MathML to LaTeX Converter

MathML Input

Latex Output

Rendered Latex

Notes

  • This page offers a tool to convert between equations written in Math Markup Language (MML) to Latex-style syntax. Why would anyoe write an equation in MML you may wonder? Well, because it is the language used by Microsoft Word (since 2007). One advantage of writing equations in Word is that you can see the rendered version in real time, but the downside is that these rendered equations cannot be 'cut-and-pasted' into a document that requires Latex syntax. However, there is a very handy work around: Word has a setting that enables equations to be "copied as MML", rather than text. The tool on this page accepts the copied version of a Word equation and outputs the equivalent Latex syntax, which can then be pasted into any text documents that supports Latex equations.
  • This tool is inspired by the code found on this repo, but was adapted to remove the extra text found in the Word output (i.e. <mml:mrow> was stripped just <mrow>). The final format of this page also evolved as a I learned some Tailwind CSS, Javascript, and MathJax.