I went through the faq which suggests the following way to achieve what I want:

- Code: Select all Expand viewCollapse view
`""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

""phantom {3(x+4)-2(x-1)}={a} over {abc}

However, if I use fractions then both numerators and denominators get left aligned, and that doesn't look good (the last line in the above example). Any idea how to centre them?

When using the matrix approach I have a similar problem.