Center-aligned fractions in a left-aligned formula

Discuss the formula editor
Post Reply
Pepe-CH
Posts: 2
Joined: Sat Mar 02, 2013 2:49 pm

Center-aligned fractions in a left-aligned formula

Post by Pepe-CH »

Hi

I'm looking for a better solution for this situation:

I need all my formulas left-aligned. But with fractions I prefer, when numerator and denominator are centered to the fraction bar.

So far I formated every single fraction with the alignc command:

Code: Select all

A = {alignc BB} over CCCC newline
CCCC = BB over {alignc A}
And I had allways to check, if the numerator or the dnominator is smaller, and the smaller part needed the alingc command to make it centered to the fraction bar.

So my question is:
Does somebody knows a better way? May be a command which has only be written once for a line?

Cheers
Pepe
My working environment: OpenOffice.org 3.4.0 - Windows Home Premium SP1
User avatar
RGB
Posts: 1456
Joined: Mon Oct 08, 2007 1:34 am

Re: Center-aligned fractions in a left-aligned formula

Post by RGB »

I cannot say it's better, but maybe easier ;) Let the alignment to centred and use one Math object for each line, instead of one object with several newline commands.
There are two types of people: those who believe that there are two types of people and those who do not.

openSUSE Leap with KDE Plasma / LibreOffice
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Center-aligned fractions in a left-aligned formula

Post by acknak »

I agree, it seems like a clunky design. I don't know of any way to make it "just work".

Maybe ... set the global (menu) alignment to centered, then ...

{alignl A} = BB over CCCC newline
{alignl CCCC} = BB over A
AOO4/LO5 • Linux • Fedora 23
Pepe-CH
Posts: 2
Joined: Sat Mar 02, 2013 2:49 pm

Re: Center-aligned fractions in a left-aligned formula

Post by Pepe-CH »

Thanks for the the answers and solutions so far.
acknak wrote:I agree, it seems like a clunky design. I don't know of any way to make it "just work".
This is bad news, but I feared that.
acknak wrote:Maybe ... set the global (menu) alignment to centered, then ...

{alignl A} = BB over CCCC newline
{alignl CCCC} = BB over A
Good idea! Better one command in the beginning as having to "fix" every single fraction.
This approach generated a new idea:

If it doesn't matter to have a small gap at the left border,
also this is a possible solution:
  • Set the global alignment in the menu to centered and then ...

    "" A = BB over CCCC newline
    "" CCCC = BB over A
With this empty text (with quote signs) at the beginning of the line, the complete line is left-aligned, but the numerator and denominator stay centered to the fraction bar.

Cheers
Pepe
My working environment: OpenOffice.org 3.4.0 - Windows Home Premium SP1
Post Reply