Skip to content

start:

Root / Math -- [Prev    -    Next ]

How do I align my equations at the equality sign?


Currently Math does not have an alignment construction. Instead you can use a matrix.

For example, to typeset the following equation:

image of resulting formula

enter the following:

matrix{ alignr x+y # {}={} # alignl 2 ## alignr x # {}={} # alignl 2-y }

The empty braces around = are necessary because = is a binary operator and thus needs an expression on each side.


Note: you can reduce the spacing around = if you change the inter-column spacing of the matrix:

  • Select Format-Spacing.
  • Click Category and choose Matrixes in the pop-up menu.
  • Now enter 0% under Column spacing.

Here is another example which uses a different solution:

To typeset the equation

image of resulting formula

use the phantom command as follows:

""3(x+4)-2(x-1)=3 x+12-(2 x-2) newline
""phantom {3(x+4)-2(x-1)}=3 x+12-2 x+2 newline
""phantom {3(x+4)-2(x-1)}=x+14

The empty quotation marks justify the line to the left. A line which begins with text (even an empty text line) will always be left justified.

You can replace "" with alignl.

Root / Math -- [Prev    -    Next ]