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: unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-16 09:01 UTC by WilfriedH
Modified: 2014-12-07 14:10 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


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

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.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.