|
If you use Loading jsMath in the Document HEAD
easy/load.js
to load jsMath, you can place the SCRIPT tag that loads it anywhere in your document. That is the easiest way to include jsMath in your web page.The usual way to load jsMath used to be with a
SCRIPT
tag within theBODY
of the document; loading jsMath in the documentHEAD
used to require additional effort, but as of version 3.0, this is no longer the case. You can now load jsMath in theHEAD
and calljsMath.Process()
orjsMath.ProcessBeforeShowing()
in the document'sonLoad
handler without ever having any jsMath calls within theBODY
of the document. The oldjsMath.Setup.Body()
call is no longer needed.The call to
jsMath.Setup.Body()
is made automatically ifjsMath.js
is loaded in the body of the document, and if not, the call is made whenjsMath.Process()
orjsMath.ProcessBeforeShowing()
is invoked. This routine is where the styles are set up, the jsMath button appears, the fonts are checked, the missing-font message is displayed, the fallback code is loaded, and so on. Having this performed at the top of the document is a help to your readers, as it will get the file loads started early, and will prevent the style changes from causing the page to change once they have seen it, which can be confusing. So if you load jsMath in the documentHEAD
, it is still a good idea to put a call tojsMath.Setup.Body()
somewhere near the top of the documentBODY
rather than waiting forjsMath.Process()
to do it at the bottom of the page.
|
|