I'm building a library that only allows objects render's functionality to to return DOM elements of the representation of themselves, one of those is math, so <img>
, <canvas>
or <svg>
will do it, I'll prefer svg.
Mathjax is known for being very good at this, but I need something more like:
Mathjax.Latex('frac{2}{1}').toSVG(); //svg DOM node or string
Mathjax.Latex('frac{2}{1}').toImage(); //Image, img node, or base64
I know it's possible with mathjax-node, but is it with mathjax client side? https://github.com/mathjax/MathJax-node
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…