You asked in a follow-up comment:
Do you know if it is somehow possible to control the spacing between the left-hand column of equations (m's) and the right-hand one?
That's actually where the alignat
and alignat*
environments very much come into their own. Consider the following three alignat*{2}
environments:
The first group shows that, in general, it's not a good idea to provide no separation instruction between the left-hand and right-hand equations. The second and third group differ only in where the instruction \qquad
is placed: it's in row 2 for the middle group, and in row 1 for the third and final group. In practice, one would (should?) place the spacing instruction (here: \qquad
) in the row for which the spacing is narrowest to begin with.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{alignat*}{2}
m&=0{:} & a&=b\\
m&=1{:} & abc&=def+1\\
m&=2{:} & e&=mc^2-H(x,y,z)
\end{alignat*}
\begin{alignat*}{2}
m&=0{:} & a&=b\\
m&=1{:} &\qquad abc&=def+1\\
m&=2{:} & e&=mc^2-H(x,y,z)
\end{alignat*}
\begin{alignat*}{2}
m&=0{:} &\qquad a&=b\\
m&=1{:} & abc&=def+1\\
m&=2{:} & e&=mc^2-H(x,y,z)
\end{alignat*}
\end{document}
&
needs to be 2x number of alignments minus 1. Som & =0: & a & = b \\
will be the first linealignedat
instead, it needs the number of alignments as a parameter. It makes the dist between alignment columns zero and thus a manual space can be added between them.aligned
/aligned*
and the embeddablealignedat
/alignedat*
environments provide ways to control the spacing between the left-hand and right-hand groups of equations.amsmath
package. Therefore, reading the user guide foramsmath
(texdoc amsldoc
) could be beneficial.