4

This MWE

\documentclass{article}

\usepackage{amsmath}

\begin{document}

$$\begin{aligned}
    \Gamma_{11}^1  & =0, \qquad \Gamma_{12}^1  & =0, \qquad \Gamma_{22}^1  & =-\frac{1}{2}G_u, \\
    G\Gamma_{11}^2 & =0, \qquad G\Gamma_{12}^2 & =\frac{1}{2}G_u, \qquad G\Gamma_{22}^2 & =0. 
\end{aligned}$$

\end{document}

Generates: enter image description here

and I can't understand why is the middle & not working, I've used it in the same way as the first and last &.

Blooment
  • 666

2 Answers2

8

Since it seems to be a common question how to correctly place ampersands in alignment environments in math, maybe it helps to illustrate it like this:

In a lot of alignment environments for math (for example align, aligned, alignat etc.), each ampersand introduces a new column and each double backslash introduces a new row. In each row, every first column is right-aligned and every second column is left-aligned.

\documentclass[varwidth]{standalone}

\usepackage{amsmath}

\begin{document}\footnotesize

\[\begin{aligned}
    \fbox{one\strut} & \fbox{two\strut} \\
    \fbox{right-aligned\strut} & \fbox{left-aligned\strut} 
\end{aligned}\]

\bigskip

\[\begin{aligned}
    \fbox{one\strut} & \fbox{two\strut} & \fbox{three\strut} & \fbox{four\strut} & \fbox{five\strut} & \fbox{six\strut} \\
    \fbox{right-aligned\strut} & \fbox{left-aligned\strut} & \fbox{right-aligned\strut} & \fbox{left-aligned\strut} & \fbox{right-aligned\strut} & \fbox{left-aligned\strut} 
\end{aligned}\]

\bigskip

\[\begin{aligned}
    \fbox{one\strut} & \fbox{two\strut} & \fbox{three\strut} & \fbox{four\strut} & \fbox{five\strut} & \fbox{six\strut} \\
    \Gamma_{11}^1  & =0, &\qquad \Gamma_{12}^1  & =0, &\qquad \Gamma_{22}^1  & =-\frac{1}{2}G_u, \\
    G\Gamma_{11}^2 & =0, & G\Gamma_{12}^2 & =\frac{1}{2}G_u, & G\Gamma_{22}^2 & =0. 
\end{aligned}\]

\end{document}

enter image description here

6

I suggest you switch to an alignedat environment and place the \qquad directives on the second line. I would also use \tfrac rather than \frac, in order to reduce the visual prominence of the fraction terms.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{alignedat}{3}
  \Gamma_{\!11}^1 &=0,       &  \Gamma_{\!12}^1 &=0,                      &  \Gamma_{\!22}^1  &=-\tfrac{1}{2}G_u, \\
 G\Gamma_{\!11}^2 &=0,\qquad & G\Gamma_{\!12}^2 &=\tfrac{1}{2}G_u, \qquad & G\Gamma_{\!22}^2  &=0 \,. 
\end{alignedat}
\]  
\end{document} 

Or, use a single alignat* environment instead of the \[ \begin{alignedat}{3} ... \end{alignedat} \] combination:

\begin{alignat*}{3}
  \Gamma_{\!11}^1 &=0,       &  \Gamma_{\!12}^1 &=0,                      &  \Gamma_{\!22}^1  &=-\tfrac{1}{2}G_u, \\
 G\Gamma_{\!11}^2 &=0,\qquad & G\Gamma_{\!12}^2 &=\tfrac{1}{2}G_u, \qquad & G\Gamma_{\!22}^2  &=0 \,. 
\end{alignat*}
Mico
  • 506,678