Bug 48645 - FORMATTING: alignr, alignl operators distort fraction representation
Summary: FORMATTING: alignr, alignl operators distort fraction representation
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
3.6.1.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks: Formula-Editor
  Show dependency treegraph
 
Reported: 2012-04-13 05:35 UTC by Yakov
Modified: 2022-06-19 03:29 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Using the 'align' command inside an equation with fractions (4.55 KB, image/png)
2012-08-11 23:01 UTC, Roberto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yakov 2012-04-13 05:35:41 UTC
Problem description: 

In systems of equations, it is usually desirable to align all the equations to the left. For instance, for this one:

left lbrace stack{
 {{dot d}_n over{n-2}} = ...
#
 longer expression
}right none

it is desirable to move the first line to the left. However, if one uses alignl "operator", he couldn't get the desirable result, because the fraction {dot d}_n over{n-2} gets distorted.

Steps to reproduce:
1. try

left lbrace stack{
 alignl {{dot d}_n over{n-2}}
#
 alignl ........................................................................
}right none

in this case, dot d_n in the fraction is moved to the left in the numerator which I consider as a bug.

2. To avoid this I tried

left lbrace stack{
 alignl {alignc {dot d}_n over{n-2}}
#
 alignl ........................................................................
}right none

but instead of just making numerator normal, this makes the whole expression aligned to the center.

Current behavior:

already described.

Expected behavior:

alignl, alignr shouldn't change the numerator at all, just never in math expressions numerator is aligned to the left or right, always to the center.

Platform (if different from the browser): 
              
Browser: Opera/9.80 (Windows NT 6.0; U; ru) Presto/2.10.229 Version/11.61
Comment 1 Christina Rossmanith 2012-08-06 19:11:23 UTC
Adding braces around alignc helps:

{{alignc {dot d}_n} over{n-2}}
Comment 2 Roberto 2012-08-11 23:01:53 UTC
Created attachment 65446 [details]
Using the 'align' command inside an equation with fractions
Comment 3 Roberto 2012-08-11 23:12:28 UTC
Dear Christina:

You are right, it works. However, imagine a L.O. Math user who needs to write the reasoning behind the process of finding the solution of an equation that contains fractions. The workaround you suggest will work, but (in my opinion) it's something excessively complicated for such a simple . For example, in order to obtain the equation displayed in the screenshot I attach (EquationwithFractions.png), you must type the following lines:

matrix
{
alignr{2 + x} # "" = "" # alignl{{alignc{1} over {x + 1}} - {alignc{2} over{3-x}} + {alignc{1} over {x-2}}}
##
alignr{2+x} # "" = "" # alignl{"more_fractions"}
}

Despite the fact this is only a basic equation, the code is 'a little bit' hard to type, read, understand, and edit. I think fractions (their numerators and denominators)should be always aligned to the center except, maybe, a very specific command is introduced.
Comment 4 Roberto 2012-08-12 17:42:56 UTC
(In reply to comment #3)
> Dear Christina:
> 
> You are right, it works. However, imagine a L.O. Math user who needs to write
> the reasoning behind the process of finding the solution of an equation that
> contains fractions. The workaround you suggest will work, but (in my opinion)
> it's something excessively complicated for such a simple . For example, in
> order to obtain the equation displayed in the screenshot I attach
> (EquationwithFractions.png), you must type the following lines:
> 
> matrix
> {
> alignr{2 + x} # "" = "" # alignl{{alignc{1} over {x + 1}} - {alignc{2}
> over{3-x}} + {alignc{1} over {x-2}}}
> ##
> alignr{2+x} # "" = "" # alignl{"more_fractions"}
> }
> 
> Despite the fact this is only a basic equation, the code is 'a little bit' hard
> to type, read, understand, and edit. I think fractions (their numerators and
> denominators)should be always aligned to the center except, maybe, a very
> specific command is introduced.

In reply to my own last comment: the attached screenshot I refer above (EquationwithFractions.png) is attachment 65446 [details], in comment written at 2012-08-11 23:01:53 UTC.
Comment 5 Roberto 2012-08-12 18:00:04 UTC
(In reply to comment #1)
> Adding braces around alignc helps:
> 
> {{alignc {dot d}_n} over{n-2}}

Dear Christina:

I tried to reply to you, but I selected the wrong option and 'added a new comment' instead of 'replying'. So, to avoid leading everybody read my reply twice, I simply ask to you to log in into bugzilla and read it. As a LibreOffice user, I'm interested in your opinion.

Kind regards.

Roberto.
Comment 6 Yakov 2012-10-14 09:14:32 UTC
(In reply to comment #1)
> Adding braces around alignc helps:
> 
> {{alignc {dot d}_n} over{n-2}}

Thanks for the reply, the workaround works.

On the other hand, the described behavior is still inconvenient, since normally no one needs to align a numerator in another manner than central, and the workaround requires more symbols => more typing, less readable code, and is not that evident.
Comment 7 Stéphane Champeau 2015-01-04 14:43:46 UTC
Hi
It's a very annoying bug
I hope this will be fixed in the future
Thanks
Comment 8 QA Administrators 2016-01-17 20:02:12 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2017-03-06 13:50:43 UTC Comment hidden (obsolete)
Comment 10 Regina Henschel 2017-06-17 18:31:26 UTC
If you want to align the content of a stack or matrix element to the left, start the content with an empty string "".
Comment 11 QA Administrators 2018-06-18 02:42:48 UTC Comment hidden (obsolete)
Comment 12 QA Administrators 2020-06-18 03:52:32 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2022-06-19 03:29:15 UTC
Dear Yakov,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug