latex3/luamml

Automatically generate MathML equivalents for math expressions in LuaLaTeX

13

stars

316

commits

Lua

primary language

Aug 14, 2026

updated

Browse cluster: TeX/LaTeX document processing and visualization

README

LuaMML: Automated LuaLaTeX math to MathML conversion

This is an attempt to implement automatic conversion of LuaLaTeX inline and display math expressions into MathML code to aid with tagging. It works best with unicode-math, but it can also be used with traditional math fonts if mappings to Unicode are provided.

Installation

Run l3build install to install luamml into your local texmf tree.

Usage

To generate MathML of your LuaLaTeX formulas you should use latex-lab-math which will internally call LuaMML. A typical example would be

\DocumentMetadata{lang=en, tagging=on, tagging-setup={math/setup=mathml-SE}}
\documentclass{article}
\usepackage{unicode-math}
\begin{document}
\[ E=mc^2 \]
\end{document}

This will automatically generate MathML nd embed it into the tagging structure of the output. See the latex-lab-math documentation for details.

License

LuaMML may be modified and distributed under the terms of the LaTeX Project Public License, version 1.3c or greater. It is written by Marcel Krüger and the LaTeX Project Team.

Contributors

zauguin

228 commits

u-fischer

87 commits

davidcarlisle

1 commits

latex3/luamml

Automatically generate MathML equivalents for math expressions in LuaLaTeX

13

stars

316

commits

Lua

primary language

Aug 14, 2026

updated

Browse cluster: TeX/LaTeX document processing and visualization

README

LuaMML: Automated LuaLaTeX math to MathML conversion

This is an attempt to implement automatic conversion of LuaLaTeX inline and display math expressions into MathML code to aid with tagging. It works best with unicode-math, but it can also be used with traditional math fonts if mappings to Unicode are provided.

Installation

Run l3build install to install luamml into your local texmf tree.

Usage

To generate MathML of your LuaLaTeX formulas you should use latex-lab-math which will internally call LuaMML. A typical example would be

\DocumentMetadata{lang=en, tagging=on, tagging-setup={math/setup=mathml-SE}}
\documentclass{article}
\usepackage{unicode-math}
\begin{document}
\[ E=mc^2 \]
\end{document}

This will automatically generate MathML nd embed it into the tagging structure of the output. See the latex-lab-math documentation for details.

License

LuaMML may be modified and distributed under the terms of the LaTeX Project Public License, version 1.3c or greater. It is written by Marcel Krüger and the LaTeX Project Team.

Contributors

zauguin

228 commits

u-fischer

87 commits

davidcarlisle

1 commits

Languages

Lua

74.5%

TeX

25.5%