title: Convert Latex/MathML to SVG or Image with mathjax or similar?
body: <p>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 <code>&lt;img&gt;</code>, <code>&lt;canvas&gt;</code> or <code>&lt;svg&gt;</code> will do it, I'll prefer svg.</p>
  
  <p>Mathjax is known for being very good at this, but I need something more like:</p>
  
  <pre><code>Mathjax.Latex('\frac{2}{1}').toSVG(); //svg DOM node or string
  Mathjax.Latex('\frac{2}{1}').toImage(); //Image, img node, or base64
  </code></pre>
  
  <p>I know it's possible with mathjax-node, but is it with mathjax client side? <a href="https://github.com/mathjax/MathJax-node" rel="noreferrer">https://github.com/mathjax/MathJax-node</a></p>