Bug 66088 - Many mathematical symbols are incorrectly exported as <mo> operators
Summary: Many mathematical symbols are incorrectly exported as <mo> operators
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:4.2.0
Keywords:
Depends on: 66279
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-23 15:30 UTC by Frédéric Wang
Modified: 2017-07-13 12:40 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Wang 2013-06-23 15:30:55 UTC
In theory, only operators like those mentioned in

http://www.w3.org/TR/MathML3/appendixc.html#oper-dict.entries-table

should be exported as <mo> elements. Symbols like emptyset, aleph, setN that are more like variables should use <mi> elements instead.
Comment 1 Jorendc 2013-06-24 22:58:52 UTC
NEW right away :).

Kind regards,
Joren
Comment 2 Frédéric Wang 2013-06-27 19:41:56 UTC
I've submitted a patch for review:

https://gerrit.libreoffice.org/#/c/4595/
Comment 3 Frédéric Wang 2013-06-27 21:57:04 UTC
Marking these bugs assigned since I've already taken them.
Comment 4 Commit Notification 2013-06-28 10:07:14 UTC
Frederic Wang committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=43cf39adff66d20862956869d11fbcc184eb5702

 fdo#66088 Export some math symbols as <mi> elements.



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.
Comment 5 Frédéric Wang 2013-06-30 11:49:56 UTC
Reopening this bug as it seems that I overlooked the NSPECIAL and NGLYPH_SPECIAL cases.

NGLYPHSPECIAL correspond to the commands uoper, boper, oper to define operators and so should still be exported as <mo> elements.

NSPECIAL correspond to the %xxxx commands. Most of them are greek letters like %alpha so should be exported as <mi> elements. Other correspond to binary operators (without syntax verification) like %and so should be exported as <mo> elements. I think users can define their own %xxxx commands so a generic way to detect whether a character is an operator is needed (bug 66279)
Comment 6 Commit Notification 2013-07-02 09:17:43 UTC
Frederic Wang committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9bb74686b1f857e791235381db632d1b5ac58296

 fdo#66088 - follow-up: handle NGLYPHSPECIAL and NSPECIAL too.



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.
Comment 7 Frédéric Wang 2013-07-03 13:34:33 UTC
This is not completely fixed and depends on bug 66279. %xxx are now exported as <mi>'s rather than <mo>'s which is OK since most of them are Greek letters. But a few commands like %noelement should be <mo>. Users can also define their own commands with the Catalog menu. See comment 5.
Comment 8 Khaled Hosny (inactive) 2013-07-03 13:50:02 UTC
OK, I overlooked that.
Comment 9 Xisco Faulí 2017-07-13 12:40:55 UTC
Setting Assignee back to default. Please assign it back to yourself if you're
still working on this issue