Using the standard "align"-command, I cannot find a way to center equations between alignment characters. Is there a different environment which is better suited for this problem? My problem is as follows

  a &=& \underbrace{\text{insert long equation here}} &=& \text{something}\\
    &=& b &=& \text{something}

where now the b would be displayed leftbound on the equals sign. I would like if it was displayed centered between the 2 equal signs, preferably right below the underbrace. I know that I can also add it to the underbrace, but that is not what I'm looking or.


1 Answer 1


You can use eqparbox; the first argument is an arbitrary label (which should be unique per usage).

Better use alignat, for this display. In any case, &=& is incorrect with align and the other amsmath environments.




  a &= \matheqbox{A}{\underbrace{\text{insert long equation here}}} &&= \text{something}\\
    &= \matheqbox{A}{b}                                             &&= \text{something}


enter image description here

  • Can your elaborate, why using &=& is incorrect with align? I know that "it works" is not a good reason for it to be correct, but it has worked for me quite well so far and I don't see any problems.
    – Sellerie
    Jul 11, 2018 at 11:32
  • @Sellerie Did you notice how big is the space after = in the &=& case?
    – egreg
    Jul 11, 2018 at 11:38
  • No, I didn't, but I guess you are right. Working with only one alignment-character appears to be better suited. Thanks so far. Also thank you for showing me the alignat-command, which might be much more suited in many equations.
    – Sellerie
    Jul 11, 2018 at 11:44

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.