1

I have two equations that I would like to split (with a split command) but have them both lined up; i.e., something like

\begin{align}
\begin{split}
a&=xxxxxxxxxxxxx\\
 &=xxxxxxxxxxxxxxx\label{1}
\intertext{and}
\begin{split}
b&=yyyyyyyyyyyyy\\
 &=yyyyyyyyyyyyyyyy\label{2}
\end{split}
\end{align}

I want the split command so that the equation labels are centered between the two lines, and the align command so that all four equal signs are lined up. What I just tried doesn't work. I tried nesting aligned within align, but the four equal signs were not lined up.

  • 1
    Please post a full minimal example that others can just copy'n'paste and try without having to add anything. Makes it a lot easier to help. – daleif Apr 25 '16 at 13:16
  • Plus I do not quite get what you are trying to do. Note that split onlt handles a single & per line, if you need more, then use aligned (also not that the number of &'s per line is (2x number of alignments -1) ) – daleif Apr 25 '16 at 13:18
  • 1
    BTW: if you remember to end the first split, then your sniplet works just fine – daleif Apr 25 '16 at 13:51
2

You're missing an \end{split} statement before \intertext.

\documentclass{article}
\usepackage{amsmath} % for "align" and "split" environments and "\intertext" macro
\begin{document}
\begin{align}
\begin{split}
a&=xxxxxxxxxxxxx\\
 &=xxxxxxxxxxxxxxx\label{1}
\end{split}  % <--- new
\intertext{and}
\begin{split}
b&=yyyyyyyyyyyyy\\
 &=yyyyyyyyyyyyyyyy\label{2}
\end{split}
\end{align}

\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.