mathjax / MathJax-node

MathJax for Node
Apache License 2.0
615 stars 97 forks source link

Replacing all LaTeX formulas on HTML page with IMG tags with URI-s for PNG images #415

Closed grishind closed 6 years ago

grishind commented 6 years ago

I'm not sure if here is the best place to ask this but I suppose one can classify this as an appeal for clearer documentation. I have an HTML document with LaTeX equations in forms $e^{i\pi}+1=0$ and \[ e^{i\pi}+1=0 \]. Reading the documentation I can't figure out how to produce an HTML document with all equations replaced with tags <img src="uri" /> where uri is a URI string for PNG image. It seems like it's supposed to be easy with mathjax-node-page and mathjax-node-svg2png, but I almost don't know JavaScript and I can't go past the examples. I hope someone could explain it to me. Thank you very much in advance!

pkra commented 6 years ago

My suggestion on StackOverflow was meant to direct you to mathjax-node-page.

There's (minimalistic) information on this at https://github.com/pkra/mathjax-node-page#mathjax-node-customization. You could start, for example, with the script in ./bin (in mj-node-page) and modify it following those instructions.