The texmath package

The texmathml library provides functions to convert LaTeX
math formulas to presentation MathML (which can be used
in HTML) or OMML (Office Math Markup Language, used in
Microsoft Office). It supports basic LaTeX and AMS
extensions, and it can parse and apply LaTeX macros.

Use the test flag to install a standalone executable,
texmath, that reads a LaTeX formula from stdin and
writes MathML to stdout.