ronkok/Temml

TeX-to-MathML conversion library in JavaScript

JavaScript

349

906 commits

updated Aug 28, 2026

See the code

README

Temml is a LaTeX-to-MathML Core JavaScript conversion utility. It is built to be lightweight.

LibraryMinified JavaScript + CSS
Temml174 KB
MathJax 2.7.5338 KB
KaTeX280 KB
TeXZilla168 KB

As a futher advantage, Temml can use local system fonts. The minimum Temml installation serves a font file that is only 10kb. Sadly, Chromium has some rendering bugs when using system fonts. It works better with the Latin Modern font, a 380 KB file.

Temml’s coverage of LaTeX functions is as good as MathJax, slightly better than KaTeX 0.16.0 and substantially better than TeXZilla. See a detailed coverage comparison.

Temml's test suite includes many rendered examples, including the Temml supported functions page and tests from Mozilla, Wikipedia, mhchem, and LaTeXML.

Temml's demonstration page is at https://temml.org/

Documentation can be found at:

Acknowledgements

I built Temml by:

  1. Forking KaTeX.

  2. Deleting half the code, removing the HTML parts and keeping the parser, the macro expander, and the MathML parts.

  3. Doing some code refactoring and many MathML bug fixes.

  4. Adding new functionality: upright lower-case Greek letters, \euro, \label{…}, \ref{…}, \prescript, \definecolor, xcolor color names, etc.

I wish to thank Khan Academy and the many volunteer KaTeX contributors. This library would not exist if KaTeX had not existed first.


Temml is released under terms of the MIT license

javascript
latex
math

Contributors

ronkok

895 commits

KTibow

3 commits

ntsd

2 commits

tmke8

2 commits

ronkok/Temml

TeX-to-MathML conversion library in JavaScript

JavaScript

349

906 commits

updated Aug 28, 2026

See the code

README

Temml is a LaTeX-to-MathML Core JavaScript conversion utility. It is built to be lightweight.

LibraryMinified JavaScript + CSS
Temml174 KB
MathJax 2.7.5338 KB
KaTeX280 KB
TeXZilla168 KB

As a futher advantage, Temml can use local system fonts. The minimum Temml installation serves a font file that is only 10kb. Sadly, Chromium has some rendering bugs when using system fonts. It works better with the Latin Modern font, a 380 KB file.

Temml’s coverage of LaTeX functions is as good as MathJax, slightly better than KaTeX 0.16.0 and substantially better than TeXZilla. See a detailed coverage comparison.

Temml's test suite includes many rendered examples, including the Temml supported functions page and tests from Mozilla, Wikipedia, mhchem, and LaTeXML.

Temml's demonstration page is at https://temml.org/

Documentation can be found at:

Acknowledgements

I built Temml by:

  1. Forking KaTeX.

  2. Deleting half the code, removing the HTML parts and keeping the parser, the macro expander, and the MathML parts.

  3. Doing some code refactoring and many MathML bug fixes.

  4. Adding new functionality: upright lower-case Greek letters, \euro, \label{…}, \ref{…}, \prescript, \definecolor, xcolor color names, etc.

I wish to thank Khan Academy and the many volunteer KaTeX contributors. This library would not exist if KaTeX had not existed first.


Temml is released under terms of the MIT license

javascript
latex
math

Contributors

ronkok

895 commits

KTibow

3 commits

ntsd

2 commits

tmke8

2 commits

Languages

JavaScript

57.1%

HTML

41.2%

CSS

1.7%