Issue 104005 - Matrix fractional alignment error
Summary: Matrix fractional alignment error
Status: CLOSED DUPLICATE of issue 5998
Alias: None
Product: Math
Classification: Application
Component: ui (show other issues)
Version: OOo 3.1
Hardware: All All
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-04 17:33 UTC by earthtone
Modified: 2009-08-05 09:38 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Example 1 (4.97 KB, application/vnd.oasis.opendocument.formula)
2009-08-04 17:34 UTC, earthtone
no flags Details
Example 2 (5.12 KB, application/vnd.oasis.opendocument.formula)
2009-08-04 17:34 UTC, earthtone
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description earthtone 2009-08-04 17:33:27 UTC
I'm having an issue trying to format formulas. Using a matrix is a good approach
when you want to line up equations (e.g. aligned on the = sign), but a problem
arises when you have fractions, such as this example:

matrix {
alignr a over {c+b} # {}={} # alignl c over{a+b} 
}

The fractions will follow the alignment of the matrix cell, which is problematic
because they should be displayed centered. The following fixes the problem for
simple expressions:

matrix { 
alignr {alignc a over {c+b}} # {}={} # alignl {alignc c over{a+b}} 
}

This uses brackets to group the fraction expressions and preserve their centered
alignment. However, if one of the expressions has more content in it, it
stretches the column and centers the fraction, ignoring the "alignl" parameter:

matrix {
alignr {alignc a over {c+b}} # {}={} # alignl {alignc c over{a+b}} ##
alignr {alignc a over {c+b}} # {}={} # alignl {alignc c over{a+b}} "The same
example with extra text" 
}

Using parentheses instead of brackets seems to provide a workaround, but it adds
unnecessary characters to the expressions:

matrix {
alignr {alignc a over {c+b}} # {}={} # alignl (alignc c over{a+b}) ##
alignr {alignc a over {c+b}} # {}={} # alignl {alignc c over{a+b}} "Notice the
proper alignment above" 
}

Is this a bug? Am I missing something obvious? We should be able to use brackets
consistently in this regard as a way to group expressions without displaying
extra code and have the formula respect the layout.
Comment 1 earthtone 2009-08-04 17:34:19 UTC
Created attachment 63954 [details]
Example 1
Comment 2 earthtone 2009-08-04 17:34:51 UTC
Created attachment 63955 [details]
Example 2
Comment 3 eric.savary 2009-08-04 19:40:59 UTC
Not a P1.
Comment 4 michael.ruess 2009-08-05 09:37:46 UTC
This problem is already tracked as issue 5998.
See also issue 20398 - maybe there you find additional information to "fine
tune" the workaround you already found.

*** This issue has been marked as a duplicate of 5998 ***
Comment 5 michael.ruess 2009-08-05 09:38:15 UTC
Closing duplicate.