TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want the equation number to be shown only at the last line, or better, somewhere in the middle of all. So instead of (1), (2), ... only (1). I use \begin{align} ... \end{align}

share|improve this question
up vote 62 down vote accepted

You can use the split environment from the amsmath package:



  a &= b \\
  &=c \\
  &=d \\

share|improve this answer
Thanks It works! – Theta30 May 6 '11 at 1:38
you could also simply put \nonumber at the end of each equation line for which you don't want an equation no. – prettygully May 6 '11 at 1:44
You could also see this question: tex.stackexchange.com/questions/13396/… – Ryan Reich May 6 '11 at 2:04
@prettygully: if the number of lines is even, then \notag (or \nonumber) won't vertically center the tag. – Gonzalo Medina May 6 '11 at 2:06
@prettygully: I think you should also write your comment as an answer. @Gonzalo Medina: sometimes you want the number at the end, rather than centered; I often do so. (While the OP prefers centered, not everyone will.) – Niel de Beaudrap May 6 '11 at 12:17

Use \nonumber to do so:

  a & b \nonumber \\ % no number is shown
  c & d \\ % there is a number
  e & f \nonumber % no number
share|improve this answer
I edited the code to remove syntax problems. – Stefan Kottwitz May 6 '11 at 18:22

you can use the aligned environment from the amsmath package:


  m &=n \\
    &=o \\
    &=p \\
  a &=b + 1 \\
  c &=d \\
  e &=f \\
  g &=h


this is generally recommended for straightforward expressions rather than embedding a sub-structure within align. see the user's manual for amsmath (amsldoc.pdf on ctan or type texdoc amsmath if you have a tex live installation).

edit: changed equation environment to gather to allow multiple sub-structures, and added an example of split as requested. since single letters on either side of the equals sign will give the illusion that everything is aligned, i lengthened one line to show that the alignments of the two sub-structures are really offset from one another. this result will get two equation numbers; either may be removed by use of \notag, but the positioning will not be optimal. sadly, i don't have a solution for that.

share|improve this answer
Mildly ironic that in an answer to a question on alignment, you had an error in your code alignment! A case of misalliance (in tribute to Britain's answer to Tom Lehrer). – Loop Space May 6 '11 at 12:48
I think this is the right answer, but with the wrong example. To typeset a multi-line equation such as a = b = c = d = e, you should not use anything from the align family, but something like split. Could you perhaps change the example so that it is something like "a = b, c = d, e = f, g = h", so that it is clearly multiple equations that you want to align. This is not just semantics; there might be a difference in the vertical spacing, and you should use the right command for the right purpose. – Jukka Suomela May 6 '11 at 12:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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