Created attachment 126310 [details] Test for italic Open attached document. It has the command {ital %GAMMA} + %GAMMA + %iGAMMA + {nitalic %iGAMMA} So you should see first and third character in italic and second and forth character upright. Export the file to MathML or extract the MathML part from the odf-file and open the result in a browser. You will see for upright characters. The exported source is <mrow> <mstyle mathvariant="italic"> <mi mathvariant="normal">Γ</mi> </mstyle> <mo stretchy="false">+</mo> <mi mathvariant="normal">Γ</mi> <mo stretchy="false">+</mo> <mi mathvariant="normal">Γ</mi> <mo stretchy="false">+</mo> <mstyle mathvariant="normal"> <mi mathvariant="normal">Γ</mi> </mstyle> </mrow> The mathvariant-attribute explicitly given in the mi-element overrides the inherited value from the mystyle-element. Therefore the structure <mstyle mathvariant="italic"> <mi mathvariant="normal">Γ</mi> </mstyle> cannot produce an italic GAMMA. The %iGAMMA characters are exported with attribute mathvariant="normal", but it should be mathvariant="italic". It seems to me, that the attribute mathvariant="normal" is erroneously always written, without any case distinction. ODF specifies, that formulas have to be written in MathML. The StarMath annotation is irrelevant for ODF and is not read by other consumers. Therefore the MathML export should not be neglected. I have used Version: 5.2.0.2 Build ID: a7567a46e5d2953c320b13eb88a3981c4f9bd1e0 CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Locale: de-DE (de_DE)
The associated internal StarMath records correctly as annotation -- allowing our correct internal use. So, isn't it mostly a broken filter (mathmlexport.cxx) issue on export in composing a matching MathML ODF Formula. On reimport do we read the MathML and filter that--or do we instead parse the annotation and recreate formula using that? If the first--would expect a whole lot more complaining as documents would fail on round trip. None the less, the MathML looks to be broken. To NEW.
LibreOffice parses the StarMath annotation if available. And yes, MathML filters have a lot of bugs. Since MS Word 2010 use of ODF is possible and MS Word 2010 can parse the MathML of the formula. The complains are so few, because people use .doc format for roundtrip, which uses MathType 3.
I have uploaded a possible fix for this issue: <https://gerrit.libreoffice.org/#/c/27604/> Comments are welcome. Note that the default value of mi's mathvariant is "italic" when the body consists of a single character: <https://www.w3.org/TR/MathML2/chapter3.html#id.3.2.3.2>.
Takeshi Abe committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=ff4217e9e4f90a8dd09e635a35665a64846b4505 tdf#101022 Export Greek symbol to MathML with correct mathvariant It will be available in 5.3.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.
Hello, Is this bug fixed? If so, could you please close it as RESOLVED FIXED?
It 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