## [Solved] Alignment of fractions on = sign?

Discuss the formula editor

### [Solved] Alignment of fractions on = sign?

Hi,

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

Posts: 31
Joined: Sat Jan 30, 2010 9:09 pm

### Re: Alignment of fractions on = sign?

Could it be the newline missing in the line above the last one?
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 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.
AOO 4.1.7 on Xubuntu 20.04 and 4.1.5 on Windows 10 (with winPenPack port).

Hagar Delest
Moderator

Posts: 28846
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

### Re: Alignment of fractions on = sign?

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)   newlinephantom {3(x+4)-2(x-1)} = 3 x+12-2 x+2     newlinephantom {3(x+4)-2(x-1)} = x+14             newlinephantom {3(x+4)-2(x-1)} = {alignc {a} over {abc}}`
AOO4/LO5 • Linux • Fedora 23

acknak
Moderator

Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

### Re: Alignment of fractions on = sign?

I tried alignc before but must have put braces after the alignc word... This way it works perfectly fine.

OOo 3.3.0, LibO 3.6.0beta1 on Winblows/Linux
kotpierdzibonk

Posts: 31
Joined: Sat Jan 30, 2010 9:09 pm

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

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

acknak
Moderator

Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3