Jeffrey.W.Dong
Jeffrey.W.Dong

Reputation: 1067

how to convert MathJax formula to img

Mathjax now is working well in my project. but there is one problem. is there any way to convert MathJax's formula(pure html and css) into a img file. that I can save.

Upvotes: 17

Views: 13904

Answers (2)

Beni Cherniavsky-Paskin
Beni Cherniavsky-Paskin

Reputation: 10039

MathJax can be configured to produce an SVG. See http://docs.mathjax.org/en/latest/output.html about the portability.

There is now an easy solution to produce SVG with mathjax on a server: https://github.com/mathjax/MathJax-node
For PNG see:
https://github.com/pkra/mathjax-node-svg2png

Upvotes: 10

Michel Hua
Michel Hua

Reputation: 1777

Obviously Mathjax wasn't made for that.

If it's just for a few equations, use a screenshot utility tool that allows you to quickly select the area you want and save it to an image.

If it's for batch work, install the real LaTeX and ImageMagick on your server to generate the images. But it's contrary to the spirit of the lightweight system that Mathjax provides and the rendering won't be the same.

https://tex.stackexchange.com/questions/35690/how-to-export-a-equation-as-a-image-without-background

Upvotes: -5

Related Questions