Bug 32362 - Bad behavior of scalable brackets with large objects
Summary: Bad behavior of scalable brackets with large objects
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version: Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard: NeedsDevEval DifficultyInteresting Sk...
Keywords:
: 40998 42812 (view as bug list)
Depends on:
Blocks: 39750
  Show dependency treegraph
 
Reported: 2010-12-13 14:37 UTC by RGB
Modified: 2014-10-24 00:08 UTC (History)
7 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Example of bad behavior for scalable brackets (15.86 KB, application/vnd.oasis.opendocument.text)
2010-12-13 14:37 UTC, RGB
Details
updated example of bad bracket behaviour (45.59 KB, application/vnd.oasis.opendocument.text)
2011-11-28 23:18 UTC, Forest Johnson
Details
Image showing how bracket characters need to be mutated (34.89 KB, image/jpeg)
2011-11-28 23:21 UTC, Forest Johnson
Details

Description RGB 2010-12-13 14:37:49 UTC
Created attachment 41094 [details]
Example of bad behavior for scalable brackets

As shown on attached document (which includes a Math object and a screenshot with the problem highlighted), if you use scalable brackets for a big object like a matrix, they became more and more "bold", something should not happen.
Comment 1 Rainer Bielefeld Retired 2010-12-14 01:13:42 UTC
[Reproducible] with "brackets.odt" and "LibreOffice 3.3.0 RC1 - WIN XP German UI  [OOO330m17 (build 3.3.0.1"

Also visible with sample document and OOo 3.1.1, OOo 3.4.-dev
Comment 2 Jean-Baptiste Faure 2010-12-18 10:57:09 UTC
Old known bug in OOo : http://www.openoffice.org/issues/show_bug.cgi?id=66848

Best regards. JBF
Comment 3 rfvuhbtg 2011-08-03 08:06:05 UTC
A workaround is to make the scalable brackets as usual, then make two more brackets (left and right) by themselves--two additional math objects, then use the Position and Size window to scale these up to the proper size, then position them on top of the bad brackets and use the align tool to make sure the good brackets and the math formula are properly aligned vertically.

But it seems like LibreOffice should be smart enough to properly scale the brackets by itself.  How does LaTeX do things like that?  Would its techniques in any way be transferable to LibreOffice?
Comment 4 rfvuhbtg 2011-08-16 15:41:00 UTC
Turns out the workaround I proposed is only possible in Impress.  In Writer, it is impossible to have two math objects overlap. 

So, can anyone do something about this?  Kinda makes LibreOffice a non-starter when it comes to putting math formulas in documents.
Comment 5 Rainer Bielefeld Retired 2011-08-23 23:21:09 UTC
@rfvuhbtg
<http://wiki.documentfoundation.org/BugReport_Details#Version>
Comment 6 Rainer Bielefeld Retired 2011-09-18 22:16:51 UTC
*** Bug 40998 has been marked as a duplicate of this bug. ***
Comment 7 peter 2011-10-24 15:17:59 UTC
Hi there - I need this bug fixed or I'll have export my thesis to word. Is there any system at libreoffice whereby I can put a bounty on this bug (say $100) and have someone else (like an admin or something) determine when its fixed, who fixed it and award the money accordingly?

Thanks,
peter.
Comment 8 rfvuhbtg 2011-11-11 07:31:11 UTC
I'd just like to add that the problem shows up for parentheses and braces as well as brackets.


I hope the developers get this bug fixed soon.  I've had to switch away from LibreOffice until this is fixed.  

This bug truly makes LibreOffice a non-starter for any kind of technical/scientific document or presentation--and those are the types of users who would tend to be most inclined to use LibreOffice over proprietary competitors as long as the quality is comparable.
Comment 9 peter 2011-11-20 19:23:54 UTC
Sorry, I have to retract the offer above as I am now slowly converting my thesis to word. I agree with rfvuhbtg above - the most likely professional users of libreoffice are people who are likely to use this functionality. Because of this bug, we can't use libreoffice to produce professional looking work.
Comment 10 Jean-Baptiste Faure 2011-11-20 21:05:27 UTC
*** Bug 42812 has been marked as a duplicate of this bug. ***
Comment 11 Jean-Baptiste Faure 2011-11-20 21:10:17 UTC
@Peter: please have a look at TexMathts extension (http://extensions.libreoffice.org/extension-center/texmaths-1)

Best regards. JBF
Comment 12 peter 2011-11-20 22:03:04 UTC
@Jean-Baptiste Faure - thanks very much for this. I'll have to redo my diagrams, but at least I get to keep using libreoffice :)
Comment 13 Forest Johnson 2011-11-28 23:18:48 UTC
Created attachment 53928 [details]
updated example of bad bracket behaviour

I made a new example document that shows more problems with the brackets.

Right now there are two kinds of brackets. Normal and Scalable.

Normal Brackets just draw the Unicode character normally. It scales in the same way all the other characters scale and lines up just like a normal characer.

Scalable Brackets do something else. I am not sure what. They scale linearly to be the same hight as the object they inclose. They are not just normal brackets that get stretched up and down. they look different from the normal brackets even when the object they enclose is one character tall.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  Fixing this _The Right Way_ is NOT an easy hack
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

It would require actual mutations of the vector (bezier) curves inside the bracket characters that are drawn. Or a custom implementation of the bracket characters.

If this was done properly there would be only one kind of bracket, which would make them easier to use and fit the sort of "just works" standard that we all aspire to have in our software.

There isn't a solution that looks good and ONLY involves scaling.

Assuming that the bracket characters don't have a lot of unnessecary bezier curve endpoints along thier curves, the solution is to:

1. design a system so that arbitrary offsets can be applied to the positions of arbitrary curve endpoints. A demo of this system would be a character that fits inline and looks just like other characters, but can have a sine wave distortion applied to the positions of its curve endpoints so that it wobbles like a skrillex song. 

2. design a new scaling system based on the previous step.  The character is placed in front of the object to inclose, and looks just like how the Normal brackets look now. Then, the curve endpoints that lie in the top third of the character are moved until thier top edge lines up with the top edge of the object to be enclosed, and the bottom third moved down in a similar fasion.


It is possible that this would produce bad curves on something like the curly brace, but in theory the curve tangents could be adjusted algorithmically based on the distance that the endpoints were moved, to compensate.
Comment 14 Forest Johnson 2011-11-28 23:21:15 UTC
Created attachment 53929 [details]
Image showing how bracket characters need to be mutated
Comment 15 Björn Michaelsen 2011-12-23 11:35:36 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 16 RGB 2011-12-23 16:51:54 UTC
The problem is present on 3.5 beta2.
Comment 17 Rainer Bielefeld Retired 2011-12-31 00:10:03 UTC
@András:
Please feel free to reassign (or reset Assignee to default) if it’s not your area or if provided information is not sufficient. Please set Status to ASSIGNED if you accept this Bug.
Comment 18 Frédéric Wang 2013-06-23 19:19:57 UTC
The right way to fix this bug is to use several glyphs to draw the brace e.g. one glyph for the top, one for the middle and one for the bottom. The rest of the brace are two vertical lines that can easily be extended to arbitrary size (e.g. by repeating a glyph for vertical bar or drawing a line). In general, you need to use some specific mathematical fonts that contain the glyphs for the most important stretchy operators e.g. the STIX fonts.

There have been discussion on the LibreOffice mailing list about using STIX fonts as well as supporting the Open Type Math table (here, at least the stretchy variants/constructions would help).

CC'ing Khaled Hosny.
Comment 19 Khaled Hosny 2013-06-23 23:11:12 UTC
I had a cursory look at Math while ago, and my impression is that it is a hopeless case, it has to be rewritten from scratch (at least the math renderer) if any sane math rendering is to be achieved.
Comment 20 peter 2013-06-24 01:18:03 UTC
A year or two ago I asked about this bug because I needed it fixed for my thesis. Someone suggested using the TexMaths Equations editor instead (it embeds LaTeX into LibreOffice). This worked perfectly and saved me from having to convert my work to word. Is there any way we could just use this instead? It properly scales brackets with large objects. I'd recommend it, because I think this bug is about a decade old.
Comment 21 Frédéric Wang 2013-06-24 06:29:00 UTC
Thanks for the replies. I have to say that I studied LibreOffice Math after some reports from MathJax users about issues with mathematical formulas. So I'm mainly concerned about getting a good MathML export at the moment so that LibreOffice users can publish their content on the Web. (Of course, I also realize it is important to have an open-source office productivity software suite with good math rendering but that's not my personal priority).

I've just posted some thoughts on what could be done in the future:
http://lists.freedesktop.org/archives/libreoffice/2013-June/053727.html
Comment 22 Joel Madero 2014-02-27 23:17:56 UTC
In order to limit the confusion between ProposedEasyHack and EasyHack and to make queries much easier we are changing ProposedEasyHack to NeedsDevEval.

Thank you and apologies for the noise
Comment 23 Jean-Baptiste Faure 2014-06-09 17:12:27 UTC
Changed version to Inherited from OOo due to comment #2.

Best regards. JBF
Comment 24 QA Administrators 2014-10-23 17:32:22 UTC
Please read this message in its entirety before responding.

Your bug was confirmed at least 1 year ago and has not had any activity on it for over a year. Your bug is still set to NEW which means that it is open and confirmed. It would be nice to have the bug confirmed on a newer version than the version reported in the original report to know that the bug is still present -- sometimes a bug is inadvertently fixed over time and just never closed.

If you have time please do the following:
1) Test to see if the bug is still present on a currently supported version of LibreOffice (preferably 4.2 or newer).
2) If it is present please leave a comment telling us what version of LibreOffice and your operating system.
3) If it is NOT present please set the bug to RESOLVED-WORKSFORME and leave a short comment telling us your version and Operating System

Please DO NOT
1) Update the version field
2) Reply via email (please reply directly on the bug tracker)
3) Set the bug to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link:
https://wiki.documentfoundation.org/QA/BugTriage

There are also other ways to get involved including with marketing, UX, documentation, and of course developing -  http://www.libreoffice.org/get-help/mailing-lists/. 

Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
Comment 25 Christopher M. Penalver 2014-10-23 23:45:46 UTC
Reproducibe in MASTER:
Version: 4.4.0.0.alpha1+
Build ID: a6b01d01f77f84517d267bdfe31de91b9050a70c
TinderBox: Win-x86@39, Branch:master, Time: 2014-10-23_07:22:13
Comment 26 peter 2014-10-24 00:08:20 UTC
Reproducible on Version: 4.2.3.3, OS X (I tested it using the sample document above).
Reading the comments above, it is clear this bug is not going to magically go away without a substantial rewrite.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.