Bug 47414 - Import of MathML into OpenOffice / LibreOffice
Summary: Import of MathML into OpenOffice / LibreOffice
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 81428 (view as bug list)
Depends on:
Blocks: MathML
  Show dependency treegraph
 
Reported: 2012-03-16 09:01 UTC by WilfriedH
Modified: 2023-03-02 00:46 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
zip archive with test files to reproduce the bug (182.99 KB, application/zip)
2012-03-16 09:01 UTC, WilfriedH
Details
Importing MathML Files (150.00 KB, image/png)
2014-07-16 12:28 UTC, rk601
Details
screenshots of equations in LO5.0.4 and LO3.3.0 (156.31 KB, application/x-zip-compressed)
2016-01-22 15:18 UTC, WilfriedH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description WilfriedH 2012-03-16 09:01:43 UTC
Created attachment 58569 [details]
zip archive with test files to reproduce the bug

This bug report is intended to remind the development team of a long standing bug in OpenOffice which is still present in LibreOffice (tested with LO 3.5.1).
It is reported in the OO tracker at https://issues.apache.org/ooo/show_bug.cgi?id=69088

The tex4ht software converts LaTeX documents into OpenOffice/LibreOffice format (.odt). Equations are converted to MathML. The MathML generated by tex4ht is valid but the import to OO and LO is broken in at least two points:

1. Multiple indices are not correctly grouped, when imported from MML.

2. An array (e.g. a LaTeX eqnarray environment) is represented in LO math as matrix. In a matrix, columns are separated by "#" and rows by "##". If a column consists of an equal sign "#=#" only, this has to be escaped like this "#{}={}#", otherwise it is displayed as "?". 
But when the equation is imported from MathML, the equal sign is NOT escaped. Note that in MathML the equal sign must not be escaped.

The attached zip file contains 
- the LaTeX source file
- the .odt file exhibiting the bugs,
- the pdf file produced by LaTeX
Comment 1 Gerry 2013-03-14 15:05:05 UTC
I agree with Wilfried. Many valid MathMl files do not import in LibreOffice. 

I do not know whether they are based on a higher version of the MathML standard. LibreOffice supports only up to version 1.01 of the standard. The current revision of MathML is 3.0.
Comment 2 Marcos Souza 2013-05-21 17:34:41 UTC
Interesting, using LO 4.0.1 we can make a workaround like this for the second equation:

matrix {{s w} # {"=" { \(  {3 + 2 i}  \)} { \(  {2  -  i}  \)}} ## {} #{"=" 6  -  3 i + 4 i  -  2 i^2} ## {} # {"=" 8 + i}}

Maybe we could change the MathML importer to not require a empty {} to align corrently, and to scape equal signal when import.

I can work in this issue.
Comment 3 rk601 2014-07-16 12:28:59 UTC
Created attachment 102920 [details]
Importing MathML Files

Many valid MathMl files do not import in LibreOffice on OS X 10.6.8 with LO Version: 4.2.5.2

Build ID: 61cb170a04bb1f12e77c884eab9192be736ec5f5. We have tested numerous MathMl files generated with MathJax.

Please see:

http://www.mathjax.org/demos/copy-and-paste/ 

Note: It is sometimes possible to import MathML files into LO by rewriting the MathMl files and changing the MathMl format and syntax.
Comment 4 QA Administrators 2015-12-20 16:05:00 UTC Comment hidden (obsolete)
Comment 5 WilfriedH 2016-01-22 15:17:26 UTC
Tested with LO5.0.4 against LO3.3.0. Problems with arrays are exactly the same. Some multiple indices are better supported in 5.0.4, some are worse in 5.0.4.
Attached: A zip file with screenshots of both 5.0.4 and 3.3.0 with differences marked by red rectangles.
Comment 6 WilfriedH 2016-01-22 15:18:50 UTC
Created attachment 122158 [details]
screenshots of equations in LO5.0.4 and LO3.3.0
Comment 7 V Stuart Foote 2016-10-29 19:15:34 UTC
*** Bug 81428 has been marked as a duplicate of this bug. ***
Comment 8 Andreas P. 2018-07-26 10:24:36 UTC
This bug seems still to exist in LO Version: 6.0.1.1
where may I donate to get someone solving it?
Comment 9 dante19031999 2020-11-18 12:13:12 UTC
(In reply to Andreas P. from comment #8)
> This bug seems still to exist in LO Version: 6.0.1.1
> where may I donate to get someone solving it?

If you have to pay the cost of a programmer working to solve it you will get ruined. I'm working around mathml, and there will be some improvements on 7.1. If there is something feasible you need to get implemented I can take a look.