I was wondering if it is possible to align equations within an two column environment so they make better use of the space.
I tried this but it did not work:
\documentclass[a4paper]{article}
\usepackage{amsmath,siunitx}
\usepackage{mathtools}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}
\noindent
\begin{align*}
t_a &= \frac{\SI{6}{\metre\per\second}}{\SI{0,6}{\metre\per\second\squared}} \\
&= \SI{10}{\second}
\\
h_a &= \frac{1}{2} \times \SI{6}{\metre\per\second\squared} \times {\SI{10}{\second}}^2 \\
&= \SI{30}{\metre}
\\
h_v &= \SI{300}{\metre} - \SI{30}{\metre} - \SI{30}{\metre} \\
&= \SI{240}{\metre}
\\
t_v &= \frac{\SI{240}{\metre}}{\SI{6}{\metre\per\second}} \\
&= \SI{40}{\second}
\\
t_t &= 2 \times (\SI{10}{\second} + \SI{40}{\second} + \SI{8}{\second} + \SI{120}{\second}) \\
&= \SI{356}{\second}
\end{align*}
\end{multicols}
\end{document}
Best Answer
The
align
andalignat
environments allow for several alignment columns. For n columns, it will require 2n – 1 ampersands. The syntax is this: each new column (no the first one) is introduced by an ampersand, and inside this column, the alignment point is set by a second ampersand.I slightly simplified your code (needless to load
amsmath
if you loadmathtools
: the latter does it for you, anf you can use abbreviations for units).Update:
To add numbers on the left side to the groups of equations (not referable tags), you can add them by hand, and have different layouts.
With
flalign*
, the numbers will be at the left margin, but the last equation in the columns will end at the right margin. Withalign*
oralignat*
, they wuill be aligned, at some distance on the left of the left column. This distance depends on the contents of the equations foralign*
, whereas you have full control withalignat*
: