I want to display an equation on multiple lines. I know that I can align multi-line equation with the split environment. But now I would like to align the equation by the equal sign and display at the end of the equation the applied operations like this:

3 * x = 15 | /3
x     = 5

So far I have this code, but I don't know which is the best way to align the applied operation.

        U_{VS1} - I_{C} \cdot R_{1} &= U_{VS1} - I_{C} \cdot R_{2} \quad \lvert \, + I_{C} \cdot R_{2} \\

split is the wrong tool for this: you need alignedat.



  &U_{VS1} - I_{C}R_{1} &&= U_{VS1} - I_{C}R_{2} \quad \lvert {} + I_{C} R_{2} \\
  &U_{VS1}              &&= U_{VS1}


The trick is to have two pairs of right-left columns, using only the left aligned ones.

enter image description here

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.