Question

I'm using Mathjax in a project I'm working on but cannot figure out how it works. I'm using MathML with the following code:

<body>
    <math>
        <mi>x</mi>
        <mo>+</mo>
        <mn>2</mn>
    </math>
</body>

This code works fine.

My understanding of XML files was that they needed to be called and interpreted via AJAX, but MathML seems to be rendered through MathJax as soon as the page loads. Is there an onload method that renders MathJax as soon as the page loads? I've tried searching the documentation for a method that converts the XML to MathJax graphics but cannot find anything. I've also tried looking for some kind of map between XML tags and Mathjax fonts but havent been able to find anything there either. Any ideas?

Was it helpful?

Solution

Yes, there is an onload handler that MathJax uses to typeset the page initially.

I'm not clear on what you are trying to accomplish, but if you need to modify the mathematics on the page after the onload handler runs, you will need to use the MathJax processing queue to issue a new typeset command. See the modifying math on the page documentation.

There is no mapping between tags and fonts (the translation is more complicated than that). Again, it would help to know what you are trying to accomplish.

The MathJax support community is more active on the MathJax user forum and the developer forum, so you might try asking there.

Davide

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top