Page 1 of 1

[Solved] Alignment of fractions on = sign?

Posted: Sat Feb 13, 2010 7:28 pm
by kotpierdzibonk
Hi,

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

Code: Select all

""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.

Re: Alignment of fractions on = sign?

Posted: Sat Feb 13, 2010 8:03 pm
by Hagar Delest
Could it be the newline missing in the line above the last one?

Code: Select all

""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 newline
""phantom {3(x+4)-2(x-1)}={a} over {abc}
Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.

Re: Alignment of fractions on = sign?

Posted: Sat Feb 13, 2010 8:04 pm
by acknak
You can also use the alignment functions to apply different alignments to localized parts of a formula:
  • ­
             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             newline
    phantom {3(x+4)-2(x-1)} = {alignc {a} over {abc}}

Re: Alignment of fractions on = sign?

Posted: Sat Feb 13, 2010 8:14 pm
by kotpierdzibonk
I tried alignc before but must have put braces after the alignc word... This way it works perfectly fine.

Thank you for your help!

Re: [solved] Alignment of fractions on = sign?

Posted: Sat Feb 13, 2010 9:56 pm
by acknak
Right. I find that confusing as well. I don't understand why some functions, like phantom, must appear just before the thing they apply to, while others, like alignc, must appear just after the braces they apply to.