Modifying Math on the Page

If you are writing a dynamic web page where content containing金宝搏188mathematics may appear after 金宝搏188MathJax has already typeset the rest ofthe page,then you will need to tell 金宝搏188MathJax to loo金宝搏188k for mathematicsin the page again when that new content is produced.To do that,你需要使用金宝搏188MathJax.Hub.Typeset()method.This will causethe preprocessors (if any were loaded) to run over the page again,andthen 金宝搏188MathJax will look for unproc金宝搏188essed mathematics on the page andtypeset it,leaving unchanged any math that has already been typeset.

You should not simply call this method directly,however.Because金宝搏188MathJax operates asynchonously (seeSynchronizing with 金宝搏188MathJaxfor details),you need to be sure thatyour call to金宝搏188MathJax.Hub.Typeset()is synchronized with theother actions that 金宝搏188MathJax is taking.For example,it may already betypesetting portions of the page,or it may be waiting for an outputjax to load,etc.,and so you need to queue the typeset action to beperformed after 金宝搏188MathJax has finished whatever else it may be doing.That may be immediately,but it may not,and there is no way to tell.

To queue the typeset action,use the command

金宝搏188.Hub.Queue(["Typeset",金宝搏188.Hub]);

This will cause 金宝搏188MathJax to typeset the page when it is next able to doso.It guarantees that the typesetting will synchronize properlywith the loading of jax,extensions,fonts,stylesheets,and otherasynchronous activity,and is the only truly safe way to ask 金宝搏188MathJaxto process additional material.

The金宝搏188MathJax.Hub.Typeset()command also accepts a parameterthat is a DOM element whose content is to be typeset.That could bea paragraph,or a

element,or even a 金宝搏188MathJax math