Bug 53143 - FORMATTING: Wrong equation alignment inside matrix cell.
Summary: FORMATTING: Wrong equation alignment inside matrix cell.
Status: RESOLVED DUPLICATE of bug 47813
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: x86 (IA32) All
: medium major
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-05 17:24 UTC by Roberto
Modified: 2012-12-02 20:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
This is how the system looks like (2.89 KB, image/jpeg)
2012-08-05 17:24 UTC, Roberto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto 2012-08-05 17:24:11 UTC
Created attachment 65144 [details]
This is how the system looks like

Problem description: wrong equation alignment inside matrix cell.

Steps to reproduce:
1. Open Libreofffice Writer
2. Go to Insert-> Formula, and insert a Math Object
3. In the command window, paste the following lines:
left none  
matrix
{ 
alignr{3 x + 2 y} # "" = "" # alignl{2} 
## 
alignr{-x- 7 y} # "" = "" # alignl{5}
}
right rbrace

Current behavior: second system's equation doesn't align to the rigth. 

Expected behavior: second system's equation should be aligned to the rigth (as you will get by deleting the '-' sign). 

Platform (if different from the browser): Ubuntu GNU/Linux, 12.04 LTS, 64 bit.
              
Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1
Comment 1 Jean-Baptiste Faure 2012-08-09 10:58:51 UTC
I reproduce this behavior with LO 3.6.0 under Ubuntu 11.10
It seems that Math can't distinguish between minus (unitary) and subtraction operators.
There is a workaround: add an small space before the minus sign.
If you want that the minus sign to be smaller than the subtraction operator, you can add the keyword uoper (unitary operator) in front of it. 

Side note: there is a "left none" missing in front of your formula. 

left none {matrix
{ 
alignr{3 x + 2 y} # "" = "" # alignl{2} 
## 
alignr{`uoper-x - 7 y} # "" = "" # alignl{5}
}}
right rbrace
Comment 2 Roberto 2012-08-11 22:00:29 UTC
Jean-Baptiste:
(1) Thank you very much for your comment. However, I think your idea is not a real solution. Of course, such an opinion is not a real contribution to the LibreOffice project, but sometimes I feel Math being treated as a 'secondary tool' inside the whole suite.For example,if you check out the 3.6 features, all you'll find for Math are some help buttons.  
(2) There isn't a missed "left none" in my formula. See above the "matrix" command.

Kind regards.

Roberto.
Comment 3 Pepe Alvarez 2012-10-04 21:38:29 UTC
I have the same problem

For example:

left( alignr matrix{ -1 # 2 ## 0 # 1} right) -> bad

If you add {} before "-" it works fine now:

left( alignr matrix{ {}-1 # 2 ## 0 # 1} right) -> good

I use LibreOffice 3.5.5 in Linux
Comment 4 Jean-Baptiste Faure 2012-10-06 13:10:38 UTC
Please, do not change version number, it designed to be the oldest version in which the bug has been observed.

Best regards. JBF
Comment 5 Regina Henschel 2012-12-02 20:56:12 UTC

*** This bug has been marked as a duplicate of bug 47813 ***