An update: as of docx4j 17.0.4 (September 2026), the answer to the original question is simply
yes — docx4j can now give you the LaTeX string of an equation directly, no OMML2MML.XSL, no MathML detour, no third-party MathML-to-LaTeX library.
The new docx4j-markdown module contains
org.docx4j.markdown.math.OmmlToLatex:
Using java Syntax Highlighting
String latex
= new OmmlToLatex
().
convertOMath(oMath
); // m:oMath -> e.g. P=\frac{1}{2}\rho AU^{3}Parsed in 0.013 seconds, using
GeSHi 1.0.8.4
It covers a published LaTeX subset (fractions, sub/superscripts, radicals, sum/integral with limits, delimiters, matrices, aligned equations, accents, Greek and common symbols); an equation outside the subset throws rather than producing something silently wrong, so you can fall back to the equation's plain text. The translation also runs in reverse (LaTeX → native OMML), and if you want a whole document rather than one equation, Docx4J.toMarkdown exports it as Markdown with the equations as $...$ LaTeX.
If you'd still rather have MathML (e.g. for an existing MathML→LaTeX toolchain), that's native now too: org.docx4j.convert.out.mathml.OmmlToMathML, no Microsoft stylesheet required.
Details:
CR-006 (TeX math ⇄ OMML) and CR-007 (OMML ⇄ MathML).