Often I have a chain of equations but later on I only want to refer that the first statement is equal to the last one. There are some options to do that:
\begin{align}
\label{equation}
a
&= b \\
&= c \\
&= d \\
&= e \\
&= f
\end{align}
Equation~\eqref{equation} gives $a=f$.
\begin{align}
a \label{equation_first}
&= b \\
&= c \\
&= d \\
&= e \\
&= f \label{equation_last}
\end{align}
Equation~\eqref{equation_first}--\eqref{equation_last} gives $a=f$.
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}
\begin{align*}
a
&= b \\
&= c \\
&= d \\
&= e \\
&= f \numberthis \label{equation2}
\end{align*}
Equation~\eqref{equation2} gives $a=f$.
\begin{equation}
\label{equation_split}
\begin{split}
a
&= b \\
&= c \\
&= d \\
&= e \\
&= f
\end{split}
\end{equation}
Equation~\eqref{equation_split} gives $a=f$.
- The first one is just bad, as (2)--(5) are displayed, but not included in the reference.
- The second one is more or less okay, but after all it is one equation while it looks like I need six equations.
- The third one is a hack I found here (alternativly I could have used
align*
and lots ofnonumber
s). This version is okay, but does not look that good. Sure, I could put the tag on the center line, but that‘s manual work (I have to (not forget to) redo that stuff after adding some lines) and there is not always a center line. - The fourth option looks quite good. However, I pretty much always used
align[*]
up to now. Are there any problems withequation+split
?
How do you tag multi line equations? Why?
equation+split
and this is absolutely the right way do go here. Split is just an aligning environment which automatically sets the single label to where you want it: to the centre.split
, it's also possible to specify that the tag is to go at the bottom (for tags on the right) or the top (for tags on the left) with the optiontbtags
.split
andaligned
below.