Section text appears misaligned
With align*
and siunitx
:
\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage[english, french, greek]{babel}
\usepackage{amsmath}
\usepackage{siunitx}
\begin{document}
\selectlanguage{english}
\section*{Excercise 1}
\selectlanguage{greek}
\begin{align*}
m &= \SI{5}{\kg}\\
t &= \SI{0}{\s}: \vec{υ} = \SI{2}{\m\per\s}\\
t' &= \SI{2}{\s}: \vec{υ} = \SI{12}{\m\per\s} \\
\mu &= 0,2\\
\vec{g} &= \SI{10}{\m\per\s\squared}
\end{align*}
\end{document}
Hi @PuperHacker and welcome to TeX-SE.
As you are a beginner let's go step by step.
Standards
There are many standards around the world. LaTeX's standard depends of the class and normally they are related to common standards in USA. I'm from Brazil and the common standard here (the one taught in elementary schools) is all paragraphs are indented.
So, first basic command \usepackage{indentfirst}
This is a MWE (Minimum Working Example). OBS: \usepackage{lipsum}
generates dummy text.
\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage{indentfirst} %(un)comment this line to test
\usepackage{lipsum}
\begin{document}
\section{title}
\lipsum[1]
\lipsum[2]
\end{document}
With \usepackage{indentfirst}
Without \usepackage{indentfirst}
Equations and Units
There are many methods to input math into LaTeX.
I must be honest here, I learned about siunitx
only after I started my own set of units commands, so there might be some better methods to use the package siunitx
.
For more info, please check: CTAN - siunitx.
A not so minimal WE follows
\documentclass{article}
\usepackage{amsmath}
\usepackage{indentfirst}
\usepackage{siunitx}
\begin{document}
\section{title}
Text $m = 5 kg$ does not result in the same as $m = 5$ kg.
With a blank line (not recommended)
\begin{equation}
m = 5 kg
\end{equation}
Without a blank line (recommended)
\begin{equation}
m = 5 kg
\end{equation}
Let's test some text commands in math mode.
Using align
\begin{align}
m & = 5 kg \\
m & = 5 \operatorname{kg} \\
m & = 5 \text{kg} \\
m & = 5 \textrm{kg} \\
m & = 5 \mathrm{kg}
\end{align}
Using split
\begin{equation}
\begin{split}
m & = 5 kg \\
m & = 5 \operatorname{kg} \\
m & = 5 \text{kg} \\
m & = 5 \textrm{kg} \\
m & = 5 \mathrm{kg}
\end{split}
\end{equation}
Align and split don't interfere with spacing, but they label equations differently.
\clearpage
And now some siunitx commands and spacing
\begin{align}
m & = 5 \si{\kilogram} \\
m & = 5 \ \si{\kilogram} \\
m & = 5 \, \si{\kilogram} \\
m & = 5 \; \si{\kilogram} \\
m & = 5 \quad \si{\kilogram} \\
m & = 5 \qquad \si{\kilogram}
\end{align}
And now some siunitx commands to better spacing comparing the ones without it.
\begin{align}
m & = 5\si{\kilogram} \\
m & = \SI{5}{\kilogram} \\
\vec{u} & = 12 \si{m/s} \\
\vec{u} & = \SI{12}{m/s} \\
\vec{u} & = \SI{12}{m \per s} \\
\vec{u} & = \SI{12}{\metre\per\second}
\end{align}
\end{document}
and the results are
In my point of view, siunitx
has the most options and is a well maintained package. If you do not want to use it, the second best approach would be \operatorname{}
due the better handling of spacing.
Generally, you will want to align to the =
sign, as was shown by leandris. Occasionally, however, you may wish to align to both the left side of the variables AND the =
sign.
\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage[english, french, greek]{babel}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{tabstackengine}
\TABstackMath
\begin{document}
\selectlanguage{english}
\section*{Exercise 1}
\selectlanguage{greek}
\[
\TABbinary
\setstackaligngap{0pt}
\setstackgap{L}{1.2\baselineskip}
\alignCenterstack{
&m&=& \SI{5}{\kg}\\
&t&=& \SI{0}{\s}: \vec{υ} = \SI{2}{\m\per\s}\\
&t'&=& \SI{2}{\s}: \vec{υ} = \SI{12}{\m\per\s} \\
&\mu&=& 0,2\\
&\vec{g}&=& \SI{10}{\m\per\s\squared}
}
\]
\end{document}