问题
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.
回答1:
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
回答2:
Firstly, even though you would have to change everything, have you considered using ASCIIMathML? You dont have to write all the equations in LaTeX. Besides that, I have not been able to find a way to convert MathJax to an image. You might try coding it and then saving the resut on the page as an image. I have not tried this but it may work. Best of luck to you!
回答3:
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
来源:https://stackoverflow.com/questions/9969587/how-to-convert-mathjax-formula-to-img