I'm trying to convert latex code embedded in an HTML document (Intended to be used with a Javascript shim) into MathML. Pandoc seems like a great tool. Following this example: http://pandoc.org/demos.html,
pandoc input.html -s --latexmathml -o output.html
Produces no change in the file. I even made a barebones blank HTML file with various text expressions to test; no change in the output. What am I missing?
http://math.etsu.edu/LaTeXMathML/ This site, linked to by Pandoc, appears to show documentation for a standalone case, but it uses a JS shim instead of outputting the MathML directly. (I think it has the browser render dynamically-rendered MathML, but doesn't actually output it to the file) It's also missing some basic functionality, like own-line functions with \begin{equation}.
I've spent several hours googling ways to accomplish this. Any ideas? The only fully-working solution I've found is https://www.mathtowebonline.com/ This website. There's also a python module called latex2mathml, but it's also missing large chunks of the spec.
You'll need the
--mathml
flag (not the--latexmathml
flag) to generate MathML and thetex_math_dollars
extension enabled for reading the math between dollar signs:Or maybe you're better off using somehting like snuggleTeX or LaTeXMathML.js...