Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rendering MathJax/MathML at compilation/preprocessing time, to create an HTML file without MathML?

I have some webpages, which make heavy use of MathJax (or MathML?) that I would like to convert into ebooks and display on my kindle, which does not support enough javascript, nor MathML. So I would like to preprocess the .html files, possibly by running MathJax during a preprocessing/compilation step, to replace uses of MathML with HTML/CSS. Are there any tools that will do this for me?

like image 928
Jason Gross Avatar asked Oct 21 '22 10:10

Jason Gross


1 Answers

You would be better off replacing the MathML by SVG rather than HTML-CSS. MathJax's HTML-CSS output is different for different browsers, operating systems, font sizes, and several other factors, so if you save the HTML generated for one situation, it may not work properly for another. The SVG output is consistent across browsers.

There are some folks who have worked on doing this sort of thing already. The svgtex project is one. Wikipedia developed Mathoid to do something similar.

like image 94
Davide Cervone Avatar answered Oct 23 '22 01:10

Davide Cervone