A have some equations that I would like to align. Some of these equations are very similar and are grouped together in a cases environment. Now, I can't manage to align all these equations to have their = sign above each other.


    a = 1 \\
        b = 2 \\
        cc = 3 
    \end{cases} \\
    ddd = 4

enter image description here

1 Answer 1


(Even equations (1) and (3) are not aligned at the = sign, they are right-aligned.)

The following solution re-uses ideas from https://tex.stackexchange.com/a/633624/255231:

  \noalign{\penalty0} %first \vsplit here
  a&=1\cr %second \vsplit here
  cc&=3\cr %third \vsplit here
\setbox1=\vsplit0 to0pt %insert \splittopskip at the top of \box0
\setbox1=\vsplit0 to12pt %split off first group
\setbox1=\vbox{\unvbox1} %give \box1 its natural height
\setbox2=\vsplit0 to12pt %split off second group
\setbox2=\vbox{\unvbox2} %give \box2 its natural height
\tabskip 0pt plus1fill
\halign to\hsize{\hfil$#$&\hfil(#)\tabskip 0pt\cr

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .