[Solved] Alignment of fractions on = sign?

Discuss the formula editor
Post Reply
kotpierdzibonk
Posts: 31
Joined: Sat Jan 30, 2010 9:09 pm

[Solved] Alignment of fractions on = sign?

Post 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.
Last edited by kotpierdzibonk on Sat Feb 13, 2010 8:15 pm, edited 1 time in total.
OOo 3.3.0, LibO 3.6.0beta1 on Winblows/Linux
User avatar
Hagar Delest
Moderator
Posts: 32628
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Alignment of fractions on = sign?

Post 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.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Alignment of fractions on = sign?

Post 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}}
AOO4/LO5 • Linux • Fedora 23
kotpierdzibonk
Posts: 31
Joined: Sat Jan 30, 2010 9:09 pm

Re: Alignment of fractions on = sign?

Post 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!
OOo 3.3.0, LibO 3.6.0beta1 on Winblows/Linux
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

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

Post 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.
AOO4/LO5 • Linux • Fedora 23
Post Reply