I want to convert MathML to LaTeX

The XSLT at

https://github.com/davidcarlisle/web-xslt/tree/master/pmml2tex

converts MathML to TeX it's been fairly extensively used over the years including generating almost all the images in Chapter 4 of the MathML3 spec (as part of a pipeline Content MathML to Presentation MathML to TeX to images.)

It currently skips maligngroup and produces

enter image description here

From the supplied XML.

It would be trivial to add the extra & by hand to restore the alignment. Changing matrix to aligned and adding two & produces

enter image description here


My answer is probably not directly following your question but I think it is useful to mention the Mathtype equation editor. This is a commercial product that plugs into Word and it allows export or conversion to LaTeX equations directly from the word document. This will remove one step from your work flow and may make sense if you need to make many conversions.

Tags:

Mathml

Msword