Bug 66024

Summary: Wide accents are not stretchy when exported to MathML
Product: LibreOffice Reporter: Frédéric Wang <fred.wang>
Component: Formula EditorAssignee: Frédéric Wang <fred.wang>
Status: RESOLVED FIXED    
Severity: normal CC: fred.wang, jorendc, quikee, rb.henschel
Priority: medium Keywords: patch
Version: 4.2.0.0.alpha0+ Master   
Hardware: All   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=66281
https://bugs.freedesktop.org/show_bug.cgi?id=65765
Whiteboard: target:4.2.0
Crash report or crash signature: Regression By:
Attachments: Patch
testcase

Description Frédéric Wang 2013-06-21 20:29:50 UTC
Created attachment 81183 [details]
Patch

This was initially discussed on the MathJax user mailing list:
https://groups.google.com/forum/#!msg/mathjax-users/x0nbdr9c47o/mwcTCudgV-MJ

widevec, widehat and widetilde have stretchy set to "false" and thus do not stretch. It seems that setting stretchy="true" is not enough to make that work in other MathML rendering engines (at least not in Firefox for widetilde). As indicated in the MathML spec (http://www.w3.org/TR/MathML3/chapter7.html#chars.comb-chars):

"In the UCS there are many combining characters that are intended to be used for the many accents of numerous different natural languages. Some of them may seem to provide markup needed for mathematical accents. They should not be used in mathematical markup. Superscript, subscript, underscript, and overscript constructions as just discussed above should be used for this purpose. Of course, combining characters may be used in multi-character identifiers as they are needed, or in text contexts."

Hence I've also replaced the combining characters for tilde/hat by their non-combining versions and that fixes the stretchy issue. For vec it seems that "U+2192 RIGHTWARDS ARROW" (MS_RIGHTARROW) is what should be used and it renders better in Firefox. But the rendering is not very good in LibreOffice (font issue?) so I've kept the "U+20D7 COMBINING RIGHT ARROW ABOVE" for now.

LibreOffice still accepts the combining accents (or otherwise some unit tests fail).
Comment 1 Frédéric Wang 2013-06-21 20:31:36 UTC
Created attachment 81184 [details]
testcase

You can try to open this testcase in Firefox to see the difference.
Comment 2 Frédéric Wang 2013-06-23 11:38:24 UTC
https://gerrit.libreoffice.org/#/c/4450/
Comment 3 Jorendc 2013-06-23 21:21:40 UTC
Nice nice :-).

Lets mark it as NEW!

Kind regards and good job,
Joren
Comment 4 Frédéric Wang 2013-06-27 21:57:05 UTC
Marking these bugs assigned since I've already taken them.
Comment 5 Commit Notification 2013-06-28 09:57:10 UTC
Frederic Wang committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6231979ce1b89ce36e0a68139c96c5c1c1e704bb

fdo#66024 - Formula Editor: make wide accents stretchy when exported to MathML



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.