Bug 75171 - normal/italic and "" are totally wrong on import of .mml file
Summary: normal/italic and "" are totally wrong on import of .mml file
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-18 19:21 UTC by Regina Henschel
Modified: 2016-10-23 15:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Source with mathvariant="normal" attribute (464 bytes, application/mathml+xml)
2014-02-18 19:21 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2014-02-18 19:21:30 UTC
Created attachment 94303 [details]
Source with mathvariant="normal" attribute

Open the attached file. It will open in Math.
The formula should look like
  int {func e^x nospace{nitalic d x}}
and does so in browser.
But LibreOffice imports it as
 { int  {italic "e"^italic "x" {italic "d" italic "x"}}}

It does not simple ignore the mathvariant="normal" attribute (which is the bug 124259 in Apache OpenOffice), but generates totally wrong formula.
1.
e, x and d are marked up as 'identifier' in the the .mml file. But LibreOffice converts them to text. Doing so, can result in the wrong font.
2.
e and d are explicitly marked with mathvariant="normal" in the file, but LibreOffice forces them to italic.
Comment 1 Julien Nabet 2014-02-18 21:35:42 UTC
Frédéric: I thought you might be interested in this one.
Comment 2 Frédéric Wang 2014-02-18 22:18:34 UTC
Last time I checked, LibreOffice MathML import was very limited and had many bugs (and I'm not sure we can preserve all the info when converting MathML => StarMath). Personally, I'm not really willing to work on MathML import and think it would probably be best to switch to MathML as the internal language.
Comment 3 Regina Henschel 2015-06-29 18:40:56 UTC
It was OK in
Version 4.1.0.0.alpha0+ (Build ID: 049ce78144650d92eb6bd73292868f73d37c901)
TinderBox: Win-x86@6, Branch:master, Time: 2013-03-29_23:59:42

It is wrong in
Version: 4.2.0.0.alpha0+
Build ID: 8624906bc437b242ea0df17801bc77d0f273f32c
TinderBox: Win-x86@6, Branch:master, Time: 2013-07-05_04:07:10

It is still wrong in current master.
Comment 4 Commit Notification 2015-08-11 13:30:01 UTC
Takeshi Abe committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#75171 wrong "italic" happens on importing MathML

It will be available in 5.1.0.

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 Xisco Faulí 2016-09-15 22:11:28 UTC
Hello,
Is this bug fixed?
If so, could you please close it as RESOLVED FIXED?
Comment 6 Regina Henschel 2016-10-23 15:15:40 UTC
The erroneous structure 'italic "x"' is fixed in Version: 5.3.0.0.alpha1+
Build ID: 8a796410ec8f440b4163b15b928347c499da7a8f
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-10-20_23:07:21
Locale: de-DE (de_DE); Calc: group

But an attribute 'mathvariant="normal"' is not honored, if set directly in a 'mi' or 'mo' element. Nevertheless, we can close this issue. I'll write a new bug report for the remaining problem.