I am trying to add this to latex, but can't find how to do it. I tried using

    \begin {align*}
        x+1 &=  y   &=  x   \\
        x   &=  y+1 &=  x   \\
    \end {align*}

but it doesn't work.. Also the {equation} only works for 2 sides Any ideas? enter image description here

  • How do you mean " the {equation} only works for 2 sides Any ideas?" ?
    – Au101
    Feb 11 '18 at 4:03

It seems you're looking for alignat.

       && x+1 &=  y   &&=  x   \\
       && x   &=  y+1 &&=  x   \\

enter image description here

  • My thoughts exactly =) The only downside is the poor spacing around the second = signs, y + 1= x is very bad with that spacing between the 1 and the =, do you know how that can be fixed, possibly a nice &{}=?
    – Au101
    Feb 11 '18 at 4:07
  • @Au101 You're right, it was not pretty. Now it's slightly better, I hope.
    – user121799
    Feb 11 '18 at 4:13
  • Yes that's much better! I'd give you another +1 if I had another to give :P I was also wondering about && but I didn't have enough confidence never actually having used alignat myself. I was about to start experimenting, but you already answered, so I thought a comment would be better =)
    – Au101
    Feb 11 '18 at 4:17
  • @Au101 I also try to avoid this as much as possible. Especially if the equation reads x+1=...=x ;-)
    – user121799
    Feb 11 '18 at 4:19

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.