Hi
I am trying to convert MathML to SVG given just MathML. Example given a file like this:
<script type="math/mml">
<math>
<mrow>
<mi>a</mi>
<mo>⁢</mo>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<mi>b</mi>
<mo>⁢ </mo>
<mi>x</mi>
<mo>+</mo>
<mi>c</mi>
</mrow>
</math>
</script>
I want to convert this into an SVG using MathJax without opening it in a browser.
My current approach is to use PhantomJS to add this MathML code to an HTML page that contains a reference to the MathJax JS and then try to open it. But PhantomJS wont replicate the browser running the MathJax JS.
I was thinking, if i can give the MathML to the MathJax script as an argument using phantomJS and generate an SVG output file? Or is there something wrong I am doing with my first approach?
Thanks,
Anshul Bhatnagar