I've just learned about math MathJax. I've read some documentation, and it looks nice but If I understood it right it scans html page for equations and automatically replace them with HTML/SVG or whatever.
My concern is that I'm generating my page from raw text (simply strings) in JS and I would like to just simply pass certain parts of it to MathJax and get html string in return. I looked at the API but unless I'm missing something, there is no such option and I can only do things like MathJax.Hub.Process().
So it would look like
- I'm creating and adding HTML elements to document based on my text.
- I'm telling MathJax to search for the content I've just created.
- MathJax is searching for text to parse and removing the content I've just added, striping out text, parsing....
- MathJax is creating it's own elements add it to document.
Is there a way (without modifying the source code) to do something like this:
- I'm passing text to MathJax, telling it what is the format.
- MathJax is returning HTML text string.
- I'm creating HTML element besed on that text and inserting it at desired place.
I hope I overlooked something.