jgm/pandoc — pull request #1491 by jkr (2014-08-06 15:28:34+00:00)
Title: Docx Reader: Use TeXMath for writing equations.

Have TeXMath write the LaTeX for us.

A few notes:

* At the moment, `m:borderBox` is just treated as a grouper.

* OMML does strange things with literal ampersands acting as aligners in equation arrays. Not xml entities. Literal ampersands, like in LaTeX. Instead of doing the absolute right and very difficult thing (split rows into columns at ampersands), at the moment we're just filtering out the ampersands in equation arrays. The alignment isn't perfect, but the other thing will require a lot of work to get right.

* Somewhere down the line, the OMML parsing and translation into TeXMath AST should be moved into TeXMath proper. I'm beginning to think that might not need the full OOXML parser, so it might not need to wait for the docx parser. I'll probably try to isolate the OMML stuff into its own internal module soon as a fist step.

* No tests yet, since I haven't quite figured out the most reliable way. But pdflatex builds everything, and everything that can be translated passes the eye test.