[Tex/LaTex] LaTex align and split

amsmath

I am trying to split an equation inside the align environment, but I get an error message each time I try to add the \begin{split} … \end{split} lines in the code below:

\begin{align} % requires amsmath; align* for no eq. number
%\begin{split}
    A & = B & C & = D \\
    & = E & &  = F \\
    & = G & & = H \\[5mm]
    I & = J & K & = L \\
    & = M & &  = N \\
    & = O & & = P
%\end{split}
\end{align}

The code runs perfectly as I typed it above, but as soon as I uncomment the split lines LaTex give me an error:
Extra alignment tab has been changed to \cr.
I am Any idea of what is not correct in this piece of code?
Thanks
DK

Best Answer

Here are two ways of obtaining what you're after:

enter image description here

\documentclass{article}
\usepackage{amsmath,array}
\begin{document}

\begin{equation}
  \begin{aligned}
    A & = B & \qquad C & = D \\
      & = E &          & = F \\
      & = G &          & = H \\[5mm]
    I & = J &        K & = L \\
      & = M &          & = N \\
      & = O &          & = P
  \end{aligned}
\end{equation}

\begin{equation}
  \renewcommand{\arraystretch}{1.2}
  \begin{array}{r@{}>{\null}l@{\qquad}r@{}>{\null}l}
    A & = B &  C & = D \\
      & = E &    & = F \\
      & = G &    & = H \\[5mm]
    I & = J &  K & = L \\
      & = M &    & = N \\
      & = O &    & = P
  \end{array}  
\end{equation}

\end{document}

The first sets an equation (resulting in a single equation number) containing an aligned environment. This allows for the regular style align delimiting.

The second sets an array inside the equation instead of an aligned environment, with similarly formatted output. Mild horizontal spacing difference stem form the different column separation lengths.