I want to typeset a number of equations with some alignment constraints, but I want to partially ignore them on certain lines. An example formatted text might look like the following when it's formatted

really really really long equation = a
      a = b                      b = c
      c = d                      d = e

where the equals signs in each column are aligned, but the top line ignores the first column of alignment. This is essentially the same question as Ignoring alignment for certain lines in an alignat environment, but that question wasn't answered satisfactorily.

The two naive ways both produce undesirable results.



  && \text{really really really long equation} &= a \\
  a &= b & b &= c

  \text{really really really long equation} &= a \\
  a &= b & b &= c

  • 1
    Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. May 21, 2013 at 21:44
  • try \llap{...} possibly combined with $...$ as the contents of \llap is text mode add to the first align* attempt.
    – daleif
    May 21, 2013 at 21:58
  • 1
    if you \usepackage{mathtools} you can use \mathllap{...}. it would work nicely in this situation. May 21, 2013 at 22:06
  • @barbarabeeton Madam, just to know is there any work to be done to incorporate mathtools like bundle into amsmath ?. May 21, 2013 at 22:14
  • 2
    @texenthusiast -- there are a number of items on the "to be considered" list for amsmath that come from mathtools. however, the much-needed upgrade of amsmath has been put off repeatedly, and is not yet firmly scheduled. other priorities have arisen, and the ams staff is not large enough to handle all the demands. May 22, 2013 at 14:32

2 Answers 2


enter image description here




&& \llap{$\displaystyle \sum_0^7 x-(1+2+3+4+5+6+7)$} &= 0\\
      a& = b &                     b &= c\\
      c& = d  &                    d &= e

  • 3
    If you want the equals sign on the left of the long expression, use \rlap instead of \llap.
    – wkschwartz
    Apr 11, 2016 at 17:17
  • 1
    So what was the trick? using &&? Or the weird llap, displaystyle?
    – CGFoX
    Aug 3, 2020 at 6:47

Use \span to merge cells. You need one \span per & you want to ignore. For example, your sample output could be produced like this:

  \text{really really really long equation} \span \span &= a \\ 
  a &= b & b &= c \\
  c &= d & d &= e
  • 1
    Span produced some odd alignment when I tried it. It wasn't centered anymore, and the shorter equations were left aligned with the long one.
    – Erik
    Apr 28, 2016 at 16:25

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.