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

Suppose that when we write an equation in the align environment and we break the equation in two lines. There is only one equation number. How can I place this number not in the last equation line, but in the middle of the two lines?

I am writting a book in the book class.)

share|improve this question

You can use aligned sub-environment, like this:


For this, the package \usepackage{amsmath} is needed.

Besides aligned, there exist also split, gathered and multlined (the last one is provided by mathtools package). All are documented in the documentation of either amsmath or mathtools.

However, this can be further improved. First, multlined can do its job very nicely and you don't even need any &s:


If you still prefer the alignment, some spaces at the beginnin of the 2nd line might be proper:

\\& \phantom{=} +3+4 % space of the width of `=`
\\& \quad +3+4 % fixed space
share|improve this answer
just curious. why is mathtools needed for this? (it's a great package, but what's asked for is provided already by amsmath.) regarding formatting, the second line of your example would be improved by coding it as &\quad{}+3+4. – barbara beeton Dec 4 '12 at 18:05
Sorry, it is not, it is only for multlined, which I prefer. I'll elaborate it. – yo' Dec 4 '12 at 18:32

This is really only a variation on what tohecz did above


        10 =&1+2 \\
            &    +3+4
        \end{split} \\
            =& 4x - 5

enter image description here

But it does illustrate how you can align across split lines (numbered as you would like) and non-split lines.

share|improve this answer
Put the & in front of the = to get the proper spacing please... – yo' Dec 4 '12 at 18:29
Either &= or ={}&. The second form is justified here because you don't want the + to align with the =. – egreg Dec 4 '12 at 18:31
@egreg true, I forgot the 2nd option. I usually put \phantom{=} there. – yo' Dec 4 '12 at 18:31

The following example is taken directly from the mathmode document (p 25), with small modifications to the spacing around operators:

enter image description here

    \frac{1}{2}\Delta(f_{ij}f^{ij}) & {}={} & 2\Bigg({\displaystyle
    \nabla_{j}\nabla_{i}(\Delta f)+{}\\
    & & {}+\nabla_{k}f_{ij}\nabla^{k}f^{ij}+f^{ij}f^{k}[2

Fundamentally, the entire equation (split in this case) is boxed in an array in order to make TeX think that you're still only working with a sincle equation.

share|improve this answer
however, I think that we have aligned and its siblings exactly to avoid doing manual tweaks like \arraycolsep=2pt. – yo' Dec 4 '12 at 18:02
Thank you both ! – John Dec 4 '12 at 18:06
@tohecz: I forgot the \arraycolsep in there from the example; I've modified it with my column specification @{}c@{}, so it's not needed anymore. – Werner Dec 4 '12 at 18:28
But still, you have to say {r@{}c@{}l} and use {}={}. I mean: there are situtations where this is useful, but it is very time-consuming and you make errors there easier. – yo' Dec 4 '12 at 18:31
@tohecz : I agree. Your proposal is faster and avoids mistakes. Plus, it works fine in an align environment. – John Dec 4 '12 at 18:34

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.