3

I was trying to use the align environment to align multiple equations on one line as described here:

https://latex.wikia.org/wiki/Align_(environment)

My code is simply:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align}
\begin{split}
a &= b  &  c &= d  &  e &= f \\
b &= a  &  d &= c  &  f &= e
\end{split}
\end{align}


\end{document}

This works well and produces the desired output, except that there is a different equation number for each line.

I tried to remove multiple equation numbers with split, as I would do if there was only one ampersand. The code is:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align}
\begin{split}
a &= b  &  c &= d  &  e &= f \\
b &= a  &  d &= c  &  f &= e
\end{split}
\end{align}


\end{document}

However, this causes the error:

l.12 \end{align}
                
! Extra alignment tab has been changed to \cr.
<template> }$\hfill \endtemplate 

Why doesn't split work in that mode (multiple ampersands per line)?

1 Answer 1

6

Use aligned instead, split only supports one & per row. Which is why my goto is always aligned, then split can be used in those few cases were it is relevant.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .