# How to make a equation have a label at the last equation using \begin{split}

How to make the label of equation at the end of the equation?

and not in the middle of equation using \begin{split}

My MWE:

$$\begin{split} A =& A+ B \\ =& A-C \\ =& d + f -d \\ =& 1234 \end{split}$$

$$A = 1234$$
• Off-topic: In order to get the typographically correct amount of spacing around the = symbols, it's essential to write &= rather than =&.
– Mico
May 3 '20 at 14:25
• @Mico. Thanks.It is strange that both way =& and &= works. But i guess &= is better. But I could not see the difference
– aan
May 3 '20 at 14:27

With the environment DispWithArrows of witharrows (which is similar to align of amsmath), you have an option to specify that you want to tag only the last line.

You may also fix globally this option with \WithArrowsOptions{tagged-lines = last}.

Of course, the first aim of witharrows is to add arrows in such alignments and that's why I've added an arrow.

\documentclass[12pt]{book}
\usepackage{witharrows}
\begin{document}
\begin{DispWithArrows}[tagged-lines = last]
A & = A+ B \\
& = A-C \Arrow{an arrow} \\
& = d + f -d \\
& = 1234
\end{DispWithArrows}
\end{document}

• Thanks. What happened if I want to specific a line to be label (either line 2, line 3). I posted another questions.
– aan
May 3 '20 at 14:28
• Take a closer look at the space around the = signs. The & should precede it: &=. May 3 '20 at 18:39
• @ Babara Beeton: You re right. I have modified. May 3 '20 at 19:13

If this features is desired in whole document, than the asmath's option tbtags solve your problem:

\documentclass{article}
\usepackage[tbtags]{amsmath}

\begin{document}
$$\begin{split} A & = A+ B \\ & = A-C \\ & = d + f -d \\ & = 1234 \end{split}$$

$$A = 1234$$
\end{document}
• @Zarco ... see the second comment in my answer ... (+1) May 3 '20 at 12:56
• +1. Do please change all instances of = & to &=, though.
– Mico
May 3 '20 at 14:23
• @Zarko, Thanks. What happened if I want to specific a line to be label (either line 2, line 3). I posted another questions. tex.stackexchange.com/questions/542050/…
– aan
May 3 '20 at 14:28
• @Mico, you are right. I (again) overlooked this misplacing in OP question. Corrected! May 3 '20 at 14:40
• @aan, I clearly stated that use of tbtag influence on all similar cases in document. If you like to change placement in just one occasions, than you should stick with other answers. May 3 '20 at 14:44

Try like this:

\documentclass[12pt,twoside,draft]{book}
\usepackage{amsmath}

\begin{document}

\begin{align}\nonumber
A &= A+ B \\\nonumber
&= A-C \\\nonumber
&= d + f -d \\
&= 1234
\end{align}

$$A = 1234$$
\end{document}

• Generally, you should stack two separate align/equation environments like that. It'd be better to include the equation into the align (and I'd probably have \nonumber just before \\ , since that's the line it's modifying). May 3 '20 at 12:33
• With =& in the align, we don't have the right space after the =. You should use &= instead. May 3 '20 at 12:49
• @Teepeemm It is just an example I suppose and I can't know if one align could be ok for the op ... He could possibly have already used one and not two, bat mau be you are right... About the \nonumber LaTeX doesn't really care if it is before or after the equation ... May 3 '20 at 12:54
• @F.Pantigny ... Yes ... right ... just copy pasted and didn't try to improve the code ... just added the code in a align environment and could nor right all that in a comment (it shows terrible ...) [Thanks ... fixed!] May 3 '20 at 12:55
• \notag is equivalent to \nonumber, and is shorter to type. May 3 '20 at 18:41