Since the format of the formulas inside OOXML is OMML, can you recommend a way to transform those to MathML (which is the standard for HTML)?
Since the format of the formulas inside OOXML is OMML, can you recommend a way to transform those to MathML (which is the standard for HTML)?
Answer
Automated approach
The OMML is found in the actual text content of the EASA XML files. E.g.:
On a computer with a reasonably new version of Microsoft Word installed, you should be able to locate this XSLT file, used by Word to enable the manual process described below:
Using normal XML-DOM processing, you can extract the OMML content – and then apply this OMML2MML.XSL stylesheet to transform the OMML to MathML.
Manual approach
To manually transform the OMML to MathML:
A. One time preparation (settings):
- Open the XML file in Word
- Select the formula and the “Equations” tab
- Select the little dropdown sign in the Conversions group on the ribbon (highlighted)
- In the Equation Options dialog, be sure to turn the “Copy MathML to the clipboard” button on. This only needs to be done once – Word will persist the setting.
B. To get MathML for an equation (see the screenshot above for the sample equation):
- Open the XML in Word
- Select the equation (as you would select any text)
- Copy (Ctrl+C)
- Open an editor (for example an XML editor)
- Create an empty XML file
- Paste (Ctrl+V) to get this result:
Last updated
28/06/2022