Issue 118138

Summary: alignl & alignr have wrong effects on fractions and stacks
Product: Math Reporter: lapsap7+ooo
Component: uiAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact: Jigisha <jigishails2000>
Severity: Normal    
Priority: P3 CC: issues, rb.henschel
Version: OOo 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Example showing the alignment problem
none
Alignment problem example rendered in OOO Write 3.3 none

Description lapsap7+ooo 2011-06-05 22:20:06 UTC
Created attachment 76588 [details]
Example showing the alignment problem

The left alignment (alignl) and right alignment (alignr) have wrong effects on fraction elements and stacks elements.

Instead of moving *just* the whole expression to the left or right on the current line, alignl and alignr also move elements within fractions and stacks which in my opinion is wrong.  In some situations it is preferable to move the whole expression to the left because otherwise it's centered and is visually not comfortable (eg alignment on the equal sign).

I'll upload an example ODT file to show this problem and an PNG image showing how it's rendered in OOO Write 3.3.
Comment 1 lapsap7+ooo 2011-06-05 22:23:26 UTC
Created attachment 76589 [details]
Alignment problem example rendered in OOO Write 3.3
Comment 2 lapsap7+ooo 2011-06-05 22:29:24 UTC
Comment on the "useful situation" in my example ODT.

The first summation is centered on the line and is thus undesirable.

The second summation is what usually people would like to have (equal sign alignment).

The third summation is just an example showing that the problem also occurs to alignr - but normally this usage is very rare.
Comment 3 Regina Henschel 2011-06-05 23:16:33 UTC
You only need to group it
Z = {1} over {x_1+y_1} + {1} over {x_2+y_2} + dotslow + {1} over {x_n+y_n} + dotslow  newline 
phantom{Z} = sum from{i} {{1} over {x_i+y_i}}
newline 
{alignl phantom{Z}} = sum from{i} {{1} over {x_i+y_i}}
newline 
{alignr phantom{Z}} = sum from{i} {{1} over {x_i+y_i}}

So I see no problem here.

BTW
""phantom{Z}} = sum from{i} {{1} over {x_i+y_i}}
is shorter than
{alignl phantom{Z}} = sum from{i} {{1} over {x_i+y_i}}
Comment 4 lapsap7+ooo 2011-06-06 07:06:00 UTC
OK, I see the trick.

When you said "group it", you actually separate it.  You just align the first element of the line (the phantom letter in this example) to force the whole expression to follow it.

This is really not so obvious.  You know, I'm more a GUI user after all.  I saw the "left align" from the "Elements" window and when I clicked it, alignl is all we got.  And explanation in Help is quite obscure (or maybe I didn't find the good section).  It would be nice if there are more graphics in the Help.  "A picture is worth a thousand words", you know.

You could mark this bug as INVALID if you like.  Thanks.
Comment 5 lapsap7+ooo 2011-06-07 20:43:30 UTC
(In reply to comment #3)
> BTW
> ""phantom{Z}} = sum from{i} {{1} over {x_i+y_i}}
> is shorter than
> {alignl phantom{Z}} = sum from{i} {{1} over {x_i+y_i}}

I come back to this last comment but I have to disagree.  Try this reduced case:

Z = ...  newline
""phantom{Z} = ... newline
{alignl phantom{Z}} = ... newline

You'll see that the second line is a little bit shifted to the right.  Visibly, "" has some width.  So, even though it's shorter, it's not suitable for visual matter.
Comment 6 Oliver-Rainer Wittmann 2012-06-13 12:30:38 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.