For cases where you’d just like to convert a single formula to, say, MathML, and don’t mind the overhead, we’ve combined the pre- and post-processing into a single, handy, command latexmlmath. For example,
will print the MathML to standard output. To convert the formula to a png image, say quad.png, use the option --mathimage=quad.png.
Note that this involves putting TeX code on the command line. You’ve got to ‘slashify’ your code in whatever way is necessary so that after your shell is finished with it, the string that is passed to latexmlmath sees is normal TeX. In the example above, in most unix-like shells, we only needed to double-up the backslashes.