Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
22
rated 0 times [  29] [ 7]  / answers: 1 / hits: 18381  / 14 Years ago, fri, march 4, 2011, 12:00:00

I need MathJax to recheck again all my page.



I mean when the page is created it does all great. But I need to call it after window.onload to reparse the page, as its contents have changed in the meantime.



How would I do such a thing?


More From » html

 Answers
93

See http://docs.mathjax.org/en/latest/advanced/typeset.html:




If you are writing a dynamic web page
where content containing mathematics
may appear after MathJax has already
typeset the rest of the page, then you
will need to tell MathJax to look for
mathematics in the page again when
that new content is produced. To do
that, you need to use the
MathJax.Hub.Typeset() method. This
will cause the preprocessors (if any
were loaded) to run over the page
again, and then MathJax will look for
unprocessed mathematics on the page
and typeset it, leaving unchanged any
math that has already been typeset.



You should not simply call this method directly, however. [You should instead] queue the typeset action, [using this] command:



MathJax.Hub.Queue([Typeset,MathJax.Hub]);




Demo here: http://cdn.mathjax.org/mathjax/latest/test/sample-dynamic.html


[#93423] Friday, March 4, 2011, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
devinjadong

Total Points: 711
Total Questions: 117
Total Answers: 100

Location: Andorra
Member since Sat, May 27, 2023
1 Year ago
devinjadong questions
Thu, Feb 17, 22, 00:00, 2 Years ago
Wed, Dec 8, 21, 00:00, 2 Years ago
Tue, Oct 27, 20, 00:00, 4 Years ago
Fri, Oct 18, 19, 00:00, 5 Years ago
;