Conversion between math formats.
The texmath library provides functions to read and write TeX math, presentation MathML, and OMML (Office Math Markup Language, used in Microsoft Office). Support is also included for converting math formats to Gnu eqn, typst, and pandoc's native format (allowing conversion, via pandoc, to a variety of different markup formats). The TeX reader supports basic LaTeX and AMS extensions, and it can parse and apply LaTeX macros. (See here for a live demo of bidirectional conversion between LaTeX and MathML.)
The package also includes several utility modules which may be useful for anyone looking to manipulate either TeX math or MathML. For example, a copy of the MathML operator dictionary is included.
Use the executable
flag to install a standalone executable, texmath
, that converts formulas from one format to another. (Use the --help
flag for a description of all functionality).
Use the server
flag to install a web server, texmath-server
, that exposes a JSON API allowing conversion of individual formulas and batches of formulas.