How to revert/undo rendering? Make commands visible as text.

281 views
Skip to first unread message

viktor.q...@gmail.com

unread,
Jan 13, 2013, 12:45:43 PM1/13/13
to mathja...@googlegroups.com
As the topic says. I would like revert/undo rendering and make the page look like it did before MathJax processed it. Preferably doing this for all math inside some given DOM element.

Essentially I want to toggle math rendering on/off. How can I achieve this?

I have found how to render new content: MathJax.Hub.Queue(['Typeset', MathJax.Hub]), or by specifying an element MathJax.Hub.Queue(['Typeset', MathJax.Hub, myElem]). Now how do I revert that?

Peter Krautzberger

unread,
Jan 13, 2013, 2:40:36 PM1/13/13
to mathja...@googlegroups.com

Anyway, there's no API for "undo". But it's easy enough to get the source of an equation and replace the MathJax output with the respective source. Check out those links to get you started.

Peter.


Viktor Qvarfordt

unread,
Jan 13, 2013, 4:52:00 PM1/13/13
to mathja...@googlegroups.com
Thanks! I must have missed that. 

This will let me do what I want, even though it's not so clean. It would be nice if something like this was in the API. But I guess this feature is very rarely needed. 

rdro...@gmail.com

unread,
Apr 29, 2013, 5:37:07 PM4/29/13
to mathja...@googlegroups.com, viktor.q...@gmail.com
I had the same need, what i did was block the javascrpt in the browser.
Reply all
Reply to author
Forward
0 new messages