commit f6087b25d1e7b9502f2a26c2ffe2a222804d9c6f parent 2eb999a5d293aa827b6f88d25741b372e6fb7297 Author: Davide P. Cervone <dpvc@union.edu> Date: Thu, 3 Mar 2011 09:28:30 -0500 Move html back to top directory and remove build directory. Add html-mathjax-site to documentation in Makefile. Fix reference to MathJax.js to use current config format. Fix references to userscripts Diffstat:
233 files changed, 14003 insertions(+), 13997 deletions(-)
diff --git a/docs/.gitignore b/docs/.gitignore @@ -0,0 +1,4 @@ +* +!.gitignore +!source +!html diff --git a/docs/Makefile b/docs/Makefile @@ -5,12 +5,12 @@ SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = -BUILDDIR = build +BUILDDIR = . # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source +ALLSPHINXOPTS = -d $(BUILDDIR)/.doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest @@ -32,6 +32,8 @@ help: @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo "" + @echo " html-mathjax-site to make the documentation for www.mathjax.org" clean: -rm -rf $(BUILDDIR)/* diff --git a/docs/build/doctrees/CSS-styles.doctree b/docs/build/doctrees/CSS-styles.doctree Binary files differ. diff --git a/docs/build/doctrees/HTML-snippets.doctree b/docs/build/doctrees/HTML-snippets.doctree Binary files differ. diff --git a/docs/build/doctrees/api/ajax.doctree b/docs/build/doctrees/api/ajax.doctree Binary files differ. diff --git a/docs/build/doctrees/api/callback.doctree b/docs/build/doctrees/api/callback.doctree Binary files differ. diff --git a/docs/build/doctrees/api/elementjax.doctree b/docs/build/doctrees/api/elementjax.doctree Binary files differ. diff --git a/docs/build/doctrees/api/html.doctree b/docs/build/doctrees/api/html.doctree Binary files differ. diff --git a/docs/build/doctrees/api/hub.doctree b/docs/build/doctrees/api/hub.doctree Binary files differ. diff --git a/docs/build/doctrees/api/index.doctree b/docs/build/doctrees/api/index.doctree Binary files differ. diff --git a/docs/build/doctrees/api/inputjax.doctree b/docs/build/doctrees/api/inputjax.doctree Binary files differ. diff --git a/docs/build/doctrees/api/jax.doctree b/docs/build/doctrees/api/jax.doctree Binary files differ. diff --git a/docs/build/doctrees/api/message.doctree b/docs/build/doctrees/api/message.doctree Binary files differ. diff --git a/docs/build/doctrees/api/object.doctree b/docs/build/doctrees/api/object.doctree Binary files differ. diff --git a/docs/build/doctrees/api/outputjax.doctree b/docs/build/doctrees/api/outputjax.doctree Binary files differ. diff --git a/docs/build/doctrees/api/queue.doctree b/docs/build/doctrees/api/queue.doctree Binary files differ. diff --git a/docs/build/doctrees/api/signal.doctree b/docs/build/doctrees/api/signal.doctree Binary files differ. diff --git a/docs/build/doctrees/api/variable.doctree b/docs/build/doctrees/api/variable.doctree Binary files differ. diff --git a/docs/build/doctrees/callbacks.doctree b/docs/build/doctrees/callbacks.doctree Binary files differ. diff --git a/docs/build/doctrees/community.doctree b/docs/build/doctrees/community.doctree Binary files differ. diff --git a/docs/build/doctrees/configuration.doctree b/docs/build/doctrees/configuration.doctree Binary files differ. diff --git a/docs/build/doctrees/dynamic.doctree b/docs/build/doctrees/dynamic.doctree Binary files differ. diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle Binary files differ. diff --git a/docs/build/doctrees/glossary.doctree b/docs/build/doctrees/glossary.doctree Binary files differ. diff --git a/docs/build/doctrees/index.doctree b/docs/build/doctrees/index.doctree Binary files differ. diff --git a/docs/build/doctrees/installation.doctree b/docs/build/doctrees/installation.doctree Binary files differ. diff --git a/docs/build/doctrees/jsMath.doctree b/docs/build/doctrees/jsMath.doctree Binary files differ. diff --git a/docs/build/doctrees/mathjax.doctree b/docs/build/doctrees/mathjax.doctree Binary files differ. diff --git a/docs/build/doctrees/mathml.doctree b/docs/build/doctrees/mathml.doctree Binary files differ. diff --git a/docs/build/doctrees/model.doctree b/docs/build/doctrees/model.doctree Binary files differ. diff --git a/docs/build/doctrees/options/FontWarnings.doctree b/docs/build/doctrees/options/FontWarnings.doctree Binary files differ. diff --git a/docs/build/doctrees/options/HTML-CSS.doctree b/docs/build/doctrees/options/HTML-CSS.doctree Binary files differ. diff --git a/docs/build/doctrees/options/MMLorHTML.doctree b/docs/build/doctrees/options/MMLorHTML.doctree Binary files differ. diff --git a/docs/build/doctrees/options/MathML.doctree b/docs/build/doctrees/options/MathML.doctree Binary files differ. diff --git a/docs/build/doctrees/options/MathMenu.doctree b/docs/build/doctrees/options/MathMenu.doctree Binary files differ. diff --git a/docs/build/doctrees/options/MathZoom.doctree b/docs/build/doctrees/options/MathZoom.doctree Binary files differ. diff --git a/docs/build/doctrees/options/NativeMML.doctree b/docs/build/doctrees/options/NativeMML.doctree Binary files differ. diff --git a/docs/build/doctrees/options/TeX.doctree b/docs/build/doctrees/options/TeX.doctree Binary files differ. diff --git a/docs/build/doctrees/options/hub.doctree b/docs/build/doctrees/options/hub.doctree Binary files differ. diff --git a/docs/build/doctrees/options/jsMath2jax.doctree b/docs/build/doctrees/options/jsMath2jax.doctree Binary files differ. diff --git a/docs/build/doctrees/options/mml2jax.doctree b/docs/build/doctrees/options/mml2jax.doctree Binary files differ. diff --git a/docs/build/doctrees/options/tex2jax.doctree b/docs/build/doctrees/options/tex2jax.doctree Binary files differ. diff --git a/docs/build/doctrees/output.doctree b/docs/build/doctrees/output.doctree Binary files differ. diff --git a/docs/build/doctrees/platforms/index.doctree b/docs/build/doctrees/platforms/index.doctree Binary files differ. diff --git a/docs/build/doctrees/platforms/movable-type.doctree b/docs/build/doctrees/platforms/movable-type.doctree Binary files differ. diff --git a/docs/build/doctrees/platforms/wordpress.doctree b/docs/build/doctrees/platforms/wordpress.doctree Binary files differ. diff --git a/docs/build/doctrees/queues.doctree b/docs/build/doctrees/queues.doctree Binary files differ. diff --git a/docs/build/doctrees/signals.doctree b/docs/build/doctrees/signals.doctree Binary files differ. diff --git a/docs/build/doctrees/start.doctree b/docs/build/doctrees/start.doctree Binary files differ. diff --git a/docs/build/doctrees/startup.doctree b/docs/build/doctrees/startup.doctree Binary files differ. diff --git a/docs/build/doctrees/synchronize.doctree b/docs/build/doctrees/synchronize.doctree Binary files differ. diff --git a/docs/build/doctrees/tex.doctree b/docs/build/doctrees/tex.doctree Binary files differ. diff --git a/docs/build/doctrees/typeset.doctree b/docs/build/doctrees/typeset.doctree Binary files differ. diff --git a/docs/build/html/CSS-styles.html b/docs/build/html/CSS-styles.html @@ -1,176 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>CSS Style Objects — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="Glossary" href="glossary.html" /> - <link rel="prev" title="Describing HTML snippets" href="HTML-snippets.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="glossary.html" title="Glossary" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="HTML-snippets.html" title="Describing HTML snippets" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="css-style-objects"> -<span id="id1"></span><h1>CSS Style Objects<a class="headerlink" href="#css-style-objects" title="Permalink to this headline">¶</a></h1> -<p>Many MathJax components allow you to specify CSS styles that control -the look of the elements they create. These are described using CSS -style objects, which are JavaScript objects that represent standard -CSS declarations. The main CSS style object is a collection of -<cite>name:value</cite> pairs where the <cite>name</cite> is the CSS selector that is being -defined, and the <cite>value</cite> is an object that gives the style for that -selector. Most often, the selector will need to be enclosed in -quotation marks, as it will contain special characters, so you would -need to use <tt class="docutils literal"><span class="pre">"#myID"</span></tt> rather than just <tt class="docutils literal"><span class="pre">#myID</span></tt> and <tt class="docutils literal"><span class="pre">"ul</span> <span class="pre">li"</span></tt> -rather than just <tt class="docutils literal"><span class="pre">ul</span> <span class="pre">li</span></tt>.</p> -<p>The value used to define the CSS style can either be a string -containing the CSS definition, or a javascript object that is itself a -collection of <cite>name:value</cite> pairs, where the <cite>name</cite> is the attribute -being defined and <cite>value</cite> is the value that attibute should be given. -Note that, since this is a JavaScript object, the pairs are separated -by commas (not semi-colons) and the values are enclosed in quotation -marks. If the name contains dashes, it should be enclosed in -quotation marks as well.</p> -<p>For example, <tt class="docutils literal"><span class="pre">jax/output/HTML-CSS/config.js</span></tt> includes the following -declaration:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">styles</span><span class="o">:</span> <span class="p">{</span> - - <span class="s2">".MathJax .merror"</span><span class="o">:</span> <span class="p">{</span> - <span class="s2">"background-color"</span><span class="o">:</span> <span class="s2">"#FFFF88"</span><span class="p">,</span> - <span class="nx">color</span><span class="o">:</span> <span class="s2">"#CC0000"</span><span class="p">,</span> - <span class="nx">border</span><span class="o">:</span> <span class="s2">"1px solid #CC0000"</span><span class="p">,</span> - <span class="nx">padding</span><span class="o">:</span> <span class="s2">"1px 3px"</span><span class="p">,</span> - <span class="s2">"font-family"</span><span class="o">:</span> <span class="s2">"serif"</span><span class="p">,</span> - <span class="s2">"font-style"</span><span class="o">:</span> <span class="s2">"normal"</span><span class="p">,</span> - <span class="s2">"font-size"</span><span class="o">:</span> <span class="s2">"90%"</span> - <span class="p">},</span> - - <span class="s2">".MathJax_Preview"</span><span class="o">:</span> <span class="p">{</span><span class="nx">color</span><span class="o">:</span> <span class="s2">"#888888"</span><span class="p">},</span> - -<span class="p">}</span> -</pre></div> -</div> -<p>This defines two CSS styles, one for the selector <tt class="docutils literal"><span class="pre">.MathJax</span> -<span class="pre">.merror</span></tt>, which specifies a background color, foreground color, -border, and so on, and a second for <tt class="docutils literal"><span class="pre">.MathJax_Preview</span></tt> that sets its -color.</p> -<p>You can add as many such definitions to a <tt class="docutils literal"><span class="pre">styles</span></tt> object as you -wish. Note, however, that since this is a JavaScript object, the -selectors must be unique (e.g., you can’t use two definitions for -<tt class="docutils literal"><span class="pre">"img"</span></tt>, for example, as only the last one would be saved). If you -need to use more than one entry for a single selector, you can add -comments like <tt class="docutils literal"><span class="pre">/*</span> <span class="pre">1</span> <span class="pre">*/</span></tt> and <tt class="docutils literal"><span class="pre">/*</span> <span class="pre">2</span> <span class="pre">*/</span></tt> to the selector to make them -unique.</p> -<p>It is possible to include selectors like <tt class="docutils literal"><span class="pre">"@media</span> <span class="pre">print"</span></tt>, in which -case the value is a CSS style object. For example:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">styles</span><span class="o">:</span> <span class="p">{</span> - <span class="s2">"@media print"</span><span class="o">:</span> <span class="p">{</span> - <span class="s2">".MathJax .merror"</span><span class="o">:</span> <span class="p">{</span> - <span class="s2">"background-color"</span><span class="o">:</span> <span class="s2">"white"</span><span class="p">,</span> - <span class="nx">border</span><span class="o">:</span> <span class="mi">0</span> - <span class="p">}</span> - <span class="p">}</span> -<span class="p">}</span> -</pre></div> -</div> -<p>The various extensions and output processors include more examples of -CSS style objects, so see the code for those files for additional -samples. In particular, the <tt class="docutils literal"><span class="pre">extensions/MathMenu.js</span></tt>, -<tt class="docutils literal"><span class="pre">extensions/MathZoom.js</span></tt>, <tt class="docutils literal"><span class="pre">extensions/FontWarnsing.js</span></tt>, and -<tt class="docutils literal"><span class="pre">jax/output/HTML-CSS/jax.js</span></tt> files include such definitions.</p> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="HTML-snippets.html" - title="previous chapter">Describing HTML snippets</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="glossary.html" - title="next chapter">Glossary</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/CSS-styles.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="glossary.html" title="Glossary" - >next</a> |</li> - <li class="right" > - <a href="HTML-snippets.html" title="Describing HTML snippets" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/HTML-snippets.html b/docs/build/html/HTML-snippets.html @@ -1,173 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Describing HTML snippets — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="CSS Style Objects" href="CSS-styles.html" /> - <link rel="prev" title="Converting to MathJax from jsMath" href="jsMath.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="CSS-styles.html" title="CSS Style Objects" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="jsMath.html" title="Converting to MathJax from jsMath" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="describing-html-snippets"> -<span id="html-snippets"></span><h1>Describing HTML snippets<a class="headerlink" href="#describing-html-snippets" title="Permalink to this headline">¶</a></h1> -<p>A number of MathJax configuration options allow you to specify an HTML -snippet using a JavaScript object. This lets you include HTML in your -configutation files even though they are not HTML files themselves. -The format is fairly simple, but flexible enough to let you represent -complicated HTML trees.</p> -<p>An HTML snippet is an array consisting of a series of elements that format -the HTML tree. Those elements are one of two things: either a string, -which represents text to be included in the snippet, or an array, -which represents an HTML tag to be included. In the latter case, the -array consists of three items: a string that is the tag name (e.g., -“img”), an optional object that gives attributes for the tag (as -described below), and an optional HTML snippet array that gives the -contents of the tag.</p> -<p>When attributes are provided, they are given as <cite>name:value</cite> pairs, -with the <cite>name</cite> giving the attribute name, and <cite>value</cite> giving its -value. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[[</span><span class="s2">"img"</span><span class="p">,{</span><span class="nx">src</span><span class="o">:</span><span class="s2">"/images/mypic.jpg"</span><span class="p">}]]</span> -</pre></div> -</div> -<p>represents an HTML snippet that includes one element: an <tt class="docutils literal"><span class="pre"><img></span></tt> tag -with <tt class="docutils literal"><span class="pre">src</span></tt> set to <tt class="docutils literal"><span class="pre">/images/mypic.jpg</span></tt>. That is, this is -equivalent to</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><img</span> <span class="na">src=</span><span class="s">"/images/mypic.jpg"</span><span class="nt">></span> -</pre></div> -</div> -<p>Note that the snippet has two sets of square brackets. The outermost -one is for the array that holds the snippet, and the innermost set is -because the first (and only) element in the snippet is a tag, not -text. Note that the code <tt class="docutils literal"><span class="pre">["img",{src:"/images/mypic.jpg"}]</span></tt> -is invalid as an HTML snippet. It would represent a snippet that -starts with “img” as text in the snippet (not a tag), but the second -item is neither a string nor an array, and so is illegal. This is a -common mistake that should be avoided.</p> -<p>A more complex example is the following:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[</span> - <span class="s2">"Please read the "</span><span class="p">,</span> - <span class="p">[</span><span class="s2">"a"</span><span class="p">,{</span><span class="nx">href</span><span class="o">:</span><span class="s2">"instructions.html"</span><span class="p">},[</span><span class="s2">"instructions"</span><span class="p">]],</span> - <span class="s2">" carefully before proceeding"</span> -<span class="p">]</span> -</pre></div> -</div> -<p>which is equivalent to</p> -<div class="highlight-html"><div class="highlight"><pre>please read the <span class="nt"><a</span> <span class="na">href=</span><span class="s">"instructions.html"</span><span class="nt">></span>instructions<span class="nt"></a></span> carefully -before proceeding. -</pre></div> -</div> -<p>A final example shows how to set style attributes on an object:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[[</span><span class="s2">"span"</span><span class="p">,</span> - <span class="p">{</span> - <span class="nx">id</span><span class="o">:</span><span class="s2">"mySpan"</span><span class="p">,</span> - <span class="nx">style</span><span class="o">:</span> <span class="p">{</span><span class="nx">color</span><span class="o">:</span><span class="s2">"red"</span><span class="p">,</span> <span class="s2">"font-weight"</span><span class="o">:</span><span class="s2">"bold"</span><span class="p">}</span> - <span class="p">},</span> - <span class="p">[</span><span class="s2">" This is bold text shown in red "</span><span class="p">]</span> -<span class="p">]]</span> -</pre></div> -</div> -<p>which is equivalent to</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><span</span> <span class="na">id=</span><span class="s">"mySpan"</span> <span class="na">style=</span><span class="s">"color: red; font-weight: bold;"</span><span class="nt">></span> -This is bold text shown in red -<span class="nt"></span></span> -</pre></div> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="jsMath.html" - title="previous chapter">Converting to MathJax from jsMath</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="CSS-styles.html" - title="next chapter">CSS Style Objects</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/HTML-snippets.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="CSS-styles.html" title="CSS Style Objects" - >next</a> |</li> - <li class="right" > - <a href="jsMath.html" title="Converting to MathJax from jsMath" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/_sources/dynamic.txt b/docs/build/html/_sources/dynamic.txt @@ -1,181 +0,0 @@ -.. _ajax-mathjax: - -*************************** -Loading MathJax Dynamically -*************************** - -MathJax is designed to be included via a ``<script>`` tag in the -``<head>`` section of your HTML document, and it does rely on being -part of the original document in that it uses an ``onload`` event -handler to synchronize its actions with the loading of the page. -If you wish to insert MathJax into a document after it has -been loaded, that will normally occur *after* the page's ``onload`` -handler has fired, and so MathJax will not be able to tell if it is -safe for it to process the contents of the page. Indeed, it will wait -forever for its ``onload`` handler to fire, and so will never process -the page. - -To solve this problem, you will need to call MathJax's ``onload`` -handler yourself, to let it know that it is OK to typeset the -mathematics on the page. You accomplish this by calling the -:meth:`MathJax.Hub.Startup.onload()` method as part of your MathJax -startup script. To do this, you will need to give MathJax an in-line -configuration, so you will not be able to use the -``config/MathJax.js`` file (though you can add it to your in-line -configuration's `config` array). - -Here is an example of how to load and configure MathJax dynamically: - -.. code-block:: javascript - - (function () { - var script = document.createElement("script"); - script.type = "text/javascript"; - script.src = "/MathJax/MathJax.js"; // use the location of your MathJax - - var config = 'MathJax.Hub.Config({' + - 'extensions: ["tex2jax.js"],' + - 'jax: ["input/TeX","output/HTML-CSS"]' + - '});' + - 'MathJax.Hub.Startup.onload();'; - - if (window.opera) {script.innerHTML = config} - else {script.text = config} - - document.getElementsByTagName("head")[0].appendChild(script); - })(); - -Be sure to set the ``src`` to the correct URL for your copy of -MathJax. You can adjust the ``config`` variable to your needs, but be -careful to get the commas right. The ``window.opera`` test is because -Opera doesn't handle setting ``script.text`` properly, while Internet -Explorer doesn't handle setting the ``innerHTML`` of a script tag. - -Here is a version that uses the ``config/MathJax.js`` file to -configure MathJax: - -.. code-block:: javascript - - (function () { - var script = document.createElement("script"); - script.type = "text/javascript"; - script.src = "/MathJax/MathJax.js"; // use the location of your MathJax - - var config = 'MathJax.Hub.Config({ config: "MathJax.js" }); ' + - 'MathJax.Hub.Startup.onload();'; - - if (window.opera) {script.innerHTML = config} - else {script.text = config} - - document.getElementsByTagName("head")[0].appendChild(script); - })(); - -Note that the **only** reliable way to configure MathJax is to use an -in-line configuration of the type discussed above. You should **not** -call :meth:`MathJax.Hub.Config()` directly in your code, as it will -not run at the correct time --- it will either run too soon, in which -case ``MathJax`` may not be defined and the function will throw an -error, or it will run too late, after MathJax has already finished its -configuration process, so your changes will not have the desired -effect. - - -MathJax and GreaseMonkey -======================== - -You can use techniques like the ones discussed above to good effect in -GreaseMonkey scripts. There are GreaseMonkey work-alikes for all the -major browsers: - -- Firefox: `GreaseMonkey <http://addons.mozilla.org/firefox/addon/748>`_ -- Safari: `GreaseKit <http://8-p.info/greasekit/>`_ (also requires `SIMBL <http://www.culater.net/software/SIMBL/SIMBL.php>`_) -- Opera: Built-in (`instructions <http://www.ghacks.net/2008/08/10/greasemonkey-in-opera/>`_) -- Internet Explorer: `IEPro7 <http://www.ie7pro.com/>`_ -- Chrome: Built-in for recent releases - -Note, however, that most browsers don't allow you to insert a script -that loads a ``file://`` URL into a page that comes from the web (for -security reasons). That means that you can't have your GreaseMonkey -script load a local copy of MathJax, so you have to refer to a -server-based copy. In the scripts below, you need to insert the URL -of a copy of MathJax from your own server. - ----- - -Here is a script that runs MathJax in any document that contains -MathML (whether its includes MathJax or not). That allows -browsers that don't have native MathML support to view any web pages -with MathML, even if they say it only works in Forefox and -IE+MathPlayer. - -.. code-block:: javascript - - // ==UserScript== - // @name MathJax MathML - // @namespace http://www.mathjax.org/ - // @description Insert MathJax into pages containing MathML - // @include * - // ==/UserScript== - - if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) { - if ((document.getElementsByTagName("math").length > 0) || - (document.getElementsByTagNameNS == null ? false : - (document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) { - var script = document.createElement("script"); - script.src = "http://www.yoursite.edu/MathJax/MathJax.js"; // put your URL here - var config = 'MathJax.Hub.Config({' + - 'extensions:["mml2jax.js"],' + - 'jax:["input/MathML","output/HTML-CSS"]' + - '});' + - 'MathJax.Hub.Startup.onload()'; - if (window.opera) {script.innerHTML = config} else {script.text = config} - document.getElementsByTagName("head")[0].appendChild(script); - } - } - -**Source**: `mathjax_mathml.user.js <_statis/mathjax_mathml.user.js>`_ - ----- - -Here is a script that runs MathJax in Wikipedia pages after first -converting the math images to their original TeX code. - -.. code-block:: javascript - - // ==UserScript== - // @name MathJax in Wikipedia - // @namespace http://www.mathjax.org/ - // @description Insert MathJax into Wikipedia pages - // @include http://en.wikipedia.org/wiki/* - // ==/UserScript== - - if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) { - // - // Replace the images with MathJax scripts of type math/tex - // - var images = document.getElementsByTagName('img'); - for (var i = images.length - 1; i >= 0; i--) { - var img = images[i]; - if (img.className === "tex") { - var script = document.createElement("script"); script.type = "math/tex"; - if (window.opera) {script.innerHTML = img.alt} else {script.text = img.alt} - img.parentNode.replaceChild(script,img); - } - } - // - // Load MathJax and have it process the page - // - var script = document.createElement("script"); - script.src = "http://www.yoursite.edu/MathJax/MathJax.js"; // put your URL here - var config = 'MathJax.Hub.Config({' + - 'config: ["MMLorHTML.js"],' + - 'extensions:["TeX/noErrors.js","TeX/noUndefined.js",' + - '"TeX/AMSmath.js","TeX/AMSsymbols.js"],' + - 'jax:["input/TeX"]' + - '});' + - 'MathJax.Hub.Startup.onload()'; - if (window.opera) {script.innerHTML = config} else {script.text = config} - document.getElementsByTagName("head")[0].appendChild(script); - } - -**Source**: `mathjax_wikipedia.user.js <_statis/mathjax_wikipedia.user.js>`_ diff --git a/docs/build/html/api/ajax.html b/docs/build/html/api/ajax.html @@ -1,409 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax.Ajax Object — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="The MathJax API" href="index.html" /> - <link rel="next" title="The MathJax.Message Object" href="message.html" /> - <link rel="prev" title="The MathJax.Hub Object" href="hub.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="message.html" title="The MathJax.Message Object" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="hub.html" title="The MathJax.Hub Object" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-ajax-object"> -<span id="api-ajax"></span><h1>The MathJax.Ajax Object<a class="headerlink" href="#the-mathjax-ajax-object" title="Permalink to this headline">¶</a></h1> -<p>The <cite>MathJax.Ajax</cite> structure holds the data and functions for handling -loading of external modules. Modules are loaded only once, even if -called for in several places. The loading of files is asynchronous, -and so the code that requests an external module will continue to run -even when that module has not completed loading, so it is important to -be aware of the timing issues this may cause. Similarly, creating or -loading stylesheets is an asynchronous action. In particular, all -actions that rely on the file or stylesheet having been loaded must be -delayed until after the file has been downloaded completely. This is -the reason for the large number of routines that take callback -functions.</p> -<p>Any operation that could cause the loading of a file or stylesheet -must be synchronized with the rest of the code via such callbacks. -Since processing any mathematics might cause files to be loaded (e.g., -little-used markup might be implemented in an extension that is loaded -only when that markup is used), any code that dynamically typesets -mathematics will need to be structured to use callbacks to guarantee -that the mathematics has been completely processed before the code -tries to use it. See the <a class="reference internal" href="../synchronize.html#synchronization"><em>Synchronizing with MathJax</em></a> -documentation for details on how to do this properly.</p> -<div class="section" id="properties"> -<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">timeout</tt></dt> -<dd><p>Number of milliseconds to wait for a file to load before -it is considered to have failed to load.</p> -<p><em>Default:</em> 20 seconds</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">STATUS.OK</tt></dt> -<dd><p>The value used to indicate that a file load has occurred -successfully.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">STATUS.ERROR</tt></dt> -<dd><p>The value used to indicate that a file load has caused an error or -a timeout to occur.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">loaded</tt></dt> -<dd><p>An object containing the names of the files that have been loaded (or -requested) so far. <tt class="docutils literal"><span class="pre">MathJax.Ajax.loaded["file"]</span></tt> will be -non-<tt class="docutils literal"><span class="pre">null</span></tt> when the file has been loaded, with the value being -the <tt class="docutils literal"><span class="pre">MathJax.Ajax.STATUS</span></tt> value of the load attempt.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">loading</tt></dt> -<dd><p>An object containing the files that are currently loading, the -callbacks that are to be run when they load or timeout, and -additional internal data.</p> -</dd></dl> - -</div> -<div class="section" id="methods"> -<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> -<dl class="method"> -<dt id="Require"> -<tt class="descname">Require</tt><big>(</big><em>file</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Require" title="Permalink to this definition">¶</a></dt> -<dd><p>Loads the given file if it hasn’t been already. The file must be a -JavaScript file or a CSS stylesheet; i.e., it must end in <tt class="docutils literal"><span class="pre">.js</span></tt> -or <tt class="docutils literal"><span class="pre">.css</span></tt>. Alternatively, it can be an object with a single -<cite>key:value</cite> pair where the <cite>key</cite> is one of <tt class="docutils literal"><span class="pre">js</span></tt> or <tt class="docutils literal"><span class="pre">css</span></tt> and -the <cite>value</cite> is the file of that type to be loaded (this makes it -possible to have the file be created by a CGI script, for example, -or to use a <tt class="docutils literal"><span class="pre">data::</span></tt> URL). The file must be relative to the -MathJax home directory and can not contain <tt class="docutils literal"><span class="pre">../</span></tt> file path -components.</p> -<p>When the file is completely loaded and run, the <cite>callback</cite>, if -provided, will be executed passing it the status of the file load. -If there was an error while loading the file, or if the file fails -to load within the time limit given by <tt class="docutils literal"><span class="pre">MathJax.Ajax.timout</span></tt>, -the status will be <tt class="docutils literal"><span class="pre">MathJax.Ajax.STATUS.ERROR</span></tt> otherwise it -will be <tt class="docutils literal"><span class="pre">MathJax.Ajax.STATUS.OK</span></tt>. If the file is already -loaded, the callback will be called immediately and the file will -not be loaded again.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>file</strong> — name of the file to be loaded</li> -<li><strong>callback</strong> — the callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="Load"> -<tt class="descname">Load</tt><big>(</big><em>file</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Load" title="Permalink to this definition">¶</a></dt> -<dd><p>Used internally to load a given file without checking if it -already has been loaded, or where it is to be found.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>file</strong> — name of the file to be loaded</li> -<li><strong>callback</strong> — the callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="loadComplete"> -<tt class="descname">loadComplete</tt><big>(</big><em>file</em><big>)</big><a class="headerlink" href="#loadComplete" title="Permalink to this definition">¶</a></dt> -<dd><p>Called from within the loaded files to inform MathJax that the -file has been completely loaded and initialized. The <cite>file</cite> -parameter is the name of the file that has been loaded. This -routine will cause any callback functions registered for the file -or included in the :meth:<tt class="docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> calls to be -executed, passing them the status or the load -(<cite>MathJax.Ajax.STATUS.OK`</cite> or <tt class="docutils literal"><span class="pre">MathJax.Ajax.STATUS.ERROR</span></tt>) as -their last parameter.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>file</strong> — name of the file that has been loaded</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="loadTimeout"> -<tt class="descname">loadTimeout</tt><big>(</big><em>file</em><big>)</big><a class="headerlink" href="#loadTimeout" title="Permalink to this definition">¶</a></dt> -<dd><p>Called when the timeout period is over and the file hasn’t loaded. -This indicates an error condition, and the -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.loadError()</span></tt> method will be executed, then the -file’s callback will be run with <tt class="docutils literal"><span class="pre">MathJax.Ajax.STATUS.ERROR</span></tt> as -its parameter.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>file</strong> — name of the file that timed out</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="loadError"> -<tt class="descname">loadError</tt><big>(</big><em>file</em><big>)</big><a class="headerlink" href="#loadError" title="Permalink to this definition">¶</a></dt> -<dd><p>The default error handler called when a file fails to load. It -puts a warning message into the MathJax message box on screen.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>file</strong> — the name of the file that failed to load</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="loadHook"> -<tt class="descname">loadHook</tt><big>(</big><em>file</em>, <em>callback</em><big>)</big><a class="headerlink" href="#loadHook" title="Permalink to this definition">¶</a></dt> -<dd><p>Registers a callback to be executed when the given file is -loaded. The file load operation need to be started when this -method is called, so it can be used to register a hook for a file -that may be loaded in the future.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>file</strong> — the name of the file to wait for</li> -<li><strong>callback</strong> — the callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="Styles"> -<tt class="descname">Styles</tt><big>(</big><em>styles</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Styles" title="Permalink to this definition">¶</a></dt> -<dd><p>Creates a stylesheet from the given style data. <cite>styles</cite> can -either be a string containing a stylesheet definition, or an -object containing a <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS Style Object</em></a>. -For example:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Styles</span><span class="p">(</span><span class="s2">"body {font-family: serif; font-style: italic}"</span><span class="p">);</span> -</pre></div> -</div> -<p>and</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Styles</span><span class="p">({</span> - <span class="nx">body</span><span class="o">:</span> <span class="p">{</span> - <span class="s2">"font-family"</span><span class="o">:</span> <span class="s2">"serif"</span><span class="p">,</span> - <span class="s2">"font-style"</span><span class="o">:</span> <span class="s2">"italic"</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>both set the body font family and style.</p> -<p>The callback routine is called when the stylesheet has been -created and is available for use.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>styles</strong> — CSS style object for the styles to set</li> -<li><strong>callback</strong> — the callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -<div class="admonition note"> -<p class="first admonition-title">Note</p> -<p class="last">Internet Explorer has a limit of 32 dynamically created -stylesheets, so it is best to combine your styles into one -large group rather than making several smaller calls.</p> -</div> -</dd></dl> - -<dl class="method"> -<dt id="fileURL"> -<tt class="descname">fileURL</tt><big>(</big><em>file</em><big>)</big><a class="headerlink" href="#fileURL" title="Permalink to this definition">¶</a></dt> -<dd><p>Returns a complete URL to a file (replacing <tt class="docutils literal"><span class="pre">[MathJax]</span></tt> with the -actual root URL location).</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>file</strong> — the file name possibly including <tt class="docutils literal"><span class="pre">[MathJax]</span></tt></li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the full URL for the file</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="../index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The MathJax.Ajax Object</a><ul> -<li><a class="reference internal" href="#properties">Properties</a></li> -<li><a class="reference internal" href="#methods">Methods</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="hub.html" - title="previous chapter">The MathJax.Hub Object</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="message.html" - title="next chapter">The MathJax.Message Object</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/api/ajax.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="message.html" title="The MathJax.Message Object" - >next</a> |</li> - <li class="right" > - <a href="hub.html" title="The MathJax.Hub Object" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >The MathJax API</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/api/callback.html b/docs/build/html/api/callback.html @@ -1,438 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax.Callback Class — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="The MathJax API" href="index.html" /> - <link rel="next" title="The MathJax.Callback.Queue Class" href="queue.html" /> - <link rel="prev" title="The MathJax.HTML Object" href="html.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="queue.html" title="The MathJax.Callback.Queue Class" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="html.html" title="The MathJax.HTML Object" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-callback-class"> -<span id="api-callback"></span><h1>The MathJax.Callback Class<a class="headerlink" href="#the-mathjax-callback-class" title="Permalink to this headline">¶</a></h1> -<p>The <tt class="docutils literal"><span class="pre">MathJax.Callback</span></tt> object is one of the key mechanisms used by -MathJax to synchronize its actions with those that occur -asynchronously, like loading files and stylesheets. A <cite>Callback</cite> -object is used to tie the execution of a function to the completion of -an asynchronous action. See <a class="reference internal" href="../synchronize.html#synchronization"><em>Synchronizing with MathJax</em></a> for more details, and <a class="reference internal" href="../callbacks.html#using-callbacks"><em>Using Callbacks</em></a> in particular for examples of how to specify and -use MathJax <cite>Callback</cite> objects.</p> -<div class="section" id="specifying-a-callback"> -<h2>Specifying a callback<a class="headerlink" href="#specifying-a-callback" title="Permalink to this headline">¶</a></h2> -<p>When a method includes a callback as one of its arguments, that -callback can be specified in a number of different ways, depending on -the functionality that is required of the callback. The easiest case -is to simply provide a function to be called, but it is also possible -to include data to pass to the function when it is executed, and even -the object that will be used as the javascript <cite>this</cite> object when the -function is called.</p> -<p>Most functions that take callbacks as arguments accept a <cite>callback -specification</cite> rather than an actual callback object, though you can -use the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback()</span></tt> function to convert a callback -specification into a Callback object if needed.</p> -<p>A callback specification is any one of the following:</p> -<blockquote> -<div><dl class="describe"> -<dt> -<tt class="descname">fn</tt></dt> -<dd><p>A function that is to be called when the callback is executed. -No additional data is passed to it (other that what it is -called with at the time the callback is executed), and <cite>this</cite> -will be the window object.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">[fn]</tt></dt> -<dd><p>An array containing a function to be called when the callback -is executed (as above).</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">[fn, data...]</tt></dt> -<dd><p>An array containing a function together with data to be passed -to that function when the callback is executed; <cite>this</cite> is still -the window object. For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[</span><span class="kd">function</span> <span class="p">(</span><span class="nx">x</span><span class="p">,</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="nx">x</span><span class="o">+</span><span class="nx">y</span><span class="p">},</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">]</span> -</pre></div> -</div> -<p>would specify a callback that would pass <tt class="docutils literal"><span class="pre">2</span></tt> and <tt class="docutils literal"><span class="pre">3</span></tt> to -the given function, and it would return their sum, <tt class="docutils literal"><span class="pre">5</span></tt>, when -the callback is executed.</p> -<dl class="describe"> -<dt> -<tt class="descname">[object, fn]</tt></dt> -<dd></dd></dl> - -<p>An array containing an object to use as <cite>this</cite> and a function to -call for the callback. For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[{</span><span class="nx">x</span><span class="o">:</span><span class="s1">'foo'</span><span class="p">,</span> <span class="nx">y</span><span class="o">:</span><span class="s1">'bar'</span><span class="p">},</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">x</span><span class="p">}]</span> -</pre></div> -</div> -<p>would produce a callback that returns the string <tt class="docutils literal"><span class="pre">"foo"</span></tt> -when it is called.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">[object, fn, data...]</tt></dt> -<dd><p>Similar to the previous case, but with data that is passed to -the function as well.</p> -</dd></dl> - -<p>..describe:: [“method”, object]</p> -<blockquote> -<div><p>Here, <cite>object</cite> is an object that has a method called <cite>method</cite>, and -the callback will execute that method (with the object as -<cite>this</cite>) when it is called. For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[</span><span class="s2">"length"</span><span class="p">,[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]]</span> -</pre></div> -</div> -<p>would call the <cite>length</cite> method on the array <tt class="docutils literal"><span class="pre">[1,2,3,4]</span></tt> when -the callback is called, returning <tt class="docutils literal"><span class="pre">4</span></tt>.</p> -</div></blockquote> -<dl class="describe"> -<dt> -<tt class="descname">["method", object, data...]</tt></dt> -<dd><p>Similar to the previous case, but with data that is passed to -the method. E.g.,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[</span><span class="s2">"slice"</span><span class="p">,[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">],</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">]</span> -</pre></div> -</div> -<p>would perform the equivalent of <tt class="docutils literal"><span class="pre">[1,2,3,4].slice(1,3)</span></tt>, -which returns the array <tt class="docutils literal"><span class="pre">[2,3]</span></tt> as a result.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">{hook: fn, data: [...], object: this}</tt></dt> -<dd><p>Here the data for the callback are given in an associative -array of <cite>key:value</cite> pairs. The value of <cite>hook</cite> is the -function to call, the value of <cite>data</cite> is an array of the -arguments to pass to the function, and the value of <cite>object</cite> -is the object to use as <cite>this</cite> in the function call. The -specification need not include all three <cite>key:value</cite> pairs; any -that are missing get default values (a function that does -nothing, an empty array, and the window object, respectively).</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">"string"</tt></dt> -<dd><p>This specifies a callback where the string is executed via an -<tt class="docutils literal"><span class="pre">eval()</span></tt> statement. The code is run in the global context, -so any variables or functions created by the string become -part of the global namespace. The return value is the value of -the last statement executed in the string.</p> -</dd></dl> - -</div></blockquote> -<div class="section" id="executing-a-callback-object"> -<h3>Executing a Callback Object<a class="headerlink" href="#executing-a-callback-object" title="Permalink to this headline">¶</a></h3> -<p>The <cite>Callback</cite> object is itself a function, and calling that function -executes the callback. You can pass the callback additional -parameters, just as you can any function, and these will be added to -the callback function’s argument list following any data that was -supplied at the time the callback was created. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">f</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">x</span><span class="p">,</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="nx">x</span> <span class="o">+</span> <span class="s2">" and "</span> <span class="o">+</span><span class="nx">y</span><span class="p">}</span> -<span class="kd">var</span> <span class="nx">cb</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">([</span><span class="nx">f</span><span class="p">,</span> <span class="s2">"foo"</span><span class="p">]);</span> -<span class="kd">var</span> <span class="nx">result</span> <span class="o">=</span> <span class="nx">cb</span><span class="p">(</span><span class="s2">"bar"</span><span class="p">);</span> <span class="c1">// sets result to "foo and bar"</span> -</pre></div> -</div> -<p>Usually, the callback is not executed by the code that creates it (as -it is in the example above), but by some other code that runs at a -later time at the completion of some other activity (say the loading -of a file), or in response to a user action. For example:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">f</span><span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"x contains "</span><span class="o">+</span><span class="nx">x</span><span class="p">)};</span> -<span class="kd">function</span> <span class="nx">DelayedX</span><span class="p">(</span><span class="nx">time</span><span class="p">)</span> <span class="p">{</span> - <span class="kd">var</span> <span class="nx">x</span> <span class="o">=</span> <span class="s2">"hi"</span><span class="p">;</span> - <span class="nx">setTimeout</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">([</span><span class="nx">f</span><span class="p">,</span> <span class="nx">x</span><span class="p">],</span> <span class="nx">time</span><span class="p">);</span> -<span class="p">}</span> -</pre></div> -</div> -<p>The <tt class="docutils literal"><span class="pre">DelayedX</span></tt> function arranges for the function <tt class="docutils literal"><span class="pre">f</span></tt> to be called at -a later time, passing it the value of a local variable, <tt class="docutils literal"><span class="pre">x</span></tt>. Normally, -this would require the use of a closure, but that is not needed when a -<cite>MathJax.Callback</cite> object is used.</p> -</div> -</div> -<div class="section" id="callback-object-properties"> -<h2>Callback Object Properties<a class="headerlink" href="#callback-object-properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">hook</tt></dt> -<dd><p>The function to be called when the callback is executed.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">data</tt></dt> -<dd><p>An array containing the arguments to pass to the callback -function when it is executed.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">object</tt></dt> -<dd><p>The object to use as <cite>this</cite> during the call to the callback -function.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">called</tt></dt> -<dd><p>Set to <tt class="docutils literal"><span class="pre">true</span></tt> after the callback has been called, and undefined -otherwise. A callback will not be exectued a second time unless -the callback’s <a class="reference internal" href="#reset" title="reset"><tt class="xref py py-meth docutils literal"><span class="pre">reset()</span></tt></a> method is called first, or its -<tt class="docutils literal"><span class="pre">autoReset</span></tt> property is set to <tt class="docutils literal"><span class="pre">true</span></tt>.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">autoReset</tt></dt> -<dd><p>Set this to <tt class="docutils literal"><span class="pre">true</span></tt> if you want to be able to call the callback -more than once. (This is the case for signal listeners, for example).</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">isCallback</tt></dt> -<dd><p>Always set to <tt class="docutils literal"><span class="pre">true</span></tt> (used to detect if an object is a callback -or not).</p> -</dd></dl> - -</div> -<div class="section" id="callback-object-methods"> -<h2>Callback Object Methods<a class="headerlink" href="#callback-object-methods" title="Permalink to this headline">¶</a></h2> -<dl class="method"> -<dt id="reset"> -<tt class="descname">reset</tt><big>(</big><big>)</big><a class="headerlink" href="#reset" title="Permalink to this definition">¶</a></dt> -<dd><p>Clears the callback’s <cite>called</cite> property.</p> -</dd></dl> - -</div> -<div class="section" id="mathjax-callback-methods"> -<h2>MathJax.Callback Methods<a class="headerlink" href="#mathjax-callback-methods" title="Permalink to this headline">¶</a></h2> -<dl class="method"> -<dt id="Delay"> -<tt class="descname">Delay</tt><big>(</big><em>time</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Delay" title="Permalink to this definition">¶</a></dt> -<dd><p>Waits for the specified time (given in milliseconds) and then -performs the callback. It returns the Callback object (or a blank -one if none was supplied). The returned callback structure has a -<cite>timeout</cite> property set to the result of the <tt class="docutils literal"><span class="pre">setTimeout()</span></tt> call -that was used to perform the wait so that you can cancel the wait, -if needed. Thus <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback.Delay()</span></tt> can be used to -start a timeout delay that executes the callback if an action -doesn’t occur within the given time (and if the action does occur, -the timeout can be canceled). Since -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback.Delay()</span></tt> returns a callback structure, it -can be used in a callback queue to insert a delay between queued -commands.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>time</strong> — the amount of time to wait</li> -<li><strong>callback</strong> — the callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="executeHooks"> -<tt class="descname">executeHooks</tt><big>(</big><em>hooks</em><span class="optional">[</span>, <em>data</em><span class="optional">[</span>, <em>reset</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#executeHooks" title="Permalink to this definition">¶</a></dt> -<dd><p>Calls each callback in the <cite>hooks</cite> array (or the single hook if it -is not an array), passing it the arguments stored in the data -array. It <cite>reset</cite> is <tt class="docutils literal"><span class="pre">true</span></tt>, then the callback’s -<a class="reference internal" href="#reset" title="reset"><tt class="xref py py-meth docutils literal"><span class="pre">reset()</span></tt></a> method will be called before each hook is -executed. If any of the hooks returns a <cite>Callback</cite> object, then -it collects those callbacks and returns a new callback that will -execute when all the ones returned by the hooks have been -completed. Otherwise, <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback.executeHooks()</span></tt> -returns <tt class="docutils literal"><span class="pre">null</span></tt>.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>hooks</strong> — array of hooks to be called, or a hook</li> -<li><strong>data</strong> — array of arguments to pass to each hook in turn</li> -<li><strong>reset</strong> — <tt class="docutils literal"><span class="pre">true</span></tt> if the <a class="reference internal" href="#reset" title="reset"><tt class="xref py py-meth docutils literal"><span class="pre">reset()</span></tt></a> method should be called</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">callback that waits for all the hooks to complete, or <tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="Queue"> -<tt class="descname">Queue</tt><big>(</big><span class="optional">[</span><em>callback</em>, <em>...</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Queue" title="Permalink to this definition">¶</a></dt> -<dd><p>Creates a <cite>MathJax.CallBack.Queue</cite> object and pushes the given -callbacks into the queue. See <a class="reference internal" href="../queues.html#using-queues"><em>Using Queues</em></a> -for more details about MathJax queues.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>callback</strong> — one or more callback specifications</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the <cite>Queue</cite> object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="Signal"> -<tt class="descname">Signal</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#Signal" title="Permalink to this definition">¶</a></dt> -<dd><p>Looks for a named signal, creates it if it doesn’t already exist, -and returns the signal object. See -<a class="reference internal" href="../signals.html#using-signals"><em>Using Signals</em></a> for more details.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>name</strong> — name of the signal to get or create</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the <cite>Signal</cite> object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="../index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The MathJax.Callback Class</a><ul> -<li><a class="reference internal" href="#specifying-a-callback">Specifying a callback</a><ul> -<li><a class="reference internal" href="#executing-a-callback-object">Executing a Callback Object</a></li> -</ul> -</li> -<li><a class="reference internal" href="#callback-object-properties">Callback Object Properties</a></li> -<li><a class="reference internal" href="#callback-object-methods">Callback Object Methods</a></li> -<li><a class="reference internal" href="#mathjax-callback-methods">MathJax.Callback Methods</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="html.html" - title="previous chapter">The MathJax.HTML Object</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="queue.html" - title="next chapter">The MathJax.Callback.Queue Class</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/api/callback.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="queue.html" title="The MathJax.Callback.Queue Class" - >next</a> |</li> - <li class="right" > - <a href="html.html" title="The MathJax.HTML Object" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >The MathJax API</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/api/elementjax.html b/docs/build/html/api/elementjax.html @@ -1,286 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax.ElementJax Class — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="The MathJax API" href="index.html" /> - <link rel="next" title="The Base Jax Class" href="jax.html" /> - <link rel="prev" title="The MathJax.OutputJax Class" href="outputjax.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="jax.html" title="The Base Jax Class" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="outputjax.html" title="The MathJax.OutputJax Class" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-elementjax-class"> -<span id="api-element-jax"></span><h1>The MathJax.ElementJax Class<a class="headerlink" href="#the-mathjax-elementjax-class" title="Permalink to this headline">¶</a></h1> -<p>The element jax is the bridge between the input and output jax, and -contains the data produced by the input jax needed by the output jax -to display the results. It is tied to the individual <tt class="docutils literal"><span class="pre"><script></span></tt> tag -that produced it, and is the object used by JavaScript programs to -interact with the mathematics on the page.</p> -<p>An element jax is stored in the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file in a subdirectory of -the <tt class="docutils literal"><span class="pre">jax/element</span></tt> directory, with the subdirectory name being the -name of the element jax. Currently, there is only one element jax -class, the <cite>mml</cite> element jax, and it is stored in <tt class="docutils literal"><span class="pre">jax/element/mml</span></tt>.</p> -<p>The <cite>MathJax.ElementJax</cite> class is a subclass of the <a class="reference internal" href="jax.html#api-jax"><em>MathJax Jax</em></a> class, and inherits the properties and methods of that -class. Those listed below are the additional or overridden ones from -that class.</p> -<div class="section" id="class-properties"> -<h2>Class Properties<a class="headerlink" href="#class-properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">name</tt></dt> -<dd><p>The name of the jax.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">version</tt></dt> -<dd><p>The version number of the jax.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">directory</tt></dt> -<dd><p>The directory where the jax files are stored (e.g., <tt class="docutils literal"><span class="pre">"[MathJax]/jax/element/mml"</span></tt>);</p> -</dd></dl> - -</div> -<div class="section" id="instance-properties"> -<h2>Instance Properties<a class="headerlink" href="#instance-properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">inputJax</tt></dt> -<dd><p>A reference to the input jax that created the element.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">outputJax</tt></dt> -<dd><p>A reference to the output jax that has processed this element.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">inputID</tt></dt> -<dd><p>The DOM <cite>id</cite> of the <tt class="docutils literal"><span class="pre"><script></span></tt> tag that generated this element -(if it doesn’t have one initially, the MathJax hub will supply -one). Note that this is not a reference to the element itself; -that element will have a reference to this element jax, and if -<cite>inputID</cite> were a reference back, that would cause a reference -loop, which some browsers would not free properly during trash -collection, thus causing a memory leak.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">originalText</tt></dt> -<dd><p>A string indicating the original input text that was processed for -this element.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">mimeType</tt></dt> -<dd><p>The MIME-type of the element jax (<cite>jax/mml</cite> in the case of an -<cite>mml</cite> element jax).</p> -</dd></dl> - -<p>Other data specific to the element jax subclass may also appear here.</p> -</div> -<div class="section" id="methods"> -<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> -<dl class="method"> -<dt id="Text"> -<tt class="descname">Text</tt><big>(</big><em>text</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Text" title="Permalink to this definition">¶</a></dt> -<dd><p>Sets the input text for this element to the given text and -reprocesses the mathematics. (I.e., update the equation to the -new one given by <cite>text</cite>). When the processing is complete, the -<cite>callback</cite>, if any, is called.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>text</strong> — the new mathematic source string for the element</li> -<li><strong>callback</strong> — the callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt> -<tt class="descname">Reprocess</tt><big>(</big><span class="optional">[</span><em>callback</em><span class="optional">]</span><big>)</big></dt> -<dd><p>Remove the output and produce it again. This may be necessary if -there are changes to the CSS styles that would affect the layout -of the mathematics, for example. The <cite>callback</cite>, if any, is -called when the process completes.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>callback</strong> — the callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt> -<tt class="descname">Remove</tt><big>(</big><big>)</big></dt> -<dd><p>Removes the output for this element from the web page (but does -not remove the original <tt class="docutils literal"><span class="pre"><script></span></tt>). The <tt class="docutils literal"><span class="pre"><script></span></tt> will be -considered unprocessed, and the next call to -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.hub.Typeset()</span></tt> will re-display it.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><tt class="docutils literal"><span class="pre">null</span></tt></td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="SourceElement"> -<tt class="descname">SourceElement</tt><big>(</big><big>)</big><a class="headerlink" href="#SourceElement" title="Permalink to this definition">¶</a></dt> -<dd><p>Returns a reference to the original <tt class="docutils literal"><span class="pre"><script></span></tt> DOM element -associated to this element jax.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body">the <tt class="docutils literal"><span class="pre"><script></span></tt> element</td> -</tr> -</tbody> -</table> -</dd></dl> - -<p>Output jax may add new methods to the base element jax class to -perform exporting to other formats. For example, a MathML output jax -could add <tt class="docutils literal"><span class="pre">toMathML()</span></tt>, or an accessibility output jax could add -<tt class="docutils literal"><span class="pre">toAudible()</span></tt>. These could be made available via the MathJax -contextual menu.</p> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="../index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The MathJax.ElementJax Class</a><ul> -<li><a class="reference internal" href="#class-properties">Class Properties</a></li> -<li><a class="reference internal" href="#instance-properties">Instance Properties</a></li> -<li><a class="reference internal" href="#methods">Methods</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="outputjax.html" - title="previous chapter">The MathJax.OutputJax Class</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="jax.html" - title="next chapter">The Base Jax Class</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/api/elementjax.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="jax.html" title="The Base Jax Class" - >next</a> |</li> - <li class="right" > - <a href="outputjax.html" title="The MathJax.OutputJax Class" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >The MathJax API</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/api/html.html b/docs/build/html/api/html.html @@ -1,295 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax.HTML Object — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="The MathJax API" href="index.html" /> - <link rel="next" title="The MathJax.Callback Class" href="callback.html" /> - <link rel="prev" title="The MathJax.Message Object" href="message.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="callback.html" title="The MathJax.Callback Class" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="message.html" title="The MathJax.Message Object" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-html-object"> -<span id="api-html"></span><h1>The MathJax.HTML Object<a class="headerlink" href="#the-mathjax-html-object" title="Permalink to this headline">¶</a></h1> -<p>The <tt class="docutils literal"><span class="pre">MathJax.HTML</span></tt> object provides routines for creating HTML -elements and adding them to the page, and int particular, it contains -the code that processes MathJax’s <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>HTML snippets</em></a> -and turns them into actual DOM objects. It also implements the -methods used to manage the cookies used by MathJax.</p> -<div class="section" id="properties"> -<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">Cookie.prefix: "mjx"</tt></dt> -<dd><p>The prefix used for names of cookies stored by MathJax.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">Cookie.expires: 365</tt></dt> -<dd><p>The expiration time (in days) for cookies created by MathJax.</p> -</dd></dl> - -</div> -<div class="section" id="methods"> -<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> -<dl class="method"> -<dt id="Element"> -<tt class="descname">Element</tt><big>(</big><em>type</em><span class="optional">[</span>, <em>attributes</em><span class="optional">[</span>, <em>contents</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#Element" title="Permalink to this definition">¶</a></dt> -<dd><p>Creates a DOM element of the given type. If <cite>attributes</cite> is -non-<tt class="docutils literal"><span class="pre">null</span></tt>, it is an object that contains <cite>key:value</cite> pairs of -attributes to set for the newly created element. If <cite>contents</cite> is -non-<tt class="docutils literal"><span class="pre">null</span></tt>, it is an <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>HTML snippet</em></a> that -describes the contents to create for the element. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">div</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">HTML</span><span class="p">.</span><span class="nx">Element</span><span class="p">(</span> - <span class="s2">"div"</span><span class="p">,</span> - <span class="p">{</span><span class="nx">id</span><span class="o">:</span> <span class="s2">"MathDiv"</span><span class="p">,</span> <span class="nx">style</span><span class="o">:</span><span class="p">{</span><span class="nx">border</span><span class="o">:</span><span class="s2">"1px solid"</span><span class="p">,</span> <span class="nx">padding</span><span class="o">:</span><span class="s2">"5px"</span><span class="p">}},</span> - <span class="p">[</span><span class="s2">"Here is math: $x+1$"</span><span class="p">,[</span><span class="s2">"br"</span><span class="p">],</span><span class="s2">"and a display $$x+1\\over x-1$$"</span><span class="p">]</span> -<span class="p">);</span> -</pre></div> -</div> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>type</strong> — node type to be created</li> -<li><strong>attributes</strong> — object specifying attributes to set</li> -<li><strong>contents</strong> — HTML snippet representing contents of node</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the DOM element created</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="addElement"> -<tt class="descname">addElement</tt><big>(</big><em>parent</em>, <em>type</em><span class="optional">[</span>, <em>attributes</em><span class="optional">[</span>, <em>content</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#addElement" title="Permalink to this definition">¶</a></dt> -<dd><p>Creates a DOM element and appends it to the <cite>parent</cite> node -provided. It is equivalent to</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">parent</span><span class="p">.</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">HTML</span><span class="p">.</span><span class="nx">Element</span><span class="p">(</span><span class="nx">type</span><span class="p">,</span><span class="nx">attributes</span><span class="p">,</span><span class="nx">content</span><span class="p">))</span> -</pre></div> -</div> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>parent</strong> — the node where the element will be added</li> -<li><strong>attributes</strong> — object specifying attributes to set</li> -<li><strong>contents</strong> — HTML snippet representing contents of node</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the DOM element created</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="TextNode"> -<tt class="descname">TextNode</tt><big>(</big><em>text</em><big>)</big><a class="headerlink" href="#TextNode" title="Permalink to this definition">¶</a></dt> -<dd><p>Creates a DOM text node with the given text as its content.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>text</strong> — the text for the node</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the new text node</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="addText"> -<tt class="descname">addText</tt><big>(</big><em>parent</em>, <em>text</em><big>)</big><a class="headerlink" href="#addText" title="Permalink to this definition">¶</a></dt> -<dd><p>Creates a DOM text node with the given text and appends it to the -<cite>parent</cite> node.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>parent</strong> — the node where the text will be added</li> -<li><strong>text</strong> — the text for the new node</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the new text node</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">Cookie.Set(name,data)</tt></dt> -<dd><p>Creates a MathJax cookie using the <tt class="docutils literal"><span class="pre">MathJax.HTML.Cookie.prefix</span></tt> -and the <cite>name</cite> as the cookie name, and the <cite>key:value</cite> pairs in -the <cite>data</cite> object as the data for the cookie. For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">HTML</span><span class="p">.</span><span class="nx">Cookie</span><span class="p">.</span><span class="nx">Set</span><span class="p">(</span><span class="s2">"test"</span><span class="p">,{</span><span class="nx">x</span><span class="o">:</span><span class="mi">42</span><span class="p">,</span> <span class="nx">y</span><span class="o">:</span><span class="s2">"It Works!"</span><span class="p">});</span> -</pre></div> -</div> -<p>will create a cookie named “mjx:test” that stores the values of -<tt class="docutils literal"><span class="pre">x</span></tt> and <tt class="docutils literal"><span class="pre">y</span></tt> provided in the <cite>data</cite> object. This data can be -retrieved using the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.HTML.Cookie.Get()</span></tt> method -discussed below.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>name</strong> — the name that identifies the coookie</li> -<li><strong>data</strong> — object containing the data to store in the cookie</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">Cookie.Get(name[,obj])</tt></dt> -<dd><p>Looks up the data for the cookie named <cite>name</cite> and merges the data -into the given <cite>obj</cite> object, or returns a new object containing -the data. For instance, given the cookie stored by the example -above,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">data</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">HTML</span><span class="p">.</span><span class="nx">Cookie</span><span class="p">.</span><span class="nx">Get</span><span class="p">(</span><span class="s2">"test"</span><span class="p">);</span> -</pre></div> -</div> -<p>would set <tt class="docutils literal"><span class="pre">data</span></tt> to <tt class="docutils literal"><span class="pre">{x:42,</span> <span class="pre">y:"It</span> <span class="pre">Works!"}</span></tt>, while</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">data</span> <span class="o">=</span> <span class="p">{</span><span class="nx">x</span><span class="o">:</span><span class="mi">10</span><span class="p">,</span> <span class="nx">z</span><span class="o">:</span><span class="s2">"Safe"</span><span class="p">};</span> -<span class="nx">MathJax</span><span class="p">.</span><span class="nx">HTML</span><span class="p">.</span><span class="nx">Cookie</span><span class="p">.</span><span class="nx">Get</span><span class="p">(</span><span class="s2">"test"</span><span class="p">,</span><span class="nx">data</span><span class="p">);</span> -</pre></div> -</div> -<p>would leave <tt class="docutils literal"><span class="pre">data</span></tt> as <tt class="docutils literal"><span class="pre">{x:42,</span> <span class="pre">y:"It</span> <span class="pre">Works!",</span> <span class="pre">z:"Safe"}</span></tt>.</p> -</dd></dl> - -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="../index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The MathJax.HTML Object</a><ul> -<li><a class="reference internal" href="#properties">Properties</a></li> -<li><a class="reference internal" href="#methods">Methods</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="message.html" - title="previous chapter">The MathJax.Message Object</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="callback.html" - title="next chapter">The MathJax.Callback Class</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/api/html.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="callback.html" title="The MathJax.Callback Class" - >next</a> |</li> - <li class="right" > - <a href="message.html" title="The MathJax.Message Object" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >The MathJax API</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/api/hub.html b/docs/build/html/api/hub.html @@ -1,677 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax.Hub Object — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="The MathJax API" href="index.html" /> - <link rel="next" title="The MathJax.Ajax Object" href="ajax.html" /> - <link rel="prev" title="The MathJax variable" href="variable.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="ajax.html" title="The MathJax.Ajax Object" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="variable.html" title="The MathJax variable" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-hub-object"> -<span id="api-hub"></span><h1>The MathJax.Hub Object<a class="headerlink" href="#the-mathjax-hub-object" title="Permalink to this headline">¶</a></h1> -<p>The MathJax Hub, <cite>MathJax.Hub</cite>, is the main control structure for -MathJax. It is where input and output <a class="reference internal" href="../glossary.html#term-jax"><em class="xref std std-term">jax</em></a> are tied together, -and it is what handles processing of the MathJax <tt class="docutils literal"><span class="pre"><script></span></tt> tags. -Processing of the mathematics on the page may require external files -to be loaded (when the mathematics includes less common functionality, -for example, that is defined in an extension file), and since file -loading is asynchronous, a number of the methods below may return -before their actions are completed. For this reason, they include -callback functions that are called when the action completes. These -can be used to synchronize actions that require the mathematics to be -completed before those action occur. See the <a class="reference internal" href="../callbacks.html#using-callbacks"><em>Using Callbacks</em></a> documentation for more details.</p> -<div class="section" id="properties"> -<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">config: { ... }</tt></dt> -<dd><p>This holds the configuration parameters for MathJax. Set these -values using <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> described below. The -options and their default values are given in the <a class="reference internal" href="../options/hub.html#configure-hub"><em>Core -Options</em></a> reference page.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">processUpdateTime: 500</tt></dt> -<dd><p>The minimum time (in milliseconds) between updates of the -“Processing Math” message.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">signal</tt></dt> -<dd><p>The hub processing signal (tied to the -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Register.MessageHook()</span></tt> method).</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">Browser</tt></dt> -<dd><p>The name of the browser as determined by MathJax. It will be one -of <tt class="docutils literal"><span class="pre">Firefox</span></tt>, <tt class="docutils literal"><span class="pre">Safari</span></tt>, <tt class="docutils literal"><span class="pre">Chrome</span></tt>, <tt class="docutils literal"><span class="pre">Opera</span></tt>, <tt class="docutils literal"><span class="pre">MSIE</span></tt>, -<tt class="docutils literal"><span class="pre">Konqueror</span></tt>, or <tt class="docutils literal"><span class="pre">unkown</span></tt>. This is actually an object with -additional properties and methods concerning the browser:</p> -<dl class="describe"> -<dt> -<tt class="descname">version</tt></dt> -<dd><p>The browser version number, e.g., <tt class="docutils literal"><span class="pre">"4.0"</span></tt></p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">isMac and isPC</tt></dt> -<dd><p>These are boolean values that indicate whether the browser is -running on a Macintosh computer or a Windows computer. They -will both be <tt class="docutils literal"><span class="pre">false</span></tt> for a Linux computer</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">isForefox, isSafari, isChrome, isOpera, isMSIE, isKonqueror</tt></dt> -<dd><p>These are <tt class="docutils literal"><span class="pre">true</span></tt> when the browser is the indicated one, and -<tt class="docutils literal"><span class="pre">false</span></tt> otherwise.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">versionAtLeast(version)</tt></dt> -<dd><p>This tests whether the browser version is at least that given -in the <cite>version</cite> string. Note that you can not simply do a -numeric comparison, as version 4.10 should be considered later -than 4.9, for example. Similarly, 4.10 is different from 4.1, -for instance.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">Select(choices)</tt></dt> -<dd><p>This lets you perform browser-specific functions. Here, -<cite>choices</cite> is an object whose properties are the names of the -browsers and whose values are the functions to be performed. -Each function is passed one parameter, which is the -<tt class="docutils literal"><span class="pre">MathJax.Hub.Browser</span></tt> object. You do not need to include -every browser as one of your choices (only those for which you -need to do special processing. For example:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Browser</span><span class="p">.</span><span class="nx">Select</span><span class="p">(</span> - <span class="nx">MSIE</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">browser</span><span class="p">)</span> <span class="p">{</span> - <span class="k">if</span> <span class="p">(</span><span class="nx">browser</span><span class="p">.</span><span class="nx">versionAtLeast</span><span class="p">(</span><span class="s2">"8.0"</span><span class="p">))</span> <span class="p">{...</span> <span class="k">do</span> <span class="nx">version</span> <span class="mi">8</span> <span class="nx">stuff</span> <span class="p">...</span> <span class="p">}</span> - <span class="p">...</span> <span class="k">do</span> <span class="nx">general</span> <span class="nx">MSIE</span> <span class="nx">stuff</span> <span class="p">...</span> - <span class="p">},</span> - - <span class="nx">Firefox</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">browser</span><span class="p">)</span> <span class="p">{</span> - <span class="k">if</span> <span class="p">(</span><span class="nx">browser</span><span class="p">.</span><span class="nx">isMac</span><span class="p">)</span> <span class="p">{...</span> <span class="k">do</span> <span class="nx">Mac</span> <span class="nx">stuff</span> <span class="p">...</span> <span class="p">}</span> - <span class="p">...</span> <span class="k">do</span> <span class="nx">general</span> <span class="nx">Firefox</span> <span class="nx">stuff</span> - <span class="p">}</span> -<span class="p">);</span> -</pre></div> -</div> -</dd></dl> - -</dd></dl> - -</div> -<div class="section" id="methods"> -<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> -<dl class="method"> -<dt id="Config"> -<tt class="descname">Config</tt><big>(</big><em>options</em><big>)</big><a class="headerlink" href="#Config" title="Permalink to this definition">¶</a></dt> -<dd><p>Sets the configuration options (stored in <tt class="docutils literal"><span class="pre">MathJax.Hub.config</span></tt>) -to the values stored in the <cite>options</cite> object. See -<a class="reference internal" href="../configuration.html#configuration"><em>Configuring MathJax</em></a> for details on how this -is used and the options that you can set.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>options</strong> — object containing options to be set</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">Register.PreProcessor(callback)</tt></dt> -<dd><p>Used by preprocessors to register themselves with MathJax so that -they will be called during the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.PreProcess()</span></tt> -action.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>callback</strong> — the callback specification for the preprocessor</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">Register.MessageHook(type,callback)</tt></dt> -<dd><p>Registers a listener for a particular message being sent to the -hub processing signal (where <cite>PreProcessing</cite>, <cite>Processing</cite>, and -<cite>New Math</cite> messages are sent). When the message equals the -<cite>type</cite>, the <cite>callback</cite> will be called with the message as its -parameter.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>type</strong> — a string indicating the message to look for</li> -<li><strong>callback</strong> — a callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">Register.StartupHook(type,callback)</tt></dt> -<dd><p>Registers a listener for a particular message being sent to the -startup signal (where initialization and component startup -messages are sent). When the message equals the <cite>type</cite>, the -<cite>callback will be called with the message as its parameter. -See the :ref:`Using Signals <using-signals></cite> dcocumentation for -more details.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>type</strong> — a string indicating the message to look for</li> -<li><strong>callback</strong> — a callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">Register.LoadHook(file,callback)</tt></dt> -<dd><p>Registers a callback to be called when a particular file is -completely loaded and processed. (The callback is called when the -file makes its <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.loadComplete()</span></tt> call.) The -<cite>file</cite> should be the complete file name, e.g., -<tt class="docutils literal"><span class="pre">"[MathJax]/config/MathJax.js"</span></tt>.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>file</strong> — the name of the file to wait for</li> -<li><strong>callback</strong> — a callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt> -<tt class="descname">Queue</tt><big>(</big><em>callback</em>, <em>...</em><big>)</big></dt> -<dd><p>Pushes the given callbacks onto the main MathJax command queue. -This synchronizes the commands with MathJax so that they will be -performed in the proper order even when some run asynchronously. -See <a class="reference internal" href="../queues.html#using-queues"><em>Using Queues</em></a> for more details about how -to use queues, and the MathJax queue in particular. You may -supply as many <cite>callback</cite> specifications in one call to the -<a class="reference internal" href="callback.html#Queue" title="Queue"><tt class="xref py py-meth docutils literal"><span class="pre">Queue()</span></tt></a> method as you wish.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>callback</strong> — a callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object for the last callback added to the queue</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="Typeset"> -<tt class="descname">Typeset</tt><big>(</big><span class="optional">[</span><em>element</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#Typeset" title="Permalink to this definition">¶</a></dt> -<dd><p>Calls the preprocessors on the given element, and then typesets -any math elements within the element. If no <cite>element</cite> is -provided, the whole document is processed. The <cite>element</cite> is -either the DOM <cite>id</cite> of the element, or a reference to the DOM -element itself. The <cite>callback</cite> is called when the process is -complete. See the <a class="reference internal" href="../typeset.html#typeset-math"><em>Modifying Math</em></a> section -for details of how to use this method properly.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>element</strong> — the element whose math is to be typeset</li> -<li><strong>callback</strong> — the callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="PreProcess"> -<tt class="descname">PreProcess</tt><big>(</big><span class="optional">[</span><em>element</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#PreProcess" title="Permalink to this definition">¶</a></dt> -<dd><p>Calls the loaded preprocessors on the entire document, or on the -given DOM element. The <cite>element</cite> is either the DOM <cite>id</cite> of the -element, or a reference to the DOM element itself. The <cite>callback</cite> -is called when the processing is complete.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>element</strong> — the element to be preprocessed</li> -<li><strong>callback</strong> — the callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="Process"> -<tt class="descname">Process</tt><big>(</big><span class="optional">[</span><em>element</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#Process" title="Permalink to this definition">¶</a></dt> -<dd><p>Scans either the entire document or a given DOM <cite>element</cite> for -MathJax <tt class="docutils literal"><span class="pre"><script></span></tt> tags and processes the math those tags -contain. The <cite>element</cite> is either the DOM <cite>id</cite> of the element to -scan, or a reference to the DOM element itself. The <cite>callback</cite> is -called when the processing is complete.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>element</strong> — the element to be processed</li> -<li><strong>callback</strong> — the callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="Update"> -<tt class="descname">Update</tt><big>(</big><span class="optional">[</span><em>element</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#Update" title="Permalink to this definition">¶</a></dt> -<dd><p>Scans either the entire document or a given DOM element for -mathematics that has changed since the last time it was processed, -or is new, and typesets the mathematics they contain. The -<cite>element</cite> is either the DOM <cite>id</cite> of the element to scan, or a -reference to the DOM element itself. The <cite>callback</cite> is called -when the processing is complete.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>element</strong> — the element to be updated</li> -<li><strong>callback</strong> — the callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="Reprocess"> -<tt class="descname">Reprocess</tt><big>(</big><span class="optional">[</span><em>element</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#Reprocess" title="Permalink to this definition">¶</a></dt> -<dd><p>Removes any typeset mathematics from the document or DOM -element, and then processes the mathematics again, -re-typesetting everything. This may be necessary, for example, if -the CSS styles have changed and those changes would affect the -mathematics. The <cite>element</cite> is either the DOM <cite>id</cite> of the element -to scan, or a reference to the DOM element itself. The <cite>callback</cite> -is called when the processing is complete.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>element</strong> — the element to be reprocessed</li> -<li><strong>callback</strong> — the callback specification</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="getAllJax"> -<tt class="descname">getAllJax</tt><big>(</big><span class="optional">[</span><em>element</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#getAllJax" title="Permalink to this definition">¶</a></dt> -<dd><p>Returns a list of all the element jax in the document or a -specific DOM element. The <cite>element</cite> is either the DOM <cite>id</cite> of the -element, or a reference to the DOM element itself.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>element</strong> — the element to be searched</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">array of <cite>element jax</cite> objects</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="getJaxByType"> -<tt class="descname">getJaxByType</tt><big>(</big><em>type</em><span class="optional">[</span>, <em>element</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#getJaxByType" title="Permalink to this definition">¶</a></dt> -<dd><p>Returns a list of all the element jax of a given MIME-type in the -document or a specific DOM element. The <cite>element</cite> is either the -DOM <cite>id</cite> of the element to search, or a reference to the DOM -element itself.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>type</strong> — MIME-type of <cite>element jax</cite> to find</li> -<li><strong>element</strong> — the element to be searched</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">array of <cite>element jax</cite> objects</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="getJaxByInputType"> -<tt class="descname">getJaxByInputType</tt><big>(</big><em>type</em><span class="optional">[</span>, <em>element</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#getJaxByInputType" title="Permalink to this definition">¶</a></dt> -<dd><p>Returns a list of all the element jax associated with input -<tt class="docutils literal"><span class="pre"><script></span></tt> tags with the given MIME-type within the given DOM -element or the whole document. The <cite>element</cite> is either the DOM -<cite>id</cite> of the element to search, or a reference to the DOM element -itself.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>type</strong> — MIME-type of input (e.g., <tt class="docutils literal"><span class="pre">"math/tex"</span></tt>)</li> -<li><strong>element</strong> — the element to be searched</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">array of <cite>element jax</cite> objects</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="getJaxFor"> -<tt class="descname">getJaxFor</tt><big>(</big><em>element</em><big>)</big><a class="headerlink" href="#getJaxFor" title="Permalink to this definition">¶</a></dt> -<dd><p>Returns the element jax associated with a given DOM -element. If the element does not have an associated element jax, -<tt class="docutils literal"><span class="pre">null</span></tt> is returned. The <cite>element</cite> is either the DOM <cite>id</cite> of the -element, or a reference to the DOM element itself.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>element</strong> — the element whose element jax is required</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><cite>element jax</cite> object or <tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="isJax"> -<tt class="descname">isJax</tt><big>(</big><em>element</em><big>)</big><a class="headerlink" href="#isJax" title="Permalink to this definition">¶</a></dt> -<dd><p>Returns <tt class="docutils literal"><span class="pre">0</span></tt> if the element is not a <tt class="docutils literal"><span class="pre"><script></span></tt> that can be -processed by MathJax or the result of an output jax, returns <tt class="docutils literal"><span class="pre">-1</span></tt> -if element is an unprocessed <tt class="docutils literal"><span class="pre"><script></span></tt> tag that could be -handled by MathJax, and returns <tt class="docutils literal"><span class="pre">1</span></tt> if element is a processed -<tt class="docutils literal"><span class="pre"><script></span></tt> tag or an element that is the result of an output jax.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>element</strong> — the element to inspect</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">integer (-1, 0, 1)</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="Insert"> -<tt class="descname">Insert</tt><big>(</big><em>dst</em>, <em>src</em><big>)</big><a class="headerlink" href="#Insert" title="Permalink to this definition">¶</a></dt> -<dd><p>Inserts data from the <cite>src</cite> object into the <cite>dst</cite> object. The -<cite>key:value</cite> pairs in <cite>src</cite> are (recursively) copied into <cite>dst</cite>, so -that if <cite>value</cite> is itself an object, its contents is copied into -the corresponding object in <cite>dst</cite>. That is, objects within <cite>src</cite> -are merged into the corresponding objects in <cite>dst</cite> (they don’t -replace them).</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>dst</strong> — the destination object</li> -<li><strong>src</strong> — the source object</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the modified destination object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="formatError"> -<tt class="descname">formatError</tt><big>(</big><em>script</em>, <em>error</em><big>)</big><a class="headerlink" href="#formatError" title="Permalink to this definition">¶</a></dt> -<dd><p>This is called when an internal error occurs during the processing -of a math element (i.e., an error in the MathJax code itself). -The <cite>script</cite> is a reference to the <tt class="docutils literal"><span class="pre"><script></span></tt> tag where the -error occurred, and <cite>error</cite> is the <tt class="docutils literal"><span class="pre">Error</span></tt> object for the error. -The default action is to insert an HTML snippet at the location of -the script, but this routine can be overriden durring MathJax -configuration in order to perform some other action. -<tt class="docutils literal"><span class="pre">MathJax.Hub.lastError</span></tt> holds the <tt class="docutils literal"><span class="pre">error</span></tt> value of the last -error on the page.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>script</strong> — the <tt class="docutils literal"><span class="pre"><script></span></tt> tag causing the error</li> -<li><strong>error</strong> — the <tt class="docutils literal"><span class="pre">Error</span></tt> object for the error</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="../index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The MathJax.Hub Object</a><ul> -<li><a class="reference internal" href="#properties">Properties</a></li> -<li><a class="reference internal" href="#methods">Methods</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="variable.html" - title="previous chapter">The MathJax variable</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="ajax.html" - title="next chapter">The MathJax.Ajax Object</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/api/hub.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="ajax.html" title="The MathJax.Ajax Object" - >next</a> |</li> - <li class="right" > - <a href="variable.html" title="The MathJax variable" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >The MathJax API</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/api/index.html b/docs/build/html/api/index.html @@ -1,147 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax API — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="next" title="The MathJax variable" href="variable.html" /> - <link rel="prev" title="Modifying Math on the Page" href="../typeset.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="variable.html" title="The MathJax variable" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="../typeset.html" title="Modifying Math on the Page" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-api"> -<span id="mathjax-api"></span><h1>The MathJax API<a class="headerlink" href="#the-mathjax-api" title="Permalink to this headline">¶</a></h1> -<p>The following links document the various components that make up -MathJax. These are implemented as JavaScript objects contained within -the single global variable, <tt class="docutils literal"><span class="pre">MathJax</span></tt>. Although JavaScript includes -an objects with some inheritance capabilities, they do not constitute -a full object-oriented programming model, so MathJax implements -its own object library. This means there is an ambiguity when we -speak of an “object”, as it could be either a native JavaScript -object, or a MathJax object. We will use <cite>Object</cite> (capitalized) or -<cite>MathJax.Object</cite> for, when the distinction is important.</p> -<p>You may also want to view the <a class="reference internal" href="../index.html#advanced-topics"><em>advanced topics</em></a> -on the main MathJax documentation page.</p> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="variable.html">The MathJax variable</a></li> -<li class="toctree-l1"><a class="reference internal" href="hub.html">The MathJax.Hub object</a></li> -<li class="toctree-l1"><a class="reference internal" href="ajax.html">The MathJax.Ajax object</a></li> -<li class="toctree-l1"><a class="reference internal" href="message.html">The MathJax.Message object</a></li> -<li class="toctree-l1"><a class="reference internal" href="html.html">The MathJax.HTML object</a></li> -<li class="toctree-l1"><a class="reference internal" href="callback.html">The MathJax.CallBack class</a></li> -<li class="toctree-l1"><a class="reference internal" href="queue.html">The MathJax.CallBack.Queue class</a></li> -<li class="toctree-l1"><a class="reference internal" href="signal.html">The MathJax.CallBack.Signal class</a></li> -</ul> -</div> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="inputjax.html">The MathJax.InputJax class</a></li> -<li class="toctree-l1"><a class="reference internal" href="outputjax.html">The MathJax.OutputJax class</a></li> -<li class="toctree-l1"><a class="reference internal" href="elementjax.html">The MathJax.ElementJax class</a></li> -<li class="toctree-l1"><a class="reference internal" href="jax.html">The base Jax class</a></li> -</ul> -</div> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="object.html">The MathJax Object-Oriented Programming Model</a></li> -</ul> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="../typeset.html" - title="previous chapter">Modifying Math on the Page</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="variable.html" - title="next chapter">The MathJax variable</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/api/index.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="variable.html" title="The MathJax variable" - >next</a> |</li> - <li class="right" > - <a href="../typeset.html" title="Modifying Math on the Page" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/api/inputjax.html b/docs/build/html/api/inputjax.html @@ -1,224 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax.InputJax Class — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="The MathJax API" href="index.html" /> - <link rel="next" title="The MathJax.OutputJax Class" href="outputjax.html" /> - <link rel="prev" title="The MathJax.Callback.Signal Class" href="signal.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="outputjax.html" title="The MathJax.OutputJax Class" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="signal.html" title="The MathJax.Callback.Signal Class" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-inputjax-class"> -<span id="api-input-jax"></span><h1>The MathJax.InputJax Class<a class="headerlink" href="#the-mathjax-inputjax-class" title="Permalink to this headline">¶</a></h1> -<p>Input jax are the components of MathJax that translate -mathematics from its original format (like <a class="reference internal" href="../glossary.html#term-tex"><em class="xref std std-term">TeX</em></a> or -<a class="reference internal" href="../glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a>) to the MathJax internal format (an <cite>element jax</cite>).</p> -<p>An input jax is stored as a pair of files in a subdirectory of the -<tt class="docutils literal"><span class="pre">jax/input</span></tt> directory, with the subdirectory name being the name of -the input jax. For example, the TeX input jax is stored in -<cite>jax/input/TeX</cite>. The first file, <tt class="docutils literal"><span class="pre">config.js</span></tt>, is loaded when -MathJax is being loaded and configured, and is indicated by listing -the input jax directory in the <cite>jax</cite> array of the MathJax -configuration. The <tt class="docutils literal"><span class="pre">config.js</span></tt> file creates a subclass of the -<cite>MathJax.InputJax</cite> object for the new input jax and registers that -with MathJax, along with the MIME-type that will be used to indicate -the mathematics that is to be processed by the input jax.</p> -<p>The main body of the input jax is stored in the second file, -<tt class="docutils literal"><span class="pre">jax.js</span></tt>, which is loaded when the input jax is first called on to -translate some mathematics. This file augments the original input jax -subclass with the additional methods needed to do the translation. -MathJax calls the input jax’s <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method when it needs -the input jax to translate the contents of a math <tt class="docutils literal"><span class="pre"><script></span></tt> tag.</p> -<p>The <cite>MathJax.InputJax</cite> class is a subclass of the <a class="reference internal" href="jax.html#api-jax"><em>MathJax Jax</em></a> class, and inherits the properties and methods of that -class. Those listed below are the additional or overridden ones from -that class.</p> -<div class="section" id="properties"> -<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">name</tt></dt> -<dd><p>The name of the jax.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">version</tt></dt> -<dd><p>The version number of the jax.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">directory</tt></dt> -<dd><p>The directory where the jax files are stored (e.g., <tt class="docutils literal"><span class="pre">"[MathJax]/jax/input/TeX"</span></tt>);</p> -</dd></dl> - -</div> -<div class="section" id="methods"> -<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> -<dl class="method"> -<dt> -<tt class="descname">Translate</tt><big>(</big><em>script</em><big>)</big></dt> -<dd><p>This is the main routine called by MathJax when a <tt class="docutils literal"><span class="pre"><script></span></tt> of -the appropriate type is found. The default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> -method simply loads the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file and returns that callback -for that load function so that MathJax will know when to try -the <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> action again. When the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file -loads, it should override the default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> with its -own version that does the actual translation; that way, when the -second Translate call is made, it will be to the actual -translation routine rather than the default loader.</p> -<p>The translation process should include the creation of an -<a class="reference internal" href="elementjax.html#api-element-jax"><em>Element Jax</em></a> that stores the data needed -for this element.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>script</strong> — the <tt class="docutils literal"><span class="pre"><script></span></tt> element to be translated</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the <cite>element jax</cite> resulting from the translation</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt> -<tt class="descname">Register</tt><big>(</big><em>mimetype</em><big>)</big></dt> -<dd><p>This registers the MIME-type associated with this input jax so -that MathJax knows to call this input jax when it sees a -<tt class="docutils literal"><span class="pre"><script></span></tt> of that type. An input jax can register more than -one type, but it will be responsible for distinguishing elements -of the various types from one another.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>mimetype</strong> — the MIME-type of the input this jax processes</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="../index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The MathJax.InputJax Class</a><ul> -<li><a class="reference internal" href="#properties">Properties</a></li> -<li><a class="reference internal" href="#methods">Methods</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="signal.html" - title="previous chapter">The MathJax.Callback.Signal Class</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="outputjax.html" - title="next chapter">The MathJax.OutputJax Class</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/api/inputjax.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="outputjax.html" title="The MathJax.OutputJax Class" - >next</a> |</li> - <li class="right" > - <a href="signal.html" title="The MathJax.Callback.Signal Class" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >The MathJax API</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/api/jax.html b/docs/build/html/api/jax.html @@ -1,322 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The Base Jax Class — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="The MathJax API" href="index.html" /> - <link rel="next" title="The MathJax Object-Oriented Programming Model" href="object.html" /> - <link rel="prev" title="The MathJax.ElementJax Class" href="elementjax.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="object.html" title="The MathJax Object-Oriented Programming Model" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="elementjax.html" title="The MathJax.ElementJax Class" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-base-jax-class"> -<span id="api-jax"></span><h1>The Base Jax Class<a class="headerlink" href="#the-base-jax-class" title="Permalink to this headline">¶</a></h1> -<p>The <cite>MathJax.InputJax</cite>, <cite>MathJax.OutputJax</cite> and <cite>MathJax.ElementJax</cite> -classes are all subclasses of the base <cite>Jax</cite> class in MathJax. This -is a private class that implements the methods common to all three -other jax classes.</p> -<p>Unlike most MathJax.Object classes, calling the class object creates a -<em>subclass</em> of the class, rather than an instance of the class. E.g.,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">InputJax</span><span class="p">.</span><span class="nx">MyInputJax</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">InputJax</span><span class="p">({</span> - <span class="nx">name</span><span class="o">:</span> <span class="s2">"MyInputJax"</span><span class="p">,</span> - <span class="nx">version</span><span class="o">:</span> <span class="s2">"1.0"</span><span class="p">,</span> - <span class="p">...</span> -<span class="p">});</span> -</pre></div> -</div> -<p>creates <tt class="docutils literal"><span class="pre">MathJax.InputJax.MyInputJax</span></tt> as a subclass of <tt class="docutils literal"><span class="pre">MathJax.InputJax</span></tt>.</p> -<div class="section" id="class-properties"> -<h2>Class Properties<a class="headerlink" href="#class-properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">directory</tt></dt> -<dd><p>The name of the jax directory (usually <tt class="docutils literal"><span class="pre">"[MathJax]/jax").</span> -<span class="pre">Overridden</span> <span class="pre">in</span> <span class="pre">the</span> <span class="pre">subclass</span> <span class="pre">to</span> <span class="pre">be</span> <span class="pre">the</span> <span class="pre">specific</span> <span class="pre">directory</span> <span class="pre">for</span> <span class="pre">the</span> -<span class="pre">class,</span> <span class="pre">e.g.</span> <span class="pre">``"[MathJax]/jax/input"</span></tt>.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">extensionDir</tt></dt> -<dd><p>The name of the extensions directory (usually <tt class="docutils literal"><span class="pre">"[MathJax]/extensions"</span></tt>).</p> -</dd></dl> - -</div> -<div class="section" id="instance-properties"> -<h2>Instance Properties<a class="headerlink" href="#instance-properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">name</tt></dt> -<dd><p>The name of the jax.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">version</tt></dt> -<dd><p>The version number of the jax.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">directory</tt></dt> -<dd><p>The directory for the jax (e.g., <tt class="docutils literal"><span class="pre">"[MathJax]/jax/input/TeX"</span></tt>).</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">require: null</tt></dt> -<dd><p>An array of files to load before the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file calls the -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.loadComplete()</span></tt> method.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">config: {}</tt></dt> -<dd><p>An object that contains the default configuration options for the -jax. These can be modified by the author by including a -configuration subsection for the specific jax in question.</p> -</dd></dl> - -</div> -<div class="section" id="methods"> -<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> -<dl class="method"> -<dt id="Translate"> -<tt class="descname">Translate</tt><big>(</big><em>script</em><big>)</big><a class="headerlink" href="#Translate" title="Permalink to this definition">¶</a></dt> -<dd><p>This is the method that the <tt class="docutils literal"><span class="pre">MathJax.Hub</span></tt> calls when it needs -the input or output jax to process the given math <tt class="docutils literal"><span class="pre"><script></span></tt> -call. Its default action is to start loading the jax’s <tt class="docutils literal"><span class="pre">jax.js</span></tt> -file, and redefine the <a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method to be the -<a class="reference internal" href="#noTranslate" title="noTranslate"><tt class="xref py py-meth docutils literal"><span class="pre">noTranslate()</span></tt></a> method below. The <tt class="docutils literal"><span class="pre">jax.js</span></tt> file should -redefine the <a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method to perform the translation -operation for the specific jax. For an input jax, it should -return the <cite>ElementJax</cite> object that it created.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first"> -<li><dl class="first docutils"> -<dt><strong>script</strong> — reference to the DOM <tt class="docutils literal"><span class="pre"><script></span></tt> object for</dt> -<dd><p class="first last">the mathematics to be translated</p> -</dd> -</dl> -</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">an <cite>ElementJax</cite> object, or <tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="noTranslate"> -<tt class="descname">noTranslate</tt><big>(</big><em>script</em><big>)</big><a class="headerlink" href="#noTranslate" title="Permalink to this definition">¶</a></dt> -<dd><p>This is a temporary routine that is used while the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file -is loading. It throws an error indicating the the -<a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method hasn’t been redefined. That way, if -the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file failes to load for some reason, you will -receive an error trying to process mathematics with this input -jax.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first"> -<li><dl class="first docutils"> -<dt><strong>script</strong> — reference to the DOM <tt class="docutils literal"><span class="pre"><script></span></tt> object for</dt> -<dd><p class="first last">the mathematics to be translated</p> -</dd> -</dl> -</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="Register"> -<tt class="descname">Register</tt><big>(</big><em>mimetype</em><big>)</big><a class="headerlink" href="#Register" title="Permalink to this definition">¶</a></dt> -<dd><p>This method is overridden in the <cite>InputJax</cite>, <cite>OutputJax</cite> and -<cite>ElementJax</cite> subclasses to handle the registration of those -classes of jax.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>mimetype</strong> — the MIME-type to be associated with the jax</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt> -<tt class="descname">Config</tt><big>(</big><big>)</big></dt> -<dd><p>Inserts the configuration block for this jax from the author’s -configuration specification into the jax’s <tt class="docutils literal"><span class="pre">config</span></tt> property. -If the configuration includes an <tt class="docutils literal"><span class="pre">Augment</span></tt> object, that is used -to augment the jax (that is, the configuration can override the -methods of the object, as well as the data). This is called -automatically during the loading of the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file.</p> -</dd></dl> - -<dl class="method"> -<dt id="Startup"> -<tt class="descname">Startup</tt><big>(</big><big>)</big><a class="headerlink" href="#Startup" title="Permalink to this definition">¶</a></dt> -<dd><p>This is a method that can be overridden in the subclasses to -perform initialization at startup time (after the configuration -has occurred).</p> -</dd></dl> - -<dl class="method"> -<dt> -<tt class="descname">loadComplete</tt><big>(</big><em>file</em><big>)</big></dt> -<dd><p>This is called by the <tt class="docutils literal"><span class="pre">config.js</span></tt> and <tt class="docutils literal"><span class="pre">jax.js</span></tt> files when they -are completely loaded and are ready to signal that fact to -MathJax. For <tt class="docutils literal"><span class="pre">config.js</span></tt>, this simply calls the -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.loadComplete()</span></tt> method for the <tt class="docutils literal"><span class="pre">config.js</span></tt> -file. For <tt class="docutils literal"><span class="pre">jax.js</span></tt>, the actions performed here are the -following:</p> -<blockquote> -<div><ol class="arabic simple"> -<li>Post the “[name] Jax Config” message to the startup signal.</li> -<li>Perform the jax’s <a class="reference internal" href="hub.html#Config" title="Config"><tt class="xref py py-meth docutils literal"><span class="pre">Config()</span></tt></a> method.</li> -<li>Post the “[name] Jax Require” message to the startup signal.</li> -<li>Load the files from the jax’s <tt class="docutils literal"><span class="pre">require</span></tt> array (which may -have been modified during the configuration process).</li> -<li>Post the “[name] Jax Startup” message to the startup signal.</li> -<li>Perform the jax’s <a class="reference internal" href="#Startup" title="Startup"><tt class="xref py py-meth docutils literal"><span class="pre">Startup()</span></tt></a> method.</li> -<li>Post the “[name] Jax Ready” message to the startup signal.</li> -<li>perform the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.loadComplete()</span></tt> call for the -<tt class="docutils literal"><span class="pre">jax.js</span></tt> file.</li> -</ol> -</div></blockquote> -</dd></dl> - -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="../index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The Base Jax Class</a><ul> -<li><a class="reference internal" href="#class-properties">Class Properties</a></li> -<li><a class="reference internal" href="#instance-properties">Instance Properties</a></li> -<li><a class="reference internal" href="#methods">Methods</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="elementjax.html" - title="previous chapter">The MathJax.ElementJax Class</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="object.html" - title="next chapter">The MathJax Object-Oriented Programming Model</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/api/jax.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="object.html" title="The MathJax Object-Oriented Programming Model" - >next</a> |</li> - <li class="right" > - <a href="elementjax.html" title="The MathJax.ElementJax Class" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >The MathJax API</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/api/message.html b/docs/build/html/api/message.html @@ -1,227 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax.Message Object — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="The MathJax API" href="index.html" /> - <link rel="next" title="The MathJax.HTML Object" href="html.html" /> - <link rel="prev" title="The MathJax.Ajax Object" href="ajax.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="html.html" title="The MathJax.HTML Object" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="ajax.html" title="The MathJax.Ajax Object" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-message-object"> -<span id="api-message"></span><h1>The MathJax.Message Object<a class="headerlink" href="#the-mathjax-message-object" title="Permalink to this headline">¶</a></h1> -<p>The <tt class="docutils literal"><span class="pre">MathJax.Message</span></tt> object contains the methods used to manage the -small message area that appears at the lower-left corner of the -window. MathJax uses this area to inform the user of time-consuming -actions, like loading files and fonts, or how far along in the -typesetting process it is.</p> -<p>The page author can customize the look of the message window by -setting styles for the <tt class="docutils literal"><span class="pre">#MathJax_Message</span></tt> selector (which can be -set via</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">styles</span><span class="o">:</span> <span class="p">{</span> - <span class="s2">"#MathJax_Message"</span><span class="o">:</span> <span class="p">{</span> - <span class="p">...</span> - <span class="p">}</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>Because of a bug in Internet Explorer, in order to change the side of -the screen where the the message occurs, you must also set the side -for <tt class="docutils literal"><span class="pre">#MathJax_MSIE_Frame</span></tt>, as in</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">styles</span><span class="o">:</span> <span class="p">{</span> - <span class="s2">"#MathJax_Message"</span><span class="o">:</span> <span class="p">{</span><span class="nx">left</span><span class="o">:</span> <span class="s2">""</span><span class="p">,</span> <span class="nx">right</span><span class="o">:</span> <span class="mi">0</span><span class="p">},</span> - <span class="s2">"#MathJax_MSIE_Frame"</span><span class="o">:</span> <span class="p">{</span><span class="nx">left</span><span class="o">:</span> <span class="s2">""</span><span class="p">,</span> <span class="nx">right</span><span class="o">:</span> <span class="mi">0</span><span class="p">}</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>It is possible that a message is already being displayed when another -message needs to be posted. For this reason, when a message is -displayed on screen, it gets an id number that is used when you want -to remove or change that message. That way, when a message is -removed, the previous message (if any) can be redisplayed if it hasn’t -been removed. This allows for intermittent messages (like file -loading messages) to obscure longer-term message (like “Processing -Math” messages) temporarily.</p> -<div class="section" id="methods"> -<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> -<dl class="method"> -<dt id="Set"> -<tt class="descname">Set</tt><big>(</big><em>message</em><span class="optional">[</span>, <em>n</em><span class="optional">[</span>, <em>delay</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#Set" title="Permalink to this definition">¶</a></dt> -<dd><p>This sets the message being displayed to the given <cite>message</cite> -string. If <cite>n</cite> is not <tt class="docutils literal"><span class="pre">null</span></tt>, it represents a message id -number and the text is set for that message id, otherwise a new id -number is created for this message. If <cite>delay</cite> is provided, it is -the time (in milliseconds) to display the message before it is -cleared. If <cite>delay</cite> is not provided, the message will not be -removed automatically; you must call the -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Messsage.Clear()</span></tt> method by hand to remove it.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>message</strong> — the text to display in the message area</li> -<li><strong>n</strong> — the message id number</li> -<li><strong>delay</strong> — amout of time to display the message</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the message id nuber for this message.</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="Clear"> -<tt class="descname">Clear</tt><big>(</big><em>n</em><span class="optional">[</span>, <em>delay</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Clear" title="Permalink to this definition">¶</a></dt> -<dd><p>This causes the message with id <cite>n</cite> to be removed after the given -<cite>delay</cite>, in milliseconds. The default delay is 600 milliseconds.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>n</strong> — the message id number</li> -<li><strong>delay</strong> — the delay before removing the message</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="Log"> -<tt class="descname">Log</tt><big>(</big><big>)</big><a class="headerlink" href="#Log" title="Permalink to this definition">¶</a></dt> -<dd><p>Returns a string of all the messages issued so far, separated by -newlines. This is used in debugging MathJax operations.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body">string of all messages so far</td> -</tr> -</tbody> -</table> -</dd></dl> - -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="../index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The MathJax.Message Object</a><ul> -<li><a class="reference internal" href="#methods">Methods</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="ajax.html" - title="previous chapter">The MathJax.Ajax Object</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="html.html" - title="next chapter">The MathJax.HTML Object</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/api/message.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="html.html" title="The MathJax.HTML Object" - >next</a> |</li> - <li class="right" > - <a href="ajax.html" title="The MathJax.Ajax Object" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >The MathJax API</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/api/object.html b/docs/build/html/api/object.html @@ -1,359 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax Object-Oriented Programming Model — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="The MathJax API" href="index.html" /> - <link rel="next" title="Converting to MathJax from jsMath" href="../jsMath.html" /> - <link rel="prev" title="The Base Jax Class" href="jax.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="../jsMath.html" title="Converting to MathJax from jsMath" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="jax.html" title="The Base Jax Class" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-object-oriented-programming-model"> -<span id="api-object"></span><h1>The MathJax Object-Oriented Programming Model<a class="headerlink" href="#the-mathjax-object-oriented-programming-model" title="Permalink to this headline">¶</a></h1> -<p>MathJax uses an object-oriented programming model for its main -components, such as the <cite>Input jax</cite>, <cite>Output jax</cite>, and <cite>Element jax</cite>. -The model is intended to be light-weight and is based on JavaScript’s -prototype inheritance mechanism. Object classes are created by making -subclasses of <cite>MathJax.Object</cite> or one of its subclasses, and are -instantiated by calling the object class as you would a function.</p> -<p>For example:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">Foo</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">({</span> - <span class="nx">Init</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">SetX</span><span class="p">(</span><span class="nx">x</span><span class="p">)},</span> - <span class="nx">getX</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">x</span><span class="p">},</span> - <span class="nx">setX</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">x</span> <span class="o">=</span> <span class="nx">x</span><span class="p">}</span> -<span class="p">});</span> -<span class="kd">var</span> <span class="nx">foo</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">Foo</span><span class="p">(</span><span class="s2">"bar"</span><span class="p">);</span> -<span class="nx">foo</span><span class="p">.</span><span class="nx">getX</span><span class="p">();</span> <span class="c1">// returns "bar"</span> -<span class="nx">foo</span><span class="p">.</span><span class="nx">setX</span><span class="p">(</span><span class="s2">"foobar"</span><span class="p">);</span> -<span class="nx">foo</span><span class="p">.</span><span class="nx">getX</span><span class="p">();</span> <span class="c1">// returns "foobar"</span> -</pre></div> -</div> -<p>Object classes can have static properties and methods, which are -accessed via the object class variable. E.g., -<tt class="docutils literal"><span class="pre">MathJax.Object.Foo.SUPER</span></tt> or <tt class="docutils literal"><span class="pre">MathJax.Object.Foo.Augment()</span></tt> for -the object in the example above. Static values are not inherited by -subclasses.</p> -<div class="section" id="static-properties"> -<h2>Static Properties<a class="headerlink" href="#static-properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">SUPER</tt></dt> -<dd><p>Pointer to the super class for this subclass. (It is a reference to -<cite>MathJax.Object</cite> in the example above.)</p> -</dd></dl> - -</div> -<div class="section" id="static-methods"> -<h2>Static Methods<a class="headerlink" href="#static-methods" title="Permalink to this headline">¶</a></h2> -<dl class="method"> -<dt id="Subclass"> -<tt class="descname">Subclass</tt><big>(</big><em>def</em><span class="optional">[</span>, <em>static</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Subclass" title="Permalink to this definition">¶</a></dt> -<dd><p>Creates a subclass of the given class using the contents of the -<cite>def</cite> object to define new methods and properties of the object -class, and the contents of the optional <cite>static</cite> object to define -new static methods and properties.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>def</strong> — object that defines the properties and methods</li> -<li><strong>static</strong> — object that defines static properties and methods</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the new object class</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="Augment"> -<tt class="descname">Augment</tt><big>(</big><em>def</em><span class="optional">[</span>, <em>static</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Augment" title="Permalink to this definition">¶</a></dt> -<dd><p>Adds new properties and methods to the class prototype. All -instances of the object already in existence will receive the new -properties and methods automatically.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>def</strong> — object that defines the properties and methods</li> -<li><strong>static</strong> — object that defines static properties and methods</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the object class itself</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -</div> -<div class="section" id="properties"> -<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">constructor</tt></dt> -<dd><p>Pointer to the constructor function for this class. E.g., -<tt class="docutils literal"><span class="pre">foo.constructor</span></tt> would be a reference to <tt class="docutils literal"><span class="pre">MathJax.Object.Foo</span></tt> -in the example above.</p> -</dd></dl> - -</div> -<div class="section" id="methods"> -<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> -<dl class="method"> -<dt id="Init"> -<tt class="descname">Init</tt><big>(</big><span class="optional">[</span><em>data</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Init" title="Permalink to this definition">¶</a></dt> -<dd><p>An optional function that is called when an instance of the class -is created. When called, the <cite>this</cite> variable is set to the newly -instantiated object, and the <cite>data</cite> is whatever was passed to the -object constructor. For instance, in the example above, the -variable <tt class="docutils literal"><span class="pre">foo</span></tt> is created by calling -<tt class="docutils literal"><span class="pre">MathJax.Object.Foo("bar")</span></tt>, which calls the -<tt class="docutils literal"><span class="pre">MathJax.Object.Foo</span></tt> object’s <a class="reference internal" href="#Init" title="Init"><tt class="xref py py-meth docutils literal"><span class="pre">Init()</span></tt></a> method with <cite>data</cite> -equal to <tt class="docutils literal"><span class="pre">"bar"</span></tt>. If desired, the <a class="reference internal" href="#Init" title="Init"><tt class="xref py py-meth docutils literal"><span class="pre">Init()</span></tt></a> method can -create a <em>different</em> object, and return that, in which case this -becomes the return value for the object constructor.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>data</strong> — the data from the constructor call</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt> or the object to be returned by the constructor</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="isa"> -<tt class="descname">isa</tt><big>(</big><em>class</em><big>)</big><a class="headerlink" href="#isa" title="Permalink to this definition">¶</a></dt> -<dd><p>Returns <tt class="docutils literal"><span class="pre">true</span></tt> if the object is an instance of the given class, -or of a subclass of the given class, and <tt class="docutils literal"><span class="pre">false</span></tt> otherwise. So -using the <tt class="docutils literal"><span class="pre">foo</span></tt> value defined above,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">foo</span><span class="p">.</span><span class="nx">isa</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">);</span> <span class="c1">// returns true</span> -<span class="nx">foo</span><span class="p">.</span><span class="nx">isa</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">Foo</span><span class="p">);</span> <span class="c1">// returns true</span> -<span class="nx">foo</span><span class="p">.</span><span class="nx">isa</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">InputJax</span><span class="p">);</span> <span class="c1">// returns false</span> -</pre></div> -</div> -</dd></dl> - -<dl class="method"> -<dt id="can"> -<tt class="descname">can</tt><big>(</big><em>method</em><big>)</big><a class="headerlink" href="#can" title="Permalink to this definition">¶</a></dt> -<dd><p>Checks if the object has the given <cite>method</cite> and returns <tt class="docutils literal"><span class="pre">true</span></tt> -if so, otherwise returns <tt class="docutils literal"><span class="pre">false</span></tt>. This allows you to test if an -object has a particular function available before trying to call -it (i.e., if an object implements a particular feature). For example:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">foo</span><span class="p">.</span><span class="nx">can</span><span class="p">(</span><span class="s2">"getX"</span><span class="p">);</span> <span class="c1">// returns true</span> -<span class="nx">foo</span><span class="p">.</span><span class="nx">can</span><span class="p">(</span><span class="s2">"bar"</span><span class="p">);</span> <span class="c1">// returns false</span> -</pre></div> -</div> -</dd></dl> - -<dl class="method"> -<dt id="has"> -<tt class="descname">has</tt><big>(</big><em>property</em><big>)</big><a class="headerlink" href="#has" title="Permalink to this definition">¶</a></dt> -<dd><p>Checks if the object has the given <cite>property</cite> and returns <tt class="docutils literal"><span class="pre">true</span></tt> -if so, otherwise returns <tt class="docutils literal"><span class="pre">false</span></tt>. This allows you to test if an -object has a particular property available before trying to use -it. For example:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">foo</span><span class="p">.</span><span class="nx">has</span><span class="p">(</span><span class="s2">"getX"</span><span class="p">);</span> <span class="c1">// returns true</span> -<span class="nx">foo</span><span class="p">.</span><span class="nx">has</span><span class="p">(</span><span class="s2">"x"</span><span class="p">);</span> <span class="c1">// returns true</span> -<span class="nx">foo</span><span class="p">.</span><span class="nx">has</span><span class="p">(</span><span class="s2">"bar"</span><span class="p">);</span> <span class="c1">// returns false</span> -</pre></div> -</div> -</dd></dl> - -</div> -<div class="section" id="accessing-the-super-class"> -<h2>Accessing the Super Class<a class="headerlink" href="#accessing-the-super-class" title="Permalink to this headline">¶</a></h2> -<p>If a subclass overrides a method of its parent class, it may want to -call the original function as part of its replacement method. The -semantics for this are a bit awkward, but work efficiently. Within a -method, the value <tt class="docutils literal"><span class="pre">arguments.callee.SUPER</span></tt> refers to the super -class, so you can access any method of the superclass using that. In -order to have <cite>this</cite> refer to the current object when you call the -super class, however, you need to use <tt class="docutils literal"><span class="pre">call()</span></tt> or -<tt class="docutils literal"><span class="pre">apply()</span></tt> to access the given method.</p> -<p>For example, <tt class="docutils literal"><span class="pre">arguments.callee.SUPER.method.call(this,data)</span></tt> would -call the superclass’ <cite>method</cite> and pass it <cite>data</cite> as its argument, -properly passing the current object as <cite>this</cite>. Alternatively, you can -use <tt class="docutils literal"><span class="pre">this.SUPER(arguments)</span></tt> in place of <tt class="docutils literal"><span class="pre">arguments.callee.SUPER</span></tt>. -It is also possible to refer to the super class explicitly rather than -through <tt class="docutils literal"><span class="pre">arguments.callee.SUPER</span></tt>, as in the following example:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class1</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">({</span> - <span class="nx">Init</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">x</span> <span class="o">=</span> <span class="nx">x</span><span class="p">},</span> - <span class="nx">XandY</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="s2">"Class1: x and y = "</span> <span class="o">+</span> <span class="k">this</span><span class="p">.</span><span class="nx">x</span> <span class="o">+</span> <span class="s2">" and "</span> <span class="o">+</span> <span class="nx">y</span><span class="p">}</span> -<span class="p">});</span> - -<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class2</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class1</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">({</span> - <span class="nx">XandY</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="s2">"Class2: "</span><span class="o">+</span><span class="nx">arguments</span><span class="p">.</span><span class="nx">callee</span><span class="p">.</span><span class="nx">SUPER</span><span class="p">.</span><span class="nx">XandY</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="k">this</span><span class="p">,</span><span class="nx">y</span><span class="p">)}</span> -<span class="p">});</span> - -<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class3</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class2</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">({</span> - <span class="nx">XandY</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="s2">"Class3: "</span><span class="o">+</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class2</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">XandY</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="k">this</span><span class="p">,</span><span class="nx">y</span><span class="p">)}</span> -<span class="p">});</span> - -<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class4</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class1</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">({</span> - <span class="nx">XandY</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="s2">"Class4: "</span><span class="o">+</span><span class="k">this</span><span class="p">.</span><span class="nx">SUPER</span><span class="p">(</span><span class="nx">arguments</span><span class="p">).</span><span class="nx">XandY</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="k">this</span><span class="p">,</span><span class="nx">y</span><span class="p">)}</span> -<span class="p">});</span> - -<span class="kd">var</span> <span class="nx">foo</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class2</span><span class="p">(</span><span class="s2">"foo"</span><span class="p">);</span> -<span class="nx">foo</span><span class="p">.</span><span class="nx">XandY</span><span class="p">(</span><span class="s2">"bar"</span><span class="p">);</span> <span class="c1">// returns "Class2: Class1: x and y = foo and bar"</span> -<span class="kd">var</span> <span class="nx">bar</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class3</span><span class="p">(</span><span class="s2">"bar"</span><span class="p">);</span> -<span class="nx">bar</span><span class="p">.</span><span class="nx">XandY</span><span class="p">(</span><span class="s2">"foo"</span><span class="p">);</span> <span class="c1">// returns "Class3: Class2: Class1: x and y = bar and foo"</span> -<span class="kd">var</span> <span class="nx">moo</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class4</span><span class="p">(</span><span class="s2">"moo"</span><span class="p">);</span> -<span class="nx">moo</span><span class="p">.</span><span class="nx">XandY</span><span class="p">(</span><span class="s2">"cow"</span><span class="p">);</span> <span class="c1">// returns "Class4: Class1: x and y = moo and cow"</span> -</pre></div> -</div> -<p>Since both of these mechanisms are rather awkward, MathJax provides an -alternative syntax that is easier on the programmer, but at the cost -of some inefficiency in creating the subclass and in calling methods -that access the super class.</p> -<p>Since most calls to the super class are to the overridden method, not -to some other method, the method name and the <tt class="docutils literal"><span class="pre">call()</span></tt> are -essentially redundant. You can get a more convenient syntax by -wrapping the <cite>def</cite> for the <a class="reference internal" href="#Subclass" title="Subclass"><tt class="xref py py-meth docutils literal"><span class="pre">Subclass()</span></tt></a> call in a call to -<tt class="docutils literal"><span class="pre">MathJax.Object.SimpleSUPER()</span></tt>, as in the following example:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class1</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">({</span> - <span class="nx">Init</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">x</span> <span class="o">=</span> <span class="nx">x</span><span class="p">},</span> - <span class="nx">XandY</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="s2">"Class1: x and y = "</span> <span class="o">+</span> <span class="k">this</span><span class="p">.</span><span class="nx">x</span> <span class="o">+</span> <span class="s2">" and "</span> <span class="o">+</span> <span class="nx">y</span><span class="p">}</span> -<span class="p">});</span> - -<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class2</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class1</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">(</span> - <span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">SimpleSUPER</span><span class="p">({</span> - <span class="nx">XandY</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="s2">"Class2: "</span><span class="o">+</span><span class="k">this</span><span class="p">.</span><span class="nx">SUPER</span><span class="p">(</span><span class="nx">y</span><span class="p">)},</span> - <span class="nx">AnotherMethod</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">x</span><span class="p">}</span> <span class="c1">// it's OK if a method doesn't use SUPER</span> - <span class="p">})</span> -<span class="p">);</span> - -<span class="kd">var</span> <span class="nx">foo</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class2</span><span class="p">(</span><span class="s2">"foo"</span><span class="p">);</span> -<span class="nx">foo</span><span class="p">.</span><span class="nx">XandY</span><span class="p">(</span><span class="s2">"bar"</span><span class="p">);</span> <span class="c1">// returns "Class2: Class1: x and y = foo and bar"</span> -</pre></div> -</div> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="../index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The MathJax Object-Oriented Programming Model</a><ul> -<li><a class="reference internal" href="#static-properties">Static Properties</a></li> -<li><a class="reference internal" href="#static-methods">Static Methods</a></li> -<li><a class="reference internal" href="#properties">Properties</a></li> -<li><a class="reference internal" href="#methods">Methods</a></li> -<li><a class="reference internal" href="#accessing-the-super-class">Accessing the Super Class</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="jax.html" - title="previous chapter">The Base Jax Class</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="../jsMath.html" - title="next chapter">Converting to MathJax from jsMath</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/api/object.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="../jsMath.html" title="Converting to MathJax from jsMath" - >next</a> |</li> - <li class="right" > - <a href="jax.html" title="The Base Jax Class" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >The MathJax API</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/api/outputjax.html b/docs/build/html/api/outputjax.html @@ -1,249 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax.OutputJax Class — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="The MathJax API" href="index.html" /> - <link rel="next" title="The MathJax.ElementJax Class" href="elementjax.html" /> - <link rel="prev" title="The MathJax.InputJax Class" href="inputjax.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="elementjax.html" title="The MathJax.ElementJax Class" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="inputjax.html" title="The MathJax.InputJax Class" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-outputjax-class"> -<span id="api-output-jax"></span><h1>The MathJax.OutputJax Class<a class="headerlink" href="#the-mathjax-outputjax-class" title="Permalink to this headline">¶</a></h1> -<p>Output jax are the components of MathJax that translate -mathematics from the MathJax internal format (an <cite>element jax</cite>) -to whatever output is required to represent the mathematics (e.g., -MathML elements, or HTML-with-CSS that formats the mathematics on screen).</p> -<p>An output jax is stored as a pair of files in a subdirectory of the -the <tt class="docutils literal"><span class="pre">jax/output</span></tt> directory, with the subdirectory name being the -name of the output jax. For example, the NativeMML output jax is -stored in <cite>jax/output/NativeMML</cite>. The first file, <tt class="docutils literal"><span class="pre">config.js</span></tt>, is -loaded when MathJax is being loaded and configured, and is indicated -by listing the input jax directory in the <cite>jax</cite> array of the MathJax -configuration. The <tt class="docutils literal"><span class="pre">config.js</span></tt> file creates a subclass of the -<cite>MathJax.OutputJax</cite> object for the new output jax and registers it -with MathJax, along with the MIME-type of the element jax that it can -process.</p> -<p>The main body of the output jax is stored in the second file, <tt class="docutils literal"><span class="pre">jax.js</span></tt>, -which is loaded when the output jax is first called on to translate -some mathematics. This file augments the original output jax -subclass with the additional methods needed to produce the output. -MathJax calls the input jax’s <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method when it needs -the output jax to translate an element jax to produce output.</p> -<p>The <cite>MathJax.OutputJax</cite> class is a subclass of the <a class="reference internal" href="jax.html#api-jax"><em>MathJax Jax</em></a> class, and inherits the properties and methods of that -class. Those listed below are the additional or overridden ones from -that class.</p> -<div class="section" id="properties"> -<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">name</tt></dt> -<dd><p>The name of the jax.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">version</tt></dt> -<dd><p>The version number of the jax.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">directory</tt></dt> -<dd><p>The directory where the jax files are stored (e.g., <tt class="docutils literal"><span class="pre">"[MathJax]/jax/output/HTML-CSS"</span></tt>);</p> -</dd></dl> - -</div> -<div class="section" id="methods"> -<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> -<dl class="method"> -<dt> -<tt class="descname">Translate</tt><big>(</big><em>script</em><big>)</big></dt> -<dd><p>This is the main routine called by MathJax when an element jax is -to be converted to output. The default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> -method simply loads the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file and returns that callback -for that load function so that MathJax will know when to try -the <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> action again. When the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file -loads, it should override the default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> with its -own version that does the actual translation; that way, when the -second Translate call is made, it will be to the actual -translation routine rather than the default loader.</p> -<p>You should use <tt class="docutils literal"><span class="pre">MathJax.Hub.getJaxFor(script)</span></tt> to obtain the -element jax for the given script. The translation process may add -modify the element jax (e.g., if it has data that needs to be -stored with the jax), and may insert DOM elements into the -document near the jax’s <tt class="docutils literal"><span class="pre"><script></span></tt> tag.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>script</strong> — the <tt class="docutils literal"><span class="pre"><script></span></tt> element to be translated</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the <cite>element jax</cite> resulting from the translation</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt> -<tt class="descname">Register</tt><big>(</big><em>mimetype</em><big>)</big></dt> -<dd><p>This registers the MIME-type for the element jax associated with -this output jax so that MathJax knows to call this jax when it -wants to display an element jax of that type. Several output jax -may register for the same input jax, in which case the first one -to register will be the default one for that type.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>mimetype</strong> — the MIME-type of the input this jax processes</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt> -<tt class="descname">Remove</tt><big>(</big><em>jax</em><big>)</big></dt> -<dd><p>Removes the output associated with the given element jax. The -routine can use <tt class="docutils literal"><span class="pre">jax.SourceElement()</span></tt> to locate the <tt class="docutils literal"><span class="pre"><script></span></tt> -tag associated with the element jax.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>jax</strong> — the element jax whose display should be removed</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="../index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The MathJax.OutputJax Class</a><ul> -<li><a class="reference internal" href="#properties">Properties</a></li> -<li><a class="reference internal" href="#methods">Methods</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="inputjax.html" - title="previous chapter">The MathJax.InputJax Class</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="elementjax.html" - title="next chapter">The MathJax.ElementJax Class</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/api/outputjax.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="elementjax.html" title="The MathJax.ElementJax Class" - >next</a> |</li> - <li class="right" > - <a href="inputjax.html" title="The MathJax.InputJax Class" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >The MathJax API</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/api/queue.html b/docs/build/html/api/queue.html @@ -1,250 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax.Callback.Queue Class — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="The MathJax API" href="index.html" /> - <link rel="next" title="The MathJax.Callback.Signal Class" href="signal.html" /> - <link rel="prev" title="The MathJax.Callback Class" href="callback.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="signal.html" title="The MathJax.Callback.Signal Class" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="callback.html" title="The MathJax.Callback Class" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-callback-queue-class"> -<span id="api-queue"></span><h1>The MathJax.Callback.Queue Class<a class="headerlink" href="#the-mathjax-callback-queue-class" title="Permalink to this headline">¶</a></h1> -<p>The <tt class="docutils literal"><span class="pre">MathJax.Callback.Queue</span></tt> object is one of the key mechanisms -used by MathJax to synchronize its actions with those that occur -asynchronously, like loading files and stylesheets. A <cite>Queue</cite> obejct -is used to coordinate a sequence of actions so that they are performed -one after another, even when one action has to wait for an -asynchronous process to complete. This guarantees that operations are -performed in the right order even when the code must wait for some -other action to occur. See <a class="reference internal" href="../synchronize.html#synchronization"><em>Synchronizing with MathJax</em></a> for more details, and <a class="reference internal" href="../queues.html#using-queues"><em>Using Queues</em></a> in particular for examples of how to specify and use -MathJax <cite>Queue</cite> objects.</p> -<div class="section" id="properties"> -<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">pending</tt></dt> -<dd><p>This is non-zero when the queue is waiting for a command to -complete, i.e. a command being processed returns a <cite>Callback</cite> -object, indicating that the queue should wait for that action to -complete before processing additional commands.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">running</tt></dt> -<dd><p>This is non-zero when the queue is executing one of the commands in -the queue.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">queue</tt></dt> -<dd><p>An array containing the queued commands that are yet to be performed.</p> -</dd></dl> - -</div> -<div class="section" id="methods"> -<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> -<dl class="method"> -<dt id="Push"> -<tt class="descname">Push</tt><big>(</big><em>callback</em>, <em>...</em><big>)</big><a class="headerlink" href="#Push" title="Permalink to this definition">¶</a></dt> -<dd><p>Adds commands to the queue and runs them (if the queue is not -pending or running another command). If one of the callbacks is -an actual <cite>Callback</cite> object rather than a callback specification, -then the command queued is an internal command to wait for the -given callback to complete. That is, that callback is not itself -queued to be executed, but a wait for that callback is queued. -The <a class="reference internal" href="#Push" title="Push"><tt class="xref py py-meth docutils literal"><span class="pre">Push()</span></tt></a> method returns the last callback that was -added to the queue (so that it can be used for further -synchronization, say as an entry in some other queue).</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>callback</strong> — the callback specifications to be added to the queue</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the last callback object added to the queue</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt> -<tt class="descname">Process</tt><big>(</big><big>)</big></dt> -<dd><blockquote> -<div>Process the commands in the queue, provided the queue is not -waiting for another command to complete. This method is used -internally; you should not need to call it yourself.</div></blockquote> -</dd></dl> - -<dl class="method"> -<dt id="Suspend"> -<tt class="descname">Suspend</tt><big>(</big><big>)</big><a class="headerlink" href="#Suspend" title="Permalink to this definition">¶</a></dt> -<dd><p>Increments the <cite>running</cite> property, indicating that any commands that -are added the queue should not be executed immediately, but should -be queued for later execution (when its <a class="reference internal" href="#Resume" title="Resume"><tt class="xref py py-meth docutils literal"><span class="pre">Resume()</span></tt></a> is -called). This method is used internally; you should not need to -call it yourself.</p> -</dd></dl> - -<dl class="method"> -<dt id="Resume"> -<tt class="descname">Resume</tt><big>(</big><big>)</big><a class="headerlink" href="#Resume" title="Permalink to this definition">¶</a></dt> -<dd><p>Decrements the <cite>running</cite> property, if it is positive. When it is -zero, commands can be processed, but that is not done -automatically — you would need to call <a class="reference internal" href="hub.html#Process" title="Process"><tt class="xref py py-meth docutils literal"><span class="pre">Process()</span></tt></a> to make -that happen. This method is used internally; you should not need -to call it yourself.</p> -</dd></dl> - -<dl class="method"> -<dt id="wait"> -<tt class="descname">wait</tt><big>(</big><em>callback</em><big>)</big><a class="headerlink" href="#wait" title="Permalink to this definition">¶</a></dt> -<dd><p>Used internally when an entry in the queue is a <cite>Callback</cite> object -rather than a callback specification. A callback to this function -(passing it the original callback) is queued instead, and it -simply returns the callback it was passed. Since the queue will -wait for a callback if it is the return value of one of the -commands it executes, this effectively make the queue wait for the -original callback at that point in the command queue.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>callback</strong> — the function to complete before returning to the queue</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the passed callback function</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="call"> -<tt class="descname">call</tt><big>(</big><big>)</big><a class="headerlink" href="#call" title="Permalink to this definition">¶</a></dt> -<dd><p>An internal function used to restart processing of the queue after -it has been waiting for a command to complete.</p> -</dd></dl> - -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="../index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The MathJax.Callback.Queue Class</a><ul> -<li><a class="reference internal" href="#properties">Properties</a></li> -<li><a class="reference internal" href="#methods">Methods</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="callback.html" - title="previous chapter">The MathJax.Callback Class</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="signal.html" - title="next chapter">The MathJax.Callback.Signal Class</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/api/queue.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="signal.html" title="The MathJax.Callback.Signal Class" - >next</a> |</li> - <li class="right" > - <a href="callback.html" title="The MathJax.Callback Class" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >The MathJax API</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/api/signal.html b/docs/build/html/api/signal.html @@ -1,337 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax.Callback.Signal Class — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="The MathJax API" href="index.html" /> - <link rel="next" title="The MathJax.InputJax Class" href="inputjax.html" /> - <link rel="prev" title="The MathJax.Callback.Queue Class" href="queue.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="inputjax.html" title="The MathJax.InputJax Class" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="queue.html" title="The MathJax.Callback.Queue Class" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-callback-signal-class"> -<span id="api-signal"></span><h1>The MathJax.Callback.Signal Class<a class="headerlink" href="#the-mathjax-callback-signal-class" title="Permalink to this headline">¶</a></h1> -<p>The <tt class="docutils literal"><span class="pre">MathJax.Callback.Signal</span></tt> object is one of the key mechanisms -used by MathJax to synchronize its actions with those that occur -asynchronously, like loading files and stylesheets. A <cite>Signal</cite> object -is used to pulicise the fact that MathJax has performed certain -actions, giving other code running the the web page the chance to -react to those actions. See <a class="reference internal" href="../synchronize.html#synchronization"><em>Synchronizing with MathJax</em></a> for more details, and <a class="reference internal" href="../signals.html#using-signals"><em>Using Signals</em></a> in particular for examples of how to specify and use -MathJax <cite>Signal</cite> objects.</p> -<p>The <cite>Callback Signal</cite> object is a subclass of the <a class="reference internal" href="queue.html#api-queue"><em>Callback Queue</em></a> object.</p> -<div class="section" id="properties"> -<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">name</tt></dt> -<dd><p>The name of the signal. Each signal is named so that -various components can access it. The first one to request a -particular signal causes it to be created, and other requests for -the signal return references to the same object.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">posted</tt></dt> -<dd><p>Array used internally to stored the post history so that when new -listeners express interests in this signal, they can be informed -of the signals that have been posted so far. This can be cleared -using the signal’s <a class="reference internal" href="message.html#Clear" title="Clear"><tt class="xref py py-meth docutils literal"><span class="pre">Clear()</span></tt></a> method.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">listeners</tt></dt> -<dd><p>Array of callbacks to the listeners who have expressed interest in -hearing about posts to this signal. When a post occurs, the -listeners are called in each turn, passing them the message that -was posted.</p> -</dd></dl> - -</div> -<div class="section" id="methods"> -<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> -<dl class="method"> -<dt id="Post"> -<tt class="descname">Post</tt><big>(</big><em>message</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Post" title="Permalink to this definition">¶</a></dt> -<dd><p>Posts a message to all the listeners for the signal. The listener -callbacks are called in turn (with the message as an argument), -and if any return a <cite>Callback</cite> object, the posting will be -suspended until the callback is exectured. In this way, the -<a class="reference internal" href="#Post" title="Post"><tt class="xref py py-meth docutils literal"><span class="pre">Post()</span></tt></a> call can operate asynchronously, and so the -<cite>callback</cite> parameter is used to synchronize with its operation; -the <cite>callback</cite> will be called when all the listeners have responded -to the post.</p> -<p>If a <a class="reference internal" href="#Post" title="Post"><tt class="xref py py-meth docutils literal"><span class="pre">Post()</span></tt></a> to this signal occurs while waiting for the -response from a listener (either because a listener returned a -<cite>Callback</cite> object and we are waiting for it to complete when the -<a class="reference internal" href="#Post" title="Post"><tt class="xref py py-meth docutils literal"><span class="pre">Post()</span></tt></a> occurred, or because the listener itself called the -<tt class="docutils literal"><span class="pre">Post()</span></tt> method), the new message will be queued and will be -posted after the current message has been sent to all the -listeners, and they have all responded. This is another way in -which posting can be asynchronous; the only sure way to know that -a posting has occurred is through its <cite>callback</cite>. When the posting -is complete, the callback is called, passing it the signal object -that has just completed.</p> -<p>Returns the callback object (or a blank callback object if none -was provided).</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>message</strong> — the message to send through the signal</li> -<li><strong>callback</strong> — called after the message is posted</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback or a blank callback</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt> -<tt class="descname">Clear</tt><big>(</big><span class="optional">[</span><em>callback</em><span class="optional">]</span><big>)</big></dt> -<dd><p>This causes the history of past messages to be cleared so new -listeners will not receive them. Note that since the signal may -be operating asynchronously, the <a class="reference internal" href="message.html#Clear" title="Clear"><tt class="xref py py-meth docutils literal"><span class="pre">Clear()</span></tt></a> may be queued for -later. In this way, the <a class="reference internal" href="#Post" title="Post"><tt class="xref py py-meth docutils literal"><span class="pre">Post()</span></tt></a> and <a class="reference internal" href="message.html#Clear" title="Clear"><tt class="xref py py-meth docutils literal"><span class="pre">Clear()</span></tt></a> -operations will be performed in the proper order even when they -are delayed. The <cite>callback</cite> is called when the <a class="reference internal" href="message.html#Clear" title="Clear"><tt class="xref py py-meth docutils literal"><span class="pre">Clear()</span></tt></a> -operation is completed.</p> -<p>Returns the callback (or a blank callback if none is provided).</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>callback</strong> — called after the signal history is cleared</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback or a blank callback</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="Interest"> -<tt class="descname">Interest</tt><big>(</big><em>callback</em><span class="optional">[</span>, <em>ignorePast</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Interest" title="Permalink to this definition">¶</a></dt> -<dd><p>This method registers a new listener on the signal. It creates a -<cite>Callback</cite> object from the callback specification, attaches it to -the signal, and returns that <cite>Callback</cite> object. When new messages -are posted to the signal, it runs the callback, passing it the -message that was posted. If the callback itself returns a -<cite>Callback</cite> object, that indicates that the listener has started an -asynchronous operation and the poster should wait for that -callback to complete before allowing new posts on the signal.</p> -<p>If <cite>ignorePast</cite> is <tt class="docutils literal"><span class="pre">false</span></tt> or not present, then before -<a class="reference internal" href="#Interest" title="Interest"><tt class="xref py py-meth docutils literal"><span class="pre">Interest()</span></tt></a> returns, the callback will be called with all -the past messages that have been sent to the signal.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>callback</strong> — called whenever a message is posted (past or present)</li> -<li><strong>ignorePast</strong> — <tt class="docutils literal"><span class="pre">true</span></tt> means ignore previous messages</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="NoInterest"> -<tt class="descname">NoInterest</tt><big>(</big><em>callback</em><big>)</big><a class="headerlink" href="#NoInterest" title="Permalink to this definition">¶</a></dt> -<dd><p>This removes a listener from the signal so that no new messages -will be sent to it. The callback should be the one returned by -the original <a class="reference internal" href="#Interest" title="Interest"><tt class="xref py py-meth docutils literal"><span class="pre">Interest()</span></tt></a> call that attached the listener to -the signal in the first place. Once removed, the listener will no -longer receive messages from the signal.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>callback</strong> — the listener to be removed from signal</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="MessageHook"> -<tt class="descname">MessageHook</tt><big>(</big><em>message</em>, <em>callback</em><big>)</big><a class="headerlink" href="#MessageHook" title="Permalink to this definition">¶</a></dt> -<dd><p>This creates a callback that is called whenever the signal posts -the given message. This is a little easier than having to write a -function that must check the message each time it is called. -Although the <cite>message</cite> here is a string, if a message posted to the -signal is an array, then only the first element of that array is -used to match against message. That way, if a message contains an -identifier plus arguments, the hook will match the identifier and -still get called with the complete set of arguments.</p> -<p>Returns the <cite>Callback</cite> object that was produced.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>message</strong> — the message to look for from the signal</li> -<li><strong>callback</strong> — called when the message is posted</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="ExecuteHook"> -<tt class="descname">ExecuteHook</tt><big>(</big><em>message</em><big>)</big><a class="headerlink" href="#ExecuteHook" title="Permalink to this definition">¶</a></dt> -<dd><p>Used internally to call the listeners when a particular -message is posted to the signal.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> -<li><strong>message</strong> — the posted message</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="../index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The MathJax.Callback.Signal Class</a><ul> -<li><a class="reference internal" href="#properties">Properties</a></li> -<li><a class="reference internal" href="#methods">Methods</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="queue.html" - title="previous chapter">The MathJax.Callback.Queue Class</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="inputjax.html" - title="next chapter">The MathJax.InputJax Class</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/api/signal.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="inputjax.html" title="The MathJax.InputJax Class" - >next</a> |</li> - <li class="right" > - <a href="queue.html" title="The MathJax.Callback.Queue Class" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >The MathJax API</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/api/variable.html b/docs/build/html/api/variable.html @@ -1,223 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax variable — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="The MathJax API" href="index.html" /> - <link rel="next" title="The MathJax.Hub Object" href="hub.html" /> - <link rel="prev" title="The MathJax API" href="index.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="hub.html" title="The MathJax.Hub Object" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="index.html" title="The MathJax API" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-variable"> -<h1>The MathJax variable<a class="headerlink" href="#the-mathjax-variable" title="Permalink to this headline">¶</a></h1> -<p>MathJax has a single global variable, <tt class="docutils literal"><span class="pre">MathJax</span></tt>, in which all its -data, and the data for loaded components, are stored. The MathJax -variable is a nested structure, with its top-level properties being -objects themselves.</p> -<div class="section" id="main-mathjax-components"> -<h2>Main MathJax Components<a class="headerlink" href="#main-mathjax-components" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">MathJax.Hub</tt></dt> -<dd><p>Contains the MathJax hub code and variables, including the startup -code, the onload handler, the browser data, and so forth.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">MathJax.Ajax</tt></dt> -<dd><p>Contains the code for loading external modules and creating -stylesheets. Most of the code that causes most of MathJax to -operate asynchronously is handled here.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">MathJax.Message</tt></dt> -<dd><p>Contains the code to handle the intermittant message window that -periodically appears in the lower left-hand corner of the window.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">MathJax.HTML</tt></dt> -<dd><p>Contains support code for creating HTML elements dynamically from -descriptions stored in JavaScript objects.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">MathJax.CallBack</tt></dt> -<dd><p>Contains the code for managing MathJax callbacks, queues and -signals.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">MathJax.Extensions</tt></dt> -<dd><p>Initially empty, this is where extensions can load their code. -For example, the <cite>tex2jax</cite> preprocessor creates -<tt class="docutils literal"><span class="pre">MathJax.Extensions.tex2jax</span></tt> for its code and variables.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">MathJax.Object</tt></dt> -<dd><p>Contains the code for the MathJax object-oriented programming model.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">MathJax.InputJax</tt></dt> -<dd><p>The base class for all input <cite>jax</cite> objects. Subclasses for -specific input jax are created as sub-objects of -<tt class="docutils literal"><span class="pre">MathJax.InputJax</span></tt>. For example, the TeX input jax loads itself -as <tt class="docutils literal"><span class="pre">MathJax.InputJax.TeX</span></tt>.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">MathJax.OutputJax</tt></dt> -<dd><p>The base class for all output <cite>jax</cite> objects. Subclasses for -specific output jax are created as sub-objects of -<tt class="docutils literal"><span class="pre">MathJax.OutputJax</span></tt>. For example, the HTML-CSS output jax loads -itself as <tt class="docutils literal"><span class="pre">MathJax.OutputJax["HTML-CSS"]</span></tt>.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">MathJax.ElementJax</tt></dt> -<dd><p>The base class for all element <cite>jax</cite> objects. Subclasses for -specific element jax are creates as sub-objects of -<tt class="docutils literal"><span class="pre">MathJax.ElementJax</span></tt>. For example, the mml element jax loads -itself as <tt class="docutils literal"><span class="pre">MathJax.ElementJax.mml</span></tt>.</p> -</dd></dl> - -</div> -<div class="section" id="properties"> -<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> -<dl class="describe"> -<dt> -<tt class="descname">MathJax.version</tt></dt> -<dd><p>The version number of the MathJax library.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">MathJax.isReady</tt></dt> -<dd><p>This is set to <tt class="docutils literal"><span class="pre">true</span></tt> when MathJax is set up and ready to -perform typesetting actions (and is <tt class="docutils literal"><span class="pre">null</span></tt> otherwise).</p> -</dd></dl> - -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="../index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The MathJax variable</a><ul> -<li><a class="reference internal" href="#main-mathjax-components">Main MathJax Components</a></li> -<li><a class="reference internal" href="#properties">Properties</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="index.html" - title="previous chapter">The MathJax API</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="hub.html" - title="next chapter">The MathJax.Hub Object</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/api/variable.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="hub.html" title="The MathJax.Hub Object" - >next</a> |</li> - <li class="right" > - <a href="index.html" title="The MathJax API" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >The MathJax API</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/callbacks.html b/docs/build/html/callbacks.html @@ -1,308 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Using Callbacks — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" /> - <link rel="next" title="Using Queues" href="queues.html" /> - <link rel="prev" title="Synchronizing your code with MathJax" href="synchronize.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="queues.html" title="Using Queues" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="synchronize.html" title="Synchronizing your code with MathJax" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="synchronize.html" accesskey="U">Synchronizing your code with MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="using-callbacks"> -<span id="id1"></span><h1>Using Callbacks<a class="headerlink" href="#using-callbacks" title="Permalink to this headline">¶</a></h1> -<p>A “callback” is a function that MathJax calls when it completes an -action that may occur asynchronously (like loading a file). Many of -MathJax’s functions operate asynchronously, and MathJax uses callbacks -to allow you to synchronize your code with the action of those -functions. The <cite>MathJax.Callback</cite> structure manages these callbacks. -Callbacks can include not only a function to call, but also data to be -passed to the function, and an object to act as the JavaScript <cite>this</cite> -value in the resulting call (i.e., the object on which the callback is -to execute).</p> -<p>Callbacks can be collected into <a class="reference internal" href="queues.html#using-queues"><em>Queues</em></a> where the -callbacks will be processed in order, with later callbacks waiting -until previous ones have completed before they are called. They are -also used with <a class="reference internal" href="signals.html#using-signals"><em>Signals</em></a> as the means of -receiving information about the signals as they occur.</p> -<p>A number of methods in <cite>MathJax.Hub</cite> and <cite>MathJax.Ajax</cite> accept -callback specifications as arguments and return callback structures. -These routines always will return a callback even when none was -specified in the arguments, and in that case, the callback is a “do -nothing” callback. The reason for this is so that the resulting -callback can be used can be used in a <cite>MathJax.Callback.Queue</cite> for -synchronization purposes, so that the actions following it in the -queue will not be performed until after the callback has been fired.</p> -<p>For example, the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> method can be used to -load external files, and it returns a callback that is called when the -file has been loaded and executed. If you want to load several files -and wait for them all to be loaded before performing some action, you -can create a <cite>Queue</cite> into which you push the results of the -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> calls, and then push a callback for the -action. The final action will not be performed until all the -file-load callbacks (which preceed it int he queue) have been called; -i.e., the action will not occur until all the files are loaded.</p> -<div class="section" id="specifying-a-callback"> -<h2>Specifying a Callback<a class="headerlink" href="#specifying-a-callback" title="Permalink to this headline">¶</a></h2> -<p>Callbacks can be specified in a number of different ways, depending on -the functionality that is required of the callback. The easiest case -is to simply provide a function to be called, but it is also possible -to include data to pass to the function when it is called, and to -specify the object that will be used as <cite>this</cite> when the function is -called.</p> -<p>For example, the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> method can accept a -callback as its second argument (it will be called when the file given -as the first argument is loaded and executed). So you can call</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/config/myConfig.js"</span><span class="p">,</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> - <span class="nx">alert</span><span class="p">(</span><span class="s2">"My configuration file is loaded"</span><span class="p">);</span> -<span class="p">});</span> -</pre></div> -</div> -<p>and an alert will appear when the file is loaded. An example of -passing arguments to the callback function includes the following:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">loadHook</span> <span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"loadHook: "</span><span class="o">+</span><span class="nx">x</span><span class="p">)}</span> -<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/config/myConfig.js"</span><span class="p">,[</span><span class="nx">loadHook</span><span class="p">,</span><span class="s2">"myConfig"</span><span class="p">]);</span> -</pre></div> -</div> -<p>Here, the <tt class="docutils literal"><span class="pre">loadHook()</span></tt> function accepts one argument and generates -an alert that includes the value passed to it. The callback in the -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> call is <tt class="docutils literal"><span class="pre">[loadHook,"myConfig"]</span></tt>, -which means that (the equivalent of) <tt class="docutils literal"><span class="pre">loadHook("myConfig")</span></tt> will be -performed when the file is loaded. The result should be an alert with -the text <cite>loadHook: myConfig</cite>.</p> -<p>The callback for the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> method actually -gets called with a status value, in addition to any parameters already -included in the callback specification, that indicates whether the -file loaded successfully, or failed for some reason (perhaps the file -couldn’t be found, or it failed to compile and run). So you could use</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/config/myConfig.js"</span><span class="p">,</span><span class="kd">function</span> <span class="p">(</span><span class="nx">status</span><span class="p">)</span> <span class="p">{</span> - <span class="k">if</span> <span class="p">(</span><span class="nx">status</span> <span class="o">===</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">STATUS</span><span class="p">.</span><span class="nx">OK</span><span class="p">)</span> <span class="p">{</span> - <span class="nx">alert</span><span class="p">(</span><span class="s2">"My configuration file is loaded"</span><span class="p">);</span> - <span class="p">}</span> <span class="k">else</span> <span class="p">{</span> - <span class="nx">alert</span><span class="p">(</span><span class="s2">"My configuration file failed to load!"</span><span class="p">);</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>to check if the file loaded properly. With additional parameters, the -example might be</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">loadHook</span> <span class="p">(</span><span class="nx">x</span><span class="p">,</span><span class="nx">status</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"loadHook: "</span><span class="o">+</span><span class="nx">x</span><span class="o">+</span><span class="s2">" has status "</span><span class="o">+</span><span class="nx">status</span><span class="p">)}</span> -<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/config/myConfig.js"</span><span class="p">,[</span><span class="nx">loadHook</span><span class="p">,</span><span class="s2">"myConfig"</span><span class="p">]);</span> -</pre></div> -</div> -<p>Note that the parameters given in the callback specification are used -first, and then additional parameters from the call to the callback -come afterward.</p> -<div class="section" id="callbacks-to-object-methods"> -<h3>Callbacks to Object Methods<a class="headerlink" href="#callbacks-to-object-methods" title="Permalink to this headline">¶</a></h3> -<p>When you use a method of a JavaScript object, a special variable -called <cite>this</cite> is defined that refers to the object whose method is -being called. It allows you to access other methods or properties of -the object without knowing explicitly where the object is stored.</p> -<p>For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">aPerson</span> <span class="o">=</span> <span class="p">{</span> - <span class="nx">firstname</span><span class="o">:</span> <span class="s2">"John"</span><span class="p">,</span> - <span class="nx">lastname</span><span class="o">:</span> <span class="s2">"Smith"</span><span class="p">,</span> - <span class="nx">showName</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">firstname</span><span class="o">+</span><span class="s2">" "</span><span class="o">+</span><span class="k">this</span><span class="p">.</span><span class="nx">lastname</span><span class="p">)}</span> -<span class="p">};</span> -</pre></div> -</div> -<p>creates an object that contains three items, a <cite>firstname</cite>, and -<cite>lastname</cite>, and a method that shows the person’s full name in an -alert. So <tt class="docutils literal"><span class="pre">aPerson.fullName()</span></tt> would cause an alert with the text -<tt class="docutils literal"><span class="pre">John</span> <span class="pre">Smith</span></tt> to appear. Note, however that this only works if the -method is called as <tt class="docutils literal"><span class="pre">aPerson.showName()</span></tt>; if instead you did</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">f</span> <span class="o">=</span> <span class="nx">aPerson</span><span class="p">.</span><span class="nx">showName</span><span class="p">;</span> <span class="c1">// assign f the function from aPerson</span> -<span class="nx">f</span><span class="p">();</span> <span class="c1">// and call the function</span> -</pre></div> -</div> -<p>the association of the function with the data in <tt class="docutils literal"><span class="pre">aPerson</span></tt> is lost, -and the alert will probably show <tt class="docutils literal"><span class="pre">undefined</span> <span class="pre">undefined</span></tt>. (In this -case, <tt class="docutils literal"><span class="pre">f</span></tt> will be called with <tt class="docutils literal"><span class="pre">this</span></tt> set to the <tt class="docutils literal"><span class="pre">window</span></tt> -variable, and so <tt class="docutils literal"><span class="pre">this.firstname</span></tt> and <tt class="docutils literal"><span class="pre">this.lastname</span></tt> will refer -to undefined values.)</p> -<p>Because of this, it is difficult to use an object’s method as a -callback if you refer to it as a function directly. For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">aFile</span> <span class="o">=</span> <span class="p">{</span> - <span class="nx">name</span><span class="o">:</span> <span class="s2">"[MathJax]/config/myConfig.js"</span><span class="p">,</span> - <span class="nx">onload</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">status</span><span class="p">)</span> <span class="p">{</span> - <span class="nx">alert</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">name</span><span class="o">+</span><span class="s2">" is loaded with status "</span><span class="o">+</span><span class="nx">status</span><span class="p">);</span> - <span class="p">}</span> -<span class="p">};</span> - -<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="nx">aFile</span><span class="p">.</span><span class="nx">name</span><span class="p">,</span><span class="nx">aFile</span><span class="p">.</span><span class="nx">onload</span><span class="p">);</span> -</pre></div> -</div> -<p>would produce an alert indicating that “undefined” was loaded with a -particular status. That is because <tt class="docutils literal"><span class="pre">aFile.onload</span></tt> is a reference to -the <cite>onload</cite> method, which is just a function, and the association -with the <cite>aFile</cite> object is lost. One could do</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="nx">aFile</span><span class="p">.</span><span class="nx">name</span><span class="p">,</span><span class="kd">function</span> <span class="p">(</span><span class="nx">status</span><span class="p">)</span> <span class="p">{</span><span class="nx">aFile</span><span class="p">.</span><span class="nx">onload</span><span class="p">(</span><span class="nx">status</span><span class="p">)});</span> -</pre></div> -</div> -<p>but that seems needlessly verbose, and it produces a closure when one -is not really needed. Instead, MathJax provides an alternative -specification for a callback that allows you to specify both the -method and the object it comes from:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="nx">aFile</span><span class="p">.</span><span class="nx">name</span><span class="p">,[</span><span class="s2">"onload"</span><span class="p">,</span><span class="nx">aFile</span><span class="p">]);</span> -</pre></div> -</div> -<p>This requests that the callback should call <tt class="docutils literal"><span class="pre">aFile.onload</span></tt> as the -function, which will maintain the connection between <tt class="docutils literal"><span class="pre">aFile</span></tt> and its -method, thus preserving the correct value for <cite>this</cite> within the method.</p> -<p>As in the previous cases, you can pass parameters to the method as -well by including them in the array that specifies the callback:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"filename"</span><span class="p">,[</span><span class="s2">"method"</span><span class="p">,</span><span class="nx">object</span><span class="p">,</span><span class="nx">arg1</span><span class="p">,</span><span class="nx">arg2</span><span class="p">,...]);</span> -</pre></div> -</div> -<p>This approach is useful when you are pushing a callback for one one -MathJax’s Hub routines into the MathJax processing queue. For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Typeset"</span><span class="p">,</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">,</span><span class="s2">"MathDiv"</span><span class="p">]);</span> -</pre></div> -</div> -<p>pushes the equivalent of <tt class="docutils literal"><span class="pre">MathJax.Hub.Typeset("MathDiv")</span></tt> into the -processing queue.</p> -<p>See the <a class="reference internal" href="api/callback.html#api-callback"><em>Callback Object</em></a> reference pages for more -information about the valid methods of specifying a callback.</p> -</div> -<div class="section" id="creating-a-callback-explicitly"> -<h3>Creating a Callback Explicitly<a class="headerlink" href="#creating-a-callback-explicitly" title="Permalink to this headline">¶</a></h3> -<p>When you call a method that accepts a callback, you usually pass it a -callback specification (like in the examples above), which <em>describes</em> -a callback (the method will create the actual <cite>Callback</cite> object, and -return that to you as its return value). You don’t usually create -<cite>Callback</cite> objects directly yourself.</p> -<p>There are times, however, when you may wish to create a callback -object for use with functions that don’t create callbacks for you. -For example, the <tt class="docutils literal"><span class="pre">setTimeout()</span></tt> function can take a function as its -argument, and you may want that function to be a method of an object, -and would run into the problem described in the previous section if -you simply passed the object’s method to <tt class="docutils literal"><span class="pre">setTimeout()</span></tt>. Or you -might want to pass an argument to the function called by -<tt class="docutils literal"><span class="pre">setTimeout()</span></tt>. (Altough the <tt class="docutils literal"><span class="pre">setTimeout()</span></tt> function can accept -additional arguements that are supposed to be passed on to the code -when it is called, Internet Explorer does not implement that feature, -so you can’t rely on it.) You can use a <cite>Callback</cite> object to -do this, and the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback()</span></tt> method will create one for -you. For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">myTimer</span> <span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"x = "</span><span class="o">+</span><span class="nx">x</span><span class="p">)}</span> -<span class="nx">setTimeout</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">([</span><span class="nx">f</span><span class="p">,</span><span class="s2">"Hello World!"</span><span class="p">]),</span><span class="mi">500</span><span class="p">);</span> -</pre></div> -</div> -<p>would create a callback that calls <tt class="docutils literal"><span class="pre">f("Hello</span> <span class="pre">World!")</span></tt>, and -schedules it to be called in half a second.</p> -</div> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">Using Callbacks</a><ul> -<li><a class="reference internal" href="#specifying-a-callback">Specifying a Callback</a><ul> -<li><a class="reference internal" href="#callbacks-to-object-methods">Callbacks to Object Methods</a></li> -<li><a class="reference internal" href="#creating-a-callback-explicitly">Creating a Callback Explicitly</a></li> -</ul> -</li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="synchronize.html" - title="previous chapter">Synchronizing your code with MathJax</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="queues.html" - title="next chapter">Using Queues</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/callbacks.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="queues.html" title="Using Queues" - >next</a> |</li> - <li class="right" > - <a href="synchronize.html" title="Synchronizing your code with MathJax" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="synchronize.html" >Synchronizing your code with MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/community.html b/docs/build/html/community.html @@ -1,158 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax Community — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="The MathJax Processing Model" href="model.html" /> - <link rel="prev" title="MathJax Output Formats" href="output.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="model.html" title="The MathJax Processing Model" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="output.html" title="MathJax Output Formats" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-community"> -<h1>The MathJax Community<a class="headerlink" href="#the-mathjax-community" title="Permalink to this headline">¶</a></h1> -<p>If you are an active MathJax user, you may wish to become involved in -the wider community of MathJax users. The MathJax project maintains -forums where users can ask questions about how to use MathJax, make -suggestions about future features for MathJax, and present their own -solutions to problems that they have faced. There is also a -bug-traking system where you can report errors that you have found -with MathJax in your environment.</p> -<div class="section" id="forums"> -<span id="community-forums"></span><h2>Forums<a class="headerlink" href="#forums" title="Permalink to this headline">¶</a></h2> -<p>If you need help using MathJax or you have solutions you want to share, please -use the <a class="reference external" href="http://groups.google.com/group/mathjax-users">MathJax Users Google Group</a>. We try hard to answer -questions quickly, and users are welcome to help with that as well. Also, users -can post code snippets showing how they have used MathJax, so it may be a good -place to find the examples you are looking for.</p> -<p>If you want to discuss MathJax development, please use the <a class="reference external" href="http://groups.google.com/group/mathjax-dev">MathJax Dev Google -Group</a>. We made this group -to discuss anything beyond what an end-user might be interested in, so if you -having any suggestions or questions about MathJax performance, technology, or -design, feel free to submit it to the group.</p> -<p>The community is only as good as the users who participate, so if -you have something to offer, please take time to make a post on one of -our groups.</p> -</div> -<div class="section" id="issue-tracking"> -<span id="community-tracker"></span><h2>Issue tracking<a class="headerlink" href="#issue-tracking" title="Permalink to this headline">¶</a></h2> -<p>Found a bug or want to suggest an improvement? Post it to our <a class="reference external" href="http://github.com/mathjax/mathjax/issues">issue tracker</a>. We monitor the tracker closely, -and work hard to respond to problems quickly.</p> -<p>Before you create a new issue, however, please search the issues to see if it -has already been reported. You could also be using an outdated version of -MathJax, so be sure to <a class="reference internal" href="installation.html#getting-mathjax-svn"><em>upgrade your copy</em></a> to verify -that the problem persists in the lastest version.</p> -</div> -<div class="section" id="powered-by-mathjax"> -<span id="badge"></span><h2>“Powered by MathJax”<a class="headerlink" href="#powered-by-mathjax" title="Permalink to this headline">¶</a></h2> -<p>If you are using MathJax and want to show your support, please consider using -our <a class="reference external" href="http://www.mathjax.org/community/mathjax-badge">“Powered by MathJax” badge</a>.</p> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The MathJax Community</a><ul> -<li><a class="reference internal" href="#forums">Forums</a></li> -<li><a class="reference internal" href="#issue-tracking">Issue tracking</a></li> -<li><a class="reference internal" href="#powered-by-mathjax">“Powered by MathJax”</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="output.html" - title="previous chapter">MathJax Output Formats</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="model.html" - title="next chapter">The MathJax Processing Model</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/community.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="model.html" title="The MathJax Processing Model" - >next</a> |</li> - <li class="right" > - <a href="output.html" title="MathJax Output Formats" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/configuration.html b/docs/build/html/configuration.html @@ -1,437 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Loading and Configuring MathJax — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="The Core Configuration Options" href="options/hub.html" /> - <link rel="prev" title="Installing and Testing MathJax" href="installation.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="options/hub.html" title="The Core Configuration Options" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="installation.html" title="Installing and Testing MathJax" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="loading-and-configuring-mathjax"> -<span id="loading"></span><h1>Loading and Configuring MathJax<a class="headerlink" href="#loading-and-configuring-mathjax" title="Permalink to this headline">¶</a></h1> -<p>You load MathJax into a web page by including its main JavaScript file -into the page. That is done via a <tt class="docutils literal"><span class="pre"><script></span></tt> tag that links to the -<tt class="docutils literal"><span class="pre">MathJax.js</span></tt> file. Place the following line in the <tt class="docutils literal"><span class="pre"><head></span></tt> -section of your document:</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span> -</pre></div> -</div> -<p>where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is replaced by the URL of the MathJax -directory on your server, or (if you are using MathJax locally rather -than through a server) the location of that directory on your hard -disk. For example, if the MathJax directory is at the top level of -your web server’s directory hierarchy, you might use</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span> -</pre></div> -</div> -<p>to load MathJax.</p> -<p>Although it is possible to load MathJax from a site other than your -own web server, there are issues involved in doing so that you need to -take into consideration. See the <a class="reference internal" href="installation.html#cross-domain-linking"><em>Notes About Shared Servers</em></a> for more details. Please do <strong>not</strong> link to -the copy of MathJax at <tt class="docutils literal"><span class="pre">www.mathjax.org</span></tt>, as we do not have the -resources to act as a web service for all the sites on the web that -would like to display mathematics. If you are able to run MathJax -from your own server, please do so (this will probably give you better -response time in any case).</p> -<p>It is best to load MathJax in the document’s <tt class="docutils literal"><span class="pre"><head></span></tt> block, but it -is also possible to load MathJax into the <tt class="docutils literal"><span class="pre"><body></span></tt> section, if -needed. If you do this, load it as early as possible, as -MathJax will begin to load its components as soon as it is included in -the page, and that will help speed up the processing of the -mathematics on your page. MathJax does expect there to be a -<tt class="docutils literal"><span class="pre"><head></span></tt> section to the document, however, so be sure there is one -if you are loading MathJax in the <tt class="docutils literal"><span class="pre"><body></span></tt>.</p> -<p>It is also possible to load MathJax dynamically after the page has -been prepared, for example, via a <a class="reference external" href="http://www.greasespot.net/">GreaseMonkey</a> script, or using a specially prepared -<a class="reference external" href="http://en.wikipedia.org/wiki/Bookmarklet">bookmarklet</a>. This is an -advanced topic, however; see <a class="reference internal" href="dynamic.html#ajax-mathjax"><em>Loading MathJax Dynamically</em></a> for more details.</p> -<div class="section" id="configuring-mathjax"> -<h2>Configuring MathJax<a class="headerlink" href="#configuring-mathjax" title="Permalink to this headline">¶</a></h2> -<p>There are several ways to configure MathJax, but the easiest is to use -the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file that comes with MathJax. See the -comments in that file, or the <a class="reference internal" href="#configuration"><em>configuration details</em></a> section, for explanations of the meanings of the various -configuration options. You can edit the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file to -change any of the settings that you want to customize. When you -include MathJax in your page via</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span> -</pre></div> -</div> -<p>it will load <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> automatically as one of its -first actions.</p> -<p>Alternatively, you can configure MathJax efficiently by calling -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> when you include MathJax in your page, as -follows:</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></span> - <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">],</span> - <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</span><span class="p">],</span> - <span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s2">"\\("</span><span class="p">,</span><span class="s2">"\\)"</span><span class="p">]</span> <span class="p">],</span> - <span class="nx">displayMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">'$$'</span><span class="p">,</span><span class="s1">'$$'</span><span class="p">],</span> <span class="p">[</span><span class="s2">"\\["</span><span class="p">,</span><span class="s2">"\\]"</span><span class="p">]</span> <span class="p">],</span> - <span class="p">},</span> - <span class="s2">"HTML-CSS"</span><span class="o">:</span> <span class="p">{</span> <span class="nx">availableFonts</span><span class="o">:</span> <span class="p">[</span><span class="s2">"TeX"</span><span class="p">]</span> <span class="p">}</span> - <span class="p">});</span> -<span class="nt"></script></span> -</pre></div> -</div> -<p>This example includes the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor and configures it -to use both the standard TeX and LaTeX math delimiters. It uses the -TeX input processor and the HTML-CSS output processor, and forces the -HTML-CSS processor to use the TeX fonts rather that other locally -installed fonts (e.g., <a class="reference internal" href="glossary.html#term-stix"><em class="xref std std-term">STIX</em></a> fonts). See the -<a class="reference internal" href="#configuration"><em>configuration options</em></a> section (or the comments -in the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file) for more information about the -configuration options that you can include in the -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. Note that if you configure MathJax -using this in-line approach, the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file is <strong>not</strong> -loaded.</p> -<p>Finally, if you would like to use several different configuration -files (like <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt>, but with different settings in each -one), you can copy <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> to <tt class="docutils literal"><span class="pre">config/MathJax-2.js</span></tt>, -or some other convenient name, and use</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></span> - <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> <span class="nx">config</span><span class="o">:</span> <span class="s2">"MathJax-2.js"</span> <span class="p">});</span> -<span class="nt"></script></span> -</pre></div> -</div> -<p>to load the alternative configuration file <tt class="docutils literal"><span class="pre">config/MathJax-2.js</span></tt> -from the MathJax <tt class="docutils literal"><span class="pre">config</span></tt> directory. In this way, you can have as -many distinct configuration files as you need.</p> -</div> -<div class="section" id="common-configurations"> -<span id="id1"></span><h2>Common Configurations<a class="headerlink" href="#common-configurations" title="Permalink to this headline">¶</a></h2> -<p>The following examples show configurations that are useful for some -common situations. This is certainly not an exhaustive list, and -there are variations possible for any of them. Again, the comments in -the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file can help you decide what settings to -include, even if you are using the in-line configuration method.</p> -<div class="section" id="the-tex-setup"> -<h3>The TeX setup<a class="headerlink" href="#the-tex-setup" title="Permalink to this headline">¶</a></h3> -<p>This example calls the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor to identify -mathematics in the page by looking for TeX and LaTeX math delimiters. -It uses <tt class="docutils literal"><span class="pre">$...$</span></tt> and <tt class="docutils literal"><span class="pre">\(...\)</span></tt> for in-line mathematics, while -<tt class="docutils literal"><span class="pre">$$...$$</span></tt> and <tt class="docutils literal"><span class="pre">\[...\]</span></tt> mark displayed equations. Because dollar -signs are used to mark mathematics, if you want to produce an actual -dollar sign in your document, you must “escape” it using a slash: -<tt class="docutils literal"><span class="pre">\$</span></tt>. This configuration also loads the <tt class="docutils literal"><span class="pre">AMSmath</span></tt> and -<tt class="docutils literal"><span class="pre">AMSsymbols</span></tt> extensions so that the macros and environments they -provide are defined for use on the page.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">,</span><span class="s2">"TeX/AMSmath.js"</span><span class="p">,</span><span class="s2">"TeX/AMSsymbols.js"</span><span class="p">],</span> - <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">],</span> - <span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s1">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],[</span><span class="s2">"\\("</span><span class="p">,</span><span class="s2">"\\)"</span><span class="p">]],</span> - <span class="nx">processEscapes</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span> - <span class="p">},</span> -<span class="p">});</span> -</pre></div> -</div> -<p>Other extensions that you may consider adding to the <cite>extensions</cite> -array include: <tt class="docutils literal"><span class="pre">TeX/noErrors.js</span></tt>, which shows the original TeX code -if an error occurs while processing the mathematics (rather than an -error message), <tt class="docutils literal"><span class="pre">TeX/noUndefined.js</span></tt>, which shows undefined -macros names in red (rather than producing an error), and -<tt class="docutils literal"><span class="pre">TeX/autobold.js</span></tt>, which automatically inserts <tt class="docutils literal"><span class="pre">\boldsymbol{...}</span></tt> -around your mathematics when it appears in a section of your page that -is in bold. Most of the other TeX extensions are loaded automatically -when needed, and so do not need to be included explicitly in your -<cite>extensions</cite> array.</p> -<p>See the <a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration</em></a> section for -other configuration options for the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor, and the -<a class="reference internal" href="options/TeX.html#configure-tex"><em>TeX input jax configuration</em></a> section for options -that control the TeX input processor.</p> -</div> -<div class="section" id="the-mathml-setup"> -<h3>The MathML setup<a class="headerlink" href="#the-mathml-setup" title="Permalink to this headline">¶</a></h3> -<p>This example calls the <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessor to identify -mathematics in the page that is in <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> format, which uses -<tt class="docutils literal"><span class="pre"><math</span> <span class="pre">display="block"></span></tt> to indicate displayed equations, and -<tt class="docutils literal"><span class="pre"><math</span> <span class="pre">display="inline"></span></tt> or simply <tt class="docutils literal"><span class="pre"><math></span></tt> to mark in-line -formulas.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"mml2jax.js"</span><span class="p">],</span> - <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/MathML"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">]</span> -<span class="p">});</span> -</pre></div> -</div> -<p>Note that this will work in HTML files, not just XHTML files (MathJax -works with both), and that the web page need not be served with any -special MIME-type. Also note that, unless you are using XHTML rather -than HTML, you should not include a namespace prefix for your -<tt class="docutils literal"><span class="pre"><math></span></tt> tags; for example, you should not use <tt class="docutils literal"><span class="pre"><m:math></span></tt> except -in a file where you have tied the <tt class="docutils literal"><span class="pre">m</span></tt> namespace to the MathML DTD.</p> -<p>See the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration</em></a> section for -other configuration options for the <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessor, and the -<a class="reference internal" href="options/MathML.html#configure-mathml"><em>MathML input jax configuration</em></a> section for -options that control the MathML input processor.</p> -</div> -<div class="section" id="both-tex-and-mathml"> -<h3>Both TeX and MathML<a class="headerlink" href="#both-tex-and-mathml" title="Permalink to this headline">¶</a></h3> -<p>This example provides for both TeX and MathML input in the same file. -It calls on both the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> and <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessors and the -TeX and MathML input jax to do the job.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">,</span> <span class="s2">"mml2jax.js"</span><span class="p">],</span> - <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="s2">"input/MathML"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</span><span class="p">],</span> -<span class="p">});</span> -</pre></div> -</div> -<p>Notice that no <tt class="docutils literal"><span class="pre">tex2jax</span></tt> configuration section is included, so it -uses its default options (no single dollar signs for in-line math).</p> -<p>The majority of the code for the TeX and MathML input processors are -not loaded until they are actually needed by the mathematics on the -page, so if this configuration is used on a page that include only -MathML, the TeX input processor will not be loaded. Thus it is -reasonably efficient to specify both input processors even if only one -(or neither one) is used.</p> -</div> -<div class="section" id="tex-input-with-mathml-output"> -<h3>TeX input with MathML output<a class="headerlink" href="#tex-input-with-mathml-output" title="Permalink to this headline">¶</a></h3> -<p>This example configures MathJax to use the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor -and TeX input processor, but the choice of output format is determined -by MathJax depending on the capabilities of the user’s browser. The -is performed by the <tt class="docutils literal"><span class="pre">MMLorHTML.js</span></tt> configuration file that is loaded -in the <cite>config`</cite> array.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">"MMLorHTML.js"</span><span class="p">],</span> - <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">],</span> - <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">]</span> -<span class="p">});</span> -</pre></div> -</div> -<p>With this setup, Firefox or Internet Explorer with the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer -plugin</a> installed -will use the NativeMML output processor, while all other browsers will -use the HTML-CSS output processor. Since native MathML support is -faster than MathJax’s HTML-CSS processor, this will mean that the web -pages will display faster for Firefox and IE than they would -otherwise. This speed comes at the cost, however, as you are now -relying on the native MathML support to render the mathematics, and -that is outside of MathJax’s control. There may be spacing or other -display differences (compared to MathJax’s HTML-CSS output) when the -NativeMML output processor is used.</p> -<p>See <a class="reference internal" href="output.html#output-formats"><em>MathJax Output Formats</em></a> for more -information on the NativeMML and HTML-CSS output processors. See the -<a class="reference internal" href="options/MMLorHTML.html#configure-mmlorhtml"><em>MMLorHTML configuration</em></a> section for -details on the options that control the <tt class="docutils literal"><span class="pre">MMLorHTML</span></tt> configuration.</p> -</div> -<div class="section" id="mathml-input-and-output-in-all-browsers"> -<h3>MathML input and output in all browsers<a class="headerlink" href="#mathml-input-and-output-in-all-browsers" title="Permalink to this headline">¶</a></h3> -<p>This example configures MathJax to look for MathML within your page, -and to display it using the browser’s native MathML support, if -possible, or its HTML-CSS output if not.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">"MMLorHTML.js"</span><span class="p">],</span> - <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"mml2jax.js"</span><span class="p">],</span> - <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/MathML"</span><span class="p">]</span> -<span class="p">});</span> -</pre></div> -</div> -<p>Using this configuration, MathJax finally makes MathML available in -all modern browsers.</p> -<p>See the <a class="reference internal" href="options/MMLorHTML.html#configure-mmlorhtml"><em>MMLorHTML configuration</em></a> section -for details on the options that control the <tt class="docutils literal"><span class="pre">MMLorHTML</span></tt> -configuration file, the <a class="reference internal" href="options/MathML.html#configure-mathml"><em>MathML configuration</em></a> -section for the options that control the MathML output processor, and -the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration</em></a> section for the -options that control the <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessor.</p> -</div> -</div> -<div class="section" id="configuration-objects"> -<span id="configuration"></span><h2>Configuration Objects<a class="headerlink" href="#configuration-objects" title="Permalink to this headline">¶</a></h2> -<p>The various components of MathJax, including its input and output -processors, its preprocessors, its extensions, and the MathJax core, -all can be configured through the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file, or via a -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call (indeed, if you look closely, you -will see that <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> is itself one big call to -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt>). Anything that is in -<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> can be included in-line to configure MathJax.</p> -<p>The structure that you pass to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> is a -JavaScript object that includes name-value pairs giving the names of -parameters and their values, with pairs separated by commas. Be -careful not to include a comma after the last value, however, as some -browsers (namely Internet Explorer) will fail to process the -configuration if you do.</p> -<p>The MathJax components, like the TeX input processor, have their own -sections in the configuration object, labeled by the component name, -and using an configuration object as its value. The object is itself -a configuration object made up of name-value pairs that give the -configuration options for the component.</p> -<p>For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">showProcessingMessages</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span> - <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</span><span class="p">],</span> - <span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">TagSide</span><span class="o">:</span> <span class="s2">"left"</span><span class="p">,</span> - <span class="nx">Macros</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">RR</span><span class="o">:</span> <span class="s1">'{\\bf R}'</span><span class="p">,</span> - <span class="nx">bold</span><span class="o">:</span> <span class="p">[</span><span class="s1">'{\\bf #1}'</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span> - <span class="p">}</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>is a configuration that includes two settings for the MathJax Hub (one -for <cite>showProcessingMessages</cite> and one of the <cite>jax</cite> array), and a -configuration object for the TeX input processor. The latter includes -a setting for the TeX input processor’s <cite>TagSide</cite> option (to set tags -on the left rather than the right) and a setting for <cite>Macros</cite>, which -defines new TeX macros (in this case, two macros, one called <tt class="docutils literal"><span class="pre">\RR</span></tt> -that produces a bold “R”, and one called <tt class="docutils literal"><span class="pre">\bold</span></tt> that puts is -argument in bold face).</p> -<p>The <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file is another example that shows nearly -all the configuration options for all of MathJax’s components.</p> -</div> -<div class="section" id="configuration-options-by-component"> -<h2>Configuration Options by Component<a class="headerlink" href="#configuration-options-by-component" title="Permalink to this headline">¶</a></h2> -<p>The individual options are explained in the following sections, which -are categorized by the component they affect.</p> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="options/hub.html">The core options</a></li> -</ul> -</div> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="options/tex2jax.html">The tex2jax preprocessor options</a></li> -<li class="toctree-l1"><a class="reference internal" href="options/mml2jax.html">The mml2jax preprocessor options</a></li> -<li class="toctree-l1"><a class="reference internal" href="options/jsMath2jax.html">The jsMath2jax preprocessor options</a></li> -</ul> -</div> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="options/TeX.html">The TeX input processor options</a></li> -<li class="toctree-l1"><a class="reference internal" href="options/MathML.html">The MathML input processor options</a></li> -<li class="toctree-l1"><a class="reference internal" href="options/HTML-CSS.html">The HTML-CSS output processor options</a></li> -<li class="toctree-l1"><a class="reference internal" href="options/NativeMML.html">The NativeMML output processor options</a></li> -<li class="toctree-l1"><a class="reference internal" href="options/MMLorHTML.html">The MMLorHTML configuration options</a></li> -</ul> -</div> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="options/MathMenu.html">The MathMenu options</a></li> -<li class="toctree-l1"><a class="reference internal" href="options/MathZoom.html">The MathZoom options</a></li> -<li class="toctree-l1"><a class="reference internal" href="options/FontWarnings.html">The FontWarnings options</a></li> -</ul> -</div> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">Loading and Configuring MathJax</a><ul> -<li><a class="reference internal" href="#configuring-mathjax">Configuring MathJax</a></li> -<li><a class="reference internal" href="#common-configurations">Common Configurations</a><ul> -<li><a class="reference internal" href="#the-tex-setup">The TeX setup</a></li> -<li><a class="reference internal" href="#the-mathml-setup">The MathML setup</a></li> -<li><a class="reference internal" href="#both-tex-and-mathml">Both TeX and MathML</a></li> -<li><a class="reference internal" href="#tex-input-with-mathml-output">TeX input with MathML output</a></li> -<li><a class="reference internal" href="#mathml-input-and-output-in-all-browsers">MathML input and output in all browsers</a></li> -</ul> -</li> -<li><a class="reference internal" href="#configuration-objects">Configuration Objects</a></li> -<li><a class="reference internal" href="#configuration-options-by-component">Configuration Options by Component</a><ul> -</ul> -</li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="installation.html" - title="previous chapter">Installing and Testing MathJax</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="options/hub.html" - title="next chapter">The Core Configuration Options</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/configuration.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="options/hub.html" title="The Core Configuration Options" - >next</a> |</li> - <li class="right" > - <a href="installation.html" title="Installing and Testing MathJax" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/dynamic.html b/docs/build/html/dynamic.html @@ -1,277 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Loading MathJax Dynamically — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="Modifying Math on the Page" href="typeset.html" /> - <link rel="prev" title="Using Signals" href="signals.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="typeset.html" title="Modifying Math on the Page" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="signals.html" title="Using Signals" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="loading-mathjax-dynamically"> -<span id="ajax-mathjax"></span><h1>Loading MathJax Dynamically<a class="headerlink" href="#loading-mathjax-dynamically" title="Permalink to this headline">¶</a></h1> -<p>MathJax is designed to be included via a <tt class="docutils literal"><span class="pre"><script></span></tt> tag in the -<tt class="docutils literal"><span class="pre"><head></span></tt> section of your HTML document, and it does rely on being -part of the original document in that it uses an <tt class="docutils literal"><span class="pre">onload</span></tt> event -handler to synchronize its actions with the loading of the page. -If you wish to insert MathJax into a document after it has -been loaded, that will normally occur <em>after</em> the page’s <tt class="docutils literal"><span class="pre">onload</span></tt> -handler has fired, and so MathJax will not be able to tell if it is -safe for it to process the contents of the page. Indeed, it will wait -forever for its <tt class="docutils literal"><span class="pre">onload</span></tt> handler to fire, and so will never process -the page.</p> -<p>To solve this problem, you will need to call MathJax’s <tt class="docutils literal"><span class="pre">onload</span></tt> -handler yourself, to let it know that it is OK to typeset the -mathematics on the page. You accomplish this by calling the -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Startup.onload()</span></tt> method as part of your MathJax -startup script. To do this, you will need to give MathJax an in-line -configuration, so you will not be able to use the -<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file (though you can add it to your in-line -configuration’s <cite>config</cite> array).</p> -<p>Here is an example of how to load and configure MathJax dynamically:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> - <span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">"script"</span><span class="p">);</span> - <span class="nx">script</span><span class="p">.</span><span class="nx">type</span> <span class="o">=</span> <span class="s2">"text/javascript"</span><span class="p">;</span> - <span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">"/MathJax/MathJax.js"</span><span class="p">;</span> <span class="c1">// use the location of your MathJax</span> - - <span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Config({'</span> <span class="o">+</span> - <span class="s1">'extensions: ["tex2jax.js"],'</span> <span class="o">+</span> - <span class="s1">'jax: ["input/TeX","output/HTML-CSS"]'</span> <span class="o">+</span> - <span class="s1">'});'</span> <span class="o">+</span> - <span class="s1">'MathJax.Hub.Startup.onload();'</span><span class="p">;</span> - - <span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> - <span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> - - <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">"head"</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">script</span><span class="p">);</span> -<span class="p">})();</span> -</pre></div> -</div> -<p>Be sure to set the <tt class="docutils literal"><span class="pre">src</span></tt> to the correct URL for your copy of -MathJax. You can adjust the <tt class="docutils literal"><span class="pre">config</span></tt> variable to your needs, but be -careful to get the commas right. The <tt class="docutils literal"><span class="pre">window.opera</span></tt> test is because -Opera doesn’t handle setting <tt class="docutils literal"><span class="pre">script.text</span></tt> properly, while Internet -Explorer doesn’t handle setting the <tt class="docutils literal"><span class="pre">innerHTML</span></tt> of a script tag.</p> -<p>Here is a version that uses the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file to -configure MathJax:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> - <span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">"script"</span><span class="p">);</span> - <span class="nx">script</span><span class="p">.</span><span class="nx">type</span> <span class="o">=</span> <span class="s2">"text/javascript"</span><span class="p">;</span> - <span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">"/MathJax/MathJax.js"</span><span class="p">;</span> <span class="c1">// use the location of your MathJax</span> - - <span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Config({ config: "MathJax.js" }); '</span> <span class="o">+</span> - <span class="s1">'MathJax.Hub.Startup.onload();'</span><span class="p">;</span> - - <span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> - <span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> - - <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">"head"</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">script</span><span class="p">);</span> -<span class="p">})();</span> -</pre></div> -</div> -<p>Note that the <strong>only</strong> reliable way to configure MathJax is to use an -in-line configuration of the type discussed above. You should <strong>not</strong> -call <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> directly in your code, as it will -not run at the correct time — it will either run too soon, in which -case <tt class="docutils literal"><span class="pre">MathJax</span></tt> may not be defined and the function will throw an -error, or it will run too late, after MathJax has already finished its -configuration process, so your changes will not have the desired -effect.</p> -<div class="section" id="mathjax-and-greasemonkey"> -<h2>MathJax and GreaseMonkey<a class="headerlink" href="#mathjax-and-greasemonkey" title="Permalink to this headline">¶</a></h2> -<p>You can use techniques like the ones discussed above to good effect in -GreaseMonkey scripts. There are GreaseMonkey work-alikes for all the -major browsers:</p> -<ul class="simple"> -<li>Firefox: <a class="reference external" href="http://addons.mozilla.org/firefox/addon/748">GreaseMonkey</a></li> -<li>Safari: <a class="reference external" href="http://8-p.info/greasekit/">GreaseKit</a> (also requires <a class="reference external" href="http://www.culater.net/software/SIMBL/SIMBL.php">SIMBL</a>)</li> -<li>Opera: Built-in (<a class="reference external" href="http://www.ghacks.net/2008/08/10/greasemonkey-in-opera/">instructions</a>)</li> -<li>Internet Explorer: <a class="reference external" href="http://www.ie7pro.com/">IEPro7</a></li> -<li>Chrome: Built-in for recent releases</li> -</ul> -<p>Note, however, that most browsers don’t allow you to insert a script -that loads a <tt class="docutils literal"><span class="pre">file://</span></tt> URL into a page that comes from the web (for -security reasons). That means that you can’t have your GreaseMonkey -script load a local copy of MathJax, so you have to refer to a -server-based copy. In the scripts below, you need to insert the URL -of a copy of MathJax from your own server.</p> -<hr class="docutils" /> -<p>Here is a script that runs MathJax in any document that contains -MathML (whether its includes MathJax or not). That allows -browsers that don’t have native MathML support to view any web pages -with MathML, even if they say it only works in Forefox and -IE+MathPlayer.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="c1">// ==UserScript==</span> -<span class="c1">// @name MathJax MathML</span> -<span class="c1">// @namespace http://www.mathjax.org/</span> -<span class="c1">// @description Insert MathJax into pages containing MathML</span> -<span class="c1">// @include *</span> -<span class="c1">// ==/UserScript==</span> - -<span class="k">if</span> <span class="p">((</span><span class="nb">window</span><span class="p">.</span><span class="nx">unsafeWindow</span> <span class="o">==</span> <span class="kc">null</span> <span class="o">?</span> <span class="nb">window</span> <span class="o">:</span> <span class="nx">unsafeWindow</span><span class="p">).</span><span class="nx">MathJax</span> <span class="o">==</span> <span class="kc">null</span><span class="p">)</span> <span class="p">{</span> - <span class="k">if</span> <span class="p">((</span><span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">"math"</span><span class="p">).</span><span class="nx">length</span> <span class="o">></span> <span class="mi">0</span><span class="p">)</span> <span class="o">||</span> - <span class="p">(</span><span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagNameNS</span> <span class="o">==</span> <span class="kc">null</span> <span class="o">?</span> <span class="kc">false</span> <span class="o">:</span> - <span class="p">(</span><span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagNameNS</span><span class="p">(</span><span class="s2">"http://www.w3.org/1998/Math/MathML"</span><span class="p">,</span><span class="s2">"math"</span><span class="p">).</span><span class="nx">length</span> <span class="o">></span> <span class="mi">0</span><span class="p">)))</span> <span class="p">{</span> - <span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">"script"</span><span class="p">);</span> - <span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">"http://www.yoursite.edu/MathJax/MathJax.js"</span><span class="p">;</span> <span class="c1">// put your URL here</span> - <span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Config({'</span> <span class="o">+</span> - <span class="s1">'extensions:["mml2jax.js"],'</span> <span class="o">+</span> - <span class="s1">'jax:["input/MathML","output/HTML-CSS"]'</span> <span class="o">+</span> - <span class="s1">'});'</span> <span class="o">+</span> - <span class="s1">'MathJax.Hub.Startup.onload()'</span><span class="p">;</span> - <span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> <span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> - <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">"head"</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">script</span><span class="p">);</span> - <span class="p">}</span> -<span class="p">}</span> -</pre></div> -</div> -<p><strong>Source</strong>: <a class="reference external" href="_statis/mathjax_mathml.user.js">mathjax_mathml.user.js</a></p> -<hr class="docutils" /> -<p>Here is a script that runs MathJax in Wikipedia pages after first -converting the math images to their original TeX code.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="c1">// ==UserScript==</span> -<span class="c1">// @name MathJax in Wikipedia</span> -<span class="c1">// @namespace http://www.mathjax.org/</span> -<span class="c1">// @description Insert MathJax into Wikipedia pages</span> -<span class="c1">// @include http://en.wikipedia.org/wiki/*</span> -<span class="c1">// ==/UserScript==</span> - -<span class="k">if</span> <span class="p">((</span><span class="nb">window</span><span class="p">.</span><span class="nx">unsafeWindow</span> <span class="o">==</span> <span class="kc">null</span> <span class="o">?</span> <span class="nb">window</span> <span class="o">:</span> <span class="nx">unsafeWindow</span><span class="p">).</span><span class="nx">MathJax</span> <span class="o">==</span> <span class="kc">null</span><span class="p">)</span> <span class="p">{</span> - <span class="c1">//</span> - <span class="c1">// Replace the images with MathJax scripts of type math/tex</span> - <span class="c1">//</span> - <span class="kd">var</span> <span class="nx">images</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s1">'img'</span><span class="p">);</span> - <span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">i</span> <span class="o">=</span> <span class="nx">images</span><span class="p">.</span><span class="nx">length</span> <span class="o">-</span> <span class="mi">1</span><span class="p">;</span> <span class="nx">i</span> <span class="o">>=</span> <span class="mi">0</span><span class="p">;</span> <span class="nx">i</span><span class="o">--</span><span class="p">)</span> <span class="p">{</span> - <span class="kd">var</span> <span class="nx">img</span> <span class="o">=</span> <span class="nx">images</span><span class="p">[</span><span class="nx">i</span><span class="p">];</span> - <span class="k">if</span> <span class="p">(</span><span class="nx">img</span><span class="p">.</span><span class="nx">className</span> <span class="o">===</span> <span class="s2">"tex"</span><span class="p">)</span> <span class="p">{</span> - <span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">"script"</span><span class="p">);</span> <span class="nx">script</span><span class="p">.</span><span class="nx">type</span> <span class="o">=</span> <span class="s2">"math/tex"</span><span class="p">;</span> - <span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">img</span><span class="p">.</span><span class="nx">alt</span><span class="p">}</span> <span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">img</span><span class="p">.</span><span class="nx">alt</span><span class="p">}</span> - <span class="nx">img</span><span class="p">.</span><span class="nx">parentNode</span><span class="p">.</span><span class="nx">replaceChild</span><span class="p">(</span><span class="nx">script</span><span class="p">,</span><span class="nx">img</span><span class="p">);</span> - <span class="p">}</span> - <span class="p">}</span> - <span class="c1">//</span> - <span class="c1">// Load MathJax and have it process the page</span> - <span class="c1">//</span> - <span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">"script"</span><span class="p">);</span> - <span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">"http://www.yoursite.edu/MathJax/MathJax.js"</span><span class="p">;</span> <span class="c1">// put your URL here</span> - <span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Config({'</span> <span class="o">+</span> - <span class="s1">'config: ["MMLorHTML.js"],'</span> <span class="o">+</span> - <span class="s1">'extensions:["TeX/noErrors.js","TeX/noUndefined.js",'</span> <span class="o">+</span> - <span class="s1">'"TeX/AMSmath.js","TeX/AMSsymbols.js"],'</span> <span class="o">+</span> - <span class="s1">'jax:["input/TeX"]'</span> <span class="o">+</span> - <span class="s1">'});'</span> <span class="o">+</span> - <span class="s1">'MathJax.Hub.Startup.onload()'</span><span class="p">;</span> - <span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> <span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> - <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">"head"</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">script</span><span class="p">);</span> -<span class="p">}</span> -</pre></div> -</div> -<p><strong>Source</strong>: <a class="reference external" href="_statis/mathjax_wikipedia.user.js">mathjax_wikipedia.user.js</a></p> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">Loading MathJax Dynamically</a><ul> -<li><a class="reference internal" href="#mathjax-and-greasemonkey">MathJax and GreaseMonkey</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="signals.html" - title="previous chapter">Using Signals</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="typeset.html" - title="next chapter">Modifying Math on the Page</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/dynamic.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="typeset.html" title="Modifying Math on the Page" - >next</a> |</li> - <li class="right" > - <a href="signals.html" title="Using Signals" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html @@ -1,298 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Index — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="#" title="General Index" - accesskey="I">index</a></li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - - <h1 id="index">Index</h1> - - <div class="genindex-jumpbox"> - <a href="#A"><strong>A</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#E"><strong>E</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#H"><strong>H</strong></a> | <a href="#I"><strong>I</strong></a> | <a href="#J"><strong>J</strong></a> | <a href="#L"><strong>L</strong></a> | <a href="#M"><strong>M</strong></a> | <a href="#N"><strong>N</strong></a> | <a href="#P"><strong>P</strong></a> | <a href="#Q"><strong>Q</strong></a> | <a href="#R"><strong>R</strong></a> | <a href="#S"><strong>S</strong></a> | <a href="#T"><strong>T</strong></a> | <a href="#U"><strong>U</strong></a> | <a href="#W"><strong>W</strong></a> - </div> -<h2 id="A">A</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/html.html#addElement">addElement()</a></dt> - <dt><a href="api/html.html#addText">addText()</a></dt> -</dl></td> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/object.html#Augment">Augment()</a></dt> -</dl></td> -</tr></table> - -<h2 id="C">C</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/queue.html#call">call()</a></dt> - <dt><a href="glossary.html#term-callback">Callback</a></dt> - <dt><a href="glossary.html#term-callback-queue">Callback Queue</a></dt> - <dt><a href="glossary.html#term-callback-signal">Callback Signal</a></dt> -</dl></td> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/object.html#can">can()</a></dt> - <dt><a href="api/message.html#Clear">Clear()</a></dt> - <dt><a href="api/hub.html#Config">Config()</a></dt> -</dl></td> -</tr></table> - -<h2 id="D">D</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/callback.html#Delay">Delay()</a></dt> -</dl></td> -</tr></table> - -<h2 id="E">E</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/html.html#Element">Element()</a></dt> - <dt><a href="api/signal.html#ExecuteHook">ExecuteHook()</a></dt> -</dl></td> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/callback.html#executeHooks">executeHooks()</a></dt> -</dl></td> -</tr></table> - -<h2 id="F">F</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/ajax.html#fileURL">fileURL()</a></dt> -</dl></td> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/hub.html#formatError">formatError()</a></dt> -</dl></td> -</tr></table> - -<h2 id="G">G</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/hub.html#getAllJax">getAllJax()</a></dt> - <dt><a href="api/hub.html#getJaxByInputType">getJaxByInputType()</a></dt> -</dl></td> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/hub.html#getJaxByType">getJaxByType()</a></dt> - <dt><a href="api/hub.html#getJaxFor">getJaxFor()</a></dt> -</dl></td> -</tr></table> - -<h2 id="H">H</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/object.html#has">has()</a></dt> -</dl></td> - <td style="width: 33%" valign="top"><dl> - <dt><a href="glossary.html#term-html-css">HTML-CSS</a></dt> -</dl></td> -</tr></table> - -<h2 id="I">I</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/object.html#Init">Init()</a></dt> - <dt><a href="api/hub.html#Insert">Insert()</a></dt> - <dt><a href="api/signal.html#Interest">Interest()</a></dt> -</dl></td> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/object.html#isa">isa()</a></dt> - <dt><a href="api/hub.html#isJax">isJax()</a></dt> -</dl></td> -</tr></table> - -<h2 id="J">J</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="glossary.html#term-jax">jax</a></dt> -</dl></td> -</tr></table> - -<h2 id="L">L</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="glossary.html#term-latex">LaTeX</a></dt> - <dt><a href="api/ajax.html#Load">Load()</a></dt> - <dt><a href="api/ajax.html#loadComplete">loadComplete()</a></dt> - <dt><a href="api/ajax.html#loadError">loadError()</a></dt> -</dl></td> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/ajax.html#loadHook">loadHook()</a></dt> - <dt><a href="api/ajax.html#loadTimeout">loadTimeout()</a></dt> - <dt><a href="api/message.html#Log">Log()</a></dt> -</dl></td> -</tr></table> - -<h2 id="M">M</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="glossary.html#term-mathml">MathML</a></dt> -</dl></td> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/signal.html#MessageHook">MessageHook()</a></dt> -</dl></td> -</tr></table> - -<h2 id="N">N</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/signal.html#NoInterest">NoInterest()</a></dt> -</dl></td> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/jax.html#noTranslate">noTranslate()</a></dt> -</dl></td> -</tr></table> - -<h2 id="P">P</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/signal.html#Post">Post()</a></dt> - <dt><a href="api/hub.html#PreProcess">PreProcess()</a></dt> -</dl></td> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/hub.html#Process">Process()</a></dt> - <dt><a href="api/queue.html#Push">Push()</a></dt> -</dl></td> -</tr></table> - -<h2 id="Q">Q</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/callback.html#Queue">Queue()</a></dt> -</dl></td> -</tr></table> - -<h2 id="R">R</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/jax.html#Register">Register()</a></dt> - <dt><a href="api/hub.html#Reprocess">Reprocess()</a></dt> - <dt><a href="api/ajax.html#Require">Require()</a></dt> -</dl></td> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/callback.html#reset">reset()</a></dt> - <dt><a href="api/queue.html#Resume">Resume()</a></dt> -</dl></td> -</tr></table> - -<h2 id="S">S</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/message.html#Set">Set()</a></dt> - <dt><a href="api/callback.html#Signal">Signal()</a></dt> - <dt><a href="api/elementjax.html#SourceElement">SourceElement()</a></dt> - <dt><a href="api/jax.html#Startup">Startup()</a></dt> -</dl></td> - <td style="width: 33%" valign="top"><dl> - <dt><a href="glossary.html#term-stix">STIX</a></dt> - <dt><a href="api/ajax.html#Styles">Styles()</a></dt> - <dt><a href="api/object.html#Subclass">Subclass()</a></dt> - <dt><a href="api/queue.html#Suspend">Suspend()</a></dt> -</dl></td> -</tr></table> - -<h2 id="T">T</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="glossary.html#term-tex">TeX</a></dt> - <dt><a href="api/elementjax.html#Text">Text()</a></dt> - <dt><a href="api/html.html#TextNode">TextNode()</a></dt> -</dl></td> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/jax.html#Translate">Translate()</a></dt> - <dt><a href="api/hub.html#Typeset">Typeset()</a></dt> -</dl></td> -</tr></table> - -<h2 id="U">U</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/hub.html#Update">Update()</a></dt> -</dl></td> -</tr></table> - -<h2 id="W">W</h2> -<table style="width: 100%" class="indextable genindextable"><tr> - <td style="width: 33%" valign="top"><dl> - <dt><a href="api/queue.html#wait">wait()</a></dt> -</dl></td> -</tr></table> - - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - - - -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="#" title="General Index" - >index</a></li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/glossary.html b/docs/build/html/glossary.html @@ -1,163 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Glossary — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="prev" title="CSS Style Objects" href="CSS-styles.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="CSS-styles.html" title="CSS Style Objects" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="glossary"> -<span id="id1"></span><h1>Glossary<a class="headerlink" href="#glossary" title="Permalink to this headline">¶</a></h1> -<dl class="glossary docutils"> -<dt id="term-callback">Callback</dt> -<dd>A JavaScript function that is used to perform actions that -must wait for other actions to complete before they are -performed.</dd> -<dt id="term-callback-queue">Callback Queue</dt> -<dd>MathJax uses <cite>Queues</cite> to synchronize its activity so that -actions that operate asynchronously (like loading files) will -be performed in the right order. <a class="reference internal" href="#term-callback"><em class="xref std std-term">Callback</em></a> functions -are pushed onto the queue, and are performed in order, with -MathJax handling the synchronization if operations need to -wait for other actions to finish.</dd> -<dt id="term-callback-signal">Callback Signal</dt> -<dd>A JavaScript object that acts as a mailbox for MathJax events. -Like an event handler, but it also keeps a history of -messages. Your code can register an “interest” in a signal, -or can register a <a class="reference internal" href="#term-callback"><em class="xref std std-term">callback</em></a> to be called when a -particular message is sent along the signal channel.</dd> -<dt id="term-html-css">HTML-CSS</dt> -<dd>MathJax output form that employs only on HTML and CSS 2.1, -allowing MathJax to remain compatible across all browsers.</dd> -<dt id="term-jax">jax</dt> -<dd>MathJax’s input and output processors are called “jax”, as is -its internal format manager. The code for the jax are in the -<tt class="docutils literal"><span class="pre">MathJax/jax</span></tt> directory.</dd> -<dt id="term-latex">LaTeX</dt> -<dd><p class="first">LaTeX is a variant of <a class="reference internal" href="#term-tex"><em class="xref std std-term">TeX</em></a> that is now the dominant TeX style.</p> -<div class="admonition-see-also last admonition seealso"> -<p class="first admonition-title">See also</p> -<p class="last"><a class="reference external" href="http://en.wikipedia.org/wiki/LaTeX">LaTeX Wikipedia entry</a></p> -</div> -</dd> -<dt id="term-mathml">MathML</dt> -<dd><p class="first">An XML specification created to describe mathematical -notations and capture both its structure and content. MathML -is much more verbose than <a class="reference internal" href="#term-tex"><em class="xref std std-term">TeX</em></a>, but is much more -machine-readable.</p> -<div class="admonition-see-also last admonition seealso"> -<p class="first admonition-title">See also</p> -<p class="last"><a class="reference external" href="http://en.wikipedia.org/wiki/MathML">MathML Wikipedia entry</a></p> -</div> -</dd> -<dt id="term-stix">STIX</dt> -<dd><p class="first">The Scientific and Technical Information Exchange font -package. A comprehensive set of scientific glyphs.</p> -<div class="admonition-see-also last admonition seealso"> -<p class="first admonition-title">See also</p> -<p class="last"><a class="reference external" href="http://stixfonts.org/">STIX project</a></p> -</div> -</dd> -<dt id="term-tex">TeX</dt> -<dd><p class="first">A document markup language with robust math markup commands -developed by Donald Knuth in the late 1970’s, but still in -extensive use today. It became the industry standard for -typesetting of mathematics, and is one of the most common -formats for mathematical journals, articles, and books.</p> -<div class="admonition-see-also last admonition seealso"> -<p class="first admonition-title">See also</p> -<p class="last"><a class="reference external" href="http://en.wikipedia.org/wiki/TeX">TeX Wikipedia entry</a></p> -</div> -</dd> -</dl> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="CSS-styles.html" - title="previous chapter">CSS Style Objects</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/glossary.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="CSS-styles.html" title="CSS Style Objects" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/index.html b/docs/build/html/index.html @@ -1,180 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>MathJax Documentation — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="#" /> - <link rel="next" title="What is MathJax?" href="mathjax.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="mathjax.html" title="What is MathJax?" - accesskey="N">next</a> |</li> - <li><a href="#">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="mathjax-documentation"> -<h1>MathJax Documentation<a class="headerlink" href="#mathjax-documentation" title="Permalink to this headline">¶</a></h1> -<p>MathJax is an open-source JavaScript display engine for LaTeX and -MathML that works in all modern browsers.</p> -<div class="section" id="basic-usage"> -<h2>Basic Usage<a class="headerlink" href="#basic-usage" title="Permalink to this headline">¶</a></h2> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="mathjax.html">What is MathJax?</a></li> -<li class="toctree-l1"><a class="reference internal" href="start.html">Getting Started with MathJax</a></li> -<li class="toctree-l1"><a class="reference internal" href="installation.html">Installing and Testing MathJax</a></li> -<li class="toctree-l1"><a class="reference internal" href="configuration.html">Loading and Configuring MathJax</a></li> -<li class="toctree-l1"><a class="reference internal" href="platforms/index.html">Using MathJax in Web Platforms</a></li> -</ul> -</div> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="tex.html">MathJax TeX and LaTeX Support</a></li> -<li class="toctree-l1"><a class="reference internal" href="mathml.html">MathJax MathML Support</a></li> -<li class="toctree-l1"><a class="reference internal" href="output.html">MathJax Output Formats</a></li> -</ul> -</div> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="community.html">The MathJax Community</a></li> -</ul> -</div> -</div> -<div class="section" id="advanced-topics"> -<span id="id1"></span><h2>Advanced Topics<a class="headerlink" href="#advanced-topics" title="Permalink to this headline">¶</a></h2> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="model.html">The MathJax Processing Model</a></li> -<li class="toctree-l1"><a class="reference internal" href="startup.html">The MathJax Startup Sequence</a></li> -<li class="toctree-l1"><a class="reference internal" href="synchronize.html">Synchronizing Your Code with MathJax</a></li> -<li class="toctree-l1"><a class="reference internal" href="dynamic.html">Loading MathJax Dynamically</a></li> -<li class="toctree-l1"><a class="reference internal" href="typeset.html">Modifying Math on the Page</a></li> -</ul> -</div> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="api/index.html">Details of the MathJax API</a></li> -</ul> -</div> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="jsMath.html">Converting to MathJax from jsMath</a></li> -</ul> -</div> -</div> -<div class="section" id="reference-pages"> -<h2>Reference Pages<a class="headerlink" href="#reference-pages" title="Permalink to this headline">¶</a></h2> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="HTML-snippets.html">HTML snippets</a></li> -<li class="toctree-l1"><a class="reference internal" href="CSS-styles.html">CSS style objects</a></li> -<li class="toctree-l1"><a class="reference internal" href="glossary.html">Glossary</a></li> -</ul> -</div> -<ul class="simple"> -<li><a class="reference internal" href="search.html"><em>Search</em></a></li> -</ul> -<hr class="docutils" /> -<p>This version of the documentation was built January 22, 2011.</p> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="#">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">MathJax Documentation</a><ul> -<li><a class="reference internal" href="#basic-usage">Basic Usage</a><ul> -</ul> -</li> -<li><a class="reference internal" href="#advanced-topics">Advanced Topics</a><ul> -</ul> -</li> -<li><a class="reference internal" href="#reference-pages">Reference Pages</a><ul> -</ul> -</li> -</ul> -</li> -</ul> - - <h4>Next topic</h4> - <p class="topless"><a href="mathjax.html" - title="next chapter">What is MathJax?</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/index.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="mathjax.html" title="What is MathJax?" - >next</a> |</li> - <li><a href="#">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/installation.html b/docs/build/html/installation.html @@ -1,318 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Installing and Testing MathJax — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="Loading and Configuring MathJax" href="configuration.html" /> - <link rel="prev" title="Getting Started" href="start.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="configuration.html" title="Loading and Configuring MathJax" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="start.html" title="Getting Started" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="installing-and-testing-mathjax"> -<span id="installation"></span><h1>Installing and Testing MathJax<a class="headerlink" href="#installing-and-testing-mathjax" title="Permalink to this headline">¶</a></h1> -<p>MathJax can be loaded from a public web server or privately from your hard drive -or other local media. To use MathJax in either way, you will need to obtain a -copy of MathJax and its font package. There are three ways to do this: via -<tt class="docutils literal"><span class="pre">git</span></tt>, <tt class="docutils literal"><span class="pre">svn</span></tt>, or via a pre-packaged archive. We recommend git or svn, as it -is easier to keep your installation up to date with these tools.</p> -<div class="section" id="obtaining-mathjax-via-git"> -<span id="getting-mathjax-git"></span><h2>Obtaining MathJax via Git<a class="headerlink" href="#obtaining-mathjax-via-git" title="Permalink to this headline">¶</a></h2> -<p>The easiest way to get MathJax and keep it up to date is to use the <a class="reference external" href="http://git-scm.com/">Git</a> version control system to access our <a class="reference external" href="http://github.com/mathjax/mathjax">GitHub repository</a>. Use the commands</p> -<div class="highlight-sh"><div class="highlight"><pre>git clone git://github.com/mathjax/MathJax.git mathjax -</pre></div> -</div> -<p>to obtain and set up a copy of MathJax. Note that there is no longer -a <tt class="docutils literal"><span class="pre">fonts.zip</span></tt> file, and that the <tt class="docutils literal"><span class="pre">fonts</span></tt> directory is now part of -the repository itself.</p> -<p>Whenever you want to update MathJax, you can now use</p> -<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>mathjax -git remote show origin -</pre></div> -</div> -<p>to check if there are updates to MathJax (this will print several -lines of data, but the last line should tell you if your copy is up to -date or out of date). If MathJax needs updating, use</p> -<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>mathjax -git pull origin -</pre></div> -</div> -<p>to udpate your copy of MathJax to the current release version. If you -keep MathJax updated in this way, you will be sure that you have the -latest bug fixes and new features as they become available.</p> -<p>This gets you the current development copy of MathJax, which is the -“bleeding-edge” version that contains all the latest changes to -MathJax. At times, however, these may be less stable than the -“release” version. If you prefer to use the most stable version (that -may not include all the latest patches and features), use <tt class="docutils literal"><span class="pre">git</span> <span class="pre">tag</span> -<span class="pre">-l</span></tt> to see all versions and use <tt class="docutils literal"><span class="pre">git</span> <span class="pre">checkout</span> <span class="pre"><tag_name></span></tt> to -checkout that version of MathJax. When you want to upgrade to a new -release, you will need to repeat this for the latest release tag.</p> -</div> -<div class="section" id="obtaining-mathjax-via-svn"> -<span id="getting-mathjax-svn"></span><h2>Obtaining MathJax via SVN<a class="headerlink" href="#obtaining-mathjax-via-svn" title="Permalink to this headline">¶</a></h2> -<p>If you are more comfortable with the <a class="reference external" href="http://subversion.apache.org/">subversion</a> source control system, you may want -to use GitHub’s <tt class="docutils literal"><span class="pre">svn</span></tt> service to obtain MathJax. If you want to get the -latest revision using <tt class="docutils literal"><span class="pre">svn</span></tt>, use the commands</p> -<div class="highlight-sh"><div class="highlight"><pre>svn checkout http://svn.github.com/mathjax/MathJax.git mathjax -</pre></div> -</div> -<p>to obtain and set up a copy of MathJax. Note that there is no longer -a <tt class="docutils literal"><span class="pre">fonts.zip</span></tt> file, and that the <tt class="docutils literal"><span class="pre">fonts</span></tt> directory is now part of -the repository itself.</p> -<p>Whenever you want to update MathJax, you can now use</p> -<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>mathjax -svn status -u -</pre></div> -</div> -<p>to check if there are updates to MathJax. If MathJax needs updating, -use</p> -<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>mathjax -svn update -</pre></div> -</div> -<p>to udpate your copy of MathJax to the current release version. If you -keep MathJax updated in this way, you will be sure that you have the -latest bug fixes and new features as they become available.</p> -<p>This gets you the current development copy of MathJax, which is the -“bleeding-edge” version that contains all the latest changes to -MathJax. At times, however, these may be less stable than the -“release” version. If you prefer to use one of the tagged releases -instead, then either use <tt class="docutils literal"><span class="pre">git</span></tt> as described above, or one of the -archive files as described below. You can use</p> -<div class="highlight-sh"><div class="highlight"><pre>svn checkout http://svn.github.com/mathjax/MathJax.git@nnn mathjax -</pre></div> -</div> -<p>to check out revision number <cite>nnn</cite>, but it is not easy to tell what -svn revision number is associated with a particular release. GitHub’s -<tt class="docutils literal"><span class="pre">svn</span></tt> service doesn’t appear to allow you to sepecify a particular -tagged version.</p> -</div> -<div class="section" id="obtaining-mathjax-via-an-archive"> -<span id="getting-mathjax-zip"></span><h2>Obtaining MathJax via an archive<a class="headerlink" href="#obtaining-mathjax-via-an-archive" title="Permalink to this headline">¶</a></h2> -<p>Release versions of MathJax are available in archive files from the -<a class="reference external" href="http://www.mathjax.org/download/">MathJax download page</a> or the -<a class="reference external" href="http://github.com/mathjax/mathjax/">GitHub downloads</a> (click the -big download button on the right), where you can download the archive -that you need.</p> -<p>You should download the v1.1 archive (which will get you a file with a -name like <tt class="docutils literal"><span class="pre">mathjax-MathJax-v1.1-X-XXXXXXXX.zip</span></tt>, where the X’s are -some sequence of random-looking letters and numbers), then simply unzip -it. Once the MathJax directory is unpacked, you should move it to the -desired location on your server (or your hard disk, if you are using -it locally rather then through a web server). One natural location is -to put it at the top level of your web server’s hierarchy. That would -let you refer to the main MathJax file as <tt class="docutils literal"><span class="pre">/MathJax/MathJax.js</span></tt> from -within any page on your server.</p> -<p>From the <a class="reference external" href="http://github.com/mathjax/mathjax/">MathJax GitHub download link</a> (the big download button at the -right), you can also select the <tt class="docutils literal"><span class="pre">Download</span> <span class="pre">.tar.gz</span></tt> or <tt class="docutils literal"><span class="pre">Download</span> -<span class="pre">.zip</span></tt> buttons to get a copy of the current “bleeding-edge” version of -MathJax that contains all the latest changes and bug-fixes.</p> -</div> -<div class="section" id="testing-your-installation"> -<h2>Testing your installation<a class="headerlink" href="#testing-your-installation" title="Permalink to this headline">¶</a></h2> -<p>Use the HTML files in the <tt class="docutils literal"><span class="pre">test</span></tt> directory to see if your -installation is working properly:</p> -<div class="highlight-python"><pre>test/ - index.html # Tests default configuration - index-images.html # Tests image-font fallback display - sample.html # Sample page with lots of pretty equations</pre> -</div> -<p>Open these files in your browser to see that they appear to be working -properly. If you have installed MathJax on a server, use the web -address for those files rather than opening them locally. When you -view the <tt class="docutils literal"><span class="pre">index.html</span></tt> file, you should see (after a few moments) a -message that MathJax appears to be working. If not, you should check -that the files have been transferred to the server completely, that -the fonts archive has been unpacked in the correct location, and that -the permissions allow the server to access the files and folders that -are part of the MathJax directory (be sure to verify the MathJax -folder’s permissions as well). Checking the server logs may help -locate problems with the installation.</p> -</div> -<div class="section" id="notes-about-shared-installations"> -<span id="cross-domain-linking"></span><h2>Notes about shared installations<a class="headerlink" href="#notes-about-shared-installations" title="Permalink to this headline">¶</a></h2> -<p>Typically, you want to have MathJax installed on the same server as -your web pages that use MathJax. There are times, however, when that -may be impractical, or when you want to use a MathJax installation at -a different site. For example, a departmental server at -<tt class="docutils literal"><span class="pre">www.math.yourcollege.edu</span></tt> might like to use a college-wide -installation at <tt class="docutils literal"><span class="pre">www.yourcollege.edu</span></tt> rather than installing a -separate copy on the departmental machine. MathJax can certainly -be loaded from another server, but there is one imporant caveat — -Firefox’s same-origin security policy for cross-domain scripting.</p> -<p>Firefox’s interpretation of the same-origin policy is more strict than -most other browsers, and it affects how fonts are loaded with the -<cite>@font-face</cite> CSS directive. MathJax uses this directive to load -web-based math fonts into a page when the user doesn’t have them -installed locally on their own computer. Firefox’s security policy, -however, only allows this when the fonts come from the same server as -the web page itself, so if you load MathJax (and hence its web fonts) -from a different server, Firefox won’t be able to access those web -fonts. In this case, MathJax will pause while waiting for the font to -download (which will never happen) and will time out after about 15 -seconds for each font it tries to access. Typically that is three or -four fonts, so your Firefox users will experience a minute or so -delay before mathematics is displayed, and then it will probably -display incorrectly because the browser doesn’t have access to the -correct fonts.</p> -<p>There is a solution to this, however, if you manage the server where -MathJax is installed, and if that server is running the <a class="reference external" href="http://www.apache.org/">Apache web -server</a>. In the remote server’s -<tt class="docutils literal"><span class="pre">MathJax/fonts/HTML-CSS/TeX/otf</span></tt> folder, create a file called -<tt class="docutils literal"><span class="pre">.htaccess</span></tt> that contains the following lines:</p> -<div class="highlight-python"><pre><FilesMatch "\.(ttf|otf|eot)$"> -<IfModule mod_headers.c> -Header set Access-Control-Allow-Origin "*" -</IfModule> -</FilesMatch></pre> -</div> -<p>and make sure the permissions allow the server to read this file. -(The file’s name starts with a period, which causes it to be an -“invisible” file on unix-based operating systems. Some systems, -particularly graphic user interfaces, may not allow you to create such -files, so you might need to use the command-line interface to -accomplish this.)</p> -<p>This file should make it possible for pages at other sites to load -MathJax from this server in such a way that Firefox will be able to -download the web-based fonts. If you want to restrict the sites that -can access the web fonts, change the <tt class="docutils literal"><span class="pre">Access-Control-Allow-Origin</span></tt> -line to something like:</p> -<div class="highlight-python"><pre>Header set Access-Control-Allow-Origin "http://www.math.yourcollege.edu"</pre> -</div> -<p>so that only pages at <tt class="docutils literal"><span class="pre">www.math.yourcollege.edu</span></tt> will be able to -download the fonts from this site. See the open font library -discussion of <a class="reference external" href="http://openfontlibrary.org/wiki/Web_Font_linking_and_Cross-Origin_Resource_Sharing">web-font linking</a> -for more details.</p> -</div> -<div class="section" id="forefox-and-local-fonts"> -<span id="ff-local-fonts"></span><h2>Forefox and Local Fonts<a class="headerlink" href="#forefox-and-local-fonts" title="Permalink to this headline">¶</a></h2> -<p>Firefox’s same-origin security policy affects its ability to load -web-based fonts, as described above. This has implications not only -to cross-domain loading of MathJax, but also to using MathJax locally -from your hard disk. Firefox’s interpretation of the same-origin -policy for local files is that the “same domain” for a page is the -directory where that page exists, or any of its subdirectories. So if -you use MathJax in a page with a <tt class="docutils literal"><span class="pre">file://</span></tt> URL, and if MathJax is -loaded from a diretory other than the one containing the original -page, then MathJax will not be able to access the web-based fonts in -Firefox. In that case, MathJax will fall back on image fonts to -display the mathematics.</p> -<p>In order for Firefox to be able to load the fonts properly for a local -file, your MathJax installation must be in a subdirectory of the one -containing the page that uses MathJax. This is an unfortunate -restriction, but it is a limitiation imposed by Firefox’s security -model that MathJax can not circumvent. Currently, this is not a -problem for other browsers.</p> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">Installing and Testing MathJax</a><ul> -<li><a class="reference internal" href="#obtaining-mathjax-via-git">Obtaining MathJax via Git</a></li> -<li><a class="reference internal" href="#obtaining-mathjax-via-svn">Obtaining MathJax via SVN</a></li> -<li><a class="reference internal" href="#obtaining-mathjax-via-an-archive">Obtaining MathJax via an archive</a></li> -<li><a class="reference internal" href="#testing-your-installation">Testing your installation</a></li> -<li><a class="reference internal" href="#notes-about-shared-installations">Notes about shared installations</a></li> -<li><a class="reference internal" href="#forefox-and-local-fonts">Forefox and Local Fonts</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="start.html" - title="previous chapter">Getting Started</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="configuration.html" - title="next chapter">Loading and Configuring MathJax</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/installation.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="configuration.html" title="Loading and Configuring MathJax" - >next</a> |</li> - <li class="right" > - <a href="start.html" title="Getting Started" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/jsMath.html b/docs/build/html/jsMath.html @@ -1,131 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Converting to MathJax from jsMath — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="Describing HTML snippets" href="HTML-snippets.html" /> - <link rel="prev" title="The MathJax Object-Oriented Programming Model" href="api/object.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="HTML-snippets.html" title="Describing HTML snippets" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="api/object.html" title="The MathJax Object-Oriented Programming Model" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="converting-to-mathjax-from-jsmath"> -<span id="jsmath-support"></span><h1>Converting to MathJax from jsMath<a class="headerlink" href="#converting-to-mathjax-from-jsmath" title="Permalink to this headline">¶</a></h1> -<p>MathJax is the successor to the popular <a class="reference external" href="http://www.math.union.edu/locate/jsMath/">jsMath</a> package for rendering -mathematics in web pages. Like jsMath, MathJax works by locating and -processing the mathematics within the webpage once it has been loaded -in the browser by a user viewing your web pages. If you are using -jsMath with its <tt class="docutils literal"><span class="pre">tex2math</span></tt> preprocessor, then switching to MathJax -should be easy, and is simply a matter of configuring MathJax -appropriately. See the section on <a class="reference internal" href="configuration.html#configuration"><em>Configuring MathJax</em></a> for details about loading and configuring MathJax.</p> -<p>On the other hand, if you are using jsMath’s <tt class="docutils literal"><span class="pre"><span</span> -<span class="pre">class="math">...</span></span></tt> and <tt class="docutils literal"><span class="pre"><div</span> <span class="pre">class="math">...</div></span></tt> tags to -mark the mathematics in your document, then you should use MathJax’s -<tt class="docutils literal"><span class="pre">jsMath2jax</span></tt> preprocessor when you switch to MathJax. To do this, -include <tt class="docutils literal"><span class="pre">"jsMath2jax.js"</span></tt> in the <cite>extensions</cite> array of your -configuration, with the <cite>jax</cite> array set to include <tt class="docutils literal"><span class="pre">"input/TeX"</span></tt>.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"jsMath2jax.js"</span><span class="p">],</span> -<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="p">...]</span> -</pre></div> -</div> -<p>There are a few configuration options for <tt class="docutils literal"><span class="pre">jsMath2jax</span></tt>, which you -can find in the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file, or in the <a class="reference internal" href="options/jsMath2jax.html#configure-jsmath2jax"><em>jsMath -configuration options</em></a> section.</p> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="api/object.html" - title="previous chapter">The MathJax Object-Oriented Programming Model</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="HTML-snippets.html" - title="next chapter">Describing HTML snippets</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/jsMath.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="HTML-snippets.html" title="Describing HTML snippets" - >next</a> |</li> - <li class="right" > - <a href="api/object.html" title="The MathJax Object-Oriented Programming Model" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/mathjax.html b/docs/build/html/mathjax.html @@ -1,140 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>What is MathJax? — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="Getting Started" href="start.html" /> - <link rel="prev" title="MathJax Documentation" href="index.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="start.html" title="Getting Started" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="index.html" title="MathJax Documentation" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="what-is-mathjax"> -<h1>What is MathJax?<a class="headerlink" href="#what-is-mathjax" title="Permalink to this headline">¶</a></h1> -<p>MathJax is an open-source JavaScript display engine for LaTeX and -MathML that works in all modern browsers. It was designed with the -goal of consolidating the recent advances in web technologies into a -single, definitive, math-on-the-web platform supporting the major -browsers and operating systems. It requires no setup on the part of -the user (no plugins to downlaod or software to install), so the page -author can write web documents that include mathematics and be -confident that users will be able to view it naturally and easily. -One simply includes MathJax and some mathematics in a web page, and -MathJax does the rest.</p> -<p>MathJax uses web-based fonts (in those browsers that support it) to -produce high-quality typesetting that scales and prints at full -resolution (unlike mathematics included as images). MathJax can be -used with screen readers, providing accessibility for the visually -impaired. With MathJax, mathematics is text-based rather than -image-based, and so it is available for search engines, meaning that -your equations can be searchable, just like the text of your pages. -MathJax allows page authors to write formulas using TeX and LaTeX -notation, or <a class="reference external" href="http://www.w3.org/TR/MathML3">MathML</a>, a World Wide -Web Constortium standard for representing mathematics in XML format. -MathJax will even convert TeX notation into MathML, so that it can be -rendered more quickly by those browsers that support MathML natively, -or so that you can copy and past it into other programs.</p> -<p>MathJax is modular, so it loads components only when necessary, and -can be extended to include new capabilities as needed. MathJax is -highly configurable, allowing authors to customize it for the special -requirements of their web sites. Finally, MathJax has a rich -application programming interface (API) that can be used to make the -mathematics on your web pages interactive and dynamic.</p> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="index.html" - title="previous chapter">MathJax Documentation</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="start.html" - title="next chapter">Getting Started</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/mathjax.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="start.html" title="Getting Started" - >next</a> |</li> - <li class="right" > - <a href="index.html" title="MathJax Documentation" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/mathml.html b/docs/build/html/mathml.html @@ -1,197 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>MathJax MathML Support — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="MathJax Output Formats" href="output.html" /> - <link rel="prev" title="MathJax TeX and LaTeX Support" href="tex.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="output.html" title="MathJax Output Formats" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="tex.html" title="MathJax TeX and LaTeX Support" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="mathjax-mathml-support"> -<span id="mathml-support"></span><h1>MathJax MathML Support<a class="headerlink" href="#mathjax-mathml-support" title="Permalink to this headline">¶</a></h1> -<p>The support for <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> in MathJax consists of three parts: the -<cite>mml2jax</cite> preprocessor, the MathML input processor, and the NativeMML -output processor. The first of these looks for <tt class="docutils literal"><span class="pre"><math></span></tt> tags within -your document and marks them for later processing by MathJax. The -second converts the MathML to the internal format used by MathJax, and -the third turns the internal format into MathML within the page so -that it can be displayed by the browser’s native MathML support.</p> -<p>Because of MathJax’s modular design, you do not need to use all three -of these components. For example, you could use the <cite>tex2jax</cite> -preprocessor and the TeX input processor, but the NativeMML output -processor, so that your mathematics is entered in TeX format, but -displayed as MathML. Or you could use the <cite>mml2jax</cite> reprocessor and -MathML input processor with the HTML-CSS output processor to make -MathML available in browsers that don’t have native MathML support. -It is also possible to have MathJax select the output processor for -you so that MathML is used in those browsers that support it, while -HTML-CSS is used for those that don’t. See the <a class="reference internal" href="configuration.html#common-configurations"><em>common -configurations</em></a> section for details and -examples.</p> -<p>Of course it is also possible to use all three components together. -It may seem strange to go through an internal format just to return to -MathML in the end, but this is actually what makes it possible to view -MathML within an HTML page (rather than an XHTML page), without -the complications of handling special MIME-types for the document, or -any of the other setup issues that make using native MathML -difficult. MathJax handles the setup and properly marks the -mathematics so that the browser will render it as MathML. In -addition, MathJax provides its contextual menu for the MathML, which -lets the user zoom the mathematics for easier reading, get the copy -the source markup, and so on, so there is added value to using MathJax -even whith a pure MathML workflow.</p> -<div class="section" id="mathml-in-html-pages"> -<h2>MathML in HTML pages<a class="headerlink" href="#mathml-in-html-pages" title="Permalink to this headline">¶</a></h2> -<p>For MathML that is handled via the pre-processor, you should not use -the named MathML entities, but rather use the numeric entities like -<tt class="docutils literal"><span class="pre">&#x221A;</span></tt> or unicode characters embedded in the page itself. The -reason is that entities are replaced by the browser before MathJax -runs, and some browsers report errors for unknown entities. For -browsers that are not MathML-aware, that will cause errors to be -displayed for the MathML entities. While that might not occur in the -browser you are using to compose your pages, it can happen with other -browsers, so you should avoid the named entities whenever possible. -If you must use named entities, you may need to declare them in the -<cite>DOCTYPE</cite> declaration by hand.</p> -<p>When you use MathML in an HTML document rather than an XHTML one -(MathJax will work woth both), you should not use the “self-closing” -form for tags with no content, but should use separate open and close -tags. That is, use</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><mspace</span> <span class="na">width=</span><span class="s">"thinmathspace"</span><span class="nt">></mspace></span> -</pre></div> -</div> -<p>rather than <tt class="docutils literal"><span class="pre"><mspace</span> <span class="pre">width="thinmathspace</span> <span class="pre">/></span></tt>. This is because HTML -does not have self-closing tags, and some browsers will get the -nesting of tags wrong if you attempt to use them. For example, with -<tt class="docutils literal"><span class="pre"><mspace</span> <span class="pre">width="1em"</span> <span class="pre">/></span></tt>, since there is no closing tag, the rest of -the mathematics will become the content of the <tt class="docutils literal"><span class="pre"><mspace></span></tt> tag; but -since <tt class="docutils literal"><span class="pre"><mspace></span></tt> should have no content, the rest of the mathematics -will not be displayed. This is a common error that should be avoided.</p> -</div> -<div class="section" id="supported-mathml-commands"> -<h2>Supported MathML commands<a class="headerlink" href="#supported-mathml-commands" title="Permalink to this headline">¶</a></h2> -<p>MathJax supports the <a class="reference external" href="http://www.w3.org/TR/MathML3/">MathML3.0</a> -presentation mathematics tags, with some limitations. The MathML -support is still under active development, so some tags are not yet -implemented, and some features are not fully developed, but are -coming.</p> -<p>The deficiencies include:</p> -<ul class="simple"> -<li>No support for the elementary math tags: <tt class="docutils literal"><span class="pre">mstack</span></tt>, <tt class="docutils literal"><span class="pre">mlongdiv</span></tt>, -<tt class="docutils literal"><span class="pre">msgroup</span></tt>, <tt class="docutils literal"><span class="pre">msrow</span></tt>, <tt class="docutils literal"><span class="pre">mscarries</span></tt>, and <tt class="docutils literal"><span class="pre">mscarry</span></tt>.</li> -<li>Limited support for line breaking (they are only allowed in direct -children of <tt class="docutils literal"><span class="pre">mrow</span></tt> or implied <tt class="docutils literal"><span class="pre">mrow</span></tt> elements.</li> -<li>No support for alignment groups in table.</li> -<li>No support for right-to-left rendering.</li> -</ul> -<p>See the <a class="reference external" href="http://www.w3.org/Math/testsuite/results/tests.html">results of the MathML3.0 test suite</a> for details.</p> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">MathJax MathML Support</a><ul> -<li><a class="reference internal" href="#mathml-in-html-pages">MathML in HTML pages</a></li> -<li><a class="reference internal" href="#supported-mathml-commands">Supported MathML commands</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="tex.html" - title="previous chapter">MathJax TeX and LaTeX Support</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="output.html" - title="next chapter">MathJax Output Formats</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/mathml.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="output.html" title="MathJax Output Formats" - >next</a> |</li> - <li class="right" > - <a href="tex.html" title="MathJax TeX and LaTeX Support" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/model.html b/docs/build/html/model.html @@ -1,308 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax Processing Model — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="The MathJax Startup Sequence" href="startup.html" /> - <link rel="prev" title="The MathJax Community" href="community.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="startup.html" title="The MathJax Startup Sequence" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="community.html" title="The MathJax Community" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-processing-model"> -<h1>The MathJax Processing Model<a class="headerlink" href="#the-mathjax-processing-model" title="Permalink to this headline">¶</a></h1> -<p>The purpose of MathJax is to bring the ability to include mathematics -easily in web pages to as wide a range of browsers as possible. -Authors can specify mathematics in a variety of formats (e.g., -<a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> or <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a>), and MathJax provides high-quality -mathematical typesetting even in those browsers that do not have -native MathML support. This all happens without the need for special -downloads or plugins, but rendering will be enhanced if high-quality -math fonts (e.g., <a class="reference internal" href="glossary.html#term-stix"><em class="xref std std-term">STIX</em></a>) are available to the browser.</p> -<p>MathJax is broken into several different kinds of components: page -preprocessors, input processors, output processors, and the MathJax -Hub that organizes and connects the others. The input and output -processors are called <a class="reference internal" href="glossary.html#term-jax"><em class="xref std std-term">jax</em></a>, and are described in more detail -below.</p> -<p>When MathJax runs, it looks through the page for special tags that -hold mathematics; for each such tag, it locates an appropriate input -jax which it uses to convert the mathematics into an internal form -(called an element jax), and then calls an output jax to transform the -internal format into HTML content that displays the mathematics within -the page. The page author configures MathJax by indicating which -input and output jax are to be used.</p> -<p>Often, and especially with pages that are authored by hand, the -mathematics is not stored (initially) within the special tags needed -by MathJax, as that would require more notation than the average page -author is willing to type. Instead, it is entered in a form that is -more natural to the page author, for example, using the standard TeX -math delimiters <tt class="docutils literal"><span class="pre">$...$</span></tt> and <tt class="docutils literal"><span class="pre">$$...$$</span></tt> to indicate what part of the -document is to be typeset as mathematics. In this case, MathJax can -run a preprocessor to locate the math delimiters and replace them by -the special tags that it uses to mark the formulas. There are -preprocessors for <a class="reference internal" href="tex.html#tex-support"><em>TeX notation</em></a>, <a class="reference internal" href="mathml.html#mathml-support"><em>MathML -notation</em></a>, and the <a class="reference internal" href="jsMath.html#jsmath-support"><em>jsMath notation</em></a> that uses <cite>span</cite> and <cite>div</cite> tags.</p> -<p>For pages that are constructed programatically, such as HTML -pages that result from running a processor on text in some other -format (e.g., pages produced from Markdown documents, or via programs -like <cite>tex4ht</cite>), it would be best to use MathJax’s special tags -directly, as described below, rather than having MathJax run -another preprocessor. This will speed up the final display of the -mathematics, since the extra preprocessing step would not be needed, -and it also avoids the conflict between the use of the less-than sign, -<tt class="docutils literal"><span class="pre"><</span></tt>, in mathematics and asn an HTML special character (that starts -an HTML tag).</p> -<div class="section" id="how-mathematics-is-stored-in-the-page"> -<h2>How mathematics is stored in the page<a class="headerlink" href="#how-mathematics-is-stored-in-the-page" title="Permalink to this headline">¶</a></h2> -<p>In order to identify mathematics in the page, MathJax uses special -<tt class="docutils literal"><span class="pre"><script></span></tt> tags to enclose the mathematics. This is done because -such tags can be located easily, and because their content is not -further processed by the browser; for example, less-than signs can be -used as they are in mathematics, without worrying about them being -mistaken for the beginnings of HTML tags. One may also consider the -math notation as a form of “script” for the mathematics, so a -<tt class="docutils literal"><span class="pre"><script></span></tt> tag makes at least some sense for storing the math.</p> -<p>Each <tt class="docutils literal"><span class="pre"><script></span></tt> tag has a <tt class="docutils literal"><span class="pre">type</span></tt> attribute that identifies the -kind of script that the tag contains. The usual (and default) value -is <tt class="docutils literal"><span class="pre">type="text/javascript"</span></tt>, and when a script has this type, the -browser executes the script as a javascript program. MathJax, -however, uses the type <cite>math/tex</cite> to identify mathematics in the TeX -and LaTeX notation, and <cite>math/mml</cite> for mathematics in MathML -notation. When the <cite>tex2jax</cite> or <cite>mml2jax</cite> preprocessors run, they -create <tt class="docutils literal"><span class="pre"><script></span></tt> tags with these types so that MathJax can process -them when it runs its main typesetting pass.</p> -<p>For example,</p> -<div class="highlight-html"><pre><script type="math/tex">x+\sqrt{1-x^2}</script></pre> -</div> -<p>represents an in-line equation in TeX notation, and</p> -<div class="highlight-html"><pre><script type="math/tex; mode=display"> - \sum_{n=1}^\infty {1\over n^2} = {\pi^2\over 6} -</script></pre> -</div> -<p>is a displayed TeX equation.</p> -<p>Alternatively, using MathML notation, you could use</p> -<div class="highlight-html"><pre><script type="math/mml"> - <math> - <mi>x</mi> - <mo>+</mo> - <msqrt> - <mn>1</mn> - <mo>&#x2212;<!-- − --></mo> - <msup> - <mi>x</mi> - <mn>2</mn> - </msup> - </msqrt> - </math> -</script></pre> -</div> -<p>for in-line math, or</p> -<div class="highlight-html"><pre><script type="math/mml"> - <math display="block"> - <mrow> - <munderover> - <mo>&#x2211;<!-- ∑ --></mo> - <mrow> - <mi>n</mi> - <mo>=</mo> - <mn>1</mn> - </mrow> - <mi mathvariant="normal">&#x221E;<!-- ∞ --></mi> - </munderover> - </mrow> - <mrow> - <mfrac> - <mn>1</mn> - <msup> - <mi>n</mi> - <mn>2</mn> - </msup> - </mfrac> - </mrow> - <mo>=</mo> - <mrow> - <mfrac> - <msup> - <mi>&#x03C0;<!-- π --></mi> - <mn>2</mn> - </msup> - <mn>6</mn> - </mfrac> - </mrow> - </math> -</script></pre> -</div> -<p>for displayed equations in MathML notation. -As other input jax are created, they will use other types to identify -the mathematics they can process.</p> -<p>Page authors can use one of MathJax’s preprocessors to convert from -math delimiters that are more natural for the author to type (e.g., -TeX math delimiters like <tt class="docutils literal"><span class="pre">$$...$$</span></tt>) to MathJax’s <tt class="docutils literal"><span class="pre"><script></span></tt> -format. Blog and wiki software could extend from their own markup -languages to include math delimiters, which they could convert to -MathJax’s <tt class="docutils literal"><span class="pre"><script></span></tt> format automatically.</p> -<p>Note, however, that Internet Explorer has a bug that causes it to -remove the space before a <tt class="docutils literal"><span class="pre"><script></span></tt> tag if there is also a space -after it, which can cause serious spacing problems with in-line math -in Internet Explorer. There are three possible solutions to this in -MathJax. The recommended way is to use a math preview (an element -with class <tt class="docutils literal"><span class="pre">MathJax_Preview</span></tt>) that is non-empty and comes right -before the <tt class="docutils literal"><span class="pre"><script></span></tt> tag. Its contents can be just the word -<tt class="docutils literal"><span class="pre">[math]</span></tt>, so it does not have to be specific to the mathematics -script that follows; it just has to be non-empty (though it could have -its style set to <tt class="docutils literal"><span class="pre">display:none</span></tt>). See also the <tt class="docutils literal"><span class="pre">preJax</span></tt> and -<tt class="docutils literal"><span class="pre">postJax</span></tt> options in the <a class="reference internal" href="options/hub.html#configure-hub"><em>Core Configuration Options</em></a> document for another approach.</p> -</div> -<div class="section" id="the-components-of-mathjax"> -<h2>The components of MathJax<a class="headerlink" href="#the-components-of-mathjax" title="Permalink to this headline">¶</a></h2> -<p>The main components of MathJax are its preprocessors, its input and -output jax, and the MathJax Hub, which coordinates the actions of the -other components.</p> -<p><strong>Input jax</strong> are associated with the different script types (like -<em class="mimetype">math/tex</em> or <em class="mimetype">math/mml</em>) and the mapping of a -particular type to a particular jax is made when the various jax -register their abilities with the MathJax Hub at configuration time. -For example, the MathML input jax registers the <em class="mimetype">math/mml</em> -type, so MathJax will know to call the MathML input jax when it sees -math elements of that type. The role of the input jax is to convert -the math notation entered by the author into the internal format used -by MathJax (called an <cite>element jax</cite>). This internal format is -essentially MathML (represented as JavaScript objects), so an input -jax acts as a translator into MathML.</p> -<p><strong>Output jax</strong> convert that internal element jax format into a specific -output format. For example, the NativeMML output jax inserts MathML -tags into the page to represent the mathematics, while the HTML-CSS -output jax uses HTML with CSS styling to lay out the mathematics so -that it can be displayed even in browsers that dont understand -MathML. Output jax could be produced that render the mathematics -using SVG, for example, or that speak an equation for the blind -users. The MathJax contextual menu can be used to switch between the -output jax that are available.</p> -<p>Each input and output jax has a small configuration file that is -loaded when that input jax is included in the <cite>jax</cite> array in the -MathJax configuration, and a larger file that implements the core -functionality of that particular jax. The latter file is loaded -when the first time the jax is needed by MathJax to process some -mathematics.</p> -<p>The <strong>MathJax Hub</strong> keeps track of the internal representations of the -various mathematical equations on the page, and can be queried to -obtain information about those equations. For example, one can obtain -a list of all the math elements on the page, or look up a particular -one, or find all the elements with a given input format, and so on. -In a dynamically generated web page, an equation where the source -mathematics has changed can be asked to re-render itself, or if a new -paragraph is generated that might include mathematics, MathJax can be -asked to process the equations it contains.</p> -<p>The Hub also manages issues concerning mouse events and other user -interaction with the equation itself. Parts of equations can be made -active so that mouse clicks cause event handlers to run, or activate -hyperlinks to other pages, and so on, making the mathematics as -dynamic as the rest of the page.</p> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">The MathJax Processing Model</a><ul> -<li><a class="reference internal" href="#how-mathematics-is-stored-in-the-page">How mathematics is stored in the page</a></li> -<li><a class="reference internal" href="#the-components-of-mathjax">The components of MathJax</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="community.html" - title="previous chapter">The MathJax Community</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="startup.html" - title="next chapter">The MathJax Startup Sequence</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/model.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="startup.html" title="The MathJax Startup Sequence" - >next</a> |</li> - <li class="right" > - <a href="community.html" title="The MathJax Community" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/objects.inv b/docs/build/html/objects.inv Binary files differ. diff --git a/docs/build/html/options/FontWarnings.html b/docs/build/html/options/FontWarnings.html @@ -1,267 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The FontWarnings extension — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> - <link rel="next" title="Using MathJax in popular web platforms" href="../platforms/index.html" /> - <link rel="prev" title="The MathZoom extension" href="MathZoom.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="../platforms/index.html" title="Using MathJax in popular web platforms" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="MathZoom.html" title="The MathZoom extension" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-fontwarnings-extension"> -<span id="configure-fontwarnings"></span><h1>The FontWarnings extension<a class="headerlink" href="#the-fontwarnings-extension" title="Permalink to this headline">¶</a></h1> -<p>The options below control the operation of the <cite>FontWarnings</cite> -extension that is run when you include <tt class="docutils literal"><span class="pre">"FontWarnings.js"</span></tt> in the -<cite>extensions</cite> array of your configuration. They are listed with their -default values. To set any of these options, include a -<tt class="docutils literal"><span class="pre">FontWarnings</span></tt> section in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. -For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">FontWarnings</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">fadeoutTime</span><span class="o">:</span> <span class="mi">2</span><span class="o">*</span><span class="mi">1000</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>would set the <tt class="docutils literal"><span class="pre">fadeoutTime</span></tt> option to 2000 milliseconds (2 seconds).</p> -<dl class="describe"> -<dt> -<tt class="descname">messageStyle: { ... }</tt></dt> -<dd><p>This sets the CSS styles to be used for the font warning message -window. See the <tt class="docutils literal"><span class="pre">extensions/FontWarnings.js</span></tt> file for details of -what are set by default. See the <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS style objects</em></a> for details about how to specify CSS styles -via javascript objects.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">Message: { ... }</tt></dt> -<dd><p>This block contains HTML snippets to be used for the various -messages that the FontWarning extension can produce. There are -three messages that you can redefine to suit your needs:</p> -<dl class="describe"> -<dt> -<tt class="descname">webFont: [ ... ]</tt></dt> -<dd><p>The message used for when MathJax uses web-based fonts (rather -than local fonts installed on the user’s system).</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">imageFonts: [ ... ]</tt></dt> -<dd><p>The message used for when MathJax must use image fonts rather -than local or web-based fonts (for those browsers that don’t -handle the <tt class="docutils literal"><span class="pre">@font-face</span></tt> CSS directive).</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">noFonts: [ ... ]</tt></dt> -<dd><p>The message used when MathJax is unable to find any font to use -(i.e., neither local nor web-based nor image-based fonts are -available).</p> -</dd></dl> - -<p>Any message that is set to <tt class="docutils literal"><span class="pre">null</span></tt> rather than an HTML snippet -array will not be presented to the user, so you can set, for -example, the <tt class="docutils literal"><span class="pre">webFont</span></tt> message to <tt class="docutils literal"><span class="pre">null</span></tt> in order to have the -<tt class="docutils literal"><span class="pre">imageFonts</span></tt> and <tt class="docutils literal"><span class="pre">noFonts</span></tt> messages, but no message if MathJax -uses web-based fonts.</p> -<p>See the description of <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>HTML snippets</em></a> for -details about how to describe the messages using HTML snippets. -Note that in addition to the usual rules for defining such -snippets, the FontWarnings snippets can include references to -pre-defined snippets (that represent elements common to all three -messages). These are defined below in the <tt class="docutils literal"><span class="pre">HTML</span></tt> block, and are -referenced using <tt class="docutils literal"><span class="pre">["name"]</span></tt> within the snippet, where <cite>name</cite> is -the name of one of the snippets defined in the <tt class="docutils literal"><span class="pre">HTML</span></tt> -configuration block. For example</p> -<div class="highlight-javascript"><pre> Message: { - noFonts: [ - ["closeBox"], - "MathJax is unable to locate a font to use to display ", - "its mathematics, and image fonts are not available, so it ", - "is falling back on generic unicode characters in hopes that ", - "your browser will be able to display them. Some characters ", - "may not show up properly, or possibly not at all.", - ["fonts"], - ["webfonts"] - ] - } - -refers to the ``closeBox``, ``fonts`` and ``webfonts`` snippets in -declared in the ``HTML`` section.</pre> -</div> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">HTML: { ... }</tt></dt> -<dd><p>This object defines HTML snippets that are common to more than one -message in the <tt class="docutils literal"><span class="pre">Message</span></tt> section above. They can be called in -by using <tt class="docutils literal"><span class="pre">["name"]</span></tt> in an HTML snippet, where <cite>name</cite> refers to -the name of the snippet in the <tt class="docutils literal"><span class="pre">HTML</span></tt> block. The pre-defined -snippets are:</p> -<dl class="describe"> -<dt> -<tt class="descname">closeBox</tt></dt> -<dd><p>The HTML for the close box in the FontWarning message.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">webfonts</tt></dt> -<dd><p>The HTML for a paragraph suggesting an upgrade to a more -modern browser that supports web fonts.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">fonts</tt></dt> -<dd><p>HTML that includes links to the MathJax and STIX font download -pages.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">STIXfonts</tt></dt> -<dd><p>HTML that gives the download link for the STIX fonts only. -(Used in place of <cite>fonts</cite> when the <cite>HTML-CSS</cite> option for -<cite>availableFonts</cite> only includes the <a class="reference internal" href="../glossary.html#term-stix"><em class="xref std std-term">STIX</em></a> fonts.)</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">TeXfonts</tt></dt> -<dd><p>HTML that gives the download link for the MathJax TeX fonts -only. (Used in place of <cite>fonts</cite> when the <cite>HTML-CSS</cite> option -for <cite>availableFonts</cite> only includes the <cite>TeX</cite> fonts.)</p> -</dd></dl> - -<p>You can add your own pre-defined HTML snippets to this object, or -override the ones that are there with your own text.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">removeAfter: 12*1000</tt></dt> -<dd><p>This is the amount of time to show the FontWarning message, in -milliseconds. The default is 12 seconds.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">fadeoutSteps: 10</tt></dt> -<dd><p>This is the number of steps to take while fading out the -FontWarning message. More steps make for a smoother fade-out.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">fadeoutTime: 1.5*1000</tt></dt> -<dd><p>This is the time used to perform the fade-out, in milliseconds. -The default is 1.5 seconds.</p> -</dd></dl> - -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="MathZoom.html" - title="previous chapter">The MathZoom extension</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="../platforms/index.html" - title="next chapter">Using MathJax in popular web platforms</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/options/FontWarnings.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="../platforms/index.html" title="Using MathJax in popular web platforms" - >next</a> |</li> - <li class="right" > - <a href="MathZoom.html" title="The MathZoom extension" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/options/HTML-CSS.html b/docs/build/html/options/HTML-CSS.html @@ -1,244 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The HTML-CSS output processor — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> - <link rel="next" title="The NativeMML output processor" href="NativeMML.html" /> - <link rel="prev" title="The MathML input processor" href="MathML.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="NativeMML.html" title="The NativeMML output processor" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="MathML.html" title="The MathML input processor" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-html-css-output-processor"> -<span id="configure-html-css"></span><h1>The HTML-CSS output processor<a class="headerlink" href="#the-html-css-output-processor" title="Permalink to this headline">¶</a></h1> -<p>The options below control the operation of the HTML-CSS output -processor that is run when you include <tt class="docutils literal"><span class="pre">"output/HTML-CSS"</span></tt> in the -<cite>jax</cite> array of your configuration. They are listed with their default -values. To set any of these options, include a <tt class="docutils literal"><span class="pre">"HTML-CSS"</span></tt> section -in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. Note that, because of the -dash, you need to enclose the name in quotes. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="s2">"HTML-CSS"</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">preferredFont</span><span class="o">:</span> <span class="s2">"STIX"</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>would set the <tt class="docutils literal"><span class="pre">preferredFont</span></tt> option to the <a class="reference internal" href="../glossary.html#term-stix"><em class="xref std std-term">STIX</em></a> fonts.</p> -<dl class="describe"> -<dt> -<tt class="descname">scale: 100</tt></dt> -<dd><p>The scaling factor (as a percentage) of math with respect to the -surrounding text. The <cite>HTML-CSS</cite> output processor tries to match -the en-size of the mathematics with that of the text where it is -placed, but you may want to adjust the results using this scaling -factor. The user can also adjust this value using the contextual -menu item associated with the typeset mathematics.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">availableFonts: ["STIX","TeX"]</tt></dt> -<dd><p>This is a list of the fonts to look for on a user’s computer in -preference to using MathJax’s web-based fonts. These must -correspond to directories available in the -<tt class="docutils literal"><span class="pre">jax/output/HTML-CSS/fonts</span></tt> directory, where MathJax stores data -about the characters available in the fonts. Set this to -<tt class="docutils literal"><span class="pre">["TeX"]</span></tt>, for example, to prevent the use of the <a class="reference internal" href="../glossary.html#term-stix"><em class="xref std std-term">STIX</em></a> -fonts, or set it to an empty list, <cite>[]</cite>, if you want to force -MathJax to use web-based or image fonts.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">preferredFont: "TeX"</tt></dt> -<dd><p>Which font to prefer out of the <tt class="docutils literal"><span class="pre">availableFonts</span></tt> list, when more -than one is available on the user’s computer.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">webFont: "TeX"</tt></dt> -<dd><p>This is the web-based font to use when none of the fonts listed -above are available on the user’s computer. Note that currently -only the <cite>TeX</cite> font is available in a web-based form (they are -stored in the <tt class="docutils literal"><span class="pre">fonts/HTML-CSS</span></tt> folder in the MathJax directory. -Set this to <tt class="docutils literal"><span class="pre">null</span></tt> to disable web fonts.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">imageFont: "TeX"</tt></dt> -<dd><p>This is the font to use for image fallback mode (when none of the -fonts listed above are available and the browser doesn’t support -web-fonts via the <tt class="docutils literal"><span class="pre">@font-face</span></tt> CSS directive). Note that currently -only the TeX font is available as an image font (they are stores -in the <tt class="docutils literal"><span class="pre">fonts/HTML-CSS</span></tt> directory).</p> -<p>Set this to <tt class="docutils literal"><span class="pre">null</span></tt> if you want to prevent the use of image fonts -(e.g., you have deleted or not installed the image fonts on your -server). In this case, only browsers that support web-based fonts -will be able to view your pages without having the fonts installed -on the client computer. The browsers that support web-based fonts -include: IE6 and later, Chrome, Safari3.1 and above, Firefox3.5 -and later, and Opera10 and later. Note that Firefox3.0 is <strong>not</strong> -on this list.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">styles: {}</tt></dt> -<dd><p>This is a list of CSS declarations for styling the HTML-CSS -output. See the definitions in <tt class="docutils literal"><span class="pre">jax/output/HTML-CSS/config.js</span></tt> -for some examples of what are defined by default. See <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS -Style Objects</em></a> for details on how to specify -CSS style in a JavaScript object.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">showMathMenu: true</tt></dt> -<dd><p>This controls whether the MathJax contextual menu will be -available on the mathematics in the page. If true, then -right-clicking (on the PC) or control-clicking (on the Mac) will -produce a MathJax menu that allows you to get the source of the -mathematics in various formats, change the size of the mathematics -relative to the surrounding text, get information about -MathJax, and configure other MathJax settings.</p> -<p>Set this to <tt class="docutils literal"><span class="pre">false</span></tt> to disable the menu. When <tt class="docutils literal"><span class="pre">true</span></tt>, the -<tt class="docutils literal"><span class="pre">MathMenu</span></tt> configuration block determines the operation of the -menu. See <a class="reference internal" href="MathMenu.html#configure-mathmenu"><em>the MathMenu options</em></a> for -more details.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">tooltip: { ... }</tt></dt> -<dd><p>This sets the configuration options for <tt class="docutils literal"><span class="pre"><maction></span></tt> elements -with <tt class="docutils literal"><span class="pre">actiontype="tooltip"</span></tt>. (See also the <tt class="docutils literal"><span class="pre">#MathJax_Tooltip</span></tt> -style setting in <tt class="docutils literal"><span class="pre">jax/output/HTML-CSS/config.js</span></tt>, which can be -overridden using the <tt class="docutils literal"><span class="pre">styles</span></tt> option above.)</p> -<p>The <tt class="docutils literal"><span class="pre">tooltip</span></tt> section can contain the following options:</p> -<dl class="describe"> -<dt> -<tt class="descname">delayPost: 600</tt></dt> -<dd><p>The delay (in milliseconds) before the tooltip is posted after -the mouse is moved over the <tt class="docutils literal"><span class="pre">maction</span></tt> element.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">delayClear: 600</tt></dt> -<dd><p>The delay (in milliseconds) before the tooltop is cleared -after the mouse moves out of the <tt class="docutils literal"><span class="pre">maction</span></tt> element.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">offsetX: 10 and offsetY: 5</tt></dt> -<dd><p>These are the offset from the mouse position (in pixels) -where the tooltip will be placed.</p> -</dd></dl> - -</dd></dl> - -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="MathML.html" - title="previous chapter">The MathML input processor</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="NativeMML.html" - title="next chapter">The NativeMML output processor</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/options/HTML-CSS.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="NativeMML.html" title="The NativeMML output processor" - >next</a> |</li> - <li class="right" > - <a href="MathML.html" title="The MathML input processor" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/options/MMLorHTML.html b/docs/build/html/options/MMLorHTML.html @@ -1,146 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MMLorHTML configuration options — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> - <link rel="next" title="The MathMenu extension" href="MathMenu.html" /> - <link rel="prev" title="The NativeMML output processor" href="NativeMML.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="MathMenu.html" title="The MathMenu extension" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="NativeMML.html" title="The NativeMML output processor" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mmlorhtml-configuration-options"> -<span id="configure-mmlorhtml"></span><h1>The MMLorHTML configuration options<a class="headerlink" href="#the-mmlorhtml-configuration-options" title="Permalink to this headline">¶</a></h1> -<p>The options below control the operation of the MMLorHTML configuration -file that is run when you include <tt class="docutils literal"><span class="pre">"MMLorHTML.js"</span></tt> in the <cite>config</cite> -array of your configuration. They are listed with their default -values. To set any of these options, include a <tt class="docutils literal"><span class="pre">MMLorHTML</span></tt> section -in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">MMLorHTML</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">prefer</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">Opera</span><span class="o">:</span> <span class="s2">"MML"</span> - <span class="p">}</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>would set the <tt class="docutils literal"><span class="pre">prefer</span></tt> option so that Opera browser would prefer -MathML to HTML-CSS output (while leaving the settings for other -browsers unchanged).</p> -<p>Note that if you use the <tt class="docutils literal"><span class="pre">MMLorHTML.js</span></tt> configuration file, you should -<strong>not</strong> specify an output processor in the <cite>jax</cite> array of your -configuration; <cite>MMLorHTML</cite> will fill that in for you.</p> -<dl class="describe"> -<dt> -<tt class="descname">prefer: { MSIE: "MML", Firefox: "MML", Opera: "HTML", other: "HTML" }</tt></dt> -<dd><p>This lets you set the preferred renderer on a browser-by-browser -basis. You set the browser to either <tt class="docutils literal"><span class="pre">"MML"</span></tt> or <tt class="docutils literal"><span class="pre">"HTML"</span></tt> -depending on whether you want to use the <cite>NativeMML</cite> or <cite>HTML-CSS</cite> -output processor. Note that although Opera does process some MathML -natively, its support is not sufficient to handle the more -complicated output generated by MathJax, so its setting is -<tt class="docutils literal"><span class="pre">"HTML"</span></tt> by default.</p> -</dd></dl> - -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="NativeMML.html" - title="previous chapter">The NativeMML output processor</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="MathMenu.html" - title="next chapter">The MathMenu extension</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/options/MMLorHTML.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="MathMenu.html" title="The MathMenu extension" - >next</a> |</li> - <li class="right" > - <a href="NativeMML.html" title="The NativeMML output processor" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/options/MathML.html b/docs/build/html/options/MathML.html @@ -1,135 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathML input processor — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> - <link rel="next" title="The HTML-CSS output processor" href="HTML-CSS.html" /> - <link rel="prev" title="The TeX input processor" href="TeX.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="HTML-CSS.html" title="The HTML-CSS output processor" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="TeX.html" title="The TeX input processor" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathml-input-processor"> -<span id="configure-mathml"></span><h1>The MathML input processor<a class="headerlink" href="#the-mathml-input-processor" title="Permalink to this headline">¶</a></h1> -<p>The options below control the operation of the MathML input processor -that is run when you include <tt class="docutils literal"><span class="pre">"input/MathML"</span></tt> in the <cite>jax</cite> array of -your configuration. They are listed with their default values. To -set any of these options, include a <tt class="docutils literal"><span class="pre">MathML</span></tt> section in your -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">MathML</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">useMathMLspacing</span><span class="o">:</span> <span class="kc">true</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>would set the <tt class="docutils literal"><span class="pre">useMathMLspacing</span></tt> option so that the MathML rules for -spacing would be used (rather than TeX spacing rules).</p> -<dl class="describe"> -<dt> -<tt class="descname">useMathMLspacing: false</tt></dt> -<dd><p>Specifies whether to use TeX spacing or MathML spacing when the -<cite>HTML-CSS</cite> output jax is used.</p> -</dd></dl> - -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="TeX.html" - title="previous chapter">The TeX input processor</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="HTML-CSS.html" - title="next chapter">The HTML-CSS output processor</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/options/MathML.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="HTML-CSS.html" title="The HTML-CSS output processor" - >next</a> |</li> - <li class="right" > - <a href="TeX.html" title="The TeX input processor" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/options/MathMenu.html b/docs/build/html/options/MathMenu.html @@ -1,197 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathMenu extension — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> - <link rel="next" title="The MathZoom extension" href="MathZoom.html" /> - <link rel="prev" title="The MMLorHTML configuration options" href="MMLorHTML.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="MathZoom.html" title="The MathZoom extension" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="MMLorHTML.html" title="The MMLorHTML configuration options" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathmenu-extension"> -<span id="configure-mathmenu"></span><h1>The MathMenu extension<a class="headerlink" href="#the-mathmenu-extension" title="Permalink to this headline">¶</a></h1> -<p>The options below control the operation of the contextual menu that is -available on mathematics that is typeset by MathJax. -They are listed with their default values. To set any of these -options, include a <tt class="docutils literal"><span class="pre">MathMenu</span></tt> section in your -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">MathMenu</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">delay</span><span class="o">:</span> <span class="mi">600</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>would set the <tt class="docutils literal"><span class="pre">delay</span></tt> option to 600 milliseconds.</p> -<dl class="describe"> -<dt> -<tt class="descname">delay: 400</tt></dt> -<dd><p>This is the hover delay for the display (in milliseconds) for -submenus in the contextual menu: when the mouse is over a submenu -label for this long, the menu will appear. (The submenu also will -appear if you click on its label.)</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">helpURL: "http://www.mathjax.org/help/user/"</tt></dt> -<dd><p>This is the URL for the MathJax Help menu item. When the user -selects that item, the browser opens a new window with this URL.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">showRenderer: true</tt></dt> -<dd><p>This controls whether the “Math Renderer” item will be displayed in -the the “Settings” submenu of the mathematics contextual menu. It -allows the user to change between the <cite>HTML-CSS</cite> and <cite>NativeMML</cite> -output processors for the mathematics on the page. Set to -<tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">showContext: false</tt></dt> -<dd><p>This controls whether the “Contextual Menu” item will be displayed -in the the “Settings” submenu of the mathematics contextual menu. -It allows the user to decide whether the MathJax menu or the -browser’s default contextual manu will be shown when the context -menu click occurs over mathematics typeset by MathJax. (The main -reason to allow pass-through to the browser’s menu is to gain -access to the MathPlayer contextual menu when the NativeMML output -processor is used in Internet Explorer with the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer plugin</a>.) Set to -<tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">showFontMenu: false</tt></dt> -<dd><p>This controls whether the “Font Preference” item will be displayed -in the the “Settings” submenu of the mathematics contextual menu. -This submenu lets the user select what font to use in the -mathematics produced by the <cite>HTML-CSS</cite> output processor. Note that -changing the selection in the font menu will cause the page to -reload. Set to <tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">windowSettings: { ... }</tt></dt> -<dd><p>These are the settings for the <tt class="docutils literal"><span class="pre">window.open()</span></tt> call that -creates the <cite>Show Source</cite> window. The initial width and height -will be reset after the source is shown in an attempt to make the -window fit the output better.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">styles: {}</tt></dt> -<dd><p>This is a list of CSS declarations for styling the menu -components. See the definitions in <tt class="docutils literal"><span class="pre">extensions/MathMenu.js</span></tt> for -details of what are defined by default. See <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS Style -Objects</em></a> for details on how to specify CSS -style in a JavaScript object.</p> -</dd></dl> - -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="MMLorHTML.html" - title="previous chapter">The MMLorHTML configuration options</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="MathZoom.html" - title="next chapter">The MathZoom extension</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/options/MathMenu.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="MathZoom.html" title="The MathZoom extension" - >next</a> |</li> - <li class="right" > - <a href="MMLorHTML.html" title="The MMLorHTML configuration options" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/options/MathZoom.html b/docs/build/html/options/MathZoom.html @@ -1,150 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathZoom extension — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> - <link rel="next" title="The FontWarnings extension" href="FontWarnings.html" /> - <link rel="prev" title="The MathMenu extension" href="MathMenu.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="FontWarnings.html" title="The FontWarnings extension" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="MathMenu.html" title="The MathMenu extension" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathzoom-extension"> -<span id="configure-mathzoom"></span><h1>The MathZoom extension<a class="headerlink" href="#the-mathzoom-extension" title="Permalink to this headline">¶</a></h1> -<p>The options below control the operation of the Math-Zoom feature that -allows users to see an enlarged version of the mathematics when they -click or hover over typeset mathematics. They are listed with their -default values. To set any of these options, include a <tt class="docutils literal"><span class="pre">MathZoom</span></tt> -section in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">MathZoom</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">delay</span><span class="o">:</span> <span class="mi">600</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>would set the <tt class="docutils literal"><span class="pre">delay</span></tt> option to 600 milliseconds.</p> -<p>Mathematics is zoomed when the user “triggers” the zoom by an action, -either clicking on the mathematics, double-clicking on it, or holding -the mouse still over it (i.e., “hovering”). Which trigger is used is -set by the user via the math contextual menu (or by the author using -the <tt class="docutils literal"><span class="pre">menuSettings</span></tt> configuration section).</p> -<dl class="describe"> -<dt> -<tt class="descname">delay: 400</tt></dt> -<dd><p>This the time (in milliseconds) that the mouse must be still over a -typeset mathematical formula before the zoomed version is displayed -(when the zoom trigger is set to <cite>Hover</cite>).</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">styles: {}</tt></dt> -<dd><p>This is a list of CSS declarations for styling the zoomed -mathematics. See the definitions in <tt class="docutils literal"><span class="pre">extensions/MathZoom.js</span></tt> -for details of what are defined by default. See <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS Style -Objects</em></a> for details on how to specify CSS -style in a JavaScript object.</p> -</dd></dl> - -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="MathMenu.html" - title="previous chapter">The MathMenu extension</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="FontWarnings.html" - title="next chapter">The FontWarnings extension</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/options/MathZoom.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="FontWarnings.html" title="The FontWarnings extension" - >next</a> |</li> - <li class="right" > - <a href="MathMenu.html" title="The MathMenu extension" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/options/NativeMML.html b/docs/build/html/options/NativeMML.html @@ -1,174 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The NativeMML output processor — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> - <link rel="next" title="The MMLorHTML configuration options" href="MMLorHTML.html" /> - <link rel="prev" title="The HTML-CSS output processor" href="HTML-CSS.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="MMLorHTML.html" title="The MMLorHTML configuration options" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="HTML-CSS.html" title="The HTML-CSS output processor" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-nativemml-output-processor"> -<span id="configure-nativemml"></span><h1>The NativeMML output processor<a class="headerlink" href="#the-nativemml-output-processor" title="Permalink to this headline">¶</a></h1> -<p>The options below control the operation of the NativeMML output -processor that is run when you include <tt class="docutils literal"><span class="pre">"output/NativeMML"</span></tt> in the -<cite>jax</cite> array of your configuration. They are listed with their default -values. To set any of these options, include a <tt class="docutils literal"><span class="pre">NativeMML</span></tt> section -in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">NativeMML</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">scale</span><span class="o">:</span> <span class="mi">105</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>would set the <tt class="docutils literal"><span class="pre">sale</span></tt> option to 105 percent.</p> -<dl class="describe"> -<dt> -<tt class="descname">scale: 100</tt></dt> -<dd><p>The scaling factor (as a percentage) of math with respect to the -surrounding text. Since the <cite>NativeMML</cite> output relies on the -browser’s natiove MathML support, MathJax does not control the -font size used in the mathematics. You may need to set this value -to compensate for the size selected by the browser. The user can -also adjust this value using the contextual menu item associated -with the typeset mathematics.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">showMathMath: true</tt></dt> -<dd><p>This controls whether the MathJax contextual menu will be -available on the mathematics in the page. If true, then -right-clicking (on the PC) or control-clicking (on the Mac) will -produce a MathJax menu that allows you to get the source of the -mathematics in various formats, change the size of the mathematics -relative to the surrounding text, get information about -MathJax, and configure other MathJax settings.</p> -<p>Set this to <tt class="docutils literal"><span class="pre">false</span></tt> to disable the menu. When <tt class="docutils literal"><span class="pre">true</span></tt>, the -<tt class="docutils literal"><span class="pre">MathMenu</span></tt> configuration block determines the operation of the -menu. See <a class="reference internal" href="MathMenu.html#configure-mathmenu"><em>the MathMenu options</em></a> for -more details.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">showMathMenuMSIE: true</tt></dt> -<dd><p>There is a separate menu setting for MSIE since the code to handle -that is a bit delicate; if it turns out to have unexpected -consequences, you can turn it off without turing off other the -menu support in other browsers.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">styles: {}</tt></dt> -<dd><p>This is a list of CSS declarations for styling the HTML-CSS -output. See the definitions in <tt class="docutils literal"><span class="pre">jax/output/NativeMML/config.js</span></tt> -for some examples of what are defined by default. See <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS -Style Objects</em></a> for details on how to specify -CSS style in a JavaScript object.</p> -</dd></dl> - -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="HTML-CSS.html" - title="previous chapter">The HTML-CSS output processor</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="MMLorHTML.html" - title="next chapter">The MMLorHTML configuration options</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/options/NativeMML.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="MMLorHTML.html" title="The MMLorHTML configuration options" - >next</a> |</li> - <li class="right" > - <a href="HTML-CSS.html" title="The HTML-CSS output processor" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/options/TeX.html b/docs/build/html/options/TeX.html @@ -1,178 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The TeX input processor — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> - <link rel="next" title="The MathML input processor" href="MathML.html" /> - <link rel="prev" title="The jsMath2jax Preprocessor" href="jsMath2jax.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="MathML.html" title="The MathML input processor" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="jsMath2jax.html" title="The jsMath2jax Preprocessor" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-tex-input-processor"> -<span id="configure-tex"></span><h1>The TeX input processor<a class="headerlink" href="#the-tex-input-processor" title="Permalink to this headline">¶</a></h1> -<p>The options below control the operation of the TeX input processor -that is run when you include <tt class="docutils literal"><span class="pre">"input/TeX"</span></tt> in the <cite>jax</cite> array of -your configuration. They are listed with their default values. To -set any of these options, include a <tt class="docutils literal"><span class="pre">TeX</span></tt> section in your -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">Macros</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">RR</span><span class="o">:</span> <span class="s1">'{\\bf R}'</span><span class="p">,</span> - <span class="nx">bold</span><span class="o">:</span> <span class="p">[</span><span class="s1">'{\\bf #1}'</span><span class="p">,</span> <span class="mi">1</span><span class="p">]</span> - <span class="p">}</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>would set the <tt class="docutils literal"><span class="pre">Macros</span></tt> configuration option to cause two new macros -to be defined within the TeX input processor.</p> -<dl class="describe"> -<dt> -<tt class="descname">TagSide: "right"</tt></dt> -<dd><p>This specifies the side on which <tt class="docutils literal"><span class="pre">\tag{}</span></tt> macros will place the -tags. Set it to <tt class="docutils literal"><span class="pre">"left"</span></tt> to place the tags on the left-hand side.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">TagIndent: ".8em"</tt></dt> -<dd><p>This is the amount of indentation (from the right or left) for the -tags produced by the <tt class="docutils literal"><span class="pre">\tag{}</span></tt> macro.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">MultLineWidth: "85%"</tt></dt> -<dd><p>The width to use for the <cite>multline</cite> environment that is part of -the <tt class="docutils literal"><span class="pre">AMSmath</span></tt> extension. This width gives room for tags at -either side of the equation, but if you are displaying mathematics -in a small area or a thin column of text, you might need to change -the value to leave sufficient margin for tags.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">Macros: {}</tt></dt> -<dd><p>This lists macros to define before the TeX input processor begins. -These are name:value pairs where the <cite>name</cite> gives the name of the TeX -macro to be defined, and <cite>value</cite> gives the replacement text for the -macro. The <cite>value</cite> canbe an array of the form <cite>[value,n]</cite>, where -<cite>value</cite> is the replacement text and <cite>n</cite> is the number of parameters -for the macro. Note that since the <cite>value</cite> is a javascript string, -backslashes in the replacement text must be doubled to prevent them -from acting as javascript escape characters.</p> -<p>For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">Macros</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">RR</span><span class="o">:</span> <span class="s1">'{\\bf R}'</span><span class="p">,</span> - <span class="nx">bold</span><span class="o">:</span> <span class="p">[</span><span class="s1">'{\\bf #1}'</span><span class="p">,</span> <span class="mi">1</span><span class="p">]</span> -<span class="p">}</span> -</pre></div> -</div> -<p>would ask the TeX processor to define two new macros: <tt class="docutils literal"><span class="pre">\RR</span></tt>, -which produces a bold-face “R”, and <tt class="docutils literal"><span class="pre">\bold{...}</span></tt>, which takes one -parameter and set it in the bold-face font.</p> -</dd></dl> - -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="jsMath2jax.html" - title="previous chapter">The jsMath2jax Preprocessor</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="MathML.html" - title="next chapter">The MathML input processor</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/options/TeX.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="MathML.html" title="The MathML input processor" - >next</a> |</li> - <li class="right" > - <a href="jsMath2jax.html" title="The jsMath2jax Preprocessor" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/options/hub.html b/docs/build/html/options/hub.html @@ -1,345 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The Core Configuration Options — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> - <link rel="next" title="The tex2jax Preprocessor" href="tex2jax.html" /> - <link rel="prev" title="Loading and Configuring MathJax" href="../configuration.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="tex2jax.html" title="The tex2jax Preprocessor" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="../configuration.html" title="Loading and Configuring MathJax" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-core-configuration-options"> -<span id="configure-hub"></span><h1>The Core Configuration Options<a class="headerlink" href="#the-core-configuration-options" title="Permalink to this headline">¶</a></h1> -<p>The options below control the MathJax Hub, and so determine the code -behavior of MathJax. They are given with their default values.</p> -<dl class="describe"> -<dt> -<tt class="descname">jax: ["input/TeX","output/HTML-CSS"]</tt></dt> -<dd><p>A comma-separated list of input and output jax to initialize at -startup. Their main code is loaded only when they are actually -used, so it is not inefficient to include jax that may not -actually be used on the page. These are found in the <tt class="docutils literal"><span class="pre">MathJax/jax</span></tt> -directory.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">extensions: []</tt></dt> -<dd><p>A comma-separated list of extensions to load at startup. The -default directory is <tt class="docutils literal"><span class="pre">MathJax/extensions</span></tt>. The <tt class="docutils literal"><span class="pre">tex2jax</span></tt> and -<tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessors can be listed here, as well as a number -of TeX-specific extensions (see the <a class="reference internal" href="../start.html#tex-and-latex-input"><em>TeX and LaTeX input</em></a> section of the <a class="reference internal" href="../start.html#getting-started"><em>Getting Started</em></a> document for more details). There is also a -<tt class="docutils literal"><span class="pre">FontWarnings</span></tt> extension that you can use to inform your user -that mathematics fonts are available that they can download to -improve their experience of your site.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">config: []</tt></dt> -<dd><p>A comma-separated list of configuration files to load when MathJax -starts up, e.g., to define local macros, etc., and there is a -sample config file named <tt class="docutils literal"><span class="pre">config/local/local.js</span></tt>. The default -directory is the <cite>MathJax/config</cite> directory. The <tt class="docutils literal"><span class="pre">MMLorHTML.js</span></tt> -configuration is the only other predefined configuration file.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">styleSheets: []</tt></dt> -<dd><p>A comma-separated list of CSS stylesheet files to be loaded when -MathJax starts up. The default directory is the <cite>MathJax/config</cite> -directory.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">styles: {}</tt></dt> -<dd><p>CSS <cite>selector: rules;</cite> styles to be defined dynamically at startup -time.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">preJax: null and postJax: null</tt></dt> -<dd><p>Patterns to remove from before and after math script tags. If you -are not using one of the preprocessors, you need to insert -something extra into your HTML file in order to avoid a bug in -Internet Explorer. IE removes spaces from the DOM that it thinks -are redundent, and since a <tt class="docutils literal"><span class="pre"><script></span></tt> tag usually doesn’t add -content to the page, if there is a space before and after a -MathJax <tt class="docutils literal"><span class="pre"><script></span></tt> tag, IE will remove the first space. When -MathJax inserts the typeset mathematics, this means there will be -no space before it and the preceeding text. In order to avoid -this, you should include some “guard characters” before or after -the math SCRIPT tag; define the patterns you want to use below. -Note that these are used as regular expressions, so you will need -to quote special characters. Furthermore, since they are -javascript strings, you must quote javascript special characters -as well. So to obtain a backslash, you must use <tt class="docutils literal"><span class="pre">\\</span></tt> (doubled -for javascript). For example, <tt class="docutils literal"><span class="pre">"\\["</span></tt> represents the pattern -<tt class="docutils literal"><span class="pre">\[</span></tt> in the regular expression. That means that if you want an -actual backslash in your guard characters, you need to use -<tt class="docutils literal"><span class="pre">"\\\\"</span></tt> in order to get <tt class="docutils literal"><span class="pre">\\</span></tt> in the regular expression, and -<tt class="docutils literal"><span class="pre">\</span></tt> in the actual text. If both preJax and postJax are defined, -both must be present in order to be removed.</p> -<p>See also the <tt class="docutils literal"><span class="pre">preRemoveClass</span></tt> comments below.</p> -<p>Examples:</p> -<blockquote> -<div><p><tt class="docutils literal"><span class="pre">preJax:</span> <span class="pre">"\\\\\\\\\"</span></tt> makes a double backslash the preJax text</p> -<p><tt class="docutils literal"><span class="pre">preJax:</span> <span class="pre">"\\[\\[",</span> <span class="pre">postJax:</span> <span class="pre">"\\]\\]"</span></tt> makes it so jax -scripts must be enclosed in double brackets.</p> -</div></blockquote> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">preRemoveClass: "MathJax_Preview"</tt></dt> -<dd><p>The CSS class for a math preview to be removed preceeding a -MathJax SCRIPT tag. If the tag just before the MathJax -<tt class="docutils literal"><span class="pre"><script></span></tt> tag is of this class, its contents are removed when -MathJax processes the <tt class="docutils literal"><span class="pre"><script></span></tt> tag. This allows you to -include a math preview in a form that will be displayed prior to -MathJax performing its typesetting. It also avoids the Internet -Explorer space-removal bug, and can be used in place of <tt class="docutils literal"><span class="pre">preJax</span></tt> -and <tt class="docutils literal"><span class="pre">postJax</span></tt> if that is more convenient.</p> -<p>For example</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><span</span> <span class="na">class=</span><span class="s">"MathJax_Preview"</span><span class="nt">></span>[math]<span class="nt"></span><script </span><span class="na">type=</span><span class="s">"math/tex"</span><span class="nt">></span><span class="p">...</span><span class="nt"></script></span> -</pre></div> -</div> -<p>would display “[math]” in place of the math until MathJax is able -to typeset it.</p> -<p>See also the <tt class="docutils literal"><span class="pre">preJax</span></tt> and <tt class="docutils literal"><span class="pre">postJax</span></tt> comments above.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">showProcessingMessages: true</tt></dt> -<dd><p>This value controls whether the <cite>Processing Math: nn%</cite> message are -displayed in the lower left-hand corner. Set to <tt class="docutils literal"><span class="pre">false</span></tt> to -prevent those messages (though file loading and other messages -will still be shown).</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">messageStyle: "normal"</tt></dt> -<dd><p>This value controls the verbosity of the messages in the lower -left-hand corner. Set it to <tt class="docutils literal"><span class="pre">"none"</span></tt> to eliminate all messages, -or set it to <tt class="docutils literal"><span class="pre">"simple"</span></tt> to show “Loading...” and “Processing...” -rather than showing the full file name or the percentage of the -mathematics processed.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">displayAlign: "center" and displayIndent: "0em"</tt></dt> -<dd><p>These two parameters control the alignment and shifting of -displayed equations. The first can be <tt class="docutils literal"><span class="pre">"left"</span></tt>, <tt class="docutils literal"><span class="pre">"center"</span></tt>, -or <tt class="docutils literal"><span class="pre">"right"</span></tt>, and determines the alignment of displayed -equations. When the alignment is not <tt class="docutils literal"><span class="pre">"center"</span></tt>, the second -determines an indentation from the left or right side for the -displayed equations.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">delayStartupUntil: "none"</tt></dt> -<dd><p>Normally MathJax will perform its starup commands (loading of -configuration, styles, jax, and so on) as soon as it can. If you -expect to be doing additional configuration on the page, however, -you may want to have it wait until the page’s onload hander is -called. If so, set this to <tt class="docutils literal"><span class="pre">"onload"</span></tt>.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">skipStartupTypeset: false</tt></dt> -<dd><p>Normally MathJax will typeset the mathematics on the page as soon -as the page is loaded. If you want to delay that process, in -which case you will need to call <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> -yourself by hand, set this value to <tt class="docutils literal"><span class="pre">true</span></tt>.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">menuSettings: { ... }</tt></dt> -<dd><p>This block contains settings for the mathematics contextual menu -that act as the defaults for the user’s settings in that menu. -The possible values are:</p> -<dl class="describe"> -<dt> -<tt class="descname">zoom: "none"</tt></dt> -<dd><p>This indicates when typeset mathematics should be zoomed. It -can be set to <tt class="docutils literal"><span class="pre">"None"</span></tt>, <tt class="docutils literal"><span class="pre">"Hover"</span></tt>, <tt class="docutils literal"><span class="pre">"Click"</span></tt>, or -<tt class="docutils literal"><span class="pre">"Double-Click"</span></tt> to set the zoom trigger.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">CTRL: false, ALT: false, CMD: false, Shift: false</tt></dt> -<dd><p>These values indicate which keys must be pressed in order for -math zoom to be triggered. For example, if <tt class="docutils literal"><span class="pre">CTRL</span></tt> is set to -<tt class="docutils literal"><span class="pre">true</span></tt> and <tt class="docutils literal"><span class="pre">zoom</span></tt> is <tt class="docutils literal"><span class="pre">"Click"</span></tt>, then math will be zoomed -only when the user control-clicks on mathematics (i.e., clicks -while holding down the <cite>CTRL</cite> key). If more than one is -<tt class="docutils literal"><span class="pre">true</span></tt>, then all the indicated keys must be pressed for the -zoom to occur.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">zscale: "200%"</tt></dt> -<dd><p>This is the zoom scaling factor, and it can be set to any of -the values available in the <cite>Zoom Factor</cite> menu of the -<cite>Settings</cite> submenu of the contextual menu.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">context: "MathJax"</tt></dt> -<dd><p>This controls what contextual menu will be presented when a -right click (on a PC) or CTRL-click (on the Mac) occurs over a -typeset equation. When set to <tt class="docutils literal"><span class="pre">"MathJax"</span></tt>, the MathJax -contextual menu will appear; when set to <tt class="docutils literal"><span class="pre">"Browser"</span></tt>, the -browser’s contextual menu will be used. For example, in -Internet Explorer with the MathPlayer plugin, if this is set -to <tt class="docutils literal"><span class="pre">"Browser"</span></tt>, you will get the MathPlayer contextual menu -rather than the MathJax menu.</p> -</dd></dl> - -<p>There are also settings for <tt class="docutils literal"><span class="pre">format</span></tt>, <tt class="docutils literal"><span class="pre">renderer</span></tt>, and <tt class="docutils literal"><span class="pre">font</span></tt>, -but these are maintained by MathJax and should not be set by the -page author.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">errorSettings: { ... }</tt></dt> -<dd><p>This block contains settings that control how MathJax responds to -unexpected errors while processing mathematical equations. Rather -than simply crash, MathJax can report an error and go on. The -options you can set include:</p> -<dl class="describe"> -<dt> -<tt class="descname">message: ["[Math Processing Error"]]</tt></dt> -<dd><p>This is an HTML snippet that will be inserted at the location -of the mathematics for any formula that causes MathJax to -produce an internal error (i.e., an error in the MathJax code -itself). See the <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>description of HTML snippets</em></a> for details on how to represent HTML code in -this way.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">style: {color:"#CC0000", "font-style":"italic"}</tt></dt> -<dd><p>This is the CSS style description to use for the error -messages produced by internal MathJax errors. See the section -on <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS style objects</em></a> for details on -how these are specified in JavaScript.</p> -</dd></dl> - -</dd></dl> - -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="../configuration.html" - title="previous chapter">Loading and Configuring MathJax</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="tex2jax.html" - title="next chapter">The tex2jax Preprocessor</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/options/hub.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="tex2jax.html" title="The tex2jax Preprocessor" - >next</a> |</li> - <li class="right" > - <a href="../configuration.html" title="Loading and Configuring MathJax" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/options/jsMath2jax.html b/docs/build/html/options/jsMath2jax.html @@ -1,157 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The jsMath2jax Preprocessor — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> - <link rel="next" title="The TeX input processor" href="TeX.html" /> - <link rel="prev" title="The mml2jax Preprocessor" href="mml2jax.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="TeX.html" title="The TeX input processor" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="mml2jax.html" title="The mml2jax Preprocessor" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-jsmath2jax-preprocessor"> -<span id="configure-jsmath2jax"></span><h1>The jsMath2jax Preprocessor<a class="headerlink" href="#the-jsmath2jax-preprocessor" title="Permalink to this headline">¶</a></h1> -<p>The options below control the operation of the <cite>jsMath2jax</cite> -preprocessor that is run when you include <tt class="docutils literal"><span class="pre">"jsMath2jax.js"</span></tt> in the -<cite>extensions</cite> array of your configuration. They are listed with their -default values. To set any of these options, include a <tt class="docutils literal"><span class="pre">jsMath2jax</span></tt> -section in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">jsMath2jax</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">preview</span><span class="o">:</span> <span class="s2">"none"</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>would set the <tt class="docutils literal"><span class="pre">preview</span></tt> parameter to <tt class="docutils literal"><span class="pre">"none"</span></tt>.</p> -<dl class="describe"> -<dt> -<tt class="descname">element: null</tt></dt> -<dd><p>The id name of the element that should be processed by <cite>jsMath2jax</cite>. -The default is the whole document.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">preview: "TeX"</tt></dt> -<dd><p>This controls whether <cite>jsMath2jax</cite> inserts <tt class="docutils literal"><span class="pre">MathJax_Preview</span></tt> spans -to make a preview available, and what preview to use, when it -locates in-line or display mathematics in the page. The default -is <tt class="docutils literal"><span class="pre">"TeX"</span></tt>, which means use the TeX code as the preview (which -will be visible until it is processed by MathJax). Set to -<tt class="docutils literal"><span class="pre">"none"</span></tt> to prevent previews from being inserted (the math -will simply disappear until it is typeset). Set to an array -containing the description of an HTML snippet in order to use the -same preview for all equations on the page.</p> -<p>Examples:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">preview</span><span class="o">:</span> <span class="p">[</span><span class="s2">"[math]"</span><span class="p">],</span> <span class="c1">// insert the text "[math]" as the preview</span> -</pre></div> -</div> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">preview</span><span class="o">:</span> <span class="p">[[</span><span class="s2">"img"</span><span class="p">,{</span><span class="nx">src</span><span class="o">:</span> <span class="s2">"/images/mypic.jpg"</span><span class="p">}]],</span> <span class="c1">// insert an image as the preview</span> -</pre></div> -</div> -<p>See the <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>description of HTML snippets</em></a> for -details on how to represent HTML code in this way.</p> -</dd></dl> - -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="mml2jax.html" - title="previous chapter">The mml2jax Preprocessor</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="TeX.html" - title="next chapter">The TeX input processor</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/options/jsMath2jax.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="TeX.html" title="The TeX input processor" - >next</a> |</li> - <li class="right" > - <a href="mml2jax.html" title="The mml2jax Preprocessor" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/options/mml2jax.html b/docs/build/html/options/mml2jax.html @@ -1,157 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The mml2jax Preprocessor — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> - <link rel="next" title="The jsMath2jax Preprocessor" href="jsMath2jax.html" /> - <link rel="prev" title="The tex2jax Preprocessor" href="tex2jax.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="jsMath2jax.html" title="The jsMath2jax Preprocessor" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="tex2jax.html" title="The tex2jax Preprocessor" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mml2jax-preprocessor"> -<span id="configure-mml2jax"></span><h1>The mml2jax Preprocessor<a class="headerlink" href="#the-mml2jax-preprocessor" title="Permalink to this headline">¶</a></h1> -<p>The options below control the operation of the <cite>mml2jax</cite> preprocessor -that is run when you include <tt class="docutils literal"><span class="pre">"mml2jax.js"</span></tt> in the <cite>extensions</cite> array -of your configuration. They are listed with their default values. To -set any of these options, include a <tt class="docutils literal"><span class="pre">mml2jax</span></tt> section in your -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">mml2jax</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">preview</span><span class="o">:</span> <span class="s2">"none"</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>would set the <tt class="docutils literal"><span class="pre">preview</span></tt> parameter to <tt class="docutils literal"><span class="pre">"none"</span></tt>.</p> -<dl class="describe"> -<dt> -<tt class="descname">element: null</tt></dt> -<dd><p>The id name of the element that should be processed by <cite>mml2jax</cite>. -The default is the whole document.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">preview: "alttext"</tt></dt> -<dd><p>This controls whether <cite>mml2jax</cite> inserts <tt class="docutils literal"><span class="pre">MathJax_Preview</span></tt> spans -to make a preview available, and what preview to use, when it -locates mathematics on the page. The default is <tt class="docutils literal"><span class="pre">"alttext"</span></tt>, -which means use the <tt class="docutils literal"><span class="pre"><math></span></tt> tag’s <tt class="docutils literal"><span class="pre">alttext</span></tt> attribute as the -preview (visible until it is processed by MathJax), if the tag has -one. Set it to <tt class="docutils literal"><span class="pre">"none"</span></tt> to prevent the previews from being -inserted (the math will simply disappear until it is typeset). -Set it to an array containing the description of an HTML snippet -in order to use the same preview for all equations on the page.</p> -<p>Examples:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">preview</span><span class="o">:</span> <span class="p">[</span><span class="s2">"[math]"</span><span class="p">],</span> <span class="c1">// insert the text "[math]" as the preview</span> -</pre></div> -</div> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">preview</span><span class="o">:</span> <span class="p">[[</span><span class="s2">"img"</span><span class="p">,{</span><span class="nx">src</span><span class="o">:</span> <span class="s2">"/images/mypic.jpg"</span><span class="p">}]],</span> <span class="c1">// insert an image as the preview</span> -</pre></div> -</div> -<p>See the <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>description of HTML snippets</em></a> for -details on how to represent HTML code in this way.</p> -</dd></dl> - -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="tex2jax.html" - title="previous chapter">The tex2jax Preprocessor</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="jsMath2jax.html" - title="next chapter">The jsMath2jax Preprocessor</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/options/mml2jax.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="jsMath2jax.html" title="The jsMath2jax Preprocessor" - >next</a> |</li> - <li class="right" > - <a href="tex2jax.html" title="The tex2jax Preprocessor" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/options/tex2jax.html b/docs/build/html/options/tex2jax.html @@ -1,252 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The tex2jax Preprocessor — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> - <link rel="next" title="The mml2jax Preprocessor" href="mml2jax.html" /> - <link rel="prev" title="The Core Configuration Options" href="hub.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="mml2jax.html" title="The mml2jax Preprocessor" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="hub.html" title="The Core Configuration Options" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-tex2jax-preprocessor"> -<span id="configure-tex2jax"></span><h1>The tex2jax Preprocessor<a class="headerlink" href="#the-tex2jax-preprocessor" title="Permalink to this headline">¶</a></h1> -<p>The options below control the operation of the <cite>tex2jax</cite> preprocessor -that is run when you include <tt class="docutils literal"><span class="pre">"tex2jax.js"</span></tt> in the <cite>extensions</cite> array -of your configuration. They are listed with their default values. To -set any of these options, include a <tt class="docutils literal"><span class="pre">tex2jax</span></tt> section in your -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s1">'\\('</span><span class="p">,</span><span class="s1">'\\)'</span><span class="p">]</span> <span class="p">]</span> - <span class="p">}</span> -<span class="p">});</span> -</pre></div> -</div> -<p>would set the <tt class="docutils literal"><span class="pre">inlineMath</span></tt> delimiters for the <cite>tex2jax</cite> -preprocessor.</p> -<dl class="describe"> -<dt> -<tt class="descname">element: null</tt></dt> -<dd><p>The id name of the element that should be processed by <cite>tex2jax</cite>. -The default is the whole document.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">inlineMath: [['\(','\)']]</tt></dt> -<dd><p>Array of pairs of strings that are to be used as in-line math -delimters. The first in each pair is the initial delimiter and -the second is the terminal delimiter. You can have as many pairs -as you want. For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s1">'\\('</span><span class="p">,</span><span class="s1">'\\)'</span><span class="p">]</span> <span class="p">]</span> -</pre></div> -</div> -<p>would cause <cite>tex2jax</cite> to look for <tt class="docutils literal"><span class="pre">$...$</span></tt> and <tt class="docutils literal"><span class="pre">\(...\)</span></tt> as -delimiters for inline mathematics. (Note that the single dollar -signs are not enabled by default because they are used too -frequently in normal text, so if you want to use them for math -delimiters, you must specify them explicitly.)</p> -<p>Note that the delimiters can’t look like HTML tags (i.e., can’t -include the less-than sign), as these would be turned into tags by -the browser before MathJax has the chance to run. You can only -include text, not tags, as your math delimiters.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">displayMath: [ ['$$','$$'], ['\[','\]'] ]</tt></dt> -<dd><p>Array of pairs of strings that are to be used as delimters for -displayed equations. The first in each pair is the initial -delimiter and the second is the terminal delimiter. You can have -as many pairs as you want.</p> -<p>Note that the delimiters can’t look like HTML tags (i.e., can’t -include the less-than sign), as these would be turned into tags by -the browser before MathJax has the chance to run. You can only -include text, not tags, as your math delimiters.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">processEscapes: false</tt></dt> -<dd><p>When set to <tt class="docutils literal"><span class="pre">true</span></tt>, you may use <tt class="docutils literal"><span class="pre">\$</span></tt> to represent a literal -dollar sign, rather than using it as a math delimiter. When -<tt class="docutils literal"><span class="pre">false</span></tt>, <tt class="docutils literal"><span class="pre">\$</span></tt> will not be altered, and the dollar sign may be -considered part of a math delimiter. Typically this is set to -<tt class="docutils literal"><span class="pre">true</span></tt> if you enable the <tt class="docutils literal"><span class="pre">$</span> <span class="pre">...</span> <span class="pre">$</span></tt> in-line delimiters, so you -can type <tt class="docutils literal"><span class="pre">\$</span></tt> and <cite>tex2jax</cite> will convert it to a regular dollar -sign in the rendered document.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">processEnvironments: true</tt></dt> -<dd><p>When <tt class="docutils literal"><span class="pre">true</span></tt>, <cite>tex2jax</cite> looks not only for the in-line and -display math delimters, but also for LaTeX environments -(<tt class="docutils literal"><span class="pre">\begin{something}...\end{something}</span></tt>) and marks them for -processing by MathJax. When <tt class="docutils literal"><span class="pre">false</span></tt>, LaTeX environments will -not be processed outside of math mode.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">preview: "TeX"</tt></dt> -<dd><p>This controls whether <cite>tex2jax</cite> inserts <tt class="docutils literal"><span class="pre">MathJax_Preview</span></tt> spans -to make a preview available, and what preview to use, when it -locates in-line or display mathematics in the page. The default -is <tt class="docutils literal"><span class="pre">"TeX"</span></tt>, which means use the TeX code as the preview (which -will be visible until it is processed by MathJax). Set to -<tt class="docutils literal"><span class="pre">"none"</span></tt> to prevent previews from being inserted (the math -will simply disappear until it is typeset). Set to an array -containing the description of an HTML snippet in order to use the -same preview for all equations on the page.</p> -<p>Examples:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">preview</span><span class="o">:</span> <span class="p">[</span><span class="s2">"[math]"</span><span class="p">],</span> <span class="c1">// insert the text "[math]" as the preview</span> -</pre></div> -</div> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">preview</span><span class="o">:</span> <span class="p">[[</span><span class="s2">"img"</span><span class="p">,{</span><span class="nx">src</span><span class="o">:</span> <span class="s2">"/images/mypic.jpg"</span><span class="p">}]],</span> <span class="c1">// insert an image as the preview</span> -</pre></div> -</div> -<p>See the <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>description of HTML snippets</em></a> for -details on how to represent HTML code in this way.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">skipTags: ["script","noscript","style","textarea","pre","code"]</tt></dt> -<dd><p>This array lists the names of the tags whose contents should not -be processed by <cite>tex2jax</cite> (other than to look for ignore/process -classes as listed below). You can add to (or remove from) this -list to prevent MathJax from processing mathematics in specific -contexts.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">ignoreClass: "tex2jax_ignore"</tt></dt> -<dd><p>This is the class name used to mark elements whose contents should -not be processed by tex2jax (other than to look for the -<tt class="docutils literal"><span class="pre">processClass</span></tt> pattern below). Note that this is a regular -expression, and so you need to be sure to quote any <cite>regexp</cite> -special characters. The pattern is automatically preceeded by -<tt class="docutils literal"><span class="pre">'(^|</span> <span class="pre">)('</span></tt> and followed by <tt class="docutils literal"><span class="pre">')(</span> <span class="pre">|$)'</span></tt>, so your pattern will -have to match full words in the class name. Assigning an element -this class name will prevent <cite>tex2jax</cite> from processing its -contents.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">processClass: "tex2jax_process"</tt></dt> -<dd><p>This is the class name used to mark elements whose contents -<em>should</em> be processed by <cite>tex2jax</cite>. This is used to turn on -processing within tags that have been marked as ignored or skipped -above. Note that this is a regular expression, and so you need to -be sure to quote any <cite>regexp</cite> special characters. The pattern is -automatically preceeded by <tt class="docutils literal"><span class="pre">'(^|</span> <span class="pre">)('</span></tt> and followed by <tt class="docutils literal"><span class="pre">')(</span> -<span class="pre">|$)'</span></tt>, so your pattern will have to match full words in the class -name. Use this to restart processing within an element that has -been marked as ignored above.</p> -</dd></dl> - -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="hub.html" - title="previous chapter">The Core Configuration Options</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="mml2jax.html" - title="next chapter">The mml2jax Preprocessor</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/options/tex2jax.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="mml2jax.html" title="The mml2jax Preprocessor" - >next</a> |</li> - <li class="right" > - <a href="hub.html" title="The Core Configuration Options" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/output.html b/docs/build/html/output.html @@ -1,221 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>MathJax Output Formats — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="The MathJax Community" href="community.html" /> - <link rel="prev" title="MathJax MathML Support" href="mathml.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="community.html" title="The MathJax Community" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="mathml.html" title="MathJax MathML Support" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="mathjax-output-formats"> -<span id="output-formats"></span><h1>MathJax Output Formats<a class="headerlink" href="#mathjax-output-formats" title="Permalink to this headline">¶</a></h1> -<p>Currently, MathJax can render math in two ways:</p> -<ul class="simple"> -<li>Using HTML-with-CSS to lay out the mathematics, or</li> -<li>Using a browser’s native MathML support.</li> -</ul> -<p>These are implemented by the <cite>HTML-CSS</cite> and <cite>NativeMML</cite> output -processors. You select which one you want to use by including either -<tt class="docutils literal"><span class="pre">"output/HTML-CSS"</span></tt> or <tt class="docutils literal"><span class="pre">"output/NativeMML"</span></tt> in the <cite>jax</cite> array of -your MathJax configuration. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">]</span> -</pre></div> -</div> -<p>would specify TeX input and HTML-with-CSS output for the mathematics -in your document.</p> -<p>The HTML-CSS output processor produces high-quality output in all -major browsers, with results that are consistent across browsers and -operating systems. This is MathJax’s primary output mode. It’s major -advantage is its quality and consistency; it’s drawback is that it is -slower that the NativeMML mode at rendering the mathematics. (The -HTML-CSS processor has not yet been optimized for speed, so you can -expect some improvement in the future. Note that IE8 in “IE8 -standards mode” is an order of magnitude slower than any other browser -when processing math through the HTML-CSS output processor; see -<a class="reference internal" href="#html-css-with-ie8"><em>HTML-CSS with IE8</em></a> below for some strategies -to deal with this.)</p> -<p>The NativeMML output processor uses the browser’s internal MathML support (if -any) to render the mathematics. Currently, Firefox has native support -for MathML, and IE has the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer plugin</a> for rendering -MathML. Opera has some built-in support for MathML that works well -with simple equations, but fails with more complex formulas, so we -don’t recommend using the NativeMML output processor with Opera. Safari, -Chrome, Konqueror, and most other browsers don’t support MathML -natively.</p> -<p>The advantage of the NativeMML output Processor is its speed, since -native MathML support is much faster than using complicated HTML and -CSS to lay out mathematics via an interpreted language like JavaScript -(as the HTML-CSS output processor does). The disadvantage is that you -are dependent on the browser’s MathML implementation for your -rendering, and these vary in quality of output and completeness of -implementation. MathJax may rely on features that are not available -in some renderers (for example, Firefox’s MathML support does not -implement some of the named widths, such as -<tt class="docutils literal"><span class="pre">negativethinmathspace</span></tt>). The results using the NativeMML output -processor may have spacing or other rendering problems that are -outside of MathJax’s control.</p> -<div class="section" id="automatic-selection-of-the-output-processor"> -<h2>Automatic Selection of the Output Processor<a class="headerlink" href="#automatic-selection-of-the-output-processor" title="Permalink to this headline">¶</a></h2> -<p>Since not all browsers support MathML natively, it would be unwise to -choose the NativeMML output processor unless you are sure of your -audience’s browser capabilities. MathJax can help with that, however, -since there is a special configuration file that will choose between -NativeMML and HTML-CSS depending on the browser in use. To invoke it, -add <tt class="docutils literal"><span class="pre">"MMLorHTML.js"</span></tt> to your configurations <cite>config</cite> array, and <strong>do -not</strong> include an output processor in your <cite>jax</cite> array; MathJax will -fill that in for you based on the abilities of your user’s browser.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">"MMLorHTML.js"</span><span class="p">],</span> -<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">]</span> -</pre></div> -</div> -<p>You can customize which choice to make on a browser-by-browser basis -or a global basis. See the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file or the -<a class="reference internal" href="configuration.html#configuration"><em>Configuring MathJax</em></a> section for futher -details.</p> -<p>MathJax produces MathML that models the underlying mathematics as best -it can, rather than using complicated hacks to improve output for a -particular MathML implementation. When you make the choice to use the -NativeMML output processor, you are making a trade-off: gaining speed -at the expense of quality and reliability, a decision that should not -be taken lightly. Note, however, that a user can employ the MathJax -contectual menu to select the other other renderer if he or she -wishes.</p> -</div> -<div class="section" id="html-css-with-ie8"> -<span id="id1"></span><h2>HTML-CSS with IE8<a class="headerlink" href="#html-css-with-ie8" title="Permalink to this headline">¶</a></h2> -<p>Internet Explorer 8 has at least eight different rendering modes in -which can operate, and that are triggered by the <cite>DOCTYPE</cite> of the -document being viewed. Its “quirks” mode is its fastest mode, and its -“IE8 standards” mode is its slowest. This is the mode triggered by -strict HTML document types, and since most modern content management -systems now include a <cite>DOCTYPE</cite> that activates “standards” mode, IE8 -will operate in its slowest manner. This is particularly apparent -when MathJax is used, since IE8 in standards mode runs 20 to 30 times -slower than it does in its IE7 emulation mode, and 60 times slower -than in quirks mode.</p> -<p>Most users find this speed reduction unacceptable when there is much -mathematics on the page. To overcome this problem, you may wish to -tell IE8 to use its IE7 emulation mode rather than its IE8 standards -mode. You can accomplish this by including the line</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><meta</span> <span class="na">http-equiv=</span><span class="s">"X-UA-Compatible"</span> <span class="na">content=</span><span class="s">"IE=EmulateIE7"</span><span class="nt">></span> -</pre></div> -</div> -<p>at the top of the <tt class="docutils literal"><span class="pre"><head></span></tt> section of your HTML documents. This -lets you keep the strict <cite>DOCTYPE</cite> for validation purposes, while -still managing to get reasonable perforance from Internet Explorer -8. Note that this line must come at the beginning of the <tt class="docutils literal"><span class="pre"><head></span></tt>, -before any stylesheets or other content are loaded.</p> -<p>Altertnatively, you can use the <cite>MMLorHTML</cite> configuration file -described above to select NativeMML output when possible, and request -that your users install the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer plugin</a>, which will render -the mathematics much more quickly.</p> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">MathJax Output Formats</a><ul> -<li><a class="reference internal" href="#automatic-selection-of-the-output-processor">Automatic Selection of the Output Processor</a></li> -<li><a class="reference internal" href="#html-css-with-ie8">HTML-CSS with IE8</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="mathml.html" - title="previous chapter">MathJax MathML Support</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="community.html" - title="next chapter">The MathJax Community</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/output.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="community.html" title="The MathJax Community" - >next</a> |</li> - <li class="right" > - <a href="mathml.html" title="MathJax MathML Support" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/platforms/index.html b/docs/build/html/platforms/index.html @@ -1,171 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Using MathJax in popular web platforms — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="next" title="Installing MathJax in WordPress" href="wordpress.html" /> - <link rel="prev" title="The FontWarnings extension" href="../options/FontWarnings.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="wordpress.html" title="Installing MathJax in WordPress" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="../options/FontWarnings.html" title="The FontWarnings extension" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="using-mathjax-in-popular-web-platforms"> -<span id="platforms"></span><h1>Using MathJax in popular web platforms<a class="headerlink" href="#using-mathjax-in-popular-web-platforms" title="Permalink to this headline">¶</a></h1> -<p>Most web-based content-management systems include a theme or template -layer that determines how the pages look, and that loads information -common to all pages. Such theme files provide one popular way to -include MathJax in your web templates in the absense of -MathJax-specific plugins for the system you are using. To take -advantage of this approach, you will need access to your theme files, -which probably means you need to be an administrator for the site; if -you are not, you may need to have an administrator do these steps for -you.</p> -<p>To enable MathJax in your web platform, add the line:</p> -<div class="highlight-python"><pre><script type="text/javascript" src="path-to-MathJax/MathJax.js"></script></pre> -</div> -<p>(where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is the web-address of the main MathJax -directory for your server) either just before the <tt class="docutils literal"><span class="pre"></head></span></tt> tag in -your theme file, or at the end of the file if it contains no -<tt class="docutils literal"><span class="pre"></head></span></tt>.</p> -<p>The theme files for various popular platforms are:</p> -<blockquote> -<div><dl class="docutils"> -<dt><a class="reference external" href="http://wordpress.org/">WordPress</a></dt> -<dd><tt class="docutils literal"><span class="pre">wp-content/themes/[current_theme]/header.php</span></tt></dd> -<dt><a class="reference external" href="http://www.movabletype.org/">Movable Type</a></dt> -<dd><tt class="docutils literal"><span class="pre">[current_theme_templates]/html_head.mhtml</span></tt></dd> -<dt><a class="reference external" href="http://drupal.org/">Drupal</a></dt> -<dd><tt class="docutils literal"><span class="pre">themes/[current_theme]/page.tpl.php</span></tt></dd> -<dt><a class="reference external" href="http://www.joomla.org/">Joomla</a></dt> -<dd><tt class="docutils literal"><span class="pre">templates/[current_theme]/index.php</span></tt></dd> -<dt><a class="reference external" href="http://www.mediawiki.org/">MediaWiki</a></dt> -<dd><tt class="docutils literal"><span class="pre">skins/[current_skin].php</span></tt></dd> -<dt><a class="reference external" href="http://www.tiddlywiki.com/">TiddlyWiki</a></dt> -<dd><tt class="docutils literal"><span class="pre">*.php</span></tt> (Whatever you call your TiddlyWiki php file)</dd> -<dt><a class="reference external" href="http://moodle.org/">Moodle</a></dt> -<dd><tt class="docutils literal"><span class="pre">theme/[current_theme]/header.html</span></tt></dd> -</dl> -</div></blockquote> -<p>Keep in mind that this will enable MathJax for your current -theme/template only. If you change themes or update your theme, you -will have to repeat these steps.</p> -<div class="section" id="insructions-for-specific-platforms"> -<h2>Insructions for Specific Platforms<a class="headerlink" href="#insructions-for-specific-platforms" title="Permalink to this headline">¶</a></h2> -<p>Some programs, such as WordPress and Moveable Type, allow you to edit -template files from inside their administrator interfaces. Specific -instructions for these are given via the links below.</p> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="wordpress.html">Wordpress</a></li> -<li class="toctree-l1"><a class="reference internal" href="movable-type.html">Movable Type</a></li> -</ul> -</div> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="../index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">Using MathJax in popular web platforms</a><ul> -<li><a class="reference internal" href="#insructions-for-specific-platforms">Insructions for Specific Platforms</a><ul> -</ul> -</li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="../options/FontWarnings.html" - title="previous chapter">The FontWarnings extension</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="wordpress.html" - title="next chapter">Installing MathJax in WordPress</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/platforms/index.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="wordpress.html" title="Installing MathJax in WordPress" - >next</a> |</li> - <li class="right" > - <a href="../options/FontWarnings.html" title="The FontWarnings extension" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/platforms/movable-type.html b/docs/build/html/platforms/movable-type.html @@ -1,148 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Using MathJax in Movable Type — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="Using MathJax in popular web platforms" href="index.html" /> - <link rel="next" title="MathJax TeX and LaTeX Support" href="../tex.html" /> - <link rel="prev" title="Installing MathJax in WordPress" href="wordpress.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="../tex.html" title="MathJax TeX and LaTeX Support" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="wordpress.html" title="Installing MathJax in WordPress" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">Using MathJax in popular web platforms</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="using-mathjax-in-movable-type"> -<span id="platform-movable-type"></span><h1>Using MathJax in Movable Type<a class="headerlink" href="#using-mathjax-in-movable-type" title="Permalink to this headline">¶</a></h1> -<p>These instructions assume you already have placed the MathJax files on -your server (see <a class="reference internal" href="../installation.html#installation"><em>Installing and Testing MathJax</em></a>).</p> -<ol class="arabic"> -<li><p class="first">Open Moveable Type Admin interface for the site on which you want to enable -MathJax.</p> -</li> -<li><p class="first">In the dashboard menu on the left, open up the Design menu. This -should show you the templates you are currently using on the site.</p> -<blockquote> -<div><img alt="../_images/mt_menu.png" src="../_images/mt_menu.png" /> -</div></blockquote> -</li> -<li><p class="first">Scroll down to the Template Modules section in the template list -and open the <cite>HTML Head</cite> template.</p> -<blockquote> -<div><img alt="../_images/mt_templates.png" src="../_images/mt_templates.png" /> -</div></blockquote> -</li> -<li><p class="first">At the end of the file, insert</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span> -</pre></div> -</div> -<p>where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is replaced by the web-address of the -main MathJax dorectory on your server.</p> -<blockquote> -<div><img alt="../_images/mt_head.png" src="../_images/mt_head.png" /> -</div></blockquote> -</li> -<li><p class="first">Save the file. This should enable MathJax, so you should be able -to start adding mathematical content to your pages. Use the -<tt class="docutils literal"><span class="pre">config/MathJas.js</span></tt> file in the MathJax directory to configure -MathJax to your needs (see <a class="reference internal" href="../configuration.html#configuration"><em>Configuring MathJax</em></a> for details).</p> -</li> -</ol> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="wordpress.html" - title="previous chapter">Installing MathJax in WordPress</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="../tex.html" - title="next chapter">MathJax TeX and LaTeX Support</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/platforms/movable-type.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="../tex.html" title="MathJax TeX and LaTeX Support" - >next</a> |</li> - <li class="right" > - <a href="wordpress.html" title="Installing MathJax in WordPress" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >Using MathJax in popular web platforms</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/platforms/wordpress.html b/docs/build/html/platforms/wordpress.html @@ -1,149 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Installing MathJax in WordPress — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '../', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="../_static/jquery.js"></script> - <script type="text/javascript" src="../_static/underscore.js"></script> - <script type="text/javascript" src="../_static/doctools.js"></script> - <script type="text/javascript" src="../../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> - <link rel="up" title="Using MathJax in popular web platforms" href="index.html" /> - <link rel="next" title="Using MathJax in Movable Type" href="movable-type.html" /> - <link rel="prev" title="Using MathJax in popular web platforms" href="index.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="movable-type.html" title="Using MathJax in Movable Type" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="index.html" title="Using MathJax in popular web platforms" - accesskey="P">previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" accesskey="U">Using MathJax in popular web platforms</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="installing-mathjax-in-wordpress"> -<span id="platform-wordpress"></span><h1>Installing MathJax in WordPress<a class="headerlink" href="#installing-mathjax-in-wordpress" title="Permalink to this headline">¶</a></h1> -<p>These instructions assume you already have placed the MathJax files on -your server (see <a class="reference internal" href="../installation.html#installation"><em>Installing MathJax</em></a>).</p> -<ol class="arabic"> -<li><p class="first">Open the WordPress admin interface.</p> -</li> -<li><p class="first">In the administration menu on the left, open up the <cite>Appearance</cite> -menu and click on the <cite>Editor</cite> submenu option.</p> -<blockquote> -<div><img alt="../_images/wp_menu.png" src="../_images/wp_menu.png" /> -</div></blockquote> -<p>When you click on the editor option, WordPress should open up the -first stylesheet in the current theme.</p> -</li> -<li><p class="first">In the template list on the right side of the page, click on the -header file (it should be <tt class="docutils literal"><span class="pre">header.php</span></tt>).</p> -<blockquote> -<div><img alt="../_images/wp_templates.png" src="../_images/wp_templates.png" /> -</div></blockquote> -<p>This part depends slightly on how your current theme is written. -In the <tt class="docutils literal"><span class="pre">header.php</span></tt> file, look for the end-of-head tag, -<tt class="docutils literal"><span class="pre"></head></span></tt>. If you find it, insert</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span> -</pre></div> -</div> -<p>just before that. Otherwise, insert the same code at the very -bottom of the file. Here, <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> should be replaced -by the web-address of the main MathJax directory on your server, -e.g., <tt class="docutils literal"><span class="pre">src="/mathjax/MathJax.js"</span></tt>.</p> -</li> -<li><p class="first">Save the file. This should enable MathJax, so you should be able to -start adding mathematical content to your pages. Use the -<tt class="docutils literal"><span class="pre">config/MathJas.js</span></tt> file in the MathJax directory to configure -MathJax to your needs (see <a class="reference internal" href="../configuration.html#configuration"><em>Configuring MathJax</em></a> for details).</p> -</li> -</ol> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="index.html" - title="previous chapter">Using MathJax in popular web platforms</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="movable-type.html" - title="next chapter">Using MathJax in Movable Type</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="../_sources/platforms/wordpress.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="../search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="../genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="movable-type.html" title="Using MathJax in Movable Type" - >next</a> |</li> - <li class="right" > - <a href="index.html" title="Using MathJax in popular web platforms" - >previous</a> |</li> - <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="index.html" >Using MathJax in popular web platforms</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/queues.html b/docs/build/html/queues.html @@ -1,337 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Using Queues — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" /> - <link rel="next" title="Using Signals" href="signals.html" /> - <link rel="prev" title="Using Callbacks" href="callbacks.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="signals.html" title="Using Signals" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="callbacks.html" title="Using Callbacks" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="synchronize.html" accesskey="U">Synchronizing your code with MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="using-queues"> -<span id="id1"></span><h1>Using Queues<a class="headerlink" href="#using-queues" title="Permalink to this headline">¶</a></h1> -<p>The <cite>callback queue</cite> is one of MathJax’s main tools for synchronizing -its actions, both internally, and with external programs, like -javascript code that you may write as part of dynamic web pages. -Because many actions in MathJax (like loading files) operate -asynchornously, MathJax needs a way to coordinate those actions so -that they occur in the right order. The -<cite>MathJax.Callback.Queue</cite> object provides that mechanism.</p> -<p>A <cite>callback queue</cite> is a list of commands that will be performed one at -a time, in order. If the return value of one of the commands is a -<cite>Callback</cite> object, processing is suspended until that callback is -called, and then processing of the commands is resumed. In this way, -if a command starts an asynchronous operation like loading a file, it -can return the callback for that file-load operation and the queue -will wait until the file has loaded before continuing. Thus a queue -can be used to guarantee that commands don’t get performed until other -ones are known to be finished, even if those commands usually operate -asynchronously.</p> -<div class="section" id="constructing-queues"> -<h2>Constructing Queues<a class="headerlink" href="#constructing-queues" title="Permalink to this headline">¶</a></h2> -<p>A queue is created via the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback.Queue()</span></tt> command, -which returns a <cite>MathJax.Callback.Queue</cite> object. The queue -itself consists of a series of commands given as callback -specifications (see <a class="reference internal" href="callbacks.html#using-callbacks"><em>Using Callbacks</em></a> for -details on callbacks), which allow you to provide functions (together -with their arguments) to be executed. You can provide the collection -of callback specifications when the queue is created by passing them -as arguments to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback.Queue()</span></tt>, or you can create an -empty queue to which commands are added later. Once a -<cite>MathJax.Callback.Queue</cite> object is created, you can push -additional callbacks on the end of the queue; if the queue is empty, -the command will be performed immediately, while if the queue is -waiting for another command to complete, the new command will be -queued for later processing.</p> -<p>For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">f</span><span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="nx">x</span><span class="p">)}</span> -<span class="kd">var</span> <span class="nx">queue</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="nx">f</span><span class="p">,</span> <span class="mi">15</span><span class="p">],</span> <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">10</span><span class="p">],</span> <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">5</span><span class="p">]);</span> -<span class="nx">queue</span><span class="p">.</span><span class="nx">Push</span><span class="p">([</span><span class="nx">f</span><span class="p">,</span> <span class="mi">0</span><span class="p">]);</span> -</pre></div> -</div> -<p>would create a queue containing three commands, each calling the -function <tt class="docutils literal"><span class="pre">f</span></tt> with a different input, that are performed in order. A -fourth command is then added to the queue, to be performed after the -other three. In this case, the result will be four alerts, the first -with the number 15, the second with 10, the third with 5 and the -fourth with 0. Of course <tt class="docutils literal"><span class="pre">f</span></tt> is not a function that operates -asynchronously, so it would have been easier to just call <tt class="docutils literal"><span class="pre">f</span></tt> four -times directly. The power of the queue comes from calling commands -that could operate asynchronously. For example:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">f</span><span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="nx">x</span><span class="p">)}</span> -<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">.</span><span class="nx">Queue</span><span class="p">(</span> - <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> - <span class="p">[</span><span class="s2">"Require"</span><span class="p">,</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">,</span> <span class="s2">"[MathJax]/extensions/AMSmath.js"</span><span class="p">],</span> - <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">2</span><span class="p">]</span> -<span class="p">);</span> -</pre></div> -</div> -<p>Here, the command <tt class="docutils literal"><span class="pre">MathJax.Ajax.require("extensions/AMSmath.js")</span></tt> is -queued between two calls to <tt class="docutils literal"><span class="pre">f</span></tt>. The first call to <tt class="docutils literal"><span class="pre">f(1)</span></tt> will be -made immediately, then the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> statement will -be performed. Since the <tt class="docutils literal"><span class="pre">Require</span></tt> method loads a file, it operates -asynchronously, and its return value is a <cite>MathJax.Callback</cite> -object that will be called when the file is loaded. The call to -<tt class="docutils literal"><span class="pre">f(2)</span></tt> will not be made until that callback is performed, -effectively synchronizing the second call to <tt class="docutils literal"><span class="pre">f</span></tt> with the completion -of the file loading. This is equivalent to</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">f</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> -<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/extensions/AMSmath.js"</span><span class="p">,</span> <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">2</span><span class="p">]);</span> -</pre></div> -</div> -<p>since the <tt class="docutils literal"><span class="pre">Require()</span></tt> command allows you to specify a (single) -callback to be performed on the completion of the file load. Note, -however, that the queue could be used to synchronize several file -loads along with multiple function calls, so is more flexible.</p> -<p>For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">.</span><span class="nx">Queue</span><span class="p">(</span> - <span class="p">[</span><span class="s2">"Require"</span><span class="p">,</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">,</span> <span class="s2">"[MathJax]/extensions/AMSmath.js"</span><span class="p">],</span> - <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> - <span class="p">[</span><span class="s2">"Require"</span><span class="p">,</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">,</span> <span class="s2">"[MathJax]/config/local/AMSmathAdditions.js"</span><span class="p">],</span> - <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">2</span><span class="p">]</span> -<span class="p">);</span> -</pre></div> -</div> -<p>would load the AMSmath extension, then call <tt class="docutils literal"><span class="pre">f(1)</span></tt> then load the -local AMSmath modifications, and then call <tt class="docutils literal"><span class="pre">f(2)</span></tt>, with each action -waiting for the previous one to complete before being performed -itself.</p> -</div> -<div class="section" id="callbacks-versus-callback-specifications"> -<h2>Callbacks versus Callback Specifications<a class="headerlink" href="#callbacks-versus-callback-specifications" title="Permalink to this headline">¶</a></h2> -<p>If one of the callback specifications is an actual callback object -itself, then the queue will wait for that action to be performed -before proceeding. For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">.</span><span class="nx">Queue</span><span class="p">(</span> - <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> - <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/extensions/AMSmath.js"</span><span class="p">),</span> - <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span> -<span class="p">);</span> -</pre></div> -</div> -<p>starts the loading of the AMSmath extension before the queue is -created, and then creates the queue containing the call to <tt class="docutils literal"><span class="pre">f</span></tt>, the -callback for the file load, and the second call to <tt class="docutils literal"><span class="pre">f</span></tt>. The queue -performs <tt class="docutils literal"><span class="pre">f(1)</span></tt>, waits for the file load callback to be called, and -then calls <tt class="docutils literal"><span class="pre">f(2)</span></tt>. The difference between this and the second -example above is that, in this example the file load is started before -the queue is even created, so the file is potentially loaded and -executed before the call to <tt class="docutils literal"><span class="pre">f(1)</span></tt>, while in the example above, the -file load is guaranteed not to begin until after <tt class="docutils literal"><span class="pre">f(1)</span></tt> is executed.</p> -<p>As a further example, consider</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">.</span><span class="nx">Queue</span><span class="p">(</span> - <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/extensions/AMSmath.js"</span><span class="p">),</span> - <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> - <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/config/local/AMSmathAdditions.js"</span><span class="p">),</span> - <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">2</span><span class="p">]</span> -<span class="p">);</span> -</pre></div> -</div> -<p>in comparison to the example above that uses <tt class="docutils literal"><span class="pre">["Require",</span> -<span class="pre">MathJax.Ajax,</span> <span class="pre">"[MathJax]/extensions/AMSmath.js"]</span></tt> and <tt class="docutils literal"><span class="pre">["Require",</span> -<span class="pre">MathJax.Ajax,</span> <span class="pre">"[MathJax]/config/local/AMSmathAdditions.js"]</span></tt> instead. In that -example, <tt class="docutils literal"><span class="pre">AMSmath.js</span></tt> is loaded, then <tt class="docutils literal"><span class="pre">f(1)</span></tt> is called, then the -local additions are loaded, then <tt class="docutils literal"><span class="pre">f(2)</span></tt> is called.</p> -<p>Here, however, both file loads are started before the queue is -created, and are operating in parallel (rather than sequentially as in -the earlier example). It is possible for the loading of the local -additions to complete before the AMSmath extension is loaded in this -case, which was guaranteed <strong>not</strong> to happen in the other example. -Note, however, that <tt class="docutils literal"><span class="pre">f(1)</span></tt> is guaranteed not to be performed until -after the AMSmath extensions load, and <tt class="docutils literal"><span class="pre">f(2)</span></tt> will not occur until -after both files are loaded.</p> -<p>In this way, it is possible to start asynchronous loading of several -files simultaneously, and wait until all of them are loaded (in -whatever order) to perform some command. For instance,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">.</span><span class="nx">Queue</span><span class="p">(</span> - <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"file1.js"</span><span class="p">),</span> - <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"file2.js"</span><span class="p">),</span> - <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"file3.js"</span><span class="p">),</span> - <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"file4.js"</span><span class="p">),</span> - <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="s2">"all done"</span><span class="p">]</span> -<span class="p">);</span> -</pre></div> -</div> -<p>starts four files loading all at once, and waits for all four to -complete before calling <tt class="docutils literal"><span class="pre">f("all</span> <span class="pre">done")</span></tt>. The order in which they -complete is immaterial, and they all are being requested -simultaneously.</p> -</div> -<div class="section" id="the-mathjax-processing-queue"> -<h2>The MathJax Processing Queue<a class="headerlink" href="#the-mathjax-processing-queue" title="Permalink to this headline">¶</a></h2> -<p>MathJax uses a queue stored as <tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt> to regulate its -own actions so that they operate in the right order even when some -of them include asynchronous operations. You can take advantage of -that queue when you make calls to MathJax methods that need to be -synchronized with the other actions taken by MathJax. It may not -always be apparent, however, which methods fall into that category.</p> -<p>The main source of asynchronous actions in MathJax is the loading of -external files, so any action that may cause a file to be loaded may -act asynchronously. Many important actions do so, including some that -you might not expect; e.g., typesetting mathematics can cause files to -be loaded. This is because some TeX commands, for example, are rare -enough that they are not included in the core TeX input processor, but -instead are defined in extensions that are loaded automatically when -needed. The typesetting of an expression containing one of these TeX -commands can cause the typesetting process to be suspended while the -file is loaded, and then restarted when the extension has become -evailable.</p> -<p>As a result, any call to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> (or -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Process()</span></tt>, or <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Update()</span></tt>, etc.) -could return long before the mathematics is actually typeset, and the -rest of your code may run before the mathematics is available. If you -have code that relys on the mathematics being visible on screen, you -will need to break that out into a separate operation that is -synchronized with the typesetting via the MathJax queue.</p> -<p>Furthermore, your own typesetting calls may need to wait for file loading -to occur that is already underway, so even if you don’t need to access -the mathematics after it is typeset, you may still need to queue the -typeset command in order to make sure it is properly synchronized with -<em>previous</em> typeset calls. For instance, if an earlier call -started loading an extension and you start another typeset call before -that extension is fully loaded, MathJax’s internal state may be in -flux, and it may not be prepared to handle another typeset operation -yet. This is even more important if you are using other libraries -that may call MathJax, in which case your code may not be aware of the -state that MathJax is in.</p> -<p>For these reasons, it is always best to perform typesetting operations -through the MathJax queue, and the same goes for any other action -that could cause files to load. A good rule of thumb is that, if a -MathJax function includes a callback argument, that function may operate -asynchronously; you should use the MathJax queue to perform it and -any actions that rely on its results.</p> -<p>To place an action in the MathJax queue, use the -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Queue()</span></tt> command. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Typeset"</span><span class="p">,</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">,</span><span class="s2">"MathDiv"</span><span class="p">]);</span> -</pre></div> -</div> -<p>would queue the command <tt class="docutils literal"><span class="pre">MathJax.Hub.Typeset("MathDiv")</span></tt>, causing -the contents of the DOM element with <cite>id</cite> equal to <tt class="docutils literal"><span class="pre">MathDiv</span></tt> to be -typeset.</p> -<p>One of the uses of the MathJax queue is to allow you to synchronize an -action with the startup process for MathJax. If you want to have a -function performed after MathJax has become completely set up (and -performed its initial typesetting of the page), you can push it onto -the <tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt> so that it won’t be performed until MathJax -finishes everything it has queued when it was loaded. For example,</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span> -<span class="nt"><script></span> - <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> - <span class="c1">// ... your startup commands here ...</span> - <span class="p">});</span> -<span class="nt"></script></span> -</pre></div> -</div> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">Using Queues</a><ul> -<li><a class="reference internal" href="#constructing-queues">Constructing Queues</a></li> -<li><a class="reference internal" href="#callbacks-versus-callback-specifications">Callbacks versus Callback Specifications</a></li> -<li><a class="reference internal" href="#the-mathjax-processing-queue">The MathJax Processing Queue</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="callbacks.html" - title="previous chapter">Using Callbacks</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="signals.html" - title="next chapter">Using Signals</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/queues.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="signals.html" title="Using Signals" - >next</a> |</li> - <li class="right" > - <a href="callbacks.html" title="Using Callbacks" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="synchronize.html" >Synchronizing your code with MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/search.html b/docs/build/html/search.html @@ -1,98 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Search — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="_static/searchtools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <script type="text/javascript"> - jQuery(function() { Search.loadIndex("searchindex.js"); }); - </script> - - - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <h1 id="search-documentation">Search</h1> - <div id="fallback" class="admonition warning"> - <script type="text/javascript">$('#fallback').hide();</script> - <p> - Please activate JavaScript to enable the search - functionality. - </p> - </div> - <p> - From here you can search these documents. Enter your search - words into the box below and click "search". Note that the search - function will automatically search for all of the words. Pages - containing fewer words won't appear in the result list. - </p> - <form action="" method="get"> - <input type="text" name="q" value="" /> - <input type="submit" value="search" /> - <span id="search-progress" style="padding-left: 10px"></span> - </form> - - <div id="search-results"> - - </div> - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/searchindex.js b/docs/build/html/searchindex.js @@ -1 +0,0 @@ -Search.setIndex({objects:{"":{reset:[24,0,1],getAllJax:[12,0,1],Log:[15,0,1],Subclass:[33,0,1],Delay:[24,0,1],Init:[33,0,1],Interest:[35,0,1],Translate:[34,0,1],Config:[12,0,1],addElement:[10,0,1],Reprocess:[12,0,1],Styles:[0,0,1],ExecuteHook:[35,0,1],loadTimeout:[0,0,1],Resume:[14,0,1],Update:[12,0,1],fileURL:[0,0,1],loadHook:[0,0,1],formatError:[12,0,1],call:[14,0,1],getJaxByInputType:[12,0,1],PreProcess:[12,0,1],Post:[35,0,1],has:[33,0,1],Clear:[15,0,1],Insert:[12,0,1],Register:[34,0,1],TextNode:[10,0,1],Augment:[33,0,1],Signal:[24,0,1],addText:[10,0,1],noTranslate:[34,0,1],Typeset:[12,0,1],Queue:[24,0,1],NoInterest:[35,0,1],Suspend:[14,0,1],getJaxByType:[12,0,1],Push:[14,0,1],Element:[10,0,1],loadComplete:[0,0,1],wait:[14,0,1],Load:[0,0,1],Set:[15,0,1],executeHooks:[24,0,1],Process:[12,0,1],Text:[45,0,1],loadError:[0,0,1],Startup:[34,0,1],SourceElement:[45,0,1],getJaxFor:[12,0,1],can:[33,0,1],MessageHook:[35,0,1],isJax:[12,0,1],isa:[33,0,1],Require:[0,0,1]}},terms:{lvertneqq:41,reprocess:[12,45,43],mathjax_msie_fram:15,four:[17,1,37],prefix:[10,17,32],asymp:41,blacktriangledown:41,webfont:[6,30,17],whose:[5,26,12,21,43],biggr:41,under:27,preprocess:[47,12,25,43],slowest:46,gimel:41,everi:[16,12],mskip:41,arcco:41,dotplu:41,affect:[45,12,32,37],isforefox:12,bbfont:41,eqnarrai:41,cmd:19,bigodot:41,ominu:41,red:[41,17,32,40],nparallel:41,properti:[10,0,36,33,24,35,14,26,34,45,31,12,21],direct:[30,6,27,37],consequ:18,second:[0,27,37,24,26,49,44,5,6,40,19,16,31,21,1],ngeq:41,even:[0,12,24,35,14,41,3,43,16,26,27,44,20,47,32,1,40],hide:43,prejax:[47,19],neg:41,multlinewidth:22,yoursit:3,"new":[10,35,12,37,24,43,33,1,25,4,15,16,44,22,42,45,20,31,32,21,47],mhtml:2,told:44,limsup:41,elimin:19,abov:[10,41,37,24,17,1,3,43,5,6,19,26,46,30,33],lessapprox:41,blacktriangleright:41,here:[10,35,36,24,26,1,3,43,16,17,34,19,7,12,45],met:25,lneqq:41,path:[0,2,17,7,9,32],noundefin:[41,17,32,3],interpret:[41,46,37],nrightarrow:41,forum:[17,4],bowti:41,rceil:41,backprim:41,uproot:41,circleddash:41,mathstrut:41,unix:37,brower:41,thinmathspac:27,highli:20,describ:[10,37,24,26,39,49,25,43,41,6,40,46,47,12,17],would:[41,6,8,10,32,14,17,40,19,45,22,23,24,26,29,46,30,12,33,5,37,38,49,42,43,18,47,48,1],bleed:37,vartriangl:41,ltime:41,varlambda:41,call:[0,2,3,5,6,8,32,14,15,16,22,19,21,23,24,26,29,30,31,12,33,34,35,37,38,39,45,41,42,43,44,18,47,48,1],recommend:[46,47,37],diretori:37,preview:[5,38,47,23,19],type:[0,2,3,5,7,9,10,32,16,17,34,19,45,31,12,27,21,1,43,44,46,47],until:[0,23,35,1,25,5,26,19,16,38,32],notin:41,displaymath:[5,32],notic:[41,32],warn:[0,6],eqslantless:41,hold:[0,40,19,29,47,12],unpack:[17,37],must:[0,27,37,17,39,14,41,15,5,6,46,22,19,29,44,30,32,35,49],fbox:41,join:[16,41],room:22,setup:[20,17,32,27],work:[10,11,27,37,26,41,3,4,43,16,17,28,44,20,46,32,33],cc0000:[49,19],tag_nam:37,root:[41,0,25],overrid:[33,6,31,34,21],mathmenu:[49,18,30,42,32],give:[35,17,40,49,3,16,6,22,32],indic:[0,12,35,14,41,25,16,17,34,19,26,45,31,32,21,47],impair:20,want:[16,48,37,24,26,13,33,41,4,15,5,17,19,43,46,30,9,32,21,1],setminu:41,end:[0,27,2,41,7,25,4,5,16,9,1],quot:[5,30,19],hom:41,heartsuit:41,how:[0,2,3,4,41,6,7,14,15,17,18,19,23,24,35,38,29,30,12,5,37,40,42,44,47],sever:[0,37,1,43,26,47,32,21],answer:[4,43],verifi:[17,37,4],config:[1,25,5,6,7,8,31,32,15,16,17,22,19,21,23,3,26,28,29,9,12,34,18,30,38,41,42,43,46,48,49],updat:[37,2,1,43,12,45],showrender:42,lai:[46,47],diagdown:41,after:[0,37,24,35,14,1,3,42,15,16,17,34,19,26,44,30,47,32,43],befor:[0,2,4,41,7,5,14,15,16,22,19,24,26,29,30,12,33,34,35,27,37,39,40,1,43,44,46,47],wrong:27,startuphook:[16,12],parallel:[41,1],averag:47,alignedat:41,attempt:[0,27,42],third:[1,27],leftarrow:41,receiv:[35,26,16,44,34,33],greasekit:3,maintain:[16,26,19,4,44],environ:[41,4,5,17,22,32],enter:[41,47,27,43],textnod:10,order:[35,23,37,17,39,14,1,15,5,6,19,26,46,38,12,33,47],oper:[0,5,6,8,14,15,16,17,18,20,22,23,38,29,30,34,35,36,37,26,39,1,42,43,46,48],parentnod:3,over:[10,0,30,42,43,41,17,19,29,47],fall:[6,1,37,17],becaus:[16,27,37,35,41,3,15,5,17,40,26,30,47,32,43,1],boxtim:41,textrm:41,appar:[46,1],afil:26,flexibl:[1,40],vari:46,smallint:41,fit:[16,42],fix:37,preferredfont:30,better:[17,32,42],boxminu:41,complex:[46,40],fade:6,persist:4,comprehens:39,easier:[35,27,37,1,41,33],moveleft:41,them:[10,0,12,37,1,17,14,41,27,5,6,22,26,16,47,32,35,49],thei:[0,1,3,4,5,6,8,32,13,14,16,17,18,19,22,23,25,26,29,30,12,34,35,27,37,38,39,40,41,42,43,44,47,48,49],precapprox:41,safe:[10,3,43],"break":[41,44,1,27],mtext:[41,17],wedg:41,widetild:41,choic:[46,12,32],dbinom:41,leftharpoondown:41,timeout:[0,24],each:[16,12,37,24,35,1,25,43,5,17,44,47,32],debug:15,side:[15,22,19,7],mean:[16,23,2,35,13,41,3,43,5,26,19,44,20,38,32],leqq:41,createel:3,resum:[14,1],leqalignno:41,mathopen:41,looparrowleft:41,goe:[41,44,1],iint:41,newli:[10,16,33],content:[10,47,27,2,39,25,1,3,43,5,17,40,19,7,46,31,12,33,9],reader:20,forth:36,impract:37,multilin:41,situat:32,free:[45,4],standard:[41,39,49,16,17,20,46,47,32],lneq:41,angl:41,moment:[17,37],unabl:6,pulicis:35,isa:33,subtl:43,onto:[39,17,1,12,43],mathbb:41,rang:47,mathbf:41,render:[27,25,42,5,19,20,46,47,32,48,28],yourcolleg:37,restrict:[41,37],hook:[16,0,24,35],instruct:[2,3,17,40,7,9],alreadi:[0,24,44,41,3,4,15,16,26,7,9,43,33,1],primari:46,tooltop:30,top:[36,37,41,17,46,32],underlin:41,master:44,too:[5,17,3],similarli:[0,12],john:26,listen:[16,35,12,24],thickapprox:41,namespac:[17,32,3,24,43],tool:[1,37],tagind:22,gtrless:41,somewhat:44,technic:39,past:[16,20,44,35],filesmatch:37,provid:[10,0,12,24,2,35,14,41,40,15,16,26,27,43,44,20,47,32,33,1],eqalignno:41,tree:40,iota:41,project:[39,4],matter:[16,28],minut:37,mathtt:41,ldotp:41,modern:[20,6,32,46,11],mind:[41,2],manner:46,increment:14,seem:[26,27],rightrightarrow:41,ldot:41,ngeqq:41,latter:[16,40,47,32],curvearrowleft:41,though:[24,3,41,44,40,19,47],object:[0,25,6,10,11,32,13,14,15,16,18,19,21,24,26,29,31,12,33,34,35,36,30,39,40,49,42,43,44,45,47,1],regular:[5,19],letter:[17,37],grave:41,don:[27,26,1,3,43,16,6,46,12],dom:[10,45,1,43,16,44,34,19,12,21],doe:[41,12,24,45,27,3,16,26,18,48,20,46,31,32,21,47],bracket:[40,19],tfrac:41,unchang:[48,43],sum:[41,24],dot:41,delaystartupuntil:[25,19],random:[17,37],lnapprox:41,syntax:[41,33],mediawiki:2,isopera:12,shownam:26,asynchon:43,involv:[17,32,4,44],consolid:20,layout:45,firstnam:26,mathchoic:41,ismsi:[12,25],menu:[27,30,25,42,18,19,29,7,46,9,45,47],explain:[17,32,44],configur:[25,5,6,7,8,31,11,12,16,17,22,19,20,21,23,3,26,28,29,30,9,32,34,18,27,37,38,40,41,46,47,48],apach:37,configut:40,theme:[2,7],rich:20,folder:[30,17,37],infti:[41,47],mho:41,report:[27,19,4],circeq:41,subseteq:41,fadeouttim:6,bar:[41,33,24],patch:37,reload:42,replacechild:3,neq:41,respond:[35,19,4],dashrightarrow:41,scriptscriptstyl:41,precneqq:41,result:[27,30,24,26,45,1,43,41,17,46,31,12,21,47],respons:[17,31,32,24,35],fail:[0,32,46,34,26],themselv:[40,12,36,25],best:[0,47,32,1,46],awar:[41,0,1,27],starup:19,varinjlim:41,wikipedia:[39,3],circledcirc:41,gneqq:41,approach:[26,47,32,2,43],attribut:[10,49,41,38,40,47],never:[37,3],extend:[20,47],synchon:16,extens:[0,25,41,6,32,16,17,22,19,23,3,38,28,29,12,34,5,36,39,49,42,43,1],preprocessor:[41,23,38,27,25,43,5,17,12,36,19,47,32,28],intop:41,cot:41,cow:33,howev:[37,49,3,4,43,41,26,19,46,47,32,33,1],against:35,browser:[25,41,6,11,32,17,18,19,20,45,3,27,28,30,12,5,36,37,39,42,44,46,47,48],com:37,varpsi:41,pre:[5,6,27,37],foral:41,foobar:33,sai:[14,3,24],innerhtml:[3,43],height:[41,42],wider:4,assum:[17,9,43,7],speak:[13,47],chrome:[30,12,3,46],three:[27,37,24,26,40,1,6,34,44,47],been:[0,37,24,35,14,1,3,4,15,5,17,46,34,28,26,16,44,32,43],trigger:[46,19,29],interest:[16,35,39,4,44],basic:11,tini:41,quickli:[20,46,4],underrightarrow:41,regul:1,xxx:41,ani:[0,3,4,5,6,8,32,14,15,16,17,18,19,45,22,23,24,26,29,30,12,33,35,27,37,38,41,42,43,44,46,48,1],emploi:[39,46],hskip:41,tanh:41,servic:[17,32,37],showcontext:42,diamondsuit:41,dashboard:9,suffici:[41,22,48],succeq:41,canb:22,lightli:46,nexist:41,need:[0,2,3,4,5,6,7,9,12,14,15,16,17,18,19,20,21,22,24,25,26,30,31,32,33,34,41,27,37,39,45,49,43,44,47,1],cong:41,disappear:[5,38,23],amout:15,incorrectli:37,perform:[35,36,24,26,39,14,1,25,4,43,16,6,12,34,19,44,32,45],suggest:[6,4],make:[0,4,41,6,32,13,14,16,17,19,20,23,38,12,33,5,27,37,49,42,43,44,46,47,1],drawback:46,split:41,lrcorner:41,unsafewindow:3,complet:[0,37,24,35,39,14,1,43,16,17,34,26,44,46,12,45],longmapsto:41,hand:[36,15,22,19,47,27,28],fairli:40,rais:41,mkern:41,ignorepast:35,unlhd:41,techniqu:3,redefin:[6,34],kept:16,thu:[24,1,16,26,32,45],inherit:[13,33,31,21,45],client:30,thi:[0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,17,22,19,21,23,24,35,25,26,27,28,29,30,31,32,33,34,18,36,37,38,40,41,42,43,44,45,46,47,48,49],idotsint:41,programm:33,everyth:[41,1,12],settimeout:[26,24],left:[36,27,25,15,41,44,22,19,7,9,32],processclass:5,identifi:[10,17,47,32,35],just:[35,27,24,2,26,49,41,17,19,7,20,47,32,1],yen:41,mathbin:41,coprod:41,yet:[27,14,1,43,16,44,46],languag:[39,17,47,46,44],noscript:5,onload:[25,36,3,19,26],errorset:19,ell:41,had:[16,17],myconfig:[16,26],els:[26,3,43],save:[9,49,7],hat:41,jsmath:[11,47,28],"3px":49,applic:[20,17,25],loadtimeout:0,quirk:46,preserv:26,negativethinmathspac:46,background:[41,49],sqsubset:41,specif:[0,36,2,24,35,39,14,1,43,5,26,34,19,47,12,45],arbitrari:41,zoom:[27,19,29],leftrightarrow:41,underli:46,www:[17,32,3,37,42],right:[27,37,39,14,1,3,15,41,18,19,7,30,47,32,22],old:16,simbl:3,deal:46,autobold:[41,32],surd:41,percentag:[18,30,19],donald:39,successfulli:[0,26],interc:41,dddot:41,bottom:7,subclass:[35,36,21,34,45,31,33],circ:41,exectur:35,overcom:[44,46],condit:[0,25],getjaxfor:[16,12,21],core:[32,1,25,41,19,47,12],plu:[35,25],bold:[41,40,32,22],mathrel:41,colleg:37,repositori:37,post:[35,30,25,4,15,16,44,34],"super":33,llless:41,obj:10,nwarrow:41,slightli:[41,7],surround:[18,30],unfortun:37,current_theme_templ:2,joomla:2,span:[23,5,38,40,19,47,28],downharpoonright:41,produc:[35,30,24,17,45,41,42,43,16,6,18,19,26,20,46,47,32,21,22],encod:41,contectu:46,rightsquigarrow:41,down:[9,19],shortparallel:41,wrap:33,often:[17,49,47],git:[17,37],wai:[16,23,37,24,2,35,1,3,15,5,17,34,19,26,38,46,31,32,21,47,43],checkmark:41,transform:47,ngtr:41,avail:[0,23,37,17,45,1,27,42,46,5,6,18,19,16,20,30,38,32,33,47],width:[41,46,22,27,42],reli:[0,1,3,43,26,18,46,32],wordpress:[2,7],editor:7,rightthreetim:41,head:[2,3,43,17,7,46,9,32],form:[27,30,39,22,19,47],offer:4,forc:[32,30],epsilon:41,hear:[16,35],downdownarrow:41,"true":[35,36,30,24,41,25,42,5,12,18,19,8,32,33],vcenter:41,reset:[42,24],absens:2,displayalign:19,intern:[35,27,0,39,14,1,41,19,46,31,12,21,47],tell:[17,46,3,37,43],moveright:41,nnn:37,featur:[27,37,4,16,26,29,46,33],rfloor:41,sale:18,exist:[41,33,37,24],ddot:41,backsim:41,triangleq:41,check:[0,37,35,41,26,33,17],when:[0,25,5,6,7,8,12,13,14,15,16,17,22,19,20,21,23,24,26,27,28,29,46,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,18,47,48,1],abovewithdelim:41,role:47,test:[10,11,27,37,44,3,43,16,17,9,12,33],tie:[25,24],smallsmil:41,node:10,intend:33,consit:41,munderov:47,gvertneqq:41,consid:[0,32,41,4,5,47,12,45,1],omega:41,outdat:4,faster:[46,32],furthermor:[1,19],tex2jax_ignor:5,ignor:[5,35],time:[0,3,4,41,6,10,32,15,16,17,34,19,24,26,29,12,35,37,1,43,46,47],push:[24,39,14,1,25,43,26,12],mathrm:41,doteq:41,emulateie7:46,skip:5,global:[13,46,36,24,43],skin:2,displayind:19,millisecond:[0,30,24,42,15,6,29,12],decid:[32,42],depend:[24,43,26,7,46,32,48],newenviron:41,readabl:39,nearrow:41,varpi:41,certainli:[32,37],vee:41,decis:46,leftarrowtail:41,succnsim:41,sourc:[11,27,37,1,3,42,16,18,20,30,47,12,45],string:[0,24,35,40,41,15,5,22,19,16,12,45,49],curlyve:41,word:[5,47],centerdot:41,dim:41,foo:[33,24],administr:[2,7],level:[17,32,37,36],did:26,item:[30,40,42,41,26,18],cooki:[10,25],div:[10,41,47,28,43],prevent:[41,23,30,38,42,5,17,22,19],slower:46,compens:18,sign:[41,43,5,17,47,32],cost:[17,32,33],pmb:41,rightarrowtail:41,histori:[16,35,25,39],xandi:33,dotsi:41,dotsm:41,appear:[41,36,37,26,42,15,16,17,19,43,7,32,45],dotso:41,repli:16,dotsc:41,dotsb:41,current:[0,37,2,35,45,46,7,30,9,33],backepsilon:41,ampersand:41,inlinemath:[5,17,32,43],defici:27,amalg:41,mathsiz:41,gener:[26,48,25,6,47,12,45],mfrac:[17,47],modif:1,address:[17,9,37,2,7],along:[39,1,15,16,31,21],wait:[0,37,24,35,39,14,1,3,43,16,26,25,19,44,12],box:[41,0,6],html_head:2,bracevert:41,shift:19,bot:41,queue:[35,36,24,44,13,14,1,25,43,26,39,12],overriden:12,digamma:41,varlimsup:41,macintosh:12,semant:33,succsim:41,extra:[16,41,47,19],circumv:37,modul:[0,9,36],prefer:[30,17,37,48,42],iepro7:3,veebar:41,visibl:[5,38,1,23,43],marker:41,myid:49,arrowvert:41,memori:[44,45],bigr:41,visit:17,todai:39,subvers:[17,37],stylesheet:[0,36,24,35,14,25,43,44,19,7,46],handler:[0,36,39,3,25,43,44,47],current_skin:2,bigl:41,bigm:41,eqcirc:41,checkout:37,bigg:41,inputjax:[36,13,45,25,34,31,33],capit:13,sitaut:43,bigtriangleup:41,enhanc:47,visual:20,prototyp:33,hphantom:41,easiest:[37,24,26,16,17,32],graphic:37,prepar:[1,32],cap:41,uniqu:49,pmatrix:41,whatev:[41,2,21,1,43,16,33],cal:41,purpos:[26,47,46],getjaxbytyp:12,downharpoonleft:41,subseteqq:41,varprojlim:41,backslash:[41,22,19],topic:[13,11,32],sharp:41,occur:[0,12,24,35,14,1,27,3,42,15,16,26,34,19,43,44,32],eqsim:41,nuber:15,pink:41,alwai:[41,26,1,24],multipl:[41,1],trianglelefteq:41,write:[20,17,1,43,35],fourth:1,mathsf:41,tild:41,xhtml:[17,32,27],map:47,max:41,clone:37,spot:41,mac:[12,18,30,19],udpat:37,mai:[0,2,3,4,41,6,32,13,16,17,18,19,21,35,26,30,12,33,34,5,27,37,45,1,43,44,46,47],data:[10,0,36,37,24,33,16,26,34,45,30,31,12,21],goal:20,vartheta:41,preceq:41,uparrow:41,geramond:41,inform:[0,30,2,35,39,15,16,26,18,19,47,32],"switch":[47,28],looparrowright:41,combin:0,gamma:41,lnsim:41,approx:41,showmathmath:18,lsh:41,tex2math:[17,28],still:[35,27,24,39,1,16,17,19,29,46],pointer:33,ttf:37,dynam:[0,36,11,1,3,43,17,19,44,20,47,32],entiti:[41,27],amssymbol:[41,17,32,3],group:[0,27,4],monitor:4,polici:37,bigstar:41,platform:[20,11,2,17],window:[36,24,6,3,42,15,26,43,12],"05em":41,main:[47,36,37,1,2,13,33,49,42,41,17,12,19,7,31,32,21,9],mathexampl:43,non:[10,0,47,17,14],msam10:17,myinputjax:34,initi:[0,36,44,41,25,42,5,17,34,19,16,47,12,45,1],safari:[46,12,3],half:26,now:[39,17,32,37,46],discuss:[10,37,3,4],nor:[6,40],term:15,name:[0,25,41,6,10,32,16,17,22,19,21,23,24,35,3,26,30,31,12,33,34,5,27,37,38,40,49,45,46],opera:[46,12,3,48],boxdot:41,separ:[27,37,49,15,16,17,18,19,32,1],messagestyl:[6,19],sideset:41,januari:11,confid:20,varpropto:41,vec:41,compil:26,domain:37,replac:[0,12,27,3,43,17,22,7,9,32,33,47],individu:[32,45,43],continu:[16,0,41,1,44],happen:[27,37,14,1,41,44,47],shown:[41,40,19,42,43],accomplish:[37,3,46],space:[43,41,19,46,8,32,47],internet:[0,3,42,15,41,26,19,46,47,32],formula:[43,19,29,20,46,47,32],correct:[26,3,37],simeq:41,earlier:1,ntriangleleft:41,ajax:[0,36,13,1,25,16,26,34,12],mime:[32,45,27,17,34,31,12,21],underleftarrow:41,org:[17,32,3,42],ord:41,care:[41,32,3],ntrianglelefteq:41,couldn:26,x00b1:17,synchron:[0,24,35,39,14,1,3,43,26,25,11,44,12],mscarri:27,thing:[41,17,40,43],place:[0,30,17,33,41,4,43,16,6,22,19,7,9,32,35,1],mathop:41,unwis:46,ture:18,think:[41,19,43],frequent:[5,16],first:[16,27,1,24,35,41,3,44,43,5,17,40,19,26,7,31,32,21,47],origin:[33,35,37,14,41,3,43,16,17,45,31,32,21],lfloor:41,suspend:[16,14,1,35],directli:[1,3,43,41,26,47],onc:[0,37,24,35,1,25,43,41,17,28],arrai:[25,41,6,8,32,14,16,17,22,21,23,24,35,3,26,28,46,31,12,34,5,30,38,40,18,47,48],yourself:[41,14,3,19,26],submit:4,open:[11,27,37,42,17,7,20,9],predefin:19,size:[41,49,18,30,43],given:[10,0,33,24,2,35,14,41,40,15,16,26,34,1,19,45,47,12,21,49],ifmodul:37,evail:1,leftrightharpoon:41,circl:41,whith:27,white:49,conveni:[17,32,33,19],hub:[25,5,6,8,32,13,15,16,18,19,21,22,23,3,26,29,12,34,36,30,38,45,1,42,43,47,48],especi:47,programat:47,copi:[12,37,3,4,17,27,20,32],specifi:[41,6,8,18,10,14,16,17,40,19,22,24,35,26,29,32,5,30,49,42,44,46,47,48,1],lhd:41,enclos:[47,49,30,19],quad:41,than:[0,41,6,8,32,14,16,17,34,19,20,21,24,35,30,31,12,33,5,27,37,39,49,43,44,46,47,1],serv:[17,32],wide:[20,47,37],underbrac:41,were:[16,45,43],posit:[14,30],seri:[1,40],preccurlyeq:41,delic:18,lnot:41,doublecup:41,nleftrightarrow:41,argument:[35,24,1,26,32,33],dash:[49,30],properli:[0,27,37,6,45,1,3,43,26,12,33],engin:[20,11],squar:[41,40],npreceq:41,note:[0,3,41,6,32,17,40,19,45,22,35,26,30,12,5,37,49,42,43,46,47,48,1],x2260:17,take:[0,24,2,6,1,25,4,43,41,17,22,26,44,32],noth:[26,24],channel:[16,39],updownarrow:41,begin:[16,41,25,43,5,22,46,47,32,1],sure:[35,37,41,3,4,43,5,17,46,32,1],windowset:42,normal:[41,24,49,3,5,19,47],track:[47,4],beta:[41,17],pair:[10,0,12,24,40,49,5,22,16,31,32,21],fileurl:0,beth:41,latex:[11,39,41,5,17,19,20,47,32],textarea:5,later:[35,27,30,24,14,1,41,26,12],drive:37,typeset:[0,25,5,15,16,18,19,20,45,23,3,26,29,12,36,30,38,39,1,42,43,44,47],badg:4,subarrai:41,sigma:41,mathfrak:41,showmathmenu:30,show:[37,42,6,4,43,41,26,40,19,9,32,17],autoreset:24,approxeq:41,unprocess:[12,45,43],permiss:[17,37],hack:46,corner:[36,19,15],xml:[20,39],insruct:2,onli:[0,2,3,4,41,6,32,17,40,19,20,45,35,26,30,12,5,27,37,39,49,43],explicitli:[41,26,5,17,32,33],activ:[27,24,39,4,43,44,46,47],state:1,inlinedelimit:41,otim:41,black:41,geq:41,mypic:[5,38,23,40],nearli:[41,32],variou:[35,30,2,13,49,16,6,18,31,32,47],get:[10,11,27,37,24,35,1,3,15,41,17,18,19,26,46,30,43,33],cannot:41,ncong:41,downarrow:41,requir:[0,24,41,3,16,26,34,20,47,12,21,1],prime:41,lceil:41,mathpunct:41,enspac:41,intermitt:[36,15],shortmid:41,retypeset:43,where:[0,2,25,4,41,6,9,10,32,15,16,17,22,21,24,26,30,31,12,36,37,45,49,43,44,47],wiki:[17,47,3],lozeng:41,obejct:14,ismac:[12,25],concern:[47,12],detect:24,longleftrightarrow:41,enumer:41,label:[41,32,42],enough:[1,40],between:[41,24,26,1,42,16,17,46,47,12,45],maltes:41,"import":[13,0,1,44,16],across:[39,46],parent:[10,33],vdot:41,screen:[0,1,43,20,15,21],negmedspac:41,come:[27,37,1,3,26,46,47,32],leftleftarrow:41,img:[23,49,3,5,38,40],timout:0,pertain:17,audienc:46,overbrac:41,mani:[41,32,44,49,5,26,12,1],color:[41,49,40,19],operatornam:41,period:[0,36,37],colon:[41,49],cancel:24,pod:41,bigcirc:41,msrow:27,needlessli:26,skew:41,mark:[41,27,49,5,17,28,47,32],succapprox:41,upharpoonleft:41,arcsin:41,resolut:20,mathplay:[46,32,3,19,42],breve:41,texfont:6,blacktriangl:41,those:[35,27,37,1,24,26,14,41,40,43,16,6,34,19,45,20,47,31,12,21,49],manu:42,"case":[41,37,24,26,33,49,3,43,16,17,40,19,45,30,47,32,21,1],kappa:41,oldstyl:41,addtext:10,invok:46,margin:22,tbinom:41,advantag:[46,1,2],barwedg:41,leadsto:41,mlongdiv:27,worri:[16,47],destin:12,updatemath:43,bigwedg:41,develop:[39,27,37,4],author:[15,34,19,29,20,47],media:[49,37],postjax:[47,19],same:[16,23,37,35,41,44,5,38,7,32,21,1],html:[2,25,41,6,8,10,11,32,13,16,17,18,19,21,23,3,38,36,30,9,12,5,27,37,39,40,49,42,43,44,46,47,48],pad:[10,49],knuth:39,mathvari:47,document:[0,23,39,11,13,41,3,43,5,17,12,27,19,20,46,38,32,21,47,28],exhaust:32,finish:[39,44,1,3,43],vvdash:41,nest:[36,27],availablefont:[6,32,30],longleftarrow:41,capabl:[13,20,32,46],formaterror:12,improv:[46,19,4],extern:[0,36,26,1,16,44,12],submenu:[19,42,7],appropri:[41,16,17,28,31,47],macro:[41,17,32,22,19],markup:[41,0,47,27,39],leftharpoonup:41,overwithdelim:41,without:[0,27,30,41,16,26,18,47],model:[11,36,37,13,25,41,46,47,33],altertn:46,bigotim:41,stixfont:6,mml2jax:[27,38,3,17,19,47,32],loaderror:0,rest:[0,27,1,43,17,20,47],speed:[46,47,32],versu:1,mathzoom:[49,32,29],nleqq:41,except:[17,32,44],littl:[0,35],blog:[17,47],earli:32,hover:[42,19,29],around:[41,32],read:[16,17,27,37,40],outermost:40,boldsymbol:[41,32],messsag:15,getjaxbyinputtyp:12,moo:33,world:[20,26],lasterror:12,mod:41,sum_:47,cdot:41,integ:12,server:[37,2,3,17,7,30,9,32],either:[0,37,2,35,13,40,49,3,16,17,22,29,46,12,48],output:[3,41,8,11,32,16,17,18,19,21,27,12,33,34,36,30,39,45,49,42,43,46,47,48],manag:[10,36,37,2,26,39,25,15,17,46,47],lesssim:41,searrow:41,sqcup:41,constitut:13,alttext:38,definit:[0,30,49,42,18,29,20],shoveright:41,inputid:45,dashleftarrow:41,mathcal:41,variuou:16,complic:[40,27,48,46],refer:[35,37,17,11,3,43,16,6,34,26,44,12,33,45],power:[1,4],inspect:12,broken:47,thinspac:41,fulli:[1,27],regexp:5,"throw":[34,3],trianglerighteq:41,assocait:43,underwai:1,ddddot:41,act:[41,26,39,1,16,17,22,19,47,32],industri:39,processor:[47,27,30,1,39,49,25,42,41,17,18,46,8,32,48,22],hookrightarrow:41,nobreakspac:41,routin:[10,0,44,26,34,31,12,21],effici:[32,33,43],elementari:27,lessdot:41,triangledown:41,bbb:41,rightharpoondown:41,mathbackground:41,your:[0,2,3,4,5,6,7,8,11,32,17,22,19,20,23,26,28,29,30,9,12,18,27,37,38,39,40,41,42,43,44,46,48,1],sqsupseteq:41,log:[41,17,37,15],area:[22,15],fontwarn:[6,32,19],lor:41,strict:[46,37],interfac:[37,2,17,7,20,9],lot:[16,37],lambda:41,buggi:41,categor:32,longer:[35,37,15],pull:37,mathml:[11,27,39,45,3,47,41,17,18,48,20,46,8,32,21,31],bullet:41,possibl:[0,27,37,24,6,49,15,17,19,26,46,47,32,33,1],"default":[0,25,41,6,8,32,15,17,22,19,21,23,24,38,29,30,31,12,34,5,37,42,18,47,48],processescap:[5,32],buildrel:41,sepecifi:37,notag:41,embed:27,expect:[41,46,1,32,19],creat:[0,25,4,10,15,16,34,21,24,26,31,33,35,36,37,39,45,1,42,44,47,49],certain:[16,35,44],leftrightsquigarrow:41,risingdotseq:41,varliminf:41,file:[0,2,25,41,6,7,9,32,14,15,16,17,34,19,21,24,3,26,28,31,12,35,37,39,40,49,44,45,46,47,48,1],outputjax:[36,13,45,25,34,21],fill:[46,48],again:[0,32,45,43,41,31,12,21],iiiint:41,googl:4,pmod:41,reduct:46,valid:[26,46],you:[2,3,4,5,6,7,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,30,9,32,33,34,41,27,37,38,40,49,42,43,44,46,47,48,1],trash:45,sequenc:[11,37,14,41,25,16,44],symbol:[41,17],dashv:41,briefli:17,menuset:[19,29],reduc:41,mathcolor:41,lbrace:41,directori:[0,37,2,44,39,45,25,16,17,34,19,7,30,31,32,21,9],descript:[23,38,3,5,6,36,19],lbrack:41,scroll:9,calle:33,potenti:1,escap:[32,22],dst:12,negthickspac:41,represent:47,all:[0,2,3,41,6,11,32,15,16,17,34,19,20,23,24,35,26,27,12,33,5,36,37,38,39,1,44,46,47],consider:[17,32],illustr:43,dollar:[5,17,41,32,43],abil:[46,47,37],follow:[16,37,24,26,13,40,41,25,43,5,17,34,30,47,32,33,49],alt:[3,19],disk:[32,37],children:27,scr:41,articl:39,init:33,program:[36,2,44,13,45,1,25,17,20,47,33],smile:41,cgi:0,liter:5,multlin:[41,22],vert:41,far:[0,35,15],varrho:41,prooblem:41,"1px":[10,41,49],verb:41,mechan:[35,24,14,1,25,16,44,33],loadcomplet:[0,12,34],veri:7,strang:27,list:[25,41,6,7,8,31,32,16,22,19,21,23,24,38,29,9,12,5,30,45,1,42,43,18,47,48],emul:46,adjust:[30,17,18,3,43],displaylin:41,small:[41,47,22,15],preceed:[5,19],getalljax:[12,43],lll:41,tex:[3,41,6,8,11,32,16,17,22,19,20,23,36,28,30,31,12,34,5,27,37,39,1,43,46,47],zero:14,design:[20,9,27,3,4],pass:[0,12,24,35,14,1,25,42,16,26,47,32,33],overlin:41,further:[14,47,1],what:[11,23,37,24,38,41,27,4,43,5,6,12,18,19,29,20,30,47,32,42],sub:36,section:[3,41,6,8,32,17,18,19,22,23,26,28,29,9,12,5,27,30,38,42,46,48],ast:41,abl:[37,24,17,3,43,16,6,19,7,20,30,9,32],delet:30,version:[11,36,37,25,3,4,43,17,34,29,45,31,12,21],sup:41,method:[10,0,12,33,24,35,14,1,3,15,16,26,34,43,44,31,32,21,45],hasn:[0,34,15],full:[0,13,5,26,19,20],exectu:24,variat:32,geqslant:41,modular:[20,27],ggg:41,ineffici:[33,19],modifi:[11,43,16,34,12,21],valu:[0,25,5,6,8,10,32,14,16,18,19,22,23,24,38,29,12,33,27,30,26,40,49,42,43,47,48,1],search:[20,11,12,4],sender:16,prior:19,amount:[6,22,24],action:[0,3,41,32,14,15,16,34,21,24,25,26,29,31,12,35,36,39,1,43,44,47],mathjax_wikipedia:3,magnitud:46,llap:41,via:[0,27,37,24,2,17,45,1,3,15,16,6,29,46,30,47,32,33],shorthand:43,filenam:26,href:40,inappropri:16,emptyset:41,famili:[41,0,49],decrement:14,select:[27,37,42,18,46,12],proceed:[1,40],x41:41,distinct:[13,32],mathja:[9,7],regist:[0,35,39,25,16,44,34,31,12,21,47],two:[41,44,40,49,16,17,22,19,46,32,1],asn:47,taken:[16,41,1,46,43],imath:41,basi:[46,48],more:[6,32,14,17,40,19,20,24,26,30,31,12,33,35,37,39,49,18,43,44,46,47,48,1],flat:41,diamond:41,desir:[33,37,3],henc:37,ital:[0,19],aleph:41,particular:[10,0,37,24,35,39,14,49,41,17,26,44,46,47,12,33],known:1,upsilon:41,mathml3:27,cach:16,showmathmenumsi:18,none:[35,23,30,24,38,5,26,19,47],eta:41,mmlorhtml:[46,48,32,3,19],det:41,dev:4,widehat:41,remain:39,paragraph:[41,6,47,43],caveat:37,def:[41,33],deg:41,scan:12,myspan:40,registr:34,share:[17,32,37,4],templat:[9,2,7],succneqq:41,minimum:12,explor:[0,3,42,15,41,26,19,46,47,32],phrase:17,mathinput:43,huge:41,cours:[1,27],newlin:[41,15],awkward:33,secur:[37,3],rather:[0,41,6,8,14,16,17,34,19,20,21,24,31,32,33,5,27,37,49,43,44,46,47,1],anoth:[35,37,43,14,1,15,16,44,31,32,47],comfort:37,csc:41,snippet:[10,11,23,38,4,5,6,40,19,12],ddagger:41,stix:[30,39,41,6,47,32],simpl:[46,40,19],css:[0,3,41,6,8,11,32,17,18,19,45,27,29,30,12,36,37,39,21,49,42,43,46,47,48],isn:16,resourc:[17,32],referenc:6,variant:39,reflect:[25,43],vdash:41,mstack:27,impliedbi:41,associ:[47,37,24,45,26,18,30,31,12,21,34],curlywedg:41,mytim:26,github:37,ambigu:13,caus:[0,36,37,35,45,41,27,42,15,5,17,22,19,26,16,47,12,43,1],callback:[0,36,24,35,13,14,1,25,43,16,26,39,44,31,12,21,45],firefox3:30,merror:49,unrhd:41,help:[37,42,17,4,46,32],soon:[32,3,19,43],trade:46,through:[35,27,37,41,42,16,44,46,47,32,33,1],hierarchi:[32,37],paramet:[10,0,23,33,24,35,14,15,17,12,22,19,26,38,31,32,21,34,43,45],style:[10,0,30,11,39,40,41,25,42,15,5,6,18,19,29,49,47,12,45,17],arial:41,x221a:27,processupdatetim:12,x221e:47,late:[39,3],isreadi:[36,25],pend:14,amsmathaddit:1,processenviron:5,might:[0,27,37,26,1,4,16,17,22,47,32],alter:[5,43],good:[1,3,4],"return":[10,0,27,33,24,35,14,1,15,16,26,34,43,44,31,12,21,45],textstyl:41,hslash:41,getelementbyid:43,rlap:41,mathscr:41,noerror:[41,17,32,3],bigcup:41,easili:[20,17,47],iff:41,x2212:[17,47],found:[0,31,19,4,26],unicod:[41,6,27],x2211:47,button:37,subsystem:25,originaltext:45,weight:[40,33],hard:[32,37,4],realli:26,nless:41,connect:[26,47],beyond:4,orient:[13,33,36,25],nleq:41,shortcom:44,skiptag:5,asynchorn:[1,43],print:[20,49,37],occurr:44,msie:[12,18,48],foreground:49,safari3:30,advanc:[13,11,32,20],offsetx:30,mml:[48,47,36,45],reason:[0,12,26,1,27,3,42,15,41,17,34,46,32],base:[36,37,2,44,13,3,25,46,6,34,45,20,30,33],typeet:43,put:[0,37,44,3,41,17,32],mathr:41,offseti:30,ispc:[12,25],succnapprox:41,drupal:2,msbm10:17,showprocessingmessag:[32,19],perhap:26,bumpeq:41,elementjax:[13,45,36,25,34],stixgener:41,getelementsbytagnam:3,assign:[5,26],major:[20,46,32,3],dont:47,boxplu:41,feel:4,exchang:39,lastnam:26,number:[0,36,37,24,6,40,1,15,17,22,19,26,45,31,12,21,34],fadeoutstep:6,done:[14,47,32,1],construct:[47,1],blank:[35,24,43],stabl:37,miss:[41,24],differ:[41,12,37,24,26,1,43,16,17,44,46,47,32,33],script:[0,12,37,2,47,25,1,3,43,5,17,34,19,7,16,31,32,21,9,45],interact:[20,17,47,45],smoother:6,least:[46,47,12],statement:[1,24],illeg:40,mbox:41,store:[10,35,36,30,24,45,1,43,26,31,12,21,47],option:[41,6,7,8,32,17,40,19,22,23,38,28,29,12,33,34,5,30,42,18,47,48],nleftarrow:41,triangleleft:41,ntrianglerighteq:41,selector:[49,19,15],tex2jax_process:5,part:[16,27,37,24,44,41,3,5,17,22,7,20,47,33,1],pars:41,binom:41,cosh:41,kind:47,whenev:[35,27,37],remot:37,remov:[35,43,45,15,5,19,47,12,21],dtd:[17,32],bridg:45,arrang:24,ffff88:49,comput:[30,12,37],nleqslant:41,packag:[39,37,28],expir:10,"null":[10,0,23,30,24,35,33,3,15,5,6,36,19,43,38,31,12,21,34,45],built:[11,3,46],equival:[10,24,1,43,26,40],lim:41,self:27,also:[3,4,41,10,13,15,16,17,18,19,45,24,26,30,32,33,5,27,37,39,42,43,44,47],brack:41,brace:41,index:[17,37,2],addel:10,react:35,most:[36,37,2,24,39,3,49,25,16,34,46,32,33],plan:17,rho:41,alpha:41,rhd:41,vardelta:41,clear:[35,30,24,25,15,16],tpl:2,exp:41,usual:[24,26,1,41,6,34,19,47],leftroot:41,nshortparallel:41,carefulli:[40,43],finv:41,particularli:[46,37],rightleftarrow:41,font:[0,37,6,39,40,49,42,15,41,17,18,19,43,44,20,30,47,32,22],find:[4,43,6,28,7,46,47,12],preremoveclass:19,execut:[0,24,14,1,25,16,26,47],pretti:37,solut:[17,47,37,4],delayedx:24,"public":37,queu:[14,1,24,35],factor:[18,30,19],tagsid:[32,22],precnsim:41,express:[5,16,1,19,35],strut:41,nativ:[27,13,3,20,46,47,32,48],greasemonkei:[32,3],notransl:34,restart:[5,14,1],ie8:46,ie7:46,acut:41,vmatrix:41,common:[32,2,39,40,27,41,6,34,12],set:[0,1,25,5,6,8,10,12,15,16,17,18,19,45,22,23,24,3,26,28,29,30,32,33,35,36,37,38,39,40,41,42,43,44,47,48,49],overrightarrow:41,startup:[11,36,3,1,25,43,16,34,19,12],see:[0,4,41,6,7,9,32,14,16,17,18,19,23,24,35,26,28,29,30,31,12,5,27,37,38,39,49,42,43,44,46,47,1],sec:41,arg:41,disadvantag:46,langl:41,someth:[37,4,43,5,17,19],particip:4,won:[1,37],subscript:41,experi:[37,19],attibut:49,numer:[12,27],complement:41,javascript:[0,2,3,6,7,11,13,16,17,22,19,20,45,24,26,29,9,32,33,18,36,30,39,40,49,42,44,46,47,1],mailbox:[16,39],bmatrix:41,distinguish:31,longrightarrow:41,classnam:3,popul:25,closur:[26,24,43],last:[0,32,37,24,14,49,41,12],delimit:[5,17,41,32,47],hyperlink:47,event:[39,3,43,16,44,47],nvdash:41,context:[5,42,19,24],overset:41,hbar:41,whole:[23,44,43,5,38,12],load:[0,2,25,41,11,32,14,15,16,17,34,19,20,21,24,3,26,28,31,12,35,36,37,39,1,43,44,46,47],markdown:47,simpli:[41,23,37,24,38,14,43,5,26,12,34,19,20,31,32,21,28],point:[41,14,17],instanti:33,schedul:26,usemathmlspac:8,header:[37,2,7],suppli:[12,45,24],bigve:41,mistak:40,zeta:41,gneq:41,atopwithdelim:41,empti:[36,30,24,1,25,47],dur:12,strategi:46,invis:37,fire:[25,3,26],imag:[23,37,38,3,5,6,40,20,30],descib:17,coordin:[14,47,1],understand:47,urcorn:41,sqcap:41,blacksquar:41,look:[10,35,12,37,24,2,43,41,4,15,5,17,27,7,30,47,32,49],solid:[10,41,49],pitchfork:41,lvert:41,"while":[10,0,27,37,17,48,41,3,16,6,34,19,44,46,47,32,35,1],blacktriangleleft:41,nprec:41,behavior:19,circlearrowright:41,bookmarklet:32,everyon:16,loop:45,subsect:34,measuredangl:41,readi:[16,36,25,34],jpg:[5,38,23,40],biguplu:41,itself:[35,36,37,1,24,14,41,25,16,12,27,19,45,47,32,33,49],rightarrow:41,xleftarrow:41,redisplai:15,unexpectedli:17,conflict:47,upuparrow:41,optim:46,domin:39,alert:[16,26,1,24],jsmath2jax:[32,28,23],hander:19,temporari:34,user:[41,27,37,24,43,3,4,15,16,6,18,19,29,46,20,30,47,32,42,28],robust:[16,39],typic:[5,41,37],recent:[20,3],lower:[41,36,25,19,15],task:41,entri:[39,14,49],searchabl:20,person:26,textit:41,expens:46,normals:41,scriptsiz:41,fallingdotseq:41,explan:[17,32],rvert:41,obscur:15,mathinn:41,amp:41,regardless:43,cup:41,blacklozeng:41,ffeeee:41,notifi:16,input:[3,41,8,32,16,17,22,19,45,27,28,31,12,33,34,36,39,21,1,43,46,47],unlik:[20,34],subsequ:41,oslash:41,trueli:43,format:[11,27,30,39,40,41,17,18,19,45,20,46,31,32,21,47],big:[41,32,37],moodl:2,tomathml:45,game:41,insert:[23,24,3,5,38,12,34,19,7,9,32,21,47],bit:[18,33],diagup:41,semi:49,varkappa:41,signal:[35,36,24,44,13,25,16,26,34,39,12],altough:26,collect:[26,49,45,1,24],"boolean":12,popular:[17,28,2],swarrow:41,stackrel:41,lastest:4,creation:[31,25],some:[2,41,6,32,13,14,16,17,18,19,20,21,24,26,30,31,12,33,34,27,37,45,1,43,46,47,48],back:[6,37,45],emph:41,sampl:[37,44,49,16,17,19],instal:[11,37,17,46,41,6,7,20,30,9,32],scale:[20,18,30,19],delimt:5,mathemat:[0,3,41,6,7,31,32,16,17,18,19,20,21,22,23,38,28,29,30,9,12,34,5,27,37,39,45,1,42,43,46,47],larg:[41,0],slash:32,prod:41,reproduc:43,sqsubseteq:41,tex2jax:[41,36,3,43,5,17,27,19,47,32],machin:[39,37],garamond:41,previou:[26,35,1,24,15],run:[0,3,5,6,8,32,14,16,17,18,22,23,24,25,38,30,12,35,27,37,26,1,43,44,46,47,48],doteqdot:41,odot:41,step:[6,47,2,17],hookleftarrow:41,impor:37,impos:37,ngeqslant:41,materi:43,rangl:41,succcurlyeq:41,block:[30,17,6,18,19,47,32,34],file3:1,file2:1,file1:1,file4:1,bmod:41,within:[0,12,37,24,6,13,41,27,25,43,5,17,22,28,26,44,47,32,33],prec:41,notat:[20,17,41,47,39],isjax:12,announc:44,triangl:41,question:[17,34,4],"long":[41,1,42],custom:[15,41,17,20,46,32],perp:41,includ:[0,1,2,25,5,6,8,12,13,16,17,22,19,20,23,24,3,26,27,28,29,30,31,32,34,18,36,37,38,40,41,42,43,46,47,48,49],suit:[6,27,17],nativemml:[27,48,42,18,46,47,32,21],overleftrightarrow:41,ulcorn:41,doctyp:[46,27],poster:35,atop:41,loadhook:[0,12,26],serif:[41,0,49],link:[37,2,17,13,6,44,32],translat:[31,34,21,47],delta:41,line:[41,23,37,2,25,3,5,17,27,46,47,32],consist:[41,40,1,27,46],rmoustach:41,qquad:41,divideontim:41,geqq:41,similar:[44,24],enlarg:29,constant:16,doesn:[41,37,24,45,3,16,19,30,33],repres:[10,23,17,49,15,5,6,40,19,20,38,21,47],mathdiv:[10,26,1,43],opera10:30,guarante:[0,1,43,14],constortium:20,phantom:41,bigoplu:41,iiint:41,titl:[17,43],sequenti:[44,1],invalid:[41,40],llcorner:41,toaudibl:45,declar:[27,30,49,42,6,18,29],shoveleft:41,xrightarrow:41,department:37,supseteq:41,delayclear:30,msup:[17,47],slice:24,eval:24,newcommand:41,svn:[17,37],rightharpoonup:41,land:41,mimetyp:[45,31,34,21],svg:47,supseteqq:41,depth:41,hello:26,code:[0,3,4,41,7,10,11,32,14,16,17,18,19,23,24,35,25,26,12,5,36,38,39,40,49,43,44,1],partial:41,edg:37,queri:47,tiddlywiki:2,edu:[37,3],privat:[44,34,37],elsewher:43,send:[16,35],becam:39,sens:47,sent:[16,35,12,39],actiontyp:30,unzip:37,gnsim:41,xxxxxxxx:[17,37],mous:[47,30,42,29],tri:[41,0,37,30],ischrom:12,mathit:41,forefox:[37,3],"try":[33,4,16,17,34,31,21],userscript:3,maction:30,pleas:[17,32,40,4],impli:[41,27],smaller:0,fortun:16,natur:[20,17,41,37,47],varupsilon:41,download:[0,37,6,17,19,47],fullnam:26,hspace:41,click:[30,42,18,19,29,7,37,47],append:10,compat:[39,46],appendchild:[10,3],turn:[10,35,27,24,5,18],compar:32,access:[35,37,2,26,45,1,42,41,17,20,33],mathjax:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],can:[0,1,25,4,5,6,10,12,14,15,16,17,18,19,20,21,24,3,26,27,28,30,31,32,33,34,35,36,37,39,41,43,44,46,47,49],vargamma:41,varsigma:41,leq:41,let:[27,37,3,42,17,40,46,12,48],sinh:41,becom:[27,37,24,1,4,16,33],sinc:[0,12,1,24,35,14,41,27,44,43,16,17,18,19,49,46,47,32,33,22],tex4ht:47,rtime:41,convert:[11,27,24,41,3,5,28,20,47,21],convers:41,larger:47,technolog:[20,4],zscale:19,circledast:41,chang:[18,12,37,2,43,3,42,15,22,30,47,32,45],chanc:[5,16,35],firefox:[32,37,3,46,12,48],rgroup:41,appli:[41,33],iskonqueror:12,lessgtr:41,api:[13,11,20,17],smallmatrix:41,from:[0,2,25,5,11,32,16,17,22,19,21,23,3,26,28,30,31,12,33,34,35,36,37,38,45,41,42,43,46,47,1],zip:[17,37],commun:[16,11,4,17],chi:41,doubl:[22,19,29],upgrad:[6,37,4],varphi:41,next:[41,44,45,43],implic:37,few:[41,17,37,28],msqrt:[17,47],src:[23,2,38,1,3,43,5,17,12,40,7,9,32],doublebarwedg:41,projlim:41,"4ac":17,rare:1,versionatleast:12,alik:3,retriev:10,augment:[33,31,34,21],aperson:26,thin:22,sqsupset:41,control:[41,23,37,17,49,42,46,5,6,12,18,19,29,38,30,8,32,48,22],tau:41,lesseqgtr:41,tar:37,process:[0,3,41,10,11,32,14,15,16,17,34,19,21,23,25,38,28,31,12,5,27,26,45,1,43,46,47,48],dfrac:41,newmath:43,high:[20,46,47],tag:[2,25,41,7,32,16,17,22,19,45,3,38,28,31,12,5,27,37,40,43,47,21],tan:41,prece:26,delai:[0,37,24,35,42,15,16,19,29,30],gcd:41,pure:27,getelementsbytagnamen:3,subdirectori:[37,31,21,45],instead:[41,37,17,14,1,43,16,26,47],class4:33,class2:33,sin:41,sim:41,class1:33,simplesup:33,frac:41,overridden:[30,21,34,45,31,33],mspace:[41,27],anothermethod:33,frak:41,redund:[33,19],liminf:41,essenti:[41,47,33],light:[41,33],correspond:[12,30],element:[25,41,6,10,16,17,40,21,23,35,38,36,31,12,33,5,27,30,45,49,43,44,47,1],issu:[0,27,4,15,17,47,32],unaccept:46,allow:[35,27,37,1,2,26,39,40,41,3,42,15,16,17,18,19,29,20,30,33,49],fallback:[30,37],mjx:10,fastest:46,nonumb:41,move:[30,37],nsucc:41,comma:[41,49,32,3,19],dagger:41,mathjax_tooltip:30,movabl:[9,2],coth:41,varxi:41,therefor:41,pixel:30,multimap:41,crash:19,greater:41,handl:[0,36,1,44,39,41,27,3,16,6,18,12,48,34],innermost:40,dai:10,successor:28,gggtr:41,sourceel:[16,45,21,43],anyth:[16,32,4],edit:[17,32,2],smallfrown:41,mode:[41,30,5,17,46,47],varomega:41,"2em":41,genfrac:41,subset:41,reprocessor:27,consum:15,nointerest:35,meta:46,"static":33,our:[37,4],meth:0,ie6:30,special:[41,12,26,49,5,17,27,19,44,20,46,47,32],out:[0,37,1,16,6,18,46,30,47],variabl:[36,24,13,3,25,43,41,26,33],lesseqqgtr:41,matrix:41,categori:1,rel:[0,18,30],moveabl:[9,2],circlearrowleft:41,ref:12,math:[25,41,10,11,32,15,16,17,18,19,20,23,3,38,28,29,30,31,12,34,5,27,37,39,42,43,44,46,47],negthinspac:41,nsucceq:41,insid:2,workflow:27,manipul:43,eqslantgtr:41,releas:[17,3,37],afterward:26,indent:[22,19],could:[0,27,17,13,1,4,43,16,26,47,12,45],ask:[47,22,4,43],succ:41,keep:[37,2,39,43,41,17,46,47],gtreqqless:41,length:[3,24],outsid:[5,46,32],"0em":19,scriptstyl:41,softwar:[20,17,47],rbrace:41,rbrack:41,qualiti:[20,46,47],spadesuit:41,date:[17,37],uplu:41,clubsuit:41,bigsqcup:41,start:[0,37,1,24,11,40,41,25,44,16,17,34,19,7,9,35,47],unknown:27,system:[37,2,17,4,41,6,20,46],messag:[0,36,37,39,17,13,41,25,15,16,6,12,34,19,44,32,35],attach:[16,35,44],termin:5,"final":[26,41,17,40,20,47,32],rsh:41,supset:41,"1em":27,gtreqless:41,blind:47,gtrdot:41,structur:[0,36,24,39,43,16,26,12,32],charact:[41,27,30,49,5,6,22,19,47],htaccess:37,seriou:47,biggl:41,biggm:41,rrightarrow:41,unkown:12,have:[0,2,3,4,41,6,7,32,16,17,18,19,45,24,35,26,30,9,12,33,34,5,27,37,1,43,44,46,47],tabl:27,close:[6,32,27,4],nsim:41,border:[10,41,49],min:41,mid:41,which:[1,2,25,5,9,32,15,16,17,22,19,21,23,24,3,26,27,28,29,30,31,12,33,34,35,36,37,38,40,41,43,45,46,47,49],hbox:41,mit:41,singl:[0,36,24,44,13,49,43,5,17,20,32,1],declaremathoper:41,mathjax_preview:[23,49,5,38,19,47],x22d6:41,unless:[17,32,24,46],who:[16,35,4],eight:46,leftthreetim:41,comparison:[1,12],"class":[33,35,36,24,13,14,41,5,34,19,45,31,21,47,28],underset:41,url:[0,37,3,42,17,32],gather:41,request:[0,35,41,16,26,46,1],face:[30,4,6,22,37,32],inde:[32,3],nmid:41,determin:[32,30,2,25,41,18,19,12],flux:1,fact:[35,34],backsimeq:41,mathjax_messag:15,text:[2,3,41,6,7,10,15,16,17,40,19,20,45,22,23,26,9,32,5,30,38,1,43,18,47],verbos:[39,26,19],perfom:44,perfor:46,bring:47,woth:27,curlyeqsucc:41,lgroup:41,locat:[0,23,37,17,25,3,43,5,6,12,19,16,38,32,21,47,28],jax:[25,8,32,13,16,17,22,19,45,3,28,31,12,33,34,18,36,30,39,21,49,43,46,47,48],vartriangleright:41,forev:3,should:[3,41,7,9,5,32,14,17,34,19,21,23,24,26,28,31,12,35,27,37,38,40,49,43,46,48,1],imagefont:[6,30],vartriangleleft:41,suppos:[26,43],"5px":10,triangleright:41,local:[37,24,17,1,3,43,6,19,32],hope:6,precsim:41,overleftarrow:41,fontwarns:49,ignoreclass:5,leqslant:41,smash:41,enabl:[41,2,5,17,7,9],organ:47,frown:41,stuff:12,she:46,contain:[0,2,3,41,6,10,13,14,15,16,17,34,19,45,23,24,35,26,30,12,5,36,37,38,49,43,47,1],view:[27,37,13,3,17,28,46,20,30],altern:[0,41,26,47,32,33],coooki:10,temporarili:15,substack:41,issafari:12,mathord:41,statu:[0,37,26],error:[0,12,27,3,4,41,17,34,19,32],jmath:41,pattern:[5,19],thumb:1,gtrsim:41,written:[17,7],quickest:17,theta:41,neither:[6,32,40],equiv:[41,46],omicron:41,nshortmid:41,kei:[10,0,24,35,14,16,19,12],job:32,entir:[12,43],closebox:6,ker:41,addit:[0,27,1,24,6,14,41,43,16,17,19,26,45,31,12,21,49],skipstartuptypeset:19,plugin:[2,42,19,20,46,47,32],admin:[9,7],nabla:41,equal:[1,12,33],gnapprox:41,etc:[41,1,19,43],instanc:[10,33,1,34,12,45],equat:[41,23,37,43,5,38,22,19,20,46,47,32,45],futher:46,class3:33,eth:41,limiti:37,lmoustach:41,onchang:43,comment:[17,49,32,19],varnoth:41,dorectori:9,arriv:[16,44],solv:3,arguement:26,respect:[18,30,24],quit:43,showfontmenu:42,"55em":41,quotat:49,compos:27,compon:[0,36,35,13,33,49,25,42,16,44,12,27,20,31,32,21,47],accept:[26,24,43],treat:17,immedi:[0,14,1,25,43,16],smallsetminu:41,both:[0,32,17,39,1,26,27,19,12,33],alignat:41,otf:37,psi:41,togeth:[1,12,27,24],injlim:41,present:[6,27,19,4,35],twoheadrightarrow:41,multi:41,iscallback:24,plain:41,align:[41,27,19],contextu:[27,30,42,18,19,29,47,45],studentdisplai:43,defin:[12,30,29,17,25,49,3,42,41,6,18,19,26,1,32,33,22],glossari:[39,11],layer:2,almost:41,curvearrowright:41,site:[37,2,17,19,20,9,32],archiv:[17,37],revis:37,halt:44,welcom:4,displaystyl:[41,43],parti:16,cross:37,sqrt:[41,17,47],getx:33,extensiondir:34,oint:41,easi:[37,28],difficult:[26,27,44],phi:41,http:[17,3,37,42,46],lleftarrow:41,"8em":[41,22],effect:[14,1,3],mrow:[17,47,27],student:43,php:[2,7],trake:4,executehook:[35,24],off:[41,44,18,46],center:[41,19],well:[37,24,26,49,4,43,16,17,34,19,44,46],exampl:[0,1,3,4,5,6,8,10,12,14,16,17,22,19,21,23,24,26,27,29,46,30,31,32,33,35,36,37,38,40,41,42,43,44,45,18,47,48,49],command:[27,37,24,39,14,1,25,43,41,19,12],choos:[41,46],undefin:[41,17,32,24,26],setx:33,latest:37,curlyeqprec:41,paus:37,less:[5,41,47,12,37],natiov:18,obtain:[37,43,17,19,47,21],mistaken:47,mathclos:41,mathoutput:43,simultan:1,web:[11,37,1,2,17,25,41,3,44,43,16,6,28,7,20,30,9,32,35,47,45],current_them:2,smith:26,textbf:41,cdotp:41,add:[33,41,2,17,14,49,3,5,6,19,45,46,21],book:39,match:[5,35,30],ctrl:19,webpag:28,ntriangleright:41,know:[35,26,3,16,17,31,21,47],cfrac:41,press:19,loader:[31,21],recurs:12,konqueror:[46,12],nofont:6,like:[3,41,5,14,15,16,17,20,24,26,28,31,32,35,27,37,39,49,43,44,46,47,1],lost:26,messagehook:[16,35,12],necessari:[20,12,45],page:[2,25,5,6,7,10,11,12,13,15,16,17,18,19,20,45,23,3,26,28,30,9,32,35,27,37,38,41,42,43,44,46,47,1],captur:39,linux:12,"export":45,superclass:33,proper:[35,12],home:0,librari:[13,1,36,37],glyph:[41,39],kern:41,leak:45,avoid:[41,40,47,27,19],tooltip:30,leav:[10,22,48,43],doublecap:41,twoheadleftarrow:41,daleth:41,upharpoonright:41,journal:39,usag:11,sphericalangl:41,although:[13,17,32,48,35],offset:30,panel:41,varepsilon:41,about:[35,12,37,24,17,41,4,43,16,6,18,28,26,44,30,47,32],actual:[10,0,12,24,14,41,43,16,26,27,19,31,32,21,1],column:22,mod_head:37,mapsto:41,constructor:33,fals:[35,12,30,41,3,42,5,18,19,8,32,33],disabl:[18,30],eqalign:41,own:[37,17,13,1,3,4,41,6,44,31,32,21,47],amsmath:[1,3,41,17,22,32],circledr:41,delaypost:30,automat:[41,14,1,15,5,17,34,46,47,32,33],bigtriangledown:41,guard:19,vphantom:41,merg:[10,12],dcocument:12,transfer:[17,37],support:[11,36,30,17,25,27,3,4,41,6,18,20,46,47,32,48],much:[16,39,46,44],bigcap:41,tracker:[17,4],arg1:26,"var":[10,24,1,3,43,16,26,33],arg2:26,"function":[33,0,1,24,35,39,14,41,3,43,16,26,25,44,31,12,21,47],propto:41,unexpect:[18,19],precnapprox:41,studentansw:43,bodi:[0,43,17,31,32,21],gain:[46,42],inlin:[5,17,32],bug:[37,4,15,17,19,47],made:[45,1,4,44,31,32,21,47],bbbk:41,whether:[41,23,30,38,3,42,43,5,26,18,19,8,12,48],wish:[49,3,4,41,26,46,12],displai:[10,11,23,37,17,45,41,27,42,15,5,6,22,19,29,16,20,47,32,21,43],troubl:17,underleftrightarrow:41,asynchron:[0,36,24,35,39,14,1,16,26,44,12],gtrapprox:41,below:[2,3,41,6,8,10,17,40,19,21,22,23,38,29,46,30,31,12,34,5,37,45,42,44,18,47,48],limit:[41,0,27],otherwis:[0,36,24,15,41,12,7,32,33],problem:[37,26,3,4,41,17,46,47],x03c0:47,"int":[10,26,41],dure:[16,12,45,34,24],implement:[10,0,27,13,41,16,26,34,46,47,33],nolimit:41,inf:41,rightleftharpoon:41,probabl:[37,2,26,16,17,32],oplu:41,helpurl:42,immateri:1,percent:18,detail:[0,41,6,7,11,32,14,16,17,18,19,23,24,35,38,28,29,30,9,12,5,27,37,1,42,43,44,46,47],arctan:41,other:[25,41,5,32,14,16,17,18,19,20,45,24,26,28,30,12,33,34,35,27,37,39,1,43,44,46,47,48],futur:[16,0,46,4,44],varieti:47,downlaod:20,removeaft:6,repeat:[37,2],star:41,thicksim:41,msgroup:27,scientif:39,reliabl:[46,3],rule:[41,6,8,1,19],mathjax_mathml:3,portion:43,eot:37},objtypes:{"0":"py:method"},titles:["The MathJax.Ajax Object","Using Queues","Using MathJax in popular web platforms","Loading MathJax Dynamically","The MathJax Community","The tex2jax Preprocessor","The FontWarnings extension","Installing MathJax in WordPress","The MathML input processor","Using MathJax in Movable Type","The MathJax.HTML Object","MathJax Documentation","The MathJax.Hub Object","The MathJax API","The MathJax.Callback.Queue Class","The MathJax.Message Object","Using Signals","Getting Started","The NativeMML output processor","The Core Configuration Options","What is MathJax?","The MathJax.OutputJax Class","The TeX input processor","The jsMath2jax Preprocessor","The MathJax.Callback Class","The MathJax Startup Sequence","Using Callbacks","MathJax MathML Support","Converting to MathJax from jsMath","The MathZoom extension","The HTML-CSS output processor","The MathJax.InputJax Class","Loading and Configuring MathJax","The MathJax Object-Oriented Programming Model","The Base Jax Class","The MathJax.Callback.Signal Class","The MathJax variable","Installing and Testing MathJax","The mml2jax Preprocessor","Glossary","Describing HTML snippets","MathJax TeX and LaTeX Support","The MathMenu extension","Modifying Math on the Page","Synchronizing your code with MathJax","The MathJax.ElementJax Class","MathJax Output Formats","The MathJax Processing Model","The MMLorHTML configuration options","CSS Style Objects"],objnames:{"0":"Python method"},filenames:["api/ajax","queues","platforms/index","dynamic","community","options/tex2jax","options/FontWarnings","platforms/wordpress","options/MathML","platforms/movable-type","api/html","index","api/hub","api/index","api/queue","api/message","signals","start","options/NativeMML","options/hub","mathjax","api/outputjax","options/TeX","options/jsMath2jax","api/callback","startup","callbacks","mathml","jsMath","options/MathZoom","options/HTML-CSS","api/inputjax","configuration","api/object","api/jax","api/signal","api/variable","installation","options/mml2jax","glossary","HTML-snippets","tex","options/MathMenu","typeset","synchronize","api/elementjax","output","model","options/MMLorHTML","CSS-styles"]}) -\ No newline at end of file diff --git a/docs/build/html/signals.html b/docs/build/html/signals.html @@ -1,260 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Using Signals — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" /> - <link rel="next" title="Loading MathJax Dynamically" href="dynamic.html" /> - <link rel="prev" title="Using Queues" href="queues.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="dynamic.html" title="Loading MathJax Dynamically" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="queues.html" title="Using Queues" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="synchronize.html" accesskey="U">Synchronizing your code with MathJax</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="using-signals"> -<span id="id1"></span><h1>Using Signals<a class="headerlink" href="#using-signals" title="Permalink to this headline">¶</a></h1> -<p>Because much of MathJax operates asynchronously, it is important for -MathJax to be able to indicated to other components operating on the -page that certain actions have been taken. For example, as MathJax is -starting up, it loads external files such as its configuration files -and the various input and output <a class="reference internal" href="glossary.html#term-jax"><em class="xref std std-term">jax</em></a> that are used on the -page. This means that MathJax may not be ready to run until well -after the <tt class="docutils literal"><span class="pre"><script></span></tt> tag that loads <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> has executed. If -another component on the page needs to call MathJax to process some -mathematics, it will need to know when MathJax is ready to do that. -Thus MathJax needs a way to signal other components that it is -initialized and ready to process mathematics. Other events that might -need to be signaled include the appearance of newly processed -mathematics on the web page, the loading of a new extension, and so -on.</p> -<p>The mechanism provided by MathJax for handling this type of -communication is the <a class="reference internal" href="glossary.html#term-callback-signal"><em class="xref std std-term">Callback Signal</em></a>. The <cite>Callback Signal</cite> -object provides a standardized mechanism for sending and receiving -messages between MathJax and other code on the page. A signal acts -like a mailbox where MathJax places messages for others to read. -Those interested in seeing the messages can register an interest in -receiving a given signal, and when MathJax posts a message on that -signal, all the interested parties will be notified. No new posts to -the signal will be allowed until everyone who is listening to the -signal has had a chance to receive the first one. If a signal causes -a listener to begin an asynchronous operation (such as loading a -file), the listener can indicate that its reply to the signal is going -to be delayed, and MathJax will wait until the asynchronous action is -complete before allowing additional messages to be posted to this -signal. In this way, posting a signal may itself be an asynchronous -action.</p> -<p>The posts to a signal are cached so that if a new listener expresses -an interest in the signal, it will receive all the past posts as well -as any future ones. For example, if a component on the page needs to -know when MathJax is set up, it can express an interest in the startup -signal’s <tt class="docutils literal"><span class="pre">End</span></tt> message. If MathJax is not yet set up, the component -will be signaled when MathJax is ready to begin, but if MathJax is -already set up, the component will receive the <tt class="docutils literal"><span class="pre">End</span></tt> message -immediately, since that message was cached and is available to any new -listeners. In this way, signals can be used to pass messages without -worrying about the timing of when the signaler and listener are ready -to send or receive signals: a listener will receive messages even if -it starts listening after they were sent.</p> -<p>One way that MathJax makes use of this feature is in configuring its -various extensions. The extension may not be loaded when the user’s -configuration code runs, so the configuration code can’t modify the -extension because it isn’t there yet. Fortunately, most extensions -signal when they are loaded and initialized via an <tt class="docutils literal"><span class="pre">Extension</span> <span class="pre">[name]</span> <span class="pre">Ready</span></tt> message, -so the configuration code can implement a listener for that message, and -have the listener perform the configuration when the message arrives. -But even if the extension <em>has</em> already been loaded, this will still -work, because the listener will receive the ready signal even if it -has already been posted. In this way, listening for signals is a -robust method of synchonizing code components no matter when they are -loaded and run.</p> -<p>In some cases, it may be inappropriate for a new listener to receive -past messages that were sent to a signal object. There are two ways to -handle this: first, a new listener can indicate that it doesn’t want -to hear old messages when it attaches itself to a signal object. The -sender can also indicate that past messages are not appropriate for -new listeners. It does this by clearing the message history so that -new listeners have no old posts to hear.</p> -<p>The actual message passed along by the signal can be anything, but is -frequently a string constant indicating the message value. It could -also be a JavaScript array containing data, or an object containing -<cite>key:value</cite> pairs. All the listeners receive the data as part of the -message, and can act on it in whatever ways they see fit.</p> -<div class="section" id="creating-a-listener"> -<h2>Creating a Listener<a class="headerlink" href="#creating-a-listener" title="Permalink to this headline">¶</a></h2> -<p>MathJax maintains two separate signal channels: the <cite>startup signal</cite> -and the <cite>processing signal</cite> (or the <cite>hub signal</cite>). The startup signal -is where the messages about different components starting up and -becoming ready appear. The processing signal is where the messages -are sent about processing mathematics, like the <tt class="docutils literal"><span class="pre">New</span> <span class="pre">Math</span></tt> messages -for when newly typeset mathematics appears on the page. The latter is -cleared when a new processing pass is started (so messages from past -processing runs are not kept).</p> -<p>The easiest way to create a listener is to use either -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Register.StartupHook()</span></tt> or -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Register.MessageHook()</span></tt>. The first sets a listener -on the startup signal, and the latter on the hub processing signal. -You specify the message you want to listen for, and a callback to be -called when it arrives. For example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Register</span><span class="p">.</span><span class="nx">StartupHook</span><span class="p">(</span><span class="s2">"TeX Jax Ready "</span><span class="p">,</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> - <span class="nx">alert</span><span class="p">(</span><span class="s2">"The TeX input jax is loaded and ready!"</span><span class="p">);</span> -<span class="p">});</span> -</pre></div> -</div> -<p>See the <a class="reference internal" href="startup.html#startup-sequence"><em>MathJax Startup Sequence</em></a> page for -details of the messages sent during startup. See also the -<tt class="docutils literal"><span class="pre">test/sample-signals.html</span></tt> file (and its source) for examples of -using signals. This example lists all the signals that occur while -MathJax is processing that page, so it gives useful information about -the details of the signals produced by variuous components.</p> -<p>In this example, the listener starts loading an extra configuration -file (from the same directory as the web page). Since it returns -the callback from that request, the signal processing will wait until -that file is completely loaded before it continues; that is, the -configuration process is suspended until the extra configuration file -has loaded.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Register</span><span class="p">.</span><span class="nx">StartupHook</span><span class="p">(</span><span class="s2">"Begin Config"</span><span class="p">,</span> - <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span><span class="k">return</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"myConfig.js"</span><span class="p">)}</span> -<span class="p">);</span> -</pre></div> -</div> -<p>Here is an example that produces an alert each time new mathematics -is typeset on the page. The message includes the DOM <cite>id</cite> of the -element on the page that contains the newly typeset mathematics as its -second element, so this listener locates the <tt class="docutils literal"><span class="pre"><script></span></tt> tag -for the math, and displays the original source mathematics for it.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Register</span><span class="p">.</span><span class="nx">MessageHook</span><span class="p">(</span><span class="s2">"New Math"</span><span class="p">,</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">message</span><span class="p">)</span> <span class="p">{</span> - <span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">getJaxFor</span><span class="p">(</span><span class="nx">message</span><span class="p">[</span><span class="mi">1</span><span class="p">]).</span><span class="nx">SourceElement</span><span class="p">();</span> - <span class="nx">alert</span><span class="p">(</span><span class="nx">message</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">" "</span><span class="p">)</span><span class="o">+</span><span class="s2">": '"</span><span class="o">+</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span><span class="o">+</span><span class="s2">"'"</span><span class="p">);</span> -<span class="p">})</span> -</pre></div> -</div> -</div> -<div class="section" id="listening-for-all-messages"> -<h2>Listening for All Messages<a class="headerlink" href="#listening-for-all-messages" title="Permalink to this headline">¶</a></h2> -<p>If you want to process <em>every</em> message that passes through a signal -channel, you can do that by registering an interest in the signal -rather than registering a message hook. You do this by calling the -signal’s <a class="reference internal" href="api/signal.html#Interest" title="Interest"><tt class="xref py py-meth docutils literal"><span class="pre">Interest()</span></tt></a> method, as in the following example.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Startup</span><span class="p">.</span><span class="nx">signal</span><span class="p">.</span><span class="nx">Interest</span><span class="p">(</span> - <span class="kd">function</span> <span class="p">(</span><span class="nx">message</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"Startup: "</span><span class="o">+</span><span class="nx">message</span><span class="p">)}</span> -<span class="p">);</span> -<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">signal</span><span class="p">.</span><span class="nx">Interest</span><span class="p">(</span> - <span class="kd">function</span> <span class="p">(</span><span class="nx">message</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"Hub: "</span><span class="o">+</span><span class="nx">message</span><span class="p">)}</span> -<span class="p">);</span> -</pre></div> -</div> -<p>This will cause an alert for every signal that MathJax produces. You -probably don’t want to try this out, since it will produce a <em>lot</em> of -them; instead, use the <tt class="docutils literal"><span class="pre">test/sample-signals.html</span></tt> file, which -displays them in the web page.</p> -<p>See the <a class="reference internal" href="api/signal.html#api-signal"><em>Signal Object</em></a> reference page for details on the -structure and methods of the signal object.</p> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">Using Signals</a><ul> -<li><a class="reference internal" href="#creating-a-listener">Creating a Listener</a></li> -<li><a class="reference internal" href="#listening-for-all-messages">Listening for All Messages</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="queues.html" - title="previous chapter">Using Queues</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="dynamic.html" - title="next chapter">Loading MathJax Dynamically</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/signals.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="dynamic.html" title="Loading MathJax Dynamically" - >next</a> |</li> - <li class="right" > - <a href="queues.html" title="Using Queues" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - <li><a href="synchronize.html" >Synchronizing your code with MathJax</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/start.html b/docs/build/html/start.html @@ -1,382 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Getting Started — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="Installing and Testing MathJax" href="installation.html" /> - <link rel="prev" title="What is MathJax?" href="mathjax.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="installation.html" title="Installing and Testing MathJax" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="mathjax.html" title="What is MathJax?" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="getting-started"> -<span id="id1"></span><h1>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline">¶</a></h1> -<p>MathJax allows you to include mathematics in your web pages, either -using TeX and LaTeX notation, or as MathML. To use MathJax, you will -need to do the following things:</p> -<ol class="arabic simple"> -<li>Obtain a copy of MathJax and make it available on your server.</li> -<li>Configure MathJax to suit the needs of your site.</li> -<li>Link MathJax into the web pages that are to include mathematics.</li> -<li>Put mathematics into your web pages so that MathJax can display -it.</li> -</ol> -<p>Each of these steps is described briefly below, with links to more -detailed explanations. This page gives the quickest and easiest ways -to get MathJax up and running on your web site, but you may want to -read the details in order to customize the setup for your pages.</p> -<div class="section" id="obtaining-and-installing-mathjax"> -<h2>Obtaining and Installing MathJax<a class="headerlink" href="#obtaining-and-installing-mathjax" title="Permalink to this headline">¶</a></h2> -<p>The easiest way to set up MathJax is to obtain the v1.1 archive from -the <a class="reference external" href="http://www.mathjax.org/download/">MathJax download page</a> (you -should obtain a file names something like -<tt class="docutils literal"><span class="pre">mathjax-MathJax-v1.0-X-XXXXXXXX.zip</span></tt>, where the X’s are -random-looking letters and numbers). This archive includes both the -MathJax code and the MathJax webfonts, so it is the only file you -need. (This is different from the beta releases, which had the fonts -separate from the rest of the code).</p> -<p>Unpack the archive and place the resulting MathJax folder onto your -web server at a convenient location where you can include it into your -web pages. For example, making <tt class="docutils literal"><span class="pre">MathJax</span></tt> a top-level directory on -your server would be one natural way to do this. That would let you -refer to the main MathJax file via the URL <tt class="docutils literal"><span class="pre">/MathJax/MathJax.js</span></tt> -from within any page on your server.</p> -<p>Note: While this is the easiest way to set up MathJax initially, there -is a better way to do it if you want to be able to keep your copy of -MathJax up-to-date easily. That uses the <a class="reference external" href="http://git-scm.com/">Git</a> -version control system, and is described in the <a class="reference internal" href="installation.html#getting-mathjax-git"><em>Installing -MathJax</em></a> document. If you prefer using -<a class="reference external" href="http://subversion.apache.org/">Subversion</a>, you can also use that -to get a copy of MathJax (see <a class="reference internal" href="installation.html#getting-mathjax-svn"><em>Installing MathJax via SVN</em></a>).</p> -<p>Once you have MathJax set up on your server, you can test it using the -files in the <tt class="docutils literal"><span class="pre">MathJax/test</span></tt> directory. Load them in your browser -using its web address rather than opening them locally (i.e., use an -<tt class="docutils literal"><span class="pre">http://</span></tt> URL rather than a <tt class="docutils literal"><span class="pre">file://</span></tt> URL). When you view the -<tt class="docutils literal"><span class="pre">index.html</span></tt> file, after a few moments you should see a message that -MathJax appears to be working. If not, check that the files have been -transferred to the server completely and that the permissions allow -the server to access the files and folders that are part of the -MathJax directory. (Be sure to verify the MathJax folder’s permissions -as well.) Check the server log files for any errors that pertain to -the MathJax installation; this may help locate problems in the -permission or locations of files.</p> -</div> -<div class="section" id="configuring-mathjax"> -<h2>Configuring MathJax<a class="headerlink" href="#configuring-mathjax" title="Permalink to this headline">¶</a></h2> -<p>When you include MathJax into your web pages as described below, it -will load the file <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> (i.e., the file named -<tt class="docutils literal"><span class="pre">MathJax.js</span></tt> in the <tt class="docutils literal"><span class="pre">config</span></tt> folder of the main <tt class="docutils literal"><span class="pre">MathJax</span></tt> -folder). This file contains the configuration parameters that -control how MathJax operates. There are comments in it that -explain each of the parameters, and you can edit the file to suit -your needs.</p> -<p>The default settings are appropriate for pages that use TeX as the -input language, but you might still want to adjust some settings; for -example, you might want to include some additional extensions such as -the <tt class="docutils literal"><span class="pre">AMSmath</span></tt> and <tt class="docutils literal"><span class="pre">AMSsymbols</span></tt> extensions. The comments in the -file should help you do this, but more detailed instructions are -included in the <a class="reference internal" href="configuration.html#configuration"><em>Configuring MathJax</em></a> document. -There are also ways to configure MathJax other than by using the -<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file; these are descibed on that page as well.</p> -</div> -<div class="section" id="linking-mathjax-into-a-web-page"> -<h2>Linking MathJax into a web page<a class="headerlink" href="#linking-mathjax-into-a-web-page" title="Permalink to this headline">¶</a></h2> -<p>You can include MathJax in your web page by putting</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span> -</pre></div> -</div> -<p>in your document’s <tt class="docutils literal"><span class="pre"><head></span></tt> block. Here, <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> should -be replaced by the URL for the main MathJax directory, so if you have -put the <tt class="docutils literal"><span class="pre">MathJax</span></tt> directory at the top level of you server’s web -site, you could use</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span> -</pre></div> -</div> -<p>to load MathJax in your page. For example, your page could look like</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span> - <span class="nt"><head></span> - ... - <span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span> - <span class="nt"></head></span> - <span class="nt"><body></span> - ... - <span class="nt"></body></span> -<span class="nt"></html></span> -</pre></div> -</div> -<p>Although it is possible to load MathJax from a site other than your -own web server, there are issues involved in doing so that you need to -take into consideration. See the <a class="reference internal" href="installation.html#cross-domain-linking"><em>Notes About Shared Servers</em></a> for more details. Please do <strong>not</strong> link to -the copy of MathJax at <tt class="docutils literal"><span class="pre">www.mathjax.org</span></tt>, as we do not have the -resources to act as a web service for all the sites on the web that -would like to display mathematics. If you are able to run MathJax -from your own server, please do so (this will probably give you better -response time in any case).</p> -</div> -<div class="section" id="putting-mathematics-in-a-web-page"> -<h2>Putting mathematics in a web page<a class="headerlink" href="#putting-mathematics-in-a-web-page" title="Permalink to this headline">¶</a></h2> -<p>To put mathematics in your web page, you can use either TeX and LaTeX -notation, or MathML notation (or both); the configuration file tells -MathJax which you want to use, and how you plan to indicate the -mathematics when you are using TeX notation. The following sections -tell you how to use each of these formats.</p> -<div class="section" id="tex-and-latex-input"> -<span id="id2"></span><h3>TeX and LaTeX input<a class="headerlink" href="#tex-and-latex-input" title="Permalink to this headline">¶</a></h3> -<p>To process mathematics that is written in <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a> or <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a> -format, include <tt class="docutils literal"><span class="pre">"input/TeX"</span></tt> in your configuration’s <cite>jax</cite> array, -and add <tt class="docutils literal"><span class="pre">"tex2jax.js"</span></tt> to the <cite>extensions</cite> array so that MathJax -will look for TeX-style math delimiters to identify the mathematics on -the page.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2math.js"</span><span class="p">],</span> -<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</span><span class="p">]</span> -</pre></div> -</div> -<p>Note that the default math delimiters are <tt class="docutils literal"><span class="pre">$$...$$</span></tt> and <tt class="docutils literal"><span class="pre">\[...\]</span></tt> -for displayed mathematics, and <tt class="docutils literal"><span class="pre">\(...\)</span></tt> for in-line mathematics. -In particular, the <tt class="docutils literal"><span class="pre">$...$</span></tt> in-line delimiters are <strong>not</strong> used by -default. That is because dollar signs appear too often in -non-mathematical settings, which could cause some text to be treated -as mathematics unexpectedly. For example, with single-dollar -delimiters, ”... the cost is $2.50 for the first one, and $2.00 for -each additional one ...” would cause the phrase “2.50 for the first -one, and” to be treated as mathematics since it falls between dollar -signs. For this reason, if you want to use single-dollars for in-line -math mode, you must enable that explicitly in your configuration:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span><span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s1">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s1">'\\('</span><span class="p">,</span><span class="s1">'\\)'</span><span class="p">]]}</span> -</pre></div> -</div> -<p>See the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file, or the <a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration -options</em></a> page, for additional configuration -parameters that you can specify for the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor.</p> -<p>Here is a complete sample page containing TeX mathematics (which -assumes that <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> is configured as described above):</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span> -<span class="nt"><head></span> -<span class="nt"><title></span>MathJax TeX Test Page<span class="nt"></title></span> -<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span> -<span class="nt"></head></span> -<span class="nt"><body></span> -When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are -$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ -<span class="nt"></body></span> -<span class="nt"></html></span> -</pre></div> -</div> -<p>There are a number of extensions for the TeX input processor that you -might want to add to the <cite>extensions</cite> array. These include:</p> -<ul class="simple"> -<li><cite>TeX/AMSmath.js</cite>, which defines the AMS math environments and -macros,</li> -<li><cite>TeX/AMSsymbols.js</cite>, which defines the macros for the symbols in -the msam10 and msbm10 fonts,</li> -<li><cite>TeX/noErrors.js</cite>, which shows the original TeX code rather than -an error message when there is a problem processing the TeX, and</li> -<li><cite>TeX/noUndefined.js</cite>, which prevents undefined macros from -producing an error message, and instead shows the macro name in red.</li> -</ul> -<p>For example,</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2math.js"</span><span class="p">,</span><span class="s2">"TeX/noErrors.js"</span><span class="p">,</span><span class="s2">"TeX/noUndefined.js"</span><span class="p">,</span> - <span class="s2">"TeX/AMSmath.js"</span><span class="p">,</span><span class="s2">"TeX/AMSsymbols.js"</span><span class="p">]</span> -</pre></div> -</div> -<p>loads all four extensions, in addition to the <tt class="docutils literal"><span class="pre">tex2math</span></tt> -preprocessor.</p> -</div> -<div class="section" id="mathml-input"> -<h3>MathML input<a class="headerlink" href="#mathml-input" title="Permalink to this headline">¶</a></h3> -<p>To process mathematics written in <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a>, include -<tt class="docutils literal"><span class="pre">"input/MathML"</span></tt> in your configuration’s <cite>jax</cite> array, and add -<tt class="docutils literal"><span class="pre">"mml2jax.js"</span></tt> to the <cite>extensions</cite> array so that MathJax will -locate the <tt class="docutils literal"><span class="pre"><math></span></tt> elements in the page automatically.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"mml2jax.js"</span><span class="p">],</span> -<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/MathML"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</span><span class="p">]</span> -</pre></div> -</div> -<p>With this configuration, you would mark your mathematics using -standard <tt class="docutils literal"><span class="pre"><math></span></tt> tags, where <tt class="docutils literal"><span class="pre"><math</span> <span class="pre">display="block"></span></tt> represents -displayed mathematics and <tt class="docutils literal"><span class="pre"><math</span> <span class="pre">display="inline"></span></tt> or just -<tt class="docutils literal"><span class="pre"><math></span></tt> represents in-line mathematics.</p> -<p>Note that this will work in HTML files, not just XHTML files (MathJax -works with both), and that the web page need not be served with any -special MIME-type. Also note that, unless you are using XHTML rather -than HTML, you should not include a namespace prefix for your -<tt class="docutils literal"><span class="pre"><math></span></tt> tags; for example, you should not use <tt class="docutils literal"><span class="pre"><m:math></span></tt> except -in a file where you have tied the <tt class="docutils literal"><span class="pre">m</span></tt> namespace to the MathML DTD.</p> -<p>Here is a complete sample page containing MathML mathematics (which -assumes that <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> is configured as described above):</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span> -<span class="nt"><head></span> -<span class="nt"><title></span>MathJax MathML Test Page<span class="nt"></title></span> -<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span> -<span class="nt"></head></span> -<span class="nt"><body></span> - -When <span class="nt"><math><mi></span>a<span class="nt"></mi><mo></span><span class="ni">&#x2260;</span><span class="nt"></mo><mn></span>0<span class="nt"></mn></math></span>, -there are two solutions to <span class="nt"><math></span> - <span class="nt"><mi></span>a<span class="nt"></mi><msup><mi></span>x<span class="nt"></mi><mn></span>2<span class="nt"></mn></msup></span> - <span class="nt"><mo></span>+<span class="nt"></mo></span> <span class="nt"><mi></span>b<span class="nt"></mi><mi></span>x<span class="nt"></mi></span> - <span class="nt"><mo></span>+<span class="nt"></mo></span> <span class="nt"><mi></span>c<span class="nt"></mi></span> <span class="nt"><mo></span>=<span class="nt"></mo></span> <span class="nt"><mn></span>0<span class="nt"></mn></span> -<span class="nt"></math></span> and they are -<span class="nt"><math</span> <span class="na">mode=</span><span class="s">"display"</span><span class="nt">></span> - <span class="nt"><mi></span>x<span class="nt"></mi></span> <span class="nt"><mo></span>=<span class="nt"></mo></span> - <span class="nt"><mrow></span> - <span class="nt"><mfrac></span> - <span class="nt"><mrow></span> - <span class="nt"><mo></span><span class="ni">&#x2212;</span><span class="nt"></mo></span> - <span class="nt"><mi></span>b<span class="nt"></mi></span> - <span class="nt"><mo></span><span class="ni">&#x00B1;</span><span class="nt"></mo></span> - <span class="nt"><msqrt></span> - <span class="nt"><msup><mi></span>b<span class="nt"></mi><mn></span>2<span class="nt"></mn></msup></span> - <span class="nt"><mo></span><span class="ni">&#x2212;</span><span class="nt"></mo></span> - <span class="nt"><mn></span>4<span class="nt"></mn><mi></span>a<span class="nt"></mi><mi></span>c<span class="nt"></mi></span> - <span class="nt"></msqrt></span> - <span class="nt"></mrow></span> - <span class="nt"><mrow></span> <span class="nt"><mn></span>2<span class="nt"></mn><mi></span>a<span class="nt"></mi></span> <span class="nt"></mrow></span> - <span class="nt"></mfrac></span> - <span class="nt"></mrow></span> - <span class="nt"><mtext></span>.<span class="nt"></mtext></span> -<span class="nt"></math></span> - -<span class="nt"></body></span> -<span class="nt"></html></span> -</pre></div> -</div> -<p>The <tt class="docutils literal"><span class="pre">mml2jax</span></tt> has only a few configuration options; see the -<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file or the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration options</em></a> page for more details.</p> -</div> -</div> -<div class="section" id="where-to-go-from-here"> -<h2>Where to go from here?<a class="headerlink" href="#where-to-go-from-here" title="Permalink to this headline">¶</a></h2> -<p>If you have followed the instructions above, you should now have -MathJax installed and configured on your web server, and you should be -able to use it to write web pages that include mathematics. At this -point, you can start making pages that contain mathematical content!</p> -<p>You could also read more about the details of how to <a class="reference internal" href="configuration.html#configuration"><em>customize -MathJax</em></a>.</p> -<p>If you are trying to use MathJax in blog or wiki software or in some -other content-management system, you might want to read about <a class="reference internal" href="platforms/index.html#platforms"><em>using -MathJax in popular platforms</em></a>.</p> -<p>If you are working on dynamic pages that include mathematics, you -might want to read about the <a class="reference internal" href="api/index.html#mathjax-api"><em>MathJax Application Programming -Interface</em></a> (its API), so you know how to include -mathematics in your interactive pages.</p> -<p>If you are having trouble getting MathJax to work, you can read more -about <a class="reference internal" href="installation.html#installation"><em>installing MathJax</em></a>, or <a class="reference internal" href="configuration.html#loading"><em>loading and -configuring MathJax</em></a>.</p> -<p>Finally, if you have questions or comments, or want to help support -MathJax, you could visit the <a class="reference internal" href="community.html#community-forums"><em>MathJax community forums</em></a> or the <a class="reference internal" href="community.html#community-tracker"><em>MathJax bug tracker</em></a>.</p> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">Getting Started</a><ul> -<li><a class="reference internal" href="#obtaining-and-installing-mathjax">Obtaining and Installing MathJax</a></li> -<li><a class="reference internal" href="#configuring-mathjax">Configuring MathJax</a></li> -<li><a class="reference internal" href="#linking-mathjax-into-a-web-page">Linking MathJax into a web page</a></li> -<li><a class="reference internal" href="#putting-mathematics-in-a-web-page">Putting mathematics in a web page</a><ul> -<li><a class="reference internal" href="#tex-and-latex-input">TeX and LaTeX input</a></li> -<li><a class="reference internal" href="#mathml-input">MathML input</a></li> -</ul> -</li> -<li><a class="reference internal" href="#where-to-go-from-here">Where to go from here?</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="mathjax.html" - title="previous chapter">What is MathJax?</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="installation.html" - title="next chapter">Installing and Testing MathJax</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/start.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="installation.html" title="Installing and Testing MathJax" - >next</a> |</li> - <li class="right" > - <a href="mathjax.html" title="What is MathJax?" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/startup.html b/docs/build/html/startup.html @@ -1,242 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>The MathJax Startup Sequence — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="Synchronizing your code with MathJax" href="synchronize.html" /> - <link rel="prev" title="The MathJax Processing Model" href="model.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="synchronize.html" title="Synchronizing your code with MathJax" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="model.html" title="The MathJax Processing Model" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="the-mathjax-startup-sequence"> -<span id="startup-sequence"></span><h1>The MathJax Startup Sequence<a class="headerlink" href="#the-mathjax-startup-sequence" title="Permalink to this headline">¶</a></h1> -<p>When you load <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> into a web page, it configures itself and -immediately begins loading the components it needs. As MathJax starts -up, it uses its <a class="reference internal" href="synchronize.html#synchronization"><em>signaling mechanism</em></a> -to indicate the actions that it is taking so that MathJax extensions -can tie into the initialization process, and so other applications -within the page can synchronize their actions with MathJax.</p> -<p>The startup process performs the following actions:</p> -<ul class="simple"> -<li>It creates the <tt class="docutils literal"><span class="pre">MathJax</span></tt> variable, and defines the following -subsystems:<ul> -<li><tt class="docutils literal"><span class="pre">MathJax.Object</span></tt> (object-oriented programming model)</li> -<li><tt class="docutils literal"><span class="pre">MathJax.Callback</span></tt> (callbacks, signals, and queues)</li> -<li><tt class="docutils literal"><span class="pre">MathJax.Ajax</span></tt> (file-loading and style-creation code)</li> -<li><tt class="docutils literal"><span class="pre">MathJax.HTML</span></tt> (support code for creating HTML elements)</li> -<li><tt class="docutils literal"><span class="pre">MathJax.Message</span></tt> (manages the menu line in the lower left)</li> -<li><tt class="docutils literal"><span class="pre">MathJax.Hub</span></tt> (the core MathJax functions)</li> -</ul> -</li> -</ul> -<ul class="simple"> -<li>It then creates the base <tt class="docutils literal"><span class="pre">MathJax.InputJax</span></tt>, -<tt class="docutils literal"><span class="pre">MathJax.OutputJax</span></tt>, and <tt class="docutils literal"><span class="pre">MathJax.ElementJax</span></tt> objects.</li> -</ul> -<ul class="simple"> -<li>MathJax sets up the default configuration, and creates the -signal objects used for the startup and hub actions.</li> -</ul> -<ul class="simple"> -<li>MathJax locates the <tt class="docutils literal"><span class="pre"><script></span></tt> tag that loaded the <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> -file, and sets the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.root</span></tt> value to reflect the -location of the MathJax root directory.</li> -</ul> -<ul class="simple"> -<li>MathJax determines the browser being used and its version. It sets -up the <tt class="docutils literal"><span class="pre">MathJax.Hub.Browser</span></tt> object, which includes the browser -name and version, plus <tt class="docutils literal"><span class="pre">isMac</span></tt>, <tt class="docutils literal"><span class="pre">isPC</span></tt>, <tt class="docutils literal"><span class="pre">isMSIE</span></tt>, and so on.</li> -</ul> -<ul class="simple"> -<li>MathJax set up the <tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt> command queue, and -populates it with the commands MathJax runs at startup. This -includes creating the <tt class="docutils literal"><span class="pre">MathJax.Hub.Startup.onload</span></tt> onload -handler that is used to synchronize MathJax’s action with the -loading of the page.</li> -</ul> -<p>Once the <tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt> is created, the following actions are -pushed into the queue:</p> -<ol class="arabic simple"> -<li>Post the <tt class="docutils literal"><span class="pre">Begin</span></tt> startup signal</li> -</ol> -<ol class="arabic simple" start="2"> -<li>Perform the configuration actions:<ul> -<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Config</span></tt> startup signal</li> -<li>Execute the content of the <tt class="docutils literal"><span class="pre"><script></span></tt> that loaded MathJax, -or load the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file if the <tt class="docutils literal"><span class="pre"><script></span></tt> -is empty</li> -<li>If the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.delayStartupUntil</span></tt> value is set, -wait until its condition is met</li> -<li>load the files listed in the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.config</span></tt> array</li> -<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Config</span></tt> startup signal</li> -</ul> -</li> -</ol> -<ol class="arabic simple" start="3"> -<li>Load the cookie values:<ul> -<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Cookie</span></tt> startup signal</li> -<li>Load the menu cookie values</li> -<li>Use the cookie to set the renderer, if it is set</li> -<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Cookie</span></tt> startup signal</li> -</ul> -</li> -</ol> -<ol class="arabic simple" start="4"> -<li>Define the MathJax styles:<ul> -<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Styles</span></tt> startup signal</li> -<li>Load the stylesheet files from the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.stylesheets</span></tt> array</li> -<li>Define the stylesheet described in <tt class="docutils literal"><span class="pre">MathJax.Hub.config.styles</span></tt></li> -<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Styles</span></tt> startup signal</li> -</ul> -</li> -</ol> -<ol class="arabic simple" start="5"> -<li>Load the jax configuration files:<ul> -<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Jax</span></tt> startup signal</li> -<li>Load the jax config files from the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.jax</span></tt> array<ul> -<li>The jax will register themselves when they are loaded</li> -</ul> -</li> -<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Jax</span></tt> startup signal</li> -</ul> -</li> -</ol> -<ol class="arabic simple" start="6"> -<li>Load the extension files:<ul> -<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Extension</span></tt> startup signal</li> -<li>Load the files from the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.extensions</span></tt> array<ul> -<li>Most extensions will post a <tt class="docutils literal"><span class="pre">Extension</span> <span class="pre">[name]</span> <span class="pre">Ready</span></tt> -startup message when they are loaded (where <tt class="docutils literal"><span class="pre">[name]</span></tt> is -the name of the extension)</li> -</ul> -</li> -<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Extension</span></tt> startup signal</li> -</ul> -</li> -</ol> -<ol class="arabic simple" start="7"> -<li>Wait for the onload handler to fire</li> -</ol> -<ol class="arabic simple" start="8"> -<li>Set <tt class="docutils literal"><span class="pre">MathJax.isReady</span></tt> to <tt class="docutils literal"><span class="pre">true</span></tt></li> -</ol> -<ol class="arabic simple" start="9"> -<li>Perform the typesetting pass (preprocessors and processors)<ul> -<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Typeset</span></tt> startup signal</li> -<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">PreProcess</span></tt> hub signal</li> -<li>Run the registered preprocessors</li> -<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">PreProcess</span></tt> hub signal</li> -<li>Clear the hub signal history</li> -<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Process</span></tt> hub signal</li> -<li>Process the math script elements on the page<ul> -<li>Each new math element generates a <tt class="docutils literal"><span class="pre">New</span> <span class="pre">Math</span></tt> hub signal -with the math element’s ID</li> -</ul> -</li> -<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Process</span></tt> hub signal</li> -<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Typeset</span></tt> startup signal</li> -</ul> -</li> -</ol> -<ol class="arabic simple" start="10"> -<li>Post the <tt class="docutils literal"><span class="pre">End</span></tt> startup signal</li> -</ol> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="model.html" - title="previous chapter">The MathJax Processing Model</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="synchronize.html" - title="next chapter">Synchronizing your code with MathJax</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/startup.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="synchronize.html" title="Synchronizing your code with MathJax" - >next</a> |</li> - <li class="right" > - <a href="model.html" title="The MathJax Processing Model" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/synchronize.html b/docs/build/html/synchronize.html @@ -1,164 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Synchronizing your code with MathJax — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="Using Callbacks" href="callbacks.html" /> - <link rel="prev" title="The MathJax Startup Sequence" href="startup.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="callbacks.html" title="Using Callbacks" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="startup.html" title="The MathJax Startup Sequence" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="synchronizing-your-code-with-mathjax"> -<span id="synchronization"></span><h1>Synchronizing your code with MathJax<a class="headerlink" href="#synchronizing-your-code-with-mathjax" title="Permalink to this headline">¶</a></h1> -<p>MathJax performs much of its activity asynchronously, meaning that -the calls that you make to initiate these actions will return before -the actions are completed, and your code will continue to run even -though the actions have not been finished (and may not even be started -yet). Actions such as loading files, loading web-based fonts, and -creating stylesheets all happen asynchronously within the browser, and -since JavaScript has no method of halting a program while waiting for -an action to complete, synchronizing your code with these types of -actions is made much more difficult. MathJax used three mechanisms to -overcome this language shortcoming: callbacks, queues, and signals.</p> -<p><strong>Callbacks</strong> are functions that are called when an action is -completed, so that your code can continue where it left off when the -action was initiated. Rather than have a single routine that -initiates an action, waits for it to complete, and then goes on, you -break the function into two parts: a first part that sets up and -initiates the action, and a second that runs after the action is -finished. Callbacks are similar to event handlers that you attach to -DOM elements, and are called when an certain action occurs. See the -<a class="reference internal" href="api/callback.html#api-callback"><em>Callback Object</em></a> reference page for details of -how to specify a callback.</p> -<p><strong>Queues</strong> are MathJax’s means of synchronizing actions that must be -performed sequentially, even when they involve asynchronous events -like loading files or dynamically creating stylesheets. The actions -that you put in the queue are <cite>Callback</cite> objects that will be perfomed -in sequence, with MathJax handling the linking of one action to the -next. MathJax maintains a master queue that you can use to -synchronize with MathJax, but you can also create your own private -queues for actions that need to be synchronized with each other, but -not to MathJax as a whole. See the <a class="reference internal" href="api/queue.html#api-queue"><em>Queue Object</em></a> -reference page for more details.</p> -<p><strong>Signals</strong> are another means of synchronizing your own code with -MathJax. Many of the important actions that MathJax takes (like -typesetting new math on the page, or loading an external component) -are “announced” by posting a message to a special object called a -<cite>Signal</cite>. Your code can register an interest in receiving one or more -of these signals by providing a callback to be called when the signal -is posted. When the signal arrives, MathJax will call your code. -This works somewhat like an event handler, except that many different -types of events can go through the same signal, and the signals have a -“memory”, meaning that if you register an interest in a particular -type of signal and that signal has already occurred, you will be told -about the past occurrances as well as any future ones. See the -<a class="reference internal" href="api/signal.html#api-signal"><em>Signal Object</em></a> reference page for more details. -See also the <tt class="docutils literal"><span class="pre">test/sample-signals.html</span></tt> file in the MathJax <tt class="docutils literal"><span class="pre">test</span></tt> -directory for a working example of using signals.</p> -<p>Each of these is explained in more detail in the links below:</p> -<div class="toctree-wrapper compound"> -<ul> -<li class="toctree-l1"><a class="reference internal" href="callbacks.html">Using Callbacks</a></li> -<li class="toctree-l1"><a class="reference internal" href="queues.html">Using Queues</a></li> -<li class="toctree-l1"><a class="reference internal" href="signals.html">Using Signals</a></li> -</ul> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h4>Previous topic</h4> - <p class="topless"><a href="startup.html" - title="previous chapter">The MathJax Startup Sequence</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="callbacks.html" - title="next chapter">Using Callbacks</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/synchronize.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="callbacks.html" title="Using Callbacks" - >next</a> |</li> - <li class="right" > - <a href="startup.html" title="The MathJax Startup Sequence" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/tex.html b/docs/build/html/tex.html @@ -1,1155 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>MathJax TeX and LaTeX Support — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="MathJax MathML Support" href="mathml.html" /> - <link rel="prev" title="Using MathJax in Movable Type" href="platforms/movable-type.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="mathml.html" title="MathJax MathML Support" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="platforms/movable-type.html" title="Using MathJax in Movable Type" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="mathjax-tex-and-latex-support"> -<span id="tex-support"></span><h1>MathJax TeX and LaTeX Support<a class="headerlink" href="#mathjax-tex-and-latex-support" title="Permalink to this headline">¶</a></h1> -<p>The support for TeX and LaTeX in MathJax consists of two parts: the -<cite>tex2jax</cite> preprocessor, and the TeX input processor. The first of -these looks for mathematics within your web page (indicated by math -delimiters like <tt class="docutils literal"><span class="pre">$$...$$</span></tt>) and marks the mathematics for later -processing by MathJax. The TeX input processor is what converts the -TeX notation into MathJax’s internal format, where one of MathJax’s -output processors then displays it in the web page.</p> -<p>The <cite>tex2jax</cite> preprocessor can be configured to look for whatever -markers you want to use for your math delimiters. See the -<a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration options</em></a> section for -details on how to customize the action of <cite>tex2jax</cite>.</p> -<p>The TeX input processor handles conversion of your mathematical -notation into MathJax’s internal format (which is essentially MathML), -and so acts as a TeX to MathML converter. The TeX input processor has -few configuration options (see the <a class="reference internal" href="options/TeX.html#configure-tex"><em>TeX options</em></a> section for details), but it can also be customized -through the use of extensions that define additional functionality -(see the <a class="reference internal" href="#tex-extensions"><em>TeX and LaTeX extensions</em></a> below).</p> -<p>Note that the TeX input processor implements <strong>only</strong> the math-mode -macros of TeX and LaTeX, not the text-mode macros. MathJax expects -that you will use standard HTML tags to handle formatting the text of -your page; it only handles the mathematics. So, for example, MathJax -does not implement <tt class="docutils literal"><span class="pre">\emph</span></tt> or -<tt class="docutils literal"><span class="pre">\begin{enumerate}...\end{enumerate}</span></tt> or other text-mode macros or -environments. You must use HTML to handle such formatting tasks. If -you need a LaTeX-to-HTML converter, you should consider <a class="reference external" href="http://www.google.com/search?q=latex+to+html+converter">other options</a>.</p> -<div class="section" id="tex-and-latex-in-html-documents"> -<h2>TeX and LaTeX in HTML documents<a class="headerlink" href="#tex-and-latex-in-html-documents" title="Permalink to this headline">¶</a></h2> -<p>Keep in mind that your mathematics is part of an HTML document, so you -need to be aware of the special characters used by HTML as part of its -markup. There cannot be HTML tags within the math delimiters (other -than <tt class="docutils literal"><span class="pre"><BR></span></tt>) as TeX-formatted math does not include HTML tags. -Also, since the mathematics is initially given as text on the page, -you need to be careful that your mathematics doesn’t look like HTML -tags to the browser (which parses the page before MathJax gets to see -it). In particular, that means that you have to be careful about -things like less-than and greater-than signs (<tt class="docutils literal"><span class="pre"><``and</span> <span class="pre">``></span></tt>), and -ampersands (<tt class="docutils literal"><span class="pre">&</span></tt>), which have special meaning to the browsers. For -example,</p> -<div class="highlight-latex"><div class="highlight"><pre>... when <span class="s">$</span><span class="nb">x<y</span><span class="s">$</span> we have ... -</pre></div> -</div> -<p>will cause a problem, because the brower will think <tt class="docutils literal"><span class="pre"><y</span></tt> is the -beginning of a tag named <tt class="docutils literal"><span class="pre">y</span></tt> (even though there is no such tag in -HTML). When this happens, the browser will think the tag continues up -to the next <tt class="docutils literal"><span class="pre">></span></tt> in the document (typically the end of the next -actual tag in the HTML file), and you may notice that you are missing -part of the text of the document. In the example above, the `` we -have ...`` will not be displayed because the browser thinks it is -part of the tag starting at <tt class="docutils literal"><span class="pre"><y</span></tt>. This is one indication you can -use to spot this prooblem; it is a common error and should be avoided.</p> -<p>Usually, it is sufficient to simply put spaces around these symbols to -cause the browser to avoid them, so</p> -<div class="highlight-latex"><div class="highlight"><pre>... when <span class="s">$</span><span class="nb">x < y</span><span class="s">$</span> we have ... -</pre></div> -</div> -<p>should work. Alternatively, you can use the HTML entities <tt class="docutils literal"><span class="pre">&lt;</span></tt>, -<tt class="docutils literal"><span class="pre">&gt;</span></tt> and <tt class="docutils literal"><span class="pre">&amp;</span></tt> to encode these characters so that the browser -will not interpret them, but MathJax will. E.g.,</p> -<div class="highlight-latex"><div class="highlight"><pre>... when <span class="s">$</span><span class="nb">x &lt; y</span><span class="s">$</span> we have ... -</pre></div> -</div> -<p>Finally, there are <tt class="docutils literal"><span class="pre">\lt</span></tt> and <tt class="docutils literal"><span class="pre">\gt</span></tt> macros defined to make it -easier to enter <tt class="docutils literal"><span class="pre"><</span></tt> and <tt class="docutils literal"><span class="pre">></span></tt> using TeX-like syntax:</p> -<div class="highlight-latex"><div class="highlight"><pre>... when <span class="s">$</span><span class="nb">x </span><span class="nv">\lt</span><span class="nb"> y</span><span class="s">$</span> we have ... -</pre></div> -</div> -<p>Keep in mind that the browser interprets your text before MathJax -does.</p> -</div> -<div class="section" id="tex-and-latex-extensions"> -<span id="tex-extensions"></span><h2>TeX and LaTeX extensions<a class="headerlink" href="#tex-and-latex-extensions" title="Permalink to this headline">¶</a></h2> -<p>While MathJax includes nearly all of the Plain TeX math macros, and -many of the LaTeX macros and environments, note everything is -implemented in the core TeX input processor. Some less-used commands -are defined in extensions to the TeX processor. MathJax will load -some extensions automatically when you first use the commands they -implement (for example, the <tt class="docutils literal"><span class="pre">\def</span></tt> and <tt class="docutils literal"><span class="pre">\newcommand</span></tt> macros are -implemented in the <tt class="docutils literal"><span class="pre">TeX/newcommand.js</span></tt> extension, but MathJax loads -this extension itself when you use those macros). Not all extensions -are set up to load automatically, however, so you may need to request -some extensions explicitly yourself.</p> -<p>To enable any of the TeX extensions, simply add the appropriate string -(e.g., <cite>“TeX/AMSmath.js”</cite>) to your config’s <cite>extensions</cite> array. The -main extensions are described below.</p> -<div class="section" id="amsmath-and-amssymbol"> -<h3>AMSmath and AMSsymbol<a class="headerlink" href="#amsmath-and-amssymbol" title="Permalink to this headline">¶</a></h3> -<p>The <cite>AMSmath</cite> extension implements AMS math environments and macros, -and the <cite>AMSsymbol</cite> extension implements macros for accessing the AMS -symbol fonts. To use these extensions, add them to your <cite>extensions</cite> array.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"TeX/AMSmath.js"</span><span class="p">,</span> <span class="s2">"TeX/AMSsymbol.js"</span><span class="p">,</span> <span class="p">...]</span> -</pre></div> -</div> -<p>See the list of commands at the end of this document for details about -what commands are implemented in these extensions.</p> -<p>The <cite>AMSmath</cite> extension will be loaded automatically when you first -use one of the math environments it defines, but you will have to load -it explicitly if you want to use the other macros that it defines. -The <cite>AMSsymbols</cite> extension is not loaded automatically, so you must -include it explicitly if you want to use the macros it defines.</p> -</div> -<div class="section" id="autobold"> -<h3>Autobold<a class="headerlink" href="#autobold" title="Permalink to this headline">¶</a></h3> -<p>The <cite>autobold</cite> extension adds <tt class="docutils literal"><span class="pre">\boldsymbol{...}</span></tt> around mathematics that -appears in a section of an HTML page that is in bold.</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"TeX/autobold.js"</span><span class="p">]</span> -</pre></div> -</div> -</div> -<div class="section" id="noerrors"> -<h3>noErrors<a class="headerlink" href="#noerrors" title="Permalink to this headline">¶</a></h3> -<p>The <cite>noErrors</cite> extension prevents TeX error messages from being -displayed and shows the original TeX code instead. You can configure -whether the dollar signs are shown or not for in-line math, and -whether to put all the TeX on one line or use multiple lines (if the -original text contained line breaks).</p> -<p>To enable the <cite>noErrors</cite> extension and configure it, use</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"TeX/noErrors.js"</span><span class="p">,</span> <span class="p">...],</span> -<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">noErrors</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">inlineDelimiters</span><span class="o">:</span> <span class="p">[</span><span class="s2">""</span><span class="p">,</span><span class="s2">""</span><span class="p">],</span> <span class="c1">// or ["$","$"] or ["\\(","\\)"]</span> - <span class="nx">multiLine</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span> <span class="c1">// false for TeX on all one line</span> - <span class="nx">style</span><span class="o">:</span> <span class="p">{</span> - <span class="s2">"font-family"</span><span class="o">:</span> <span class="s2">"serif"</span><span class="p">,</span> - <span class="s2">"font-size"</span><span class="o">:</span> <span class="s2">"80%"</span><span class="p">,</span> - <span class="s2">"color"</span><span class="o">:</span> <span class="s2">"black"</span><span class="p">,</span> - <span class="s2">"border"</span><span class="o">:</span> <span class="s2">"1px solid"</span> - <span class="c1">// add any additional CSS styles that you want</span> - <span class="c1">// (be sure there is no extra comma at the end of the last item)</span> - <span class="p">}</span> - <span class="p">}</span> -<span class="p">}</span> -</pre></div> -</div> -<p>Display-style math is always shown in multi-line format, and without -delimiters, as it will already be set off in its own centered -paragraph, like standard display mathematics.</p> -<p>The default settings place the invalid TeX in a multi-line box with a -black border. If you want it to look as though the TeX is just part of -the paragraph, use</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">noErrors</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">inlineDelimiters</span><span class="o">:</span> <span class="p">[</span><span class="s2">"$"</span><span class="p">,</span><span class="s2">"$"</span><span class="p">],</span> <span class="c1">// or ["",""] or ["\\(","\\)"]</span> - <span class="nx">multiLine</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span> - <span class="nx">style</span><span class="o">:</span> <span class="p">{</span> - <span class="s2">"font-size"</span><span class="o">:</span> <span class="s2">"normal"</span><span class="p">,</span> - <span class="s2">"border"</span><span class="o">:</span> <span class="s2">""</span> - <span class="p">}</span> - <span class="p">}</span> -<span class="p">}</span> -</pre></div> -</div> -<p>You may also wish to set the font family, as the default is “serif”</p> -</div> -<div class="section" id="noundefined"> -<h3>noUndefined<a class="headerlink" href="#noundefined" title="Permalink to this headline">¶</a></h3> -<p>The <cite>noUndefined</cite> extension causes undefined control sequences to be -shown as their macro names rather than produce an error message. So -<tt class="docutils literal"><span class="pre">$X_{\xxx}$</span></tt> would display as an “X” with a subscript consiting of the -text <tt class="docutils literal"><span class="pre">\xxx</span></tt> in red.</p> -<p>To enable and configure this extension, use for example</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"TeX/noUndefined.js"</span><span class="p">,</span> <span class="p">...],</span> -<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">noUndefined</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">attributes</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">mathcolor</span><span class="o">:</span> <span class="s2">"red"</span><span class="p">,</span> - <span class="nx">mathbackground</span><span class="o">:</span> <span class="s2">"#FFEEEE"</span><span class="p">,</span> - <span class="nx">mathsize</span><span class="o">:</span> <span class="s2">"90%"</span> - <span class="p">}</span> - <span class="p">}</span> - <span class="p">}</span> -</pre></div> -</div> -<p>The <tt class="docutils literal"><span class="pre">attributes</span></tt> setting specifies attributes to apply to the -<tt class="docutils literal"><span class="pre">mtext</span></tt> element that encodes the name of the undefined macro. The -default settings set <tt class="docutils literal"><span class="pre">mathcolor</span></tt> to <tt class="docutils literal"><span class="pre">"red"</span></tt>, but do not set any -other attributes. This example sets the background to a light pink, -and reduces the font size slightly.</p> -</div> -<div class="section" id="unicode-support"> -<h3>Unicode support<a class="headerlink" href="#unicode-support" title="Permalink to this headline">¶</a></h3> -<p>The <cite>unicode</cite> extension implements a <tt class="docutils literal"><span class="pre">\unicode{}</span></tt> extension to TeX -that allows arbitrary unicode code points to be entered in your -mathematics. You can specify the height and depth of the character -(the width is determined by the browser), and the default font from -which to take the character.</p> -<p>Examples:</p> -<div class="highlight-latex"><div class="highlight"><pre><span class="k">\unicode</span><span class="nb">{</span>65<span class="nb">}</span> <span class="c">% the character 'A'</span> -<span class="k">\unicode</span><span class="nb">{</span>x41<span class="nb">}</span> <span class="c">% the character 'A'</span> -<span class="k">\unicode</span><span class="na">[.55,0.05]</span><span class="nb">{</span>x22D6<span class="nb">}</span> <span class="c">% less-than with dot, with height .55em and depth 0.05em</span> -<span class="k">\unicode</span><span class="na">[.55,0.05][Geramond]</span><span class="nb">{</span>x22D6<span class="nb">}</span> <span class="c">% same taken from Geramond font</span> -<span class="k">\unicode</span><span class="na">[Garamond]</span><span class="nb">{</span>x22D6<span class="nb">}</span> <span class="c">% same, but with default height, depth of .8em,.2em</span> -</pre></div> -</div> -<p>Once a size and font are provided for a given unicode point, they need -not be specified again in subsequent <tt class="docutils literal"><span class="pre">\unicode{}</span></tt> calls for that -character.</p> -<p>The result of <tt class="docutils literal"><span class="pre">\unicode{...}</span></tt> will have TeX class <cite>ORD</cite> (i.e., it -will act like a variable). Use <tt class="docutils literal"><span class="pre">\mathbin{...}</span></tt>, <tt class="docutils literal"><span class="pre">\mathrel{...}</span></tt>, -etc., to specify a different class.</p> -<p>Note that a font list can be given in the <tt class="docutils literal"><span class="pre">\unicode{}</span></tt> macro, but -Internet Explorer has a buggy implementation of the <tt class="docutils literal"><span class="pre">font-family</span></tt> -CSS attribute where it only looks in the first font in the list that -is actually installed on the system, and if the required glyph is not -in that font, it does not look at later fonts, but goes directly to -the default font as set in the <cite>Internet-Options/Font</cite> panel. For -this reason, the default font list for the <tt class="docutils literal"><span class="pre">\unicode{}</span></tt> macro is -<tt class="docutils literal"><span class="pre">STIXGeneral,</span> <span class="pre">'Arial</span> <span class="pre">Unicode</span> <span class="pre">MS'</span></tt>, so if the user has <a class="reference internal" href="glossary.html#term-stix"><em class="xref std std-term">STIX</em></a> -fonts, the symbol will be taken from that (almost all the symbols are -in <cite>STIXGeneral</cite>), otherwise MathJax tries <cite>Arial Unicode MS</cite>.</p> -<p>The <cite>unicode</cite> extension is loaded automatically when you first use the -<tt class="docutils literal"><span class="pre">\unicode{}</span></tt> macro, so you do not need to add it to the <cite>extensions</cite> -array. You can configure the extension as follows:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">unicode</span><span class="o">:</span> <span class="p">{</span> - <span class="nx">fonts</span><span class="o">:</span> <span class="s2">"STIXGeneral, 'Arial Unicode MS'"</span> - <span class="p">}</span> -<span class="p">}</span> -</pre></div> -</div> -</div> -</div> -<div class="section" id="supported-latex-commands"> -<span id="tex-commands"></span><h2>Supported LaTeX commands<a class="headerlink" href="#supported-latex-commands" title="Permalink to this headline">¶</a></h2> -<p>This is a long list of the TeX macros supported by MathJax. If the -macro is defined in an extension, the name of the extension follows -the macro name.</p> -<div class="highlight-latex"><div class="highlight"><pre># -( ) -. -/ -[ ] -<span class="k">\!</span> -<span class="k">\#</span> -<span class="k">\$</span> -<span class="k">\%</span> -<span class="k">\&</span> -<span class="k">\:</span> -<span class="k">\;</span> -<span class="k">\\</span> -<span class="k">\_</span> -<span class="k">\{</span> <span class="k">\}</span> -<span class="k">\|</span> - -A -<span class="k">\above</span> -<span class="k">\abovewithdelims</span> -<span class="k">\acute</span> -<span class="k">\aleph</span> -<span class="k">\alpha</span> -<span class="k">\amalg</span> -<span class="k">\And</span> -<span class="k">\angle</span> -<span class="k">\approx</span> -<span class="k">\approxeq</span> AMSsymbols -<span class="k">\arccos</span> -<span class="k">\arcsin</span> -<span class="k">\arctan</span> -<span class="k">\arg</span> -<span class="k">\array</span> -<span class="k">\Arrowvert</span> -<span class="k">\arrowvert</span> -<span class="k">\ast</span> -<span class="k">\asymp</span> -<span class="k">\atop</span> -<span class="k">\atopwithdelims</span> - -B -<span class="k">\backepsilon</span> AMSsymbols -<span class="k">\backprime</span> AMSsymbols -<span class="k">\backsim</span> AMSsymbols -<span class="k">\backsimeq</span> AMSsymbols -<span class="k">\backslash</span> -<span class="k">\backslash</span> -<span class="k">\bar</span> -<span class="k">\barwedge</span> AMSsymbols -<span class="k">\Bbb</span> -<span class="k">\Bbbk</span> AMSsymbols -<span class="k">\bbFont</span> -<span class="k">\because</span> AMSsymbols -<span class="k">\begin</span> ... <span class="k">\end</span> -<span class="k">\begin</span><span class="nb">{</span>align*<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>align*<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>alignat*<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>alignat*<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>alignat<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>alignat<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>alignedat<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>alignedat<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>aligned<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>aligned<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>align<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>align<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>array<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>array<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>Bmatrix<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>Bmatrix<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>bmatrix<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>bmatrix<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>cases<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>cases<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>eqnarray*<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>eqnarray*<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>eqnarray<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>eqnarray<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>equation*<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>equation*<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>equation<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>equation<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>gather*<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>gather*<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>gathered<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>gathered<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>gather<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>gather<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>matrix<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>matrix<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>multline*<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>multline*<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>multline<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>multline<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>pmatrix<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>pmatrix<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>smallmatrix<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>smallmatrix<span class="nb">}</span> AMSmath -<span class="k">\begin</span><span class="nb">{</span>split<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>split<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>subarray<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>subarray<span class="nb">}</span> AMSmath -<span class="k">\begin</span><span class="nb">{</span>Vmatrix<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>Vmatrix<span class="nb">}</span> -<span class="k">\begin</span><span class="nb">{</span>vmatrix<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>vmatrix<span class="nb">}</span> -<span class="k">\beta</span> -<span class="k">\beth</span> AMSsymbols -<span class="k">\between</span> AMSsymbols -<span class="k">\bf</span> -<span class="k">\Big</span> -<span class="k">\big</span> -<span class="k">\bigcap</span> -<span class="k">\bigcirc</span> -<span class="k">\bigcup</span> -<span class="k">\Bigg</span> -<span class="k">\bigg</span> -<span class="k">\Biggl</span> -<span class="k">\biggl</span> -<span class="k">\Biggm</span> -<span class="k">\biggm</span> -<span class="k">\Biggr</span> -<span class="k">\biggr</span> -<span class="k">\Bigl</span> -<span class="k">\bigl</span> -<span class="k">\Bigm</span> -<span class="k">\bigm</span> -<span class="k">\bigodot</span> -<span class="k">\bigoplus</span> -<span class="k">\bigotimes</span> -<span class="k">\Bigr</span> -<span class="k">\bigr</span> -<span class="k">\bigsqcup</span> -<span class="k">\bigstar</span> AMSsymbols -<span class="k">\bigtriangledown</span> -<span class="k">\bigtriangleup</span> -<span class="k">\biguplus</span> -<span class="k">\bigvee</span> -<span class="k">\bigwedge</span> -<span class="k">\binom</span> AMSmath -<span class="k">\blacklozenge</span> AMSsymbols -<span class="k">\blacksquare</span> AMSsymbols -<span class="k">\blacktriangle</span> AMSsymbols -<span class="k">\blacktriangledown</span> AMSsymbols -<span class="k">\blacktriangleleft</span> AMSsymbols -<span class="k">\blacktriangleright</span> AMSsymbols -<span class="k">\bmod</span> -<span class="k">\boldsymbol</span> -<span class="k">\bot</span> -<span class="k">\bowtie</span> -<span class="k">\Box</span> AMSsymbols -<span class="k">\boxdot</span> AMSsymbols -<span class="k">\boxed</span> AMSmath -<span class="k">\boxminus</span> AMSsymbols -<span class="k">\boxplus</span> AMSsymbols -<span class="k">\boxtimes</span> AMSsymbols -<span class="k">\brace</span> -<span class="k">\bracevert</span> -<span class="k">\brack</span> -<span class="k">\breve</span> -<span class="k">\buildrel</span> -<span class="k">\bullet</span> -<span class="k">\Bumpeq</span> AMSsymbols -<span class="k">\bumpeq</span> AMSsymbols - -C -<span class="k">\cal</span> -<span class="k">\Cap</span> AMSsymbols -<span class="k">\cap</span> -<span class="k">\cases</span> -<span class="k">\cdot</span> -<span class="k">\cdotp</span> -<span class="k">\cdots</span> -<span class="k">\centerdot</span> AMSsymbols -<span class="k">\cfrac</span> AMSmath -<span class="k">\check</span> -<span class="k">\checkmark</span> AMSsymbols -<span class="k">\chi</span> -<span class="k">\choose</span> -<span class="k">\circ</span> -<span class="k">\circeq</span> AMSsymbols -<span class="k">\circlearrowleft</span> AMSsymbols -<span class="k">\circlearrowright</span> AMSsymbols -<span class="k">\circledast</span> AMSsymbols -<span class="k">\circledcirc</span> AMSsymbols -<span class="k">\circleddash</span> AMSsymbols -<span class="k">\circledR</span> AMSsymbols -<span class="k">\circledS</span> AMSsymbols -<span class="k">\clubsuit</span> -<span class="k">\colon</span> -<span class="k">\color</span> -<span class="k">\complement</span> AMSsymbols -<span class="k">\cong</span> -<span class="k">\coprod</span> -<span class="k">\cos</span> -<span class="k">\cosh</span> -<span class="k">\cot</span> -<span class="k">\coth</span> -<span class="k">\cr</span> -<span class="k">\csc</span> -<span class="k">\Cup</span> AMSsymbols -<span class="k">\cup</span> -<span class="k">\curlyeqprec</span> AMSsymbols -<span class="k">\curlyeqsucc</span> AMSsymbols -<span class="k">\curlyvee</span> AMSsymbols -<span class="k">\curlywedge</span> AMSsymbols -<span class="k">\curvearrowleft</span> AMSsymbols -<span class="k">\curvearrowright</span> AMSsymbols - -D -<span class="k">\dagger</span> -<span class="k">\daleth</span> AMSsymbols -<span class="k">\dashleftarrow</span> AMSsymbols -<span class="k">\dashrightarrow</span> AMSsymbols -<span class="k">\dashv</span> -<span class="k">\dbinom</span> AMSmath -<span class="k">\ddagger</span> -<span class="k">\ddddot</span> AMSmath -<span class="k">\dddot</span> AMSmath -<span class="k">\ddot</span> -<span class="k">\ddots</span> -<span class="k">\DeclareMathOperator</span> AMSmath -<span class="k">\def</span> -<span class="k">\deg</span> -<span class="k">\Delta</span> -<span class="k">\delta</span> -<span class="k">\det</span> -<span class="k">\dfrac</span> AMSmath -<span class="k">\diagdown</span> AMSsymbols -<span class="k">\diagup</span> AMSsymbols -<span class="k">\Diamond</span> AMSsymbols -<span class="k">\diamond</span> -<span class="k">\diamondsuit</span> -<span class="k">\digamma</span> AMSsymbols -<span class="k">\dim</span> -<span class="k">\displaylines</span> -<span class="k">\displaystyle</span> -<span class="k">\div</span> -<span class="k">\divideontimes</span> AMSsymbols -<span class="k">\dot</span> -<span class="k">\Doteq</span> AMSsymbols -<span class="k">\doteq</span> -<span class="k">\doteqdot</span> AMSsymbols -<span class="k">\dotplus</span> AMSsymbols -<span class="k">\dots</span> -<span class="k">\dotsb</span> -<span class="k">\dotsc</span> -<span class="k">\dotsi</span> -<span class="k">\dotsm</span> -<span class="k">\dotso</span> -<span class="k">\doublebarwedge</span> AMSsymbols -<span class="k">\doublecap</span> AMSsymbols -<span class="k">\doublecup</span> AMSsymbols -<span class="k">\Downarrow</span> -<span class="k">\downarrow</span> -<span class="k">\downdownarrows</span> AMSsymbols -<span class="k">\downharpoonleft</span> AMSsymbols -<span class="k">\downharpoonright</span> AMSsymbols - -E -<span class="k">\ell</span> -<span class="k">\emptyset</span> -<span class="k">\enspace</span> -<span class="k">\epsilon</span> -<span class="k">\eqalign</span> -<span class="k">\eqalignno</span> -<span class="k">\eqcirc</span> AMSsymbols -<span class="k">\eqsim</span> AMSsymbols -<span class="k">\eqslantgtr</span> AMSsymbols -<span class="k">\eqslantless</span> AMSsymbols -<span class="k">\equiv</span> -<span class="k">\eta</span> -<span class="k">\eth</span> AMSsymbols -<span class="k">\exists</span> -<span class="k">\exp</span> - -F -<span class="k">\fallingdotseq</span> AMSsymbols -<span class="k">\fbox</span> -<span class="k">\Finv</span> AMSsymbols -<span class="k">\flat</span> -<span class="k">\forall</span> -<span class="k">\frac</span> -<span class="k">\frac</span> AMSmath -<span class="k">\frak</span> -<span class="k">\frown</span> - -G -<span class="k">\Game</span> AMSsymbols -<span class="k">\Gamma</span> -<span class="k">\gamma</span> -<span class="k">\gcd</span> -<span class="k">\ge</span> -<span class="k">\genfrac</span> AMSmath -<span class="k">\geq</span> -<span class="k">\geqq</span> AMSsymbols -<span class="k">\geqslant</span> AMSsymbols -<span class="k">\gets</span> -<span class="k">\gg</span> -<span class="k">\ggg</span> AMSsymbols -<span class="k">\gggtr</span> AMSsymbols -<span class="k">\gimel</span> AMSsymbols -<span class="k">\gnapprox</span> AMSsymbols -<span class="k">\gneq</span> AMSsymbols -<span class="k">\gneqq</span> AMSsymbols -<span class="k">\gnsim</span> AMSsymbols -<span class="k">\grave</span> -<span class="k">\gt</span> -<span class="k">\gt</span> -<span class="k">\gtrapprox</span> AMSsymbols -<span class="k">\gtrdot</span> AMSsymbols -<span class="k">\gtreqless</span> AMSsymbols -<span class="k">\gtreqqless</span> AMSsymbols -<span class="k">\gtrless</span> AMSsymbols -<span class="k">\gtrsim</span> AMSsymbols -<span class="k">\gvertneqq</span> AMSsymbols - -H -<span class="k">\hat</span> -<span class="k">\hbar</span> -<span class="k">\hbox</span> -<span class="k">\heartsuit</span> -<span class="k">\hom</span> -<span class="k">\hookleftarrow</span> -<span class="k">\hookrightarrow</span> -<span class="k">\hphantom</span> -<span class="k">\hskip</span> -<span class="k">\hslash</span> AMSsymbols -<span class="k">\hspace</span> -<span class="k">\Huge</span> -<span class="k">\huge</span> - -I -<span class="k">\idotsint</span> AMSmath -<span class="k">\iff</span> -<span class="k">\iiiint</span> AMSmath -<span class="k">\iiint</span> -<span class="k">\iint</span> -<span class="k">\Im</span> -<span class="k">\imath</span> -<span class="k">\impliedby</span> AMSsymbols -<span class="k">\implies</span> AMSsymbols -<span class="k">\in</span> -<span class="k">\inf</span> -<span class="k">\infty</span> -<span class="k">\injlim</span> AMSmath -<span class="k">\int</span> -<span class="k">\intercal</span> AMSsymbols -<span class="k">\intop</span> -<span class="k">\iota</span> -<span class="k">\it</span> - -J -<span class="k">\jmath</span> -<span class="k">\Join</span> AMSsymbols - -K -<span class="k">\kappa</span> -<span class="k">\ker</span> -<span class="k">\kern</span> - -L -<span class="k">\label</span> -<span class="k">\Lambda</span> -<span class="k">\lambda</span> -<span class="k">\land</span> -<span class="k">\langle</span> -<span class="k">\LARGE</span> -<span class="k">\Large</span> -<span class="k">\large</span> -<span class="k">\LaTeX</span> -<span class="k">\lbrace</span> -<span class="k">\lbrack</span> -<span class="k">\lceil</span> -<span class="k">\ldotp</span> -<span class="k">\ldots</span> -<span class="k">\le</span> -<span class="k">\leadsto</span> AMSsymbols -<span class="k">\left</span> -<span class="k">\Leftarrow</span> -<span class="k">\leftarrow</span> -<span class="k">\leftarrowtail</span> AMSsymbols -<span class="k">\leftharpoondown</span> -<span class="k">\leftharpoonup</span> -<span class="k">\leftleftarrows</span> AMSsymbols -<span class="k">\Leftrightarrow</span> -<span class="k">\leftrightarrow</span> -<span class="k">\leftrightarrows</span> AMSsymbols -<span class="k">\leftrightharpoons</span> AMSsymbols -<span class="k">\leftrightsquigarrow</span> AMSsymbols -<span class="k">\leftroot</span> -<span class="k">\leftthreetimes</span> AMSsymbols -<span class="k">\leq</span> -<span class="k">\leqalignno</span> -<span class="k">\leqq</span> AMSsymbols -<span class="k">\leqslant</span> AMSsymbols -<span class="k">\lessapprox</span> AMSsymbols -<span class="k">\lessdot</span> AMSsymbols -<span class="k">\lesseqgtr</span> AMSsymbols -<span class="k">\lesseqqgtr</span> AMSsymbols -<span class="k">\lessgtr</span> AMSsymbols -<span class="k">\lesssim</span> AMSsymbols -<span class="k">\lfloor</span> -<span class="k">\lg</span> -<span class="k">\lgroup</span> -<span class="k">\lhd</span> AMSsymbols -<span class="k">\lim</span> -<span class="k">\liminf</span> -<span class="k">\limits</span> -<span class="k">\limsup</span> -<span class="k">\ll</span> -<span class="k">\llap</span> -<span class="k">\llcorner</span> AMSsymbols -<span class="k">\Lleftarrow</span> AMSsymbols -<span class="k">\lll</span> AMSsymbols -<span class="k">\llless</span> AMSsymbols -<span class="k">\lmoustache</span> -<span class="k">\ln</span> -<span class="k">\lnapprox</span> AMSsymbols -<span class="k">\lneq</span> AMSsymbols -<span class="k">\lneqq</span> AMSsymbols -<span class="k">\lnot</span> -<span class="k">\lnsim</span> AMSsymbols -<span class="k">\log</span> -<span class="k">\Longleftarrow</span> -<span class="k">\longleftarrow</span> -<span class="k">\Longleftrightarrow</span> -<span class="k">\longleftrightarrow</span> -<span class="k">\longmapsto</span> -<span class="k">\Longrightarrow</span> -<span class="k">\longrightarrow</span> -<span class="k">\looparrowleft</span> AMSsymbols -<span class="k">\looparrowright</span> AMSsymbols -<span class="k">\lor</span> -<span class="k">\lower</span> -<span class="k">\lozenge</span> AMSsymbols -<span class="k">\lrcorner</span> AMSsymbols -<span class="k">\Lsh</span> AMSsymbols -<span class="k">\lt</span> -<span class="k">\ltimes</span> AMSsymbols -<span class="k">\lVert</span> AMSmath -<span class="k">\lvert</span> AMSmath -<span class="k">\lvertneqq</span> AMSsymbols - -M -<span class="k">\maltese</span> AMSsymbols -<span class="k">\mapsto</span> -<span class="k">\mathbb</span> -<span class="k">\mathbf</span> -<span class="k">\mathbin</span> -<span class="k">\mathcal</span> -<span class="k">\mathchoice</span> -<span class="k">\mathclose</span> -<span class="k">\mathfrak</span> -<span class="k">\mathinner</span> -<span class="k">\mathit</span> -<span class="k">\mathop</span> -<span class="k">\mathopen</span> -<span class="k">\mathord</span> -<span class="k">\mathpunct</span> -<span class="k">\mathrel</span> -<span class="k">\mathring</span> AMSmath -<span class="k">\mathrm</span> -<span class="k">\mathscr</span> -<span class="k">\mathsf</span> -<span class="k">\mathstrut</span> -<span class="k">\mathtt</span> -<span class="k">\matrix</span> -<span class="k">\max</span> -<span class="k">\mbox</span> -<span class="k">\measuredangle</span> AMSsymbols -<span class="k">\mho</span> AMSsymbols -<span class="k">\mid</span> -<span class="k">\min</span> -<span class="k">\mit</span> -<span class="k">\mkern</span> -<span class="k">\mod</span> -<span class="k">\models</span> -<span class="k">\moveleft</span> -<span class="k">\moveright</span> -<span class="k">\mp</span> -<span class="k">\mskip</span> -<span class="k">\mspace</span> -<span class="k">\mu</span> -<span class="k">\multimap</span> AMSsymbols - -N -<span class="k">\nabla</span> -<span class="k">\natural</span> -<span class="k">\ncong</span> AMSsymbols -<span class="k">\ne</span> -<span class="k">\nearrow</span> -<span class="k">\neg</span> -<span class="k">\negmedspace</span> AMSmath -<span class="k">\negthickspace</span> AMSmath -<span class="k">\negthinspace</span> -<span class="k">\neq</span> -<span class="k">\newcommand</span> -<span class="k">\newenvironment</span> -<span class="k">\newline</span> -<span class="k">\nexists</span> AMSsymbols -<span class="k">\ngeq</span> AMSsymbols -<span class="k">\ngeqq</span> AMSsymbols -<span class="k">\ngeqslant</span> AMSsymbols -<span class="k">\ngtr</span> AMSsymbols -<span class="k">\ni</span> -<span class="k">\nLeftarrow</span> AMSsymbols -<span class="k">\nleftarrow</span> AMSsymbols -<span class="k">\nLeftrightarrow</span> AMSsymbols -<span class="k">\nleftrightarrow</span> AMSsymbols -<span class="k">\nleq</span> AMSsymbols -<span class="k">\nleqq</span> AMSsymbols -<span class="k">\nleqslant</span> AMSsymbols -<span class="k">\nless</span> AMSsymbols -<span class="k">\nmid</span> AMSsymbols -<span class="k">\nobreakspace</span> AMSmath -<span class="k">\nolimits</span> -<span class="k">\nonumber</span> -<span class="k">\normalsize</span> -<span class="k">\not</span> -<span class="k">\notag</span> -<span class="k">\notin</span> -<span class="k">\nparallel</span> AMSsymbols -<span class="k">\nprec</span> AMSsymbols -<span class="k">\npreceq</span> AMSsymbols -<span class="k">\nRightarrow</span> AMSsymbols -<span class="k">\nrightarrow</span> AMSsymbols -<span class="k">\nshortmid</span> AMSsymbols -<span class="k">\nshortparallel</span> AMSsymbols -<span class="k">\nsim</span> AMSsymbols -<span class="k">\nsucc</span> AMSsymbols -<span class="k">\nsucceq</span> AMSsymbols -<span class="k">\ntriangleleft</span> AMSsymbols -<span class="k">\ntrianglelefteq</span> AMSsymbols -<span class="k">\ntriangleright</span> AMSsymbols -<span class="k">\ntrianglerighteq</span> AMSsymbols -<span class="k">\nu</span> -<span class="k">\nVDash</span> AMSsymbols -<span class="k">\nVdash</span> AMSsymbols -<span class="k">\nvDash</span> AMSsymbols -<span class="k">\nvdash</span> AMSsymbols -<span class="k">\nwarrow</span> - -O -<span class="k">\odot</span> -<span class="k">\oint</span> -<span class="k">\oldstyle</span> -<span class="k">\Omega</span> -<span class="k">\omega</span> -<span class="k">\omicron</span> -<span class="k">\ominus</span> -<span class="k">\operatorname</span> AMSmath -<span class="k">\oplus</span> -<span class="k">\oslash</span> -<span class="k">\otimes</span> -<span class="k">\over</span> -<span class="k">\overbrace</span> -<span class="k">\overleftarrow</span> -<span class="k">\overleftrightarrow</span> -<span class="k">\overline</span> -<span class="k">\overrightarrow</span> -<span class="k">\overset</span> -<span class="k">\overwithdelims</span> -<span class="k">\owns</span> - -P -<span class="k">\parallel</span> -<span class="k">\partial</span> -<span class="k">\perp</span> -<span class="k">\phantom</span> -<span class="k">\Phi</span> -<span class="k">\phi</span> -<span class="k">\Pi</span> -<span class="k">\pi</span> -<span class="k">\pitchfork</span> AMSsymbols -<span class="k">\pm</span> -<span class="k">\pmatrix</span> -<span class="k">\pmb</span> -<span class="k">\pmod</span> -<span class="k">\pod</span> -<span class="k">\Pr</span> -<span class="k">\prec</span> -<span class="k">\precapprox</span> AMSsymbols -<span class="k">\preccurlyeq</span> AMSsymbols -<span class="k">\preceq</span> -<span class="k">\precnapprox</span> AMSsymbols -<span class="k">\precneqq</span> AMSsymbols -<span class="k">\precnsim</span> AMSsymbols -<span class="k">\precsim</span> AMSsymbols -<span class="k">\prime</span> -<span class="k">\prod</span> -<span class="k">\projlim</span> AMSmath -<span class="k">\propto</span> -<span class="k">\Psi</span> -<span class="k">\psi</span> - -Q -<span class="k">\qquad</span> -<span class="k">\quad</span> - -R -<span class="k">\raise</span> -<span class="k">\rangle</span> -<span class="k">\rbrace</span> -<span class="k">\rbrack</span> -<span class="k">\rceil</span> -<span class="k">\Re</span> -<span class="k">\require</span> -<span class="k">\restriction</span> AMSsymbols -<span class="k">\rfloor</span> -<span class="k">\rgroup</span> -<span class="k">\rhd</span> AMSsymbols -<span class="k">\rho</span> -<span class="k">\right</span> -<span class="k">\Rightarrow</span> -<span class="k">\rightarrow</span> -<span class="k">\rightarrowtail</span> AMSsymbols -<span class="k">\rightharpoondown</span> -<span class="k">\rightharpoonup</span> -<span class="k">\rightleftarrows</span> AMSsymbols -<span class="k">\rightleftharpoons</span> -<span class="k">\rightleftharpoons</span> AMSsymbols -<span class="k">\rightrightarrows</span> AMSsymbols -<span class="k">\rightsquigarrow</span> AMSsymbols -<span class="k">\rightthreetimes</span> AMSsymbols -<span class="k">\risingdotseq</span> AMSsymbols -<span class="k">\rlap</span> -<span class="k">\rm</span> -<span class="k">\rmoustache</span> -<span class="k">\root</span> -<span class="k">\Rrightarrow</span> AMSsymbols -<span class="k">\Rsh</span> AMSsymbols -<span class="k">\rtimes</span> AMSsymbols -<span class="k">\Rule</span> -<span class="k">\rVert</span> AMSmath -<span class="k">\rvert</span> AMSmath - -S -<span class="k">\S</span> -<span class="k">\scr</span> -<span class="k">\scriptscriptstyle</span> -<span class="k">\scriptsize</span> -<span class="k">\scriptstyle</span> -<span class="k">\searrow</span> -<span class="k">\sec</span> -<span class="k">\setminus</span> -<span class="k">\sf</span> -<span class="k">\sharp</span> -<span class="k">\shortmid</span> AMSsymbols -<span class="k">\shortparallel</span> AMSsymbols -<span class="k">\shoveleft</span> AMSmath -<span class="k">\shoveright</span> AMSmath -<span class="k">\sideset</span> AMSmath -<span class="k">\Sigma</span> -<span class="k">\sigma</span> -<span class="k">\sim</span> -<span class="k">\simeq</span> -<span class="k">\sin</span> -<span class="k">\sinh</span> -<span class="k">\skew</span> -<span class="k">\small</span> -<span class="k">\smallfrown</span> AMSsymbols -<span class="k">\smallint</span> -<span class="k">\smallsetminus</span> AMSsymbols -<span class="k">\smallsmile</span> AMSsymbols -<span class="k">\smash</span> -<span class="k">\smile</span> -<span class="k">\Space</span> -<span class="k">\space</span> -<span class="k">\spadesuit</span> -<span class="k">\sphericalangle</span> AMSsymbols -<span class="k">\sqcap</span> -<span class="k">\sqcup</span> -<span class="k">\sqrt</span> -<span class="k">\sqsubset</span> AMSsymbols -<span class="k">\sqsubseteq</span> -<span class="k">\sqsupset</span> AMSsymbols -<span class="k">\sqsupseteq</span> -<span class="k">\square</span> AMSsymbols -<span class="k">\stackrel</span> -<span class="k">\star</span> -<span class="k">\strut</span> -<span class="k">\Subset</span> AMSsymbols -<span class="k">\subset</span> -<span class="k">\subseteq</span> -<span class="k">\subseteqq</span> AMSsymbols -<span class="k">\substack</span> AMSmath -<span class="k">\succ</span> -<span class="k">\succapprox</span> AMSsymbols -<span class="k">\succcurlyeq</span> AMSsymbols -<span class="k">\succeq</span> -<span class="k">\succnapprox</span> AMSsymbols -<span class="k">\succneqq</span> AMSsymbols -<span class="k">\succnsim</span> AMSsymbols -<span class="k">\succsim</span> AMSsymbols -<span class="k">\sum</span> -<span class="k">\sup</span> -<span class="k">\Supset</span> AMSsymbols -<span class="k">\supset</span> -<span class="k">\supseteq</span> -<span class="k">\supseteqq</span> AMSsymbols -<span class="k">\surd</span> -<span class="k">\swarrow</span> - -T -<span class="k">\tag</span> -<span class="k">\tan</span> -<span class="k">\tanh</span> -<span class="k">\tau</span> -<span class="k">\tbinom</span> AMSmath -<span class="k">\TeX</span> -<span class="k">\text</span> -<span class="k">\textbf</span> -<span class="k">\textit</span> -<span class="k">\textrm</span> -<span class="k">\textstyle</span> -<span class="k">\tfrac</span> AMSmath -<span class="k">\therefore</span> AMSsymbols -<span class="k">\Theta</span> -<span class="k">\theta</span> -<span class="k">\thickapprox</span> AMSsymbols -<span class="k">\thicksim</span> AMSsymbols -<span class="k">\thinspace</span> -<span class="k">\tilde</span> -<span class="k">\times</span> -<span class="k">\Tiny</span> -<span class="k">\tiny</span> -<span class="k">\to</span> -<span class="k">\top</span> -<span class="k">\triangle</span> -<span class="k">\triangledown</span> AMSsymbols -<span class="k">\triangleleft</span> -<span class="k">\trianglelefteq</span> AMSsymbols -<span class="k">\triangleq</span> AMSsymbols -<span class="k">\triangleright</span> -<span class="k">\trianglerighteq</span> AMSsymbols -<span class="k">\tt</span> -<span class="k">\twoheadleftarrow</span> AMSsymbols -<span class="k">\twoheadrightarrow</span> AMSsymbols - -U -<span class="k">\ulcorner</span> AMSsymbols -<span class="k">\underbrace</span> -<span class="k">\underleftarrow</span> -<span class="k">\underleftrightarrow</span> -<span class="k">\underline</span> -<span class="k">\underrightarrow</span> -<span class="k">\underset</span> -<span class="k">\unicode</span> -<span class="k">\unlhd</span> AMSsymbols -<span class="k">\unrhd</span> AMSsymbols -<span class="k">\Uparrow</span> -<span class="k">\uparrow</span> -<span class="k">\Updownarrow</span> -<span class="k">\updownarrow</span> -<span class="k">\upharpoonleft</span> AMSsymbols -<span class="k">\upharpoonright</span> AMSsymbols -<span class="k">\uplus</span> -<span class="k">\uproot</span> -<span class="k">\Upsilon</span> -<span class="k">\upsilon</span> -<span class="k">\upuparrows</span> AMSsymbols -<span class="k">\urcorner</span> AMSsymbols - -V -<span class="k">\varDelta</span> AMSsymbols -<span class="k">\varepsilon</span> -<span class="k">\varGamma</span> AMSsymbols -<span class="k">\varinjlim</span> AMSmath -<span class="k">\varkappa</span> AMSsymbols -<span class="k">\varLambda</span> AMSsymbols -<span class="k">\varliminf</span> AMSmath -<span class="k">\varlimsup</span> AMSmath -<span class="k">\varnothing</span> AMSsymbols -<span class="k">\varOmega</span> AMSsymbols -<span class="k">\varPhi</span> AMSsymbols -<span class="k">\varphi</span> -<span class="k">\varPi</span> AMSsymbols -<span class="k">\varpi</span> -<span class="k">\varprojlim</span> AMSmath -<span class="k">\varpropto</span> AMSsymbols -<span class="k">\varPsi</span> AMSsymbols -<span class="k">\varrho</span> -<span class="k">\varSigma</span> AMSsymbols -<span class="k">\varsigma</span> -<span class="k">\varTheta</span> AMSsymbols -<span class="k">\vartheta</span> -<span class="k">\vartriangle</span> AMSsymbols -<span class="k">\vartriangleleft</span> AMSsymbols -<span class="k">\vartriangleright</span> AMSsymbols -<span class="k">\varUpsilon</span> AMSsymbols -<span class="k">\varXi</span> AMSsymbols -<span class="k">\vcenter</span> -<span class="k">\Vdash</span> AMSsymbols -<span class="k">\vDash</span> AMSsymbols -<span class="k">\vdash</span> -<span class="k">\vdots</span> -<span class="k">\vec</span> -<span class="k">\vee</span> -<span class="k">\veebar</span> AMSsymbols -<span class="k">\verb</span> -<span class="k">\Vert</span> -<span class="k">\vert</span> -<span class="k">\vphantom</span> -<span class="k">\Vvdash</span> AMSsymbols - -W -<span class="k">\wedge</span> -<span class="k">\widehat</span> -<span class="k">\widetilde</span> -<span class="k">\wp</span> -<span class="k">\wr</span> - -X -<span class="k">\Xi</span> -<span class="k">\xi</span> -<span class="k">\xleftarrow</span> AMSmath -<span class="k">\xrightarrow</span> AMSmath - -Y -<span class="k">\yen</span> AMSsymbols - -Z -<span class="k">\zeta</span> -</pre></div> -</div> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">MathJax TeX and LaTeX Support</a><ul> -<li><a class="reference internal" href="#tex-and-latex-in-html-documents">TeX and LaTeX in HTML documents</a></li> -<li><a class="reference internal" href="#tex-and-latex-extensions">TeX and LaTeX extensions</a><ul> -<li><a class="reference internal" href="#amsmath-and-amssymbol">AMSmath and AMSsymbol</a></li> -<li><a class="reference internal" href="#autobold">Autobold</a></li> -<li><a class="reference internal" href="#noerrors">noErrors</a></li> -<li><a class="reference internal" href="#noundefined">noUndefined</a></li> -<li><a class="reference internal" href="#unicode-support">Unicode support</a></li> -</ul> -</li> -<li><a class="reference internal" href="#supported-latex-commands">Supported LaTeX commands</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="platforms/movable-type.html" - title="previous chapter">Using MathJax in Movable Type</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="mathml.html" - title="next chapter">MathJax MathML Support</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/tex.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="mathml.html" title="MathJax MathML Support" - >next</a> |</li> - <li class="right" > - <a href="platforms/movable-type.html" title="Using MathJax in Movable Type" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/typeset.html b/docs/build/html/typeset.html @@ -1,321 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Modifying Math on the Page — MathJax v1.1 documentation</title> - <link rel="stylesheet" href="_static/mj.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '1.1', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <script type="text/javascript" src="../../MathJax.js"></script> - <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> - <link rel="next" title="The MathJax API" href="api/index.html" /> - <link rel="prev" title="Loading MathJax Dynamically" href="dynamic.html" /> - </head> - <body> - - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="api/index.html" title="The MathJax API" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="dynamic.html" title="Loading MathJax Dynamically" - accesskey="P">previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="modifying-math-on-the-page"> -<span id="typeset-math"></span><h1>Modifying Math on the Page<a class="headerlink" href="#modifying-math-on-the-page" title="Permalink to this headline">¶</a></h1> -<p>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 <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> 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.</p> -<p>You should not simply call this method directly, however. Because -MathJax operates asynchonously (see <a class="reference internal" href="synchronize.html#synchronization"><em>Synchronizing with MathJax</em></a> for details), you need to be sure that -your call to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> is synchronized with the -other actions that MathJax is taking. For example, it may already be -typesetting portions of the page, or it may be waiting for an output -jax to load, etc., and so you need to queue to typeset action to be -performed after MathJax has finished whatever else it may be doing. -That may be immediately, but it may not, and there is no way to tell.</p> -<p>To queue the typeset action, use the command</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Typeset"</span><span class="p">,</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">]);</span> -</pre></div> -</div> -<p>This will cause MathJax to typeset the page when it is next able to do -so. It guarantees that the typesetting will synchronize properly -with the loading of jax, extensions, fonts, stylesheets, and other -asynchornous activity, and is the only truely safe way to ask MathJax -to process additional material.</p> -<p>The <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> command also accepts a parameter -that is a DOM element whose contents is to be typeset. That could be -a paragraph, or a <tt class="docutils literal"><span class="pre"><div></span></tt> element, or even a MathJax math -<tt class="docutils literal"><span class="pre"><script></span></tt> tag. It could also be a the DOM <cite>id</cite> of such an object, in -which case, MathJax will look up the DOM element for you. So</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Typeset"</span><span class="p">,</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">,</span><span class="s2">"MathExample"</span><span class="p">]);</span> -</pre></div> -</div> -<p>would typeset the mathematics contained in the element whose <cite>id</cite> is -<tt class="docutils literal"><span class="pre">MathExample</span></tt>. This is equivalent to</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">math</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="s2">"MathExample"</span><span class="p">);</span> -<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Typeset"</span><span class="p">,</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">,</span><span class="nx">math</span><span class="p">]);</span> -</pre></div> -</div> -<p>If no element or element <cite>id</cite> is provided, the whole document is -typeset.</p> -<p>Note that the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Queue()</span></tt> method will return -immediately, regardless of whether the typesetting has taken place or -not, so you can not assume that the mathematics is visible after you -make this call. That means that things like the size of the container -for the mathematics may not yet reflect the size of the typeet -mathematics. If you need to perform actions that depend on the -mathematics being typeset, you should push <em>those</em> actions onto the -<tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt> as well.</p> -<p>This can be quite subtle, so you have to think carefully about the -structure of your code that works with the typeset mathematics. Also, -the things you push onto the queue should be <cite>Callback</cite> objects that -perform the actions you want when they are called, not the <em>results</em> -of calling the functions that do what you want.</p> -<div class="section" id="manipulating-individual-math-elements"> -<h2>Manipulating Individual Math Elements<a class="headerlink" href="#manipulating-individual-math-elements" title="Permalink to this headline">¶</a></h2> -<p>If you are not changing a complete DOM structure, but simply want to -update the contents of a single mathematical equation, you do not need -to use <tt class="docutils literal"><span class="pre">innerHTML</span></tt> and <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> to preprocess -and process an elements new content. Instead, you can ask MathJax to -find the <cite>element jax</cite> for the math element on the page, and use its -methods to modify and update the mathematics that it displays.</p> -<p>For example, suppose you have the following HTML in your document</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><div</span> <span class="na">id=</span><span class="s">"MathDiv"</span><span class="nt">></span> - The answer you provided is: ${}$. -<span class="nt"></div></span> -</pre></div> -</div> -<p>and MathJax has already preprocessed and typeset the mathematics -within dollar signs (it will be blank). A student has typed -something elsewhere on the page, and you want to typeset their answer -in the location of the mathematics that is already there. You could -replace the entire contents of the <cite>MathDiv</cite> element and call -<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> as described above, but there is more -efficient approach, which is to ask MathJax for the element jax for -the mathematics, and call its method for replacing the formula shown -by that element. For example:</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">math</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">getAllJax</span><span class="p">(</span><span class="s2">"MathDiv"</span><span class="p">)[</span><span class="mi">0</span><span class="p">];</span> -<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Text"</span><span class="p">,</span><span class="nx">math</span><span class="p">,</span><span class="s2">"x+1"</span><span class="p">]);</span> -</pre></div> -</div> -<p>This looks up the list of math elements in <cite>MathDiv</cite> element (there is -only one) and takes the first one (element 0) and stores it in -<tt class="docutils literal"><span class="pre">math</span></tt>. This is an <cite>element jax</cite> object (see the <a class="reference internal" href="api/elementjax.html#api-element-jax"><em>Element Jax</em></a> specification for details), which has a -<a class="reference internal" href="api/elementjax.html#Text" title="Text"><tt class="xref py py-meth docutils literal"><span class="pre">Text()</span></tt></a> method that can be used to set the input text of the -math element, and retypeset it.</p> -<p>Again, since the typesetting should be synchronized with other actions -of MathJax, the call should be pushed onto the <tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt>, -as shown above, rather than called directly. The example above -performs the equivalent of <tt class="docutils literal"><span class="pre">math.Text("x+1")</span></tt> as soon as MathJax is -able to do so. Any additional actions the rely on the equation -<tt class="docutils literal"><span class="pre">x+1</span></tt> actually showing on screen should also be pushed onto the -queue so that they will not occur before the math is typeset.</p> -<p>The actions you can perform on an element jax include:</p> -<blockquote> -<div><dl class="describe"> -<dt> -<tt class="descname">Text(newmath)</tt></dt> -<dd><p>to set the math text of the element to <cite>newmath</cite> and typeset.</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">Reprocess()</tt></dt> -<dd><p>to remove the output and reproduce it again (for -example, if CSS has changed that would alter the spacing of the -mathematics).</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">Remove()</tt></dt> -<dd><p>to remove the output for this math element (but not -the original <tt class="docutils literal"><span class="pre"><script></span></tt> tag).</p> -</dd></dl> - -<dl class="describe"> -<dt> -<tt class="descname">SourceElement()</tt></dt> -<dd><p>to obtain a reference to the original -<tt class="docutils literal"><span class="pre"><script></span></tt> object that is assocaited with this element jax.</p> -</dd></dl> - -</div></blockquote> -<p>Note that once you have located an element jax, you can keep using it -and don’t have to look it up again. So for the example above, if the -student is going to be able to type several different answers that you -will want to typeset, you can look up the element jax once at the -beginning after MathJax has processed the page the first time, and -then use that result each time you adjust the mathematics to be -displayed.</p> -<p>To get the element jax the first time, you need to be sure that you -ask MathJax for it <strong>after</strong> MathJax has processed the page the first -time. This is another sitaution where you want to use the MathJax -queue. If your startup code performs the commands</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">studentDisplay</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span> -<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> - <span class="nx">studentDisplay</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">getAllJax</span><span class="p">(</span><span class="s2">"MathDiv"</span><span class="p">);</span> -<span class="p">});</span> -</pre></div> -</div> -<p>then you can use</p> -<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Text"</span><span class="p">,</span><span class="nx">studentDisplay</span><span class="p">,</span><span class="nx">studentAnswer</span><span class="p">])</span> -</pre></div> -</div> -<p>to change the student’s answer to be the typeset version of whatever -is in the <tt class="docutils literal"><span class="pre">studentAnswer</span></tt> variable.</p> -<p>Here is a complete example that illustrates this approach</p> -<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span> -<span class="nt"><head></span> -<span class="nt"><title></span>MathJax Dynamic Math Test Page<span class="nt"></title></span> - -<span class="nt"><script </span><span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></span> - <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> - <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">],</span> - <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">],</span> - <span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span><span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s2">"$"</span><span class="p">,</span><span class="s2">"$"</span><span class="p">],[</span><span class="s2">"\\("</span><span class="p">,</span><span class="s2">"\\)"</span><span class="p">]]}</span> - <span class="p">});</span> -<span class="nt"></script></span> - -<span class="nt"></head></span> -<span class="nt"><body></span> - -<span class="nt"><script></span> - <span class="c1">//</span> - <span class="c1">// Use a closure to hide the local variables from the</span> - <span class="c1">// global namespace</span> - <span class="c1">//</span> - <span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> - <span class="kd">var</span> <span class="nx">QUEUE</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">queue</span><span class="p">;</span> <span class="c1">// shorthand for the queue</span> - <span class="kd">var</span> <span class="nx">math</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span> <span class="c1">// the element jax for the math output.</span> - - <span class="c1">//</span> - <span class="c1">// Get the element jax when MathJax has produced it.</span> - <span class="c1">//</span> - <span class="nx">QUEUE</span><span class="p">.</span><span class="nx">Push</span><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> - <span class="nx">math</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">getAllJax</span><span class="p">(</span><span class="s2">"MathOutput"</span><span class="p">)[</span><span class="mi">0</span><span class="p">];</span> - <span class="p">});</span> - - <span class="c1">//</span> - <span class="c1">// The onchange event handler that typesets the</span> - <span class="c1">// math entered by the user</span> - <span class="c1">//</span> - <span class="nb">window</span><span class="p">.</span><span class="nx">UpdateMath</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">TeX</span><span class="p">)</span> <span class="p">{</span> - <span class="nx">QUEUE</span><span class="p">.</span><span class="nx">Push</span><span class="p">([</span><span class="s2">"Text"</span><span class="p">,</span><span class="nx">math</span><span class="p">,</span><span class="s2">"\\displaystyle{"</span><span class="o">+</span><span class="nx">TeX</span><span class="o">+</span><span class="s2">"}"</span><span class="p">]);</span> - <span class="p">}</span> - <span class="p">})();</span> -<span class="nt"></script></span> - -Type some TeX code: -<span class="nt"><input</span> <span class="na">id=</span><span class="s">"MathInput"</span> <span class="na">size=</span><span class="s">"50"</span> <span class="na">onchange=</span><span class="s">"UpdateMath(this.value)"</span> <span class="nt">/></span> -<span class="nt"><p></span> - -<span class="nt"><div</span> <span class="na">id=</span><span class="s">"MathOutput"</span><span class="nt">></span> -You typed: ${}$ -<span class="nt"></div></span> - -<span class="nt"></body></span> -<span class="nt"></html></span> -</pre></div> -</div> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">Modifying Math on the Page</a><ul> -<li><a class="reference internal" href="#manipulating-individual-math-elements">Manipulating Individual Math Elements</a></li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="dynamic.html" - title="previous chapter">Loading MathJax Dynamically</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="api/index.html" - title="next chapter">The MathJax API</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/typeset.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" size="18" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="api/index.html" title="The MathJax API" - >next</a> |</li> - <li class="right" > - <a href="dynamic.html" title="Loading MathJax Dynamically" - >previous</a> |</li> - <li><a href="index.html">MathJax v1.1 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2011 Design Science. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. - </div> - - </body> -</html> -\ No newline at end of file diff --git a/docs/build/html/.buildinfo b/docs/html/.buildinfo diff --git a/docs/html/CSS-styles.html b/docs/html/CSS-styles.html @@ -0,0 +1,176 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>CSS Style Objects — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="Glossary" href="glossary.html" /> + <link rel="prev" title="Describing HTML snippets" href="HTML-snippets.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="glossary.html" title="Glossary" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="HTML-snippets.html" title="Describing HTML snippets" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="css-style-objects"> +<span id="id1"></span><h1>CSS Style Objects<a class="headerlink" href="#css-style-objects" title="Permalink to this headline">¶</a></h1> +<p>Many MathJax components allow you to specify CSS styles that control +the look of the elements they create. These are described using CSS +style objects, which are JavaScript objects that represent standard +CSS declarations. The main CSS style object is a collection of +<cite>name:value</cite> pairs where the <cite>name</cite> is the CSS selector that is being +defined, and the <cite>value</cite> is an object that gives the style for that +selector. Most often, the selector will need to be enclosed in +quotation marks, as it will contain special characters, so you would +need to use <tt class="docutils literal"><span class="pre">"#myID"</span></tt> rather than just <tt class="docutils literal"><span class="pre">#myID</span></tt> and <tt class="docutils literal"><span class="pre">"ul</span> <span class="pre">li"</span></tt> +rather than just <tt class="docutils literal"><span class="pre">ul</span> <span class="pre">li</span></tt>.</p> +<p>The value used to define the CSS style can either be a string +containing the CSS definition, or a javascript object that is itself a +collection of <cite>name:value</cite> pairs, where the <cite>name</cite> is the attribute +being defined and <cite>value</cite> is the value that attibute should be given. +Note that, since this is a JavaScript object, the pairs are separated +by commas (not semi-colons) and the values are enclosed in quotation +marks. If the name contains dashes, it should be enclosed in +quotation marks as well.</p> +<p>For example, <tt class="docutils literal"><span class="pre">jax/output/HTML-CSS/config.js</span></tt> includes the following +declaration:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">styles</span><span class="o">:</span> <span class="p">{</span> + + <span class="s2">".MathJax .merror"</span><span class="o">:</span> <span class="p">{</span> + <span class="s2">"background-color"</span><span class="o">:</span> <span class="s2">"#FFFF88"</span><span class="p">,</span> + <span class="nx">color</span><span class="o">:</span> <span class="s2">"#CC0000"</span><span class="p">,</span> + <span class="nx">border</span><span class="o">:</span> <span class="s2">"1px solid #CC0000"</span><span class="p">,</span> + <span class="nx">padding</span><span class="o">:</span> <span class="s2">"1px 3px"</span><span class="p">,</span> + <span class="s2">"font-family"</span><span class="o">:</span> <span class="s2">"serif"</span><span class="p">,</span> + <span class="s2">"font-style"</span><span class="o">:</span> <span class="s2">"normal"</span><span class="p">,</span> + <span class="s2">"font-size"</span><span class="o">:</span> <span class="s2">"90%"</span> + <span class="p">},</span> + + <span class="s2">".MathJax_Preview"</span><span class="o">:</span> <span class="p">{</span><span class="nx">color</span><span class="o">:</span> <span class="s2">"#888888"</span><span class="p">},</span> + +<span class="p">}</span> +</pre></div> +</div> +<p>This defines two CSS styles, one for the selector <tt class="docutils literal"><span class="pre">.MathJax</span> +<span class="pre">.merror</span></tt>, which specifies a background color, foreground color, +border, and so on, and a second for <tt class="docutils literal"><span class="pre">.MathJax_Preview</span></tt> that sets its +color.</p> +<p>You can add as many such definitions to a <tt class="docutils literal"><span class="pre">styles</span></tt> object as you +wish. Note, however, that since this is a JavaScript object, the +selectors must be unique (e.g., you can’t use two definitions for +<tt class="docutils literal"><span class="pre">"img"</span></tt>, for example, as only the last one would be saved). If you +need to use more than one entry for a single selector, you can add +comments like <tt class="docutils literal"><span class="pre">/*</span> <span class="pre">1</span> <span class="pre">*/</span></tt> and <tt class="docutils literal"><span class="pre">/*</span> <span class="pre">2</span> <span class="pre">*/</span></tt> to the selector to make them +unique.</p> +<p>It is possible to include selectors like <tt class="docutils literal"><span class="pre">"@media</span> <span class="pre">print"</span></tt>, in which +case the value is a CSS style object. For example:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">styles</span><span class="o">:</span> <span class="p">{</span> + <span class="s2">"@media print"</span><span class="o">:</span> <span class="p">{</span> + <span class="s2">".MathJax .merror"</span><span class="o">:</span> <span class="p">{</span> + <span class="s2">"background-color"</span><span class="o">:</span> <span class="s2">"white"</span><span class="p">,</span> + <span class="nx">border</span><span class="o">:</span> <span class="mi">0</span> + <span class="p">}</span> + <span class="p">}</span> +<span class="p">}</span> +</pre></div> +</div> +<p>The various extensions and output processors include more examples of +CSS style objects, so see the code for those files for additional +samples. In particular, the <tt class="docutils literal"><span class="pre">extensions/MathMenu.js</span></tt>, +<tt class="docutils literal"><span class="pre">extensions/MathZoom.js</span></tt>, <tt class="docutils literal"><span class="pre">extensions/FontWarnsing.js</span></tt>, and +<tt class="docutils literal"><span class="pre">jax/output/HTML-CSS/jax.js</span></tt> files include such definitions.</p> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="HTML-snippets.html" + title="previous chapter">Describing HTML snippets</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="glossary.html" + title="next chapter">Glossary</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/CSS-styles.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="glossary.html" title="Glossary" + >next</a> |</li> + <li class="right" > + <a href="HTML-snippets.html" title="Describing HTML snippets" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/HTML-snippets.html b/docs/html/HTML-snippets.html @@ -0,0 +1,173 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Describing HTML snippets — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="CSS Style Objects" href="CSS-styles.html" /> + <link rel="prev" title="Converting to MathJax from jsMath" href="jsMath.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="CSS-styles.html" title="CSS Style Objects" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="jsMath.html" title="Converting to MathJax from jsMath" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="describing-html-snippets"> +<span id="html-snippets"></span><h1>Describing HTML snippets<a class="headerlink" href="#describing-html-snippets" title="Permalink to this headline">¶</a></h1> +<p>A number of MathJax configuration options allow you to specify an HTML +snippet using a JavaScript object. This lets you include HTML in your +configutation files even though they are not HTML files themselves. +The format is fairly simple, but flexible enough to let you represent +complicated HTML trees.</p> +<p>An HTML snippet is an array consisting of a series of elements that format +the HTML tree. Those elements are one of two things: either a string, +which represents text to be included in the snippet, or an array, +which represents an HTML tag to be included. In the latter case, the +array consists of three items: a string that is the tag name (e.g., +“img”), an optional object that gives attributes for the tag (as +described below), and an optional HTML snippet array that gives the +contents of the tag.</p> +<p>When attributes are provided, they are given as <cite>name:value</cite> pairs, +with the <cite>name</cite> giving the attribute name, and <cite>value</cite> giving its +value. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[[</span><span class="s2">"img"</span><span class="p">,{</span><span class="nx">src</span><span class="o">:</span><span class="s2">"/images/mypic.jpg"</span><span class="p">}]]</span> +</pre></div> +</div> +<p>represents an HTML snippet that includes one element: an <tt class="docutils literal"><span class="pre"><img></span></tt> tag +with <tt class="docutils literal"><span class="pre">src</span></tt> set to <tt class="docutils literal"><span class="pre">/images/mypic.jpg</span></tt>. That is, this is +equivalent to</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><img</span> <span class="na">src=</span><span class="s">"/images/mypic.jpg"</span><span class="nt">></span> +</pre></div> +</div> +<p>Note that the snippet has two sets of square brackets. The outermost +one is for the array that holds the snippet, and the innermost set is +because the first (and only) element in the snippet is a tag, not +text. Note that the code <tt class="docutils literal"><span class="pre">["img",{src:"/images/mypic.jpg"}]</span></tt> +is invalid as an HTML snippet. It would represent a snippet that +starts with “img” as text in the snippet (not a tag), but the second +item is neither a string nor an array, and so is illegal. This is a +common mistake that should be avoided.</p> +<p>A more complex example is the following:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[</span> + <span class="s2">"Please read the "</span><span class="p">,</span> + <span class="p">[</span><span class="s2">"a"</span><span class="p">,{</span><span class="nx">href</span><span class="o">:</span><span class="s2">"instructions.html"</span><span class="p">},[</span><span class="s2">"instructions"</span><span class="p">]],</span> + <span class="s2">" carefully before proceeding"</span> +<span class="p">]</span> +</pre></div> +</div> +<p>which is equivalent to</p> +<div class="highlight-html"><div class="highlight"><pre>please read the <span class="nt"><a</span> <span class="na">href=</span><span class="s">"instructions.html"</span><span class="nt">></span>instructions<span class="nt"></a></span> carefully +before proceeding. +</pre></div> +</div> +<p>A final example shows how to set style attributes on an object:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[[</span><span class="s2">"span"</span><span class="p">,</span> + <span class="p">{</span> + <span class="nx">id</span><span class="o">:</span><span class="s2">"mySpan"</span><span class="p">,</span> + <span class="nx">style</span><span class="o">:</span> <span class="p">{</span><span class="nx">color</span><span class="o">:</span><span class="s2">"red"</span><span class="p">,</span> <span class="s2">"font-weight"</span><span class="o">:</span><span class="s2">"bold"</span><span class="p">}</span> + <span class="p">},</span> + <span class="p">[</span><span class="s2">" This is bold text shown in red "</span><span class="p">]</span> +<span class="p">]]</span> +</pre></div> +</div> +<p>which is equivalent to</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><span</span> <span class="na">id=</span><span class="s">"mySpan"</span> <span class="na">style=</span><span class="s">"color: red; font-weight: bold;"</span><span class="nt">></span> +This is bold text shown in red +<span class="nt"></span></span> +</pre></div> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="jsMath.html" + title="previous chapter">Converting to MathJax from jsMath</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="CSS-styles.html" + title="next chapter">CSS Style Objects</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/HTML-snippets.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="CSS-styles.html" title="CSS Style Objects" + >next</a> |</li> + <li class="right" > + <a href="jsMath.html" title="Converting to MathJax from jsMath" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/build/html/_images/mt_head.png b/docs/html/_images/mt_head.png Binary files differ. diff --git a/docs/build/html/_images/mt_menu.png b/docs/html/_images/mt_menu.png Binary files differ. diff --git a/docs/build/html/_images/mt_templates.png b/docs/html/_images/mt_templates.png Binary files differ. diff --git a/docs/build/html/_images/wp_menu.png b/docs/html/_images/wp_menu.png Binary files differ. diff --git a/docs/build/html/_images/wp_templates.png b/docs/html/_images/wp_templates.png Binary files differ. diff --git a/docs/build/html/_sources/CSS-styles.txt b/docs/html/_sources/CSS-styles.txt diff --git a/docs/build/html/_sources/HTML-snippets.txt b/docs/html/_sources/HTML-snippets.txt diff --git a/docs/build/html/_sources/api/ajax.txt b/docs/html/_sources/api/ajax.txt diff --git a/docs/build/html/_sources/api/callback.txt b/docs/html/_sources/api/callback.txt diff --git a/docs/build/html/_sources/api/elementjax.txt b/docs/html/_sources/api/elementjax.txt diff --git a/docs/build/html/_sources/api/html.txt b/docs/html/_sources/api/html.txt diff --git a/docs/build/html/_sources/api/hub.txt b/docs/html/_sources/api/hub.txt diff --git a/docs/build/html/_sources/api/index.txt b/docs/html/_sources/api/index.txt diff --git a/docs/build/html/_sources/api/inputjax.txt b/docs/html/_sources/api/inputjax.txt diff --git a/docs/build/html/_sources/api/jax.txt b/docs/html/_sources/api/jax.txt diff --git a/docs/build/html/_sources/api/message.txt b/docs/html/_sources/api/message.txt diff --git a/docs/build/html/_sources/api/object.txt b/docs/html/_sources/api/object.txt diff --git a/docs/build/html/_sources/api/outputjax.txt b/docs/html/_sources/api/outputjax.txt diff --git a/docs/build/html/_sources/api/queue.txt b/docs/html/_sources/api/queue.txt diff --git a/docs/build/html/_sources/api/signal.txt b/docs/html/_sources/api/signal.txt diff --git a/docs/build/html/_sources/api/variable.txt b/docs/html/_sources/api/variable.txt diff --git a/docs/build/html/_sources/callbacks.txt b/docs/html/_sources/callbacks.txt diff --git a/docs/build/html/_sources/community.txt b/docs/html/_sources/community.txt diff --git a/docs/build/html/_sources/configuration.txt b/docs/html/_sources/configuration.txt diff --git a/docs/html/_sources/dynamic.txt b/docs/html/_sources/dynamic.txt @@ -0,0 +1,181 @@ +.. _ajax-mathjax: + +*************************** +Loading MathJax Dynamically +*************************** + +MathJax is designed to be included via a ``<script>`` tag in the +``<head>`` section of your HTML document, and it does rely on being +part of the original document in that it uses an ``onload`` event +handler to synchronize its actions with the loading of the page. +If you wish to insert MathJax into a document after it has +been loaded, that will normally occur *after* the page's ``onload`` +handler has fired, and so MathJax will not be able to tell if it is +safe for it to process the contents of the page. Indeed, it will wait +forever for its ``onload`` handler to fire, and so will never process +the page. + +To solve this problem, you will need to call MathJax's ``onload`` +handler yourself, to let it know that it is OK to typeset the +mathematics on the page. You accomplish this by calling the +:meth:`MathJax.Hub.Startup.onload()` method as part of your MathJax +startup script. To do this, you will need to give MathJax an in-line +configuration, so you will not be able to use the +``config/MathJax.js`` file (though you can add it to your in-line +configuration's `config` array). + +Here is an example of how to load and configure MathJax dynamically: + +.. code-block:: javascript + + (function () { + var script = document.createElement("script"); + script.type = "text/javascript"; + script.src = "/MathJax/MathJax.js"; // use the location of your MathJax + + var config = 'MathJax.Hub.Config({' + + 'extensions: ["tex2jax.js"],' + + 'jax: ["input/TeX","output/HTML-CSS"]' + + '});' + + 'MathJax.Hub.Startup.onload();'; + + if (window.opera) {script.innerHTML = config} + else {script.text = config} + + document.getElementsByTagName("head")[0].appendChild(script); + })(); + +Be sure to set the ``src`` to the correct URL for your copy of +MathJax. You can adjust the ``config`` variable to your needs, but be +careful to get the commas right. The ``window.opera`` test is because +Opera doesn't handle setting ``script.text`` properly, while Internet +Explorer doesn't handle setting the ``innerHTML`` of a script tag. + +Here is a version that uses the ``config/MathJax.js`` file to +configure MathJax: + +.. code-block:: javascript + + (function () { + var script = document.createElement("script"); + script.type = "text/javascript"; + script.src = "/MathJax/MathJax.js"; // use the location of your MathJax + + var config = 'MathJax.Hub.Config({ config: "MathJax.js" }); ' + + 'MathJax.Hub.Startup.onload();'; + + if (window.opera) {script.innerHTML = config} + else {script.text = config} + + document.getElementsByTagName("head")[0].appendChild(script); + })(); + +Note that the **only** reliable way to configure MathJax is to use an +in-line configuration of the type discussed above. You should **not** +call :meth:`MathJax.Hub.Config()` directly in your code, as it will +not run at the correct time --- it will either run too soon, in which +case ``MathJax`` may not be defined and the function will throw an +error, or it will run too late, after MathJax has already finished its +configuration process, so your changes will not have the desired +effect. + + +MathJax and GreaseMonkey +======================== + +You can use techniques like the ones discussed above to good effect in +GreaseMonkey scripts. There are GreaseMonkey work-alikes for all the +major browsers: + +- Firefox: `GreaseMonkey <http://addons.mozilla.org/firefox/addon/748>`_ +- Safari: `GreaseKit <http://8-p.info/greasekit/>`_ (also requires `SIMBL <http://www.culater.net/software/SIMBL/SIMBL.php>`_) +- Opera: Built-in (`instructions <http://www.ghacks.net/2008/08/10/greasemonkey-in-opera/>`_) +- Internet Explorer: `IEPro7 <http://www.ie7pro.com/>`_ +- Chrome: Built-in for recent releases + +Note, however, that most browsers don't allow you to insert a script +that loads a ``file://`` URL into a page that comes from the web (for +security reasons). That means that you can't have your GreaseMonkey +script load a local copy of MathJax, so you have to refer to a +server-based copy. In the scripts below, you need to insert the URL +of a copy of MathJax from your own server. + +---- + +Here is a script that runs MathJax in any document that contains +MathML (whether its includes MathJax or not). That allows +browsers that don't have native MathML support to view any web pages +with MathML, even if they say it only works in Forefox and +IE+MathPlayer. + +.. code-block:: javascript + + // ==UserScript== + // @name MathJax MathML + // @namespace http://www.mathjax.org/ + // @description Insert MathJax into pages containing MathML + // @include * + // ==/UserScript== + + if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) { + if ((document.getElementsByTagName("math").length > 0) || + (document.getElementsByTagNameNS == null ? false : + (document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) { + var script = document.createElement("script"); + script.src = "http://www.yoursite.edu/MathJax/MathJax.js"; // put your URL here + var config = 'MathJax.Hub.Config({' + + 'extensions:["mml2jax.js"],' + + 'jax:["input/MathML","output/HTML-CSS"]' + + '});' + + 'MathJax.Hub.Startup.onload()'; + if (window.opera) {script.innerHTML = config} else {script.text = config} + document.getElementsByTagName("head")[0].appendChild(script); + } + } + +**Source**: `mathjax_mathml.user.js <_static/mathjax_mathml.user.js>`_ + +---- + +Here is a script that runs MathJax in Wikipedia pages after first +converting the math images to their original TeX code. + +.. code-block:: javascript + + // ==UserScript== + // @name MathJax in Wikipedia + // @namespace http://www.mathjax.org/ + // @description Insert MathJax into Wikipedia pages + // @include http://en.wikipedia.org/wiki/* + // ==/UserScript== + + if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) { + // + // Replace the images with MathJax scripts of type math/tex + // + var images = document.getElementsByTagName('img'); + for (var i = images.length - 1; i >= 0; i--) { + var img = images[i]; + if (img.className === "tex") { + var script = document.createElement("script"); script.type = "math/tex"; + if (window.opera) {script.innerHTML = img.alt} else {script.text = img.alt} + img.parentNode.replaceChild(script,img); + } + } + // + // Load MathJax and have it process the page + // + var script = document.createElement("script"); + script.src = "http://www.yoursite.edu/MathJax/MathJax.js"; // put your URL here + var config = 'MathJax.Hub.Config({' + + 'config: ["MMLorHTML.js"],' + + 'extensions:["TeX/noErrors.js","TeX/noUndefined.js",' + + '"TeX/AMSmath.js","TeX/AMSsymbols.js"],' + + 'jax:["input/TeX"]' + + '});' + + 'MathJax.Hub.Startup.onload()'; + if (window.opera) {script.innerHTML = config} else {script.text = config} + document.getElementsByTagName("head")[0].appendChild(script); + } + +**Source**: `mathjax_wikipedia.user.js <_static/mathjax_wikipedia.user.js>`_ diff --git a/docs/build/html/_sources/glossary.txt b/docs/html/_sources/glossary.txt diff --git a/docs/build/html/_sources/index.txt b/docs/html/_sources/index.txt diff --git a/docs/build/html/_sources/installation.txt b/docs/html/_sources/installation.txt diff --git a/docs/build/html/_sources/jsMath.txt b/docs/html/_sources/jsMath.txt diff --git a/docs/build/html/_sources/mathjax.txt b/docs/html/_sources/mathjax.txt diff --git a/docs/build/html/_sources/mathml.txt b/docs/html/_sources/mathml.txt diff --git a/docs/build/html/_sources/model.txt b/docs/html/_sources/model.txt diff --git a/docs/build/html/_sources/options/FontWarnings.txt b/docs/html/_sources/options/FontWarnings.txt diff --git a/docs/build/html/_sources/options/HTML-CSS.txt b/docs/html/_sources/options/HTML-CSS.txt diff --git a/docs/build/html/_sources/options/MMLorHTML.txt b/docs/html/_sources/options/MMLorHTML.txt diff --git a/docs/build/html/_sources/options/MathML.txt b/docs/html/_sources/options/MathML.txt diff --git a/docs/build/html/_sources/options/MathMenu.txt b/docs/html/_sources/options/MathMenu.txt diff --git a/docs/build/html/_sources/options/MathZoom.txt b/docs/html/_sources/options/MathZoom.txt diff --git a/docs/build/html/_sources/options/NativeMML.txt b/docs/html/_sources/options/NativeMML.txt diff --git a/docs/build/html/_sources/options/TeX.txt b/docs/html/_sources/options/TeX.txt diff --git a/docs/build/html/_sources/options/hub.txt b/docs/html/_sources/options/hub.txt diff --git a/docs/build/html/_sources/options/jsMath2jax.txt b/docs/html/_sources/options/jsMath2jax.txt diff --git a/docs/build/html/_sources/options/mml2jax.txt b/docs/html/_sources/options/mml2jax.txt diff --git a/docs/build/html/_sources/options/tex2jax.txt b/docs/html/_sources/options/tex2jax.txt diff --git a/docs/build/html/_sources/output.txt b/docs/html/_sources/output.txt diff --git a/docs/build/html/_sources/platforms/index.txt b/docs/html/_sources/platforms/index.txt diff --git a/docs/build/html/_sources/platforms/movable-type.txt b/docs/html/_sources/platforms/movable-type.txt diff --git a/docs/build/html/_sources/platforms/wordpress.txt b/docs/html/_sources/platforms/wordpress.txt diff --git a/docs/build/html/_sources/queues.txt b/docs/html/_sources/queues.txt diff --git a/docs/build/html/_sources/signals.txt b/docs/html/_sources/signals.txt diff --git a/docs/build/html/_sources/start.txt b/docs/html/_sources/start.txt diff --git a/docs/build/html/_sources/startup.txt b/docs/html/_sources/startup.txt diff --git a/docs/build/html/_sources/synchronize.txt b/docs/html/_sources/synchronize.txt diff --git a/docs/build/html/_sources/tex.txt b/docs/html/_sources/tex.txt diff --git a/docs/build/html/_sources/typeset.txt b/docs/html/_sources/typeset.txt diff --git a/docs/build/html/_static/basic.css b/docs/html/_static/basic.css diff --git a/docs/build/html/_static/doctools.js b/docs/html/_static/doctools.js diff --git a/docs/build/html/_static/file.png b/docs/html/_static/file.png Binary files differ. diff --git a/docs/build/html/_static/jquery.js b/docs/html/_static/jquery.js diff --git a/docs/build/html/_static/logo.gif b/docs/html/_static/logo.gif Binary files differ. diff --git a/docs/build/html/_static/mathjax_mathml.user.js b/docs/html/_static/mathjax_mathml.user.js diff --git a/docs/build/html/_static/mathjax_wikipedia.user.js b/docs/html/_static/mathjax_wikipedia.user.js diff --git a/docs/build/html/_static/minus.png b/docs/html/_static/minus.png Binary files differ. diff --git a/docs/build/html/_static/mj.css b/docs/html/_static/mj.css diff --git a/docs/build/html/_static/plus.png b/docs/html/_static/plus.png Binary files differ. diff --git a/docs/build/html/_static/pygments.css b/docs/html/_static/pygments.css diff --git a/docs/build/html/_static/searchtools.js b/docs/html/_static/searchtools.js diff --git a/docs/build/html/_static/underscore.js b/docs/html/_static/underscore.js diff --git a/docs/html/api/ajax.html b/docs/html/api/ajax.html @@ -0,0 +1,409 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax.Ajax Object — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="The MathJax API" href="index.html" /> + <link rel="next" title="The MathJax.Message Object" href="message.html" /> + <link rel="prev" title="The MathJax.Hub Object" href="hub.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="message.html" title="The MathJax.Message Object" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="hub.html" title="The MathJax.Hub Object" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-ajax-object"> +<span id="api-ajax"></span><h1>The MathJax.Ajax Object<a class="headerlink" href="#the-mathjax-ajax-object" title="Permalink to this headline">¶</a></h1> +<p>The <cite>MathJax.Ajax</cite> structure holds the data and functions for handling +loading of external modules. Modules are loaded only once, even if +called for in several places. The loading of files is asynchronous, +and so the code that requests an external module will continue to run +even when that module has not completed loading, so it is important to +be aware of the timing issues this may cause. Similarly, creating or +loading stylesheets is an asynchronous action. In particular, all +actions that rely on the file or stylesheet having been loaded must be +delayed until after the file has been downloaded completely. This is +the reason for the large number of routines that take callback +functions.</p> +<p>Any operation that could cause the loading of a file or stylesheet +must be synchronized with the rest of the code via such callbacks. +Since processing any mathematics might cause files to be loaded (e.g., +little-used markup might be implemented in an extension that is loaded +only when that markup is used), any code that dynamically typesets +mathematics will need to be structured to use callbacks to guarantee +that the mathematics has been completely processed before the code +tries to use it. See the <a class="reference internal" href="../synchronize.html#synchronization"><em>Synchronizing with MathJax</em></a> +documentation for details on how to do this properly.</p> +<div class="section" id="properties"> +<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">timeout</tt></dt> +<dd><p>Number of milliseconds to wait for a file to load before +it is considered to have failed to load.</p> +<p><em>Default:</em> 20 seconds</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">STATUS.OK</tt></dt> +<dd><p>The value used to indicate that a file load has occurred +successfully.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">STATUS.ERROR</tt></dt> +<dd><p>The value used to indicate that a file load has caused an error or +a timeout to occur.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">loaded</tt></dt> +<dd><p>An object containing the names of the files that have been loaded (or +requested) so far. <tt class="docutils literal"><span class="pre">MathJax.Ajax.loaded["file"]</span></tt> will be +non-<tt class="docutils literal"><span class="pre">null</span></tt> when the file has been loaded, with the value being +the <tt class="docutils literal"><span class="pre">MathJax.Ajax.STATUS</span></tt> value of the load attempt.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">loading</tt></dt> +<dd><p>An object containing the files that are currently loading, the +callbacks that are to be run when they load or timeout, and +additional internal data.</p> +</dd></dl> + +</div> +<div class="section" id="methods"> +<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> +<dl class="method"> +<dt id="Require"> +<tt class="descname">Require</tt><big>(</big><em>file</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Require" title="Permalink to this definition">¶</a></dt> +<dd><p>Loads the given file if it hasn’t been already. The file must be a +JavaScript file or a CSS stylesheet; i.e., it must end in <tt class="docutils literal"><span class="pre">.js</span></tt> +or <tt class="docutils literal"><span class="pre">.css</span></tt>. Alternatively, it can be an object with a single +<cite>key:value</cite> pair where the <cite>key</cite> is one of <tt class="docutils literal"><span class="pre">js</span></tt> or <tt class="docutils literal"><span class="pre">css</span></tt> and +the <cite>value</cite> is the file of that type to be loaded (this makes it +possible to have the file be created by a CGI script, for example, +or to use a <tt class="docutils literal"><span class="pre">data::</span></tt> URL). The file must be relative to the +MathJax home directory and can not contain <tt class="docutils literal"><span class="pre">../</span></tt> file path +components.</p> +<p>When the file is completely loaded and run, the <cite>callback</cite>, if +provided, will be executed passing it the status of the file load. +If there was an error while loading the file, or if the file fails +to load within the time limit given by <tt class="docutils literal"><span class="pre">MathJax.Ajax.timout</span></tt>, +the status will be <tt class="docutils literal"><span class="pre">MathJax.Ajax.STATUS.ERROR</span></tt> otherwise it +will be <tt class="docutils literal"><span class="pre">MathJax.Ajax.STATUS.OK</span></tt>. If the file is already +loaded, the callback will be called immediately and the file will +not be loaded again.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> — name of the file to be loaded</li> +<li><strong>callback</strong> — the callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="Load"> +<tt class="descname">Load</tt><big>(</big><em>file</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Load" title="Permalink to this definition">¶</a></dt> +<dd><p>Used internally to load a given file without checking if it +already has been loaded, or where it is to be found.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> — name of the file to be loaded</li> +<li><strong>callback</strong> — the callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="loadComplete"> +<tt class="descname">loadComplete</tt><big>(</big><em>file</em><big>)</big><a class="headerlink" href="#loadComplete" title="Permalink to this definition">¶</a></dt> +<dd><p>Called from within the loaded files to inform MathJax that the +file has been completely loaded and initialized. The <cite>file</cite> +parameter is the name of the file that has been loaded. This +routine will cause any callback functions registered for the file +or included in the :meth:<tt class="docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> calls to be +executed, passing them the status or the load +(<cite>MathJax.Ajax.STATUS.OK`</cite> or <tt class="docutils literal"><span class="pre">MathJax.Ajax.STATUS.ERROR</span></tt>) as +their last parameter.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> — name of the file that has been loaded</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="loadTimeout"> +<tt class="descname">loadTimeout</tt><big>(</big><em>file</em><big>)</big><a class="headerlink" href="#loadTimeout" title="Permalink to this definition">¶</a></dt> +<dd><p>Called when the timeout period is over and the file hasn’t loaded. +This indicates an error condition, and the +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.loadError()</span></tt> method will be executed, then the +file’s callback will be run with <tt class="docutils literal"><span class="pre">MathJax.Ajax.STATUS.ERROR</span></tt> as +its parameter.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> — name of the file that timed out</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="loadError"> +<tt class="descname">loadError</tt><big>(</big><em>file</em><big>)</big><a class="headerlink" href="#loadError" title="Permalink to this definition">¶</a></dt> +<dd><p>The default error handler called when a file fails to load. It +puts a warning message into the MathJax message box on screen.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> — the name of the file that failed to load</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="loadHook"> +<tt class="descname">loadHook</tt><big>(</big><em>file</em>, <em>callback</em><big>)</big><a class="headerlink" href="#loadHook" title="Permalink to this definition">¶</a></dt> +<dd><p>Registers a callback to be executed when the given file is +loaded. The file load operation need to be started when this +method is called, so it can be used to register a hook for a file +that may be loaded in the future.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> — the name of the file to wait for</li> +<li><strong>callback</strong> — the callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="Styles"> +<tt class="descname">Styles</tt><big>(</big><em>styles</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Styles" title="Permalink to this definition">¶</a></dt> +<dd><p>Creates a stylesheet from the given style data. <cite>styles</cite> can +either be a string containing a stylesheet definition, or an +object containing a <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS Style Object</em></a>. +For example:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Styles</span><span class="p">(</span><span class="s2">"body {font-family: serif; font-style: italic}"</span><span class="p">);</span> +</pre></div> +</div> +<p>and</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Styles</span><span class="p">({</span> + <span class="nx">body</span><span class="o">:</span> <span class="p">{</span> + <span class="s2">"font-family"</span><span class="o">:</span> <span class="s2">"serif"</span><span class="p">,</span> + <span class="s2">"font-style"</span><span class="o">:</span> <span class="s2">"italic"</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>both set the body font family and style.</p> +<p>The callback routine is called when the stylesheet has been +created and is available for use.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>styles</strong> — CSS style object for the styles to set</li> +<li><strong>callback</strong> — the callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +<div class="admonition note"> +<p class="first admonition-title">Note</p> +<p class="last">Internet Explorer has a limit of 32 dynamically created +stylesheets, so it is best to combine your styles into one +large group rather than making several smaller calls.</p> +</div> +</dd></dl> + +<dl class="method"> +<dt id="fileURL"> +<tt class="descname">fileURL</tt><big>(</big><em>file</em><big>)</big><a class="headerlink" href="#fileURL" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns a complete URL to a file (replacing <tt class="docutils literal"><span class="pre">[MathJax]</span></tt> with the +actual root URL location).</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> — the file name possibly including <tt class="docutils literal"><span class="pre">[MathJax]</span></tt></li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the full URL for the file</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The MathJax.Ajax Object</a><ul> +<li><a class="reference internal" href="#properties">Properties</a></li> +<li><a class="reference internal" href="#methods">Methods</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="hub.html" + title="previous chapter">The MathJax.Hub Object</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="message.html" + title="next chapter">The MathJax.Message Object</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/api/ajax.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="message.html" title="The MathJax.Message Object" + >next</a> |</li> + <li class="right" > + <a href="hub.html" title="The MathJax.Hub Object" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >The MathJax API</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/api/callback.html b/docs/html/api/callback.html @@ -0,0 +1,438 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax.Callback Class — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="The MathJax API" href="index.html" /> + <link rel="next" title="The MathJax.Callback.Queue Class" href="queue.html" /> + <link rel="prev" title="The MathJax.HTML Object" href="html.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="queue.html" title="The MathJax.Callback.Queue Class" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="html.html" title="The MathJax.HTML Object" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-callback-class"> +<span id="api-callback"></span><h1>The MathJax.Callback Class<a class="headerlink" href="#the-mathjax-callback-class" title="Permalink to this headline">¶</a></h1> +<p>The <tt class="docutils literal"><span class="pre">MathJax.Callback</span></tt> object is one of the key mechanisms used by +MathJax to synchronize its actions with those that occur +asynchronously, like loading files and stylesheets. A <cite>Callback</cite> +object is used to tie the execution of a function to the completion of +an asynchronous action. See <a class="reference internal" href="../synchronize.html#synchronization"><em>Synchronizing with MathJax</em></a> for more details, and <a class="reference internal" href="../callbacks.html#using-callbacks"><em>Using Callbacks</em></a> in particular for examples of how to specify and +use MathJax <cite>Callback</cite> objects.</p> +<div class="section" id="specifying-a-callback"> +<h2>Specifying a callback<a class="headerlink" href="#specifying-a-callback" title="Permalink to this headline">¶</a></h2> +<p>When a method includes a callback as one of its arguments, that +callback can be specified in a number of different ways, depending on +the functionality that is required of the callback. The easiest case +is to simply provide a function to be called, but it is also possible +to include data to pass to the function when it is executed, and even +the object that will be used as the javascript <cite>this</cite> object when the +function is called.</p> +<p>Most functions that take callbacks as arguments accept a <cite>callback +specification</cite> rather than an actual callback object, though you can +use the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback()</span></tt> function to convert a callback +specification into a Callback object if needed.</p> +<p>A callback specification is any one of the following:</p> +<blockquote> +<div><dl class="describe"> +<dt> +<tt class="descname">fn</tt></dt> +<dd><p>A function that is to be called when the callback is executed. +No additional data is passed to it (other that what it is +called with at the time the callback is executed), and <cite>this</cite> +will be the window object.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">[fn]</tt></dt> +<dd><p>An array containing a function to be called when the callback +is executed (as above).</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">[fn, data...]</tt></dt> +<dd><p>An array containing a function together with data to be passed +to that function when the callback is executed; <cite>this</cite> is still +the window object. For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[</span><span class="kd">function</span> <span class="p">(</span><span class="nx">x</span><span class="p">,</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="nx">x</span><span class="o">+</span><span class="nx">y</span><span class="p">},</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">]</span> +</pre></div> +</div> +<p>would specify a callback that would pass <tt class="docutils literal"><span class="pre">2</span></tt> and <tt class="docutils literal"><span class="pre">3</span></tt> to +the given function, and it would return their sum, <tt class="docutils literal"><span class="pre">5</span></tt>, when +the callback is executed.</p> +<dl class="describe"> +<dt> +<tt class="descname">[object, fn]</tt></dt> +<dd></dd></dl> + +<p>An array containing an object to use as <cite>this</cite> and a function to +call for the callback. For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[{</span><span class="nx">x</span><span class="o">:</span><span class="s1">'foo'</span><span class="p">,</span> <span class="nx">y</span><span class="o">:</span><span class="s1">'bar'</span><span class="p">},</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">x</span><span class="p">}]</span> +</pre></div> +</div> +<p>would produce a callback that returns the string <tt class="docutils literal"><span class="pre">"foo"</span></tt> +when it is called.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">[object, fn, data...]</tt></dt> +<dd><p>Similar to the previous case, but with data that is passed to +the function as well.</p> +</dd></dl> + +<p>..describe:: [“method”, object]</p> +<blockquote> +<div><p>Here, <cite>object</cite> is an object that has a method called <cite>method</cite>, and +the callback will execute that method (with the object as +<cite>this</cite>) when it is called. For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[</span><span class="s2">"length"</span><span class="p">,[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]]</span> +</pre></div> +</div> +<p>would call the <cite>length</cite> method on the array <tt class="docutils literal"><span class="pre">[1,2,3,4]</span></tt> when +the callback is called, returning <tt class="docutils literal"><span class="pre">4</span></tt>.</p> +</div></blockquote> +<dl class="describe"> +<dt> +<tt class="descname">["method", object, data...]</tt></dt> +<dd><p>Similar to the previous case, but with data that is passed to +the method. E.g.,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[</span><span class="s2">"slice"</span><span class="p">,[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">],</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">]</span> +</pre></div> +</div> +<p>would perform the equivalent of <tt class="docutils literal"><span class="pre">[1,2,3,4].slice(1,3)</span></tt>, +which returns the array <tt class="docutils literal"><span class="pre">[2,3]</span></tt> as a result.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">{hook: fn, data: [...], object: this}</tt></dt> +<dd><p>Here the data for the callback are given in an associative +array of <cite>key:value</cite> pairs. The value of <cite>hook</cite> is the +function to call, the value of <cite>data</cite> is an array of the +arguments to pass to the function, and the value of <cite>object</cite> +is the object to use as <cite>this</cite> in the function call. The +specification need not include all three <cite>key:value</cite> pairs; any +that are missing get default values (a function that does +nothing, an empty array, and the window object, respectively).</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">"string"</tt></dt> +<dd><p>This specifies a callback where the string is executed via an +<tt class="docutils literal"><span class="pre">eval()</span></tt> statement. The code is run in the global context, +so any variables or functions created by the string become +part of the global namespace. The return value is the value of +the last statement executed in the string.</p> +</dd></dl> + +</div></blockquote> +<div class="section" id="executing-a-callback-object"> +<h3>Executing a Callback Object<a class="headerlink" href="#executing-a-callback-object" title="Permalink to this headline">¶</a></h3> +<p>The <cite>Callback</cite> object is itself a function, and calling that function +executes the callback. You can pass the callback additional +parameters, just as you can any function, and these will be added to +the callback function’s argument list following any data that was +supplied at the time the callback was created. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">f</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">x</span><span class="p">,</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="nx">x</span> <span class="o">+</span> <span class="s2">" and "</span> <span class="o">+</span><span class="nx">y</span><span class="p">}</span> +<span class="kd">var</span> <span class="nx">cb</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">([</span><span class="nx">f</span><span class="p">,</span> <span class="s2">"foo"</span><span class="p">]);</span> +<span class="kd">var</span> <span class="nx">result</span> <span class="o">=</span> <span class="nx">cb</span><span class="p">(</span><span class="s2">"bar"</span><span class="p">);</span> <span class="c1">// sets result to "foo and bar"</span> +</pre></div> +</div> +<p>Usually, the callback is not executed by the code that creates it (as +it is in the example above), but by some other code that runs at a +later time at the completion of some other activity (say the loading +of a file), or in response to a user action. For example:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">f</span><span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"x contains "</span><span class="o">+</span><span class="nx">x</span><span class="p">)};</span> +<span class="kd">function</span> <span class="nx">DelayedX</span><span class="p">(</span><span class="nx">time</span><span class="p">)</span> <span class="p">{</span> + <span class="kd">var</span> <span class="nx">x</span> <span class="o">=</span> <span class="s2">"hi"</span><span class="p">;</span> + <span class="nx">setTimeout</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">([</span><span class="nx">f</span><span class="p">,</span> <span class="nx">x</span><span class="p">],</span> <span class="nx">time</span><span class="p">);</span> +<span class="p">}</span> +</pre></div> +</div> +<p>The <tt class="docutils literal"><span class="pre">DelayedX</span></tt> function arranges for the function <tt class="docutils literal"><span class="pre">f</span></tt> to be called at +a later time, passing it the value of a local variable, <tt class="docutils literal"><span class="pre">x</span></tt>. Normally, +this would require the use of a closure, but that is not needed when a +<cite>MathJax.Callback</cite> object is used.</p> +</div> +</div> +<div class="section" id="callback-object-properties"> +<h2>Callback Object Properties<a class="headerlink" href="#callback-object-properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">hook</tt></dt> +<dd><p>The function to be called when the callback is executed.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">data</tt></dt> +<dd><p>An array containing the arguments to pass to the callback +function when it is executed.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">object</tt></dt> +<dd><p>The object to use as <cite>this</cite> during the call to the callback +function.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">called</tt></dt> +<dd><p>Set to <tt class="docutils literal"><span class="pre">true</span></tt> after the callback has been called, and undefined +otherwise. A callback will not be exectued a second time unless +the callback’s <a class="reference internal" href="#reset" title="reset"><tt class="xref py py-meth docutils literal"><span class="pre">reset()</span></tt></a> method is called first, or its +<tt class="docutils literal"><span class="pre">autoReset</span></tt> property is set to <tt class="docutils literal"><span class="pre">true</span></tt>.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">autoReset</tt></dt> +<dd><p>Set this to <tt class="docutils literal"><span class="pre">true</span></tt> if you want to be able to call the callback +more than once. (This is the case for signal listeners, for example).</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">isCallback</tt></dt> +<dd><p>Always set to <tt class="docutils literal"><span class="pre">true</span></tt> (used to detect if an object is a callback +or not).</p> +</dd></dl> + +</div> +<div class="section" id="callback-object-methods"> +<h2>Callback Object Methods<a class="headerlink" href="#callback-object-methods" title="Permalink to this headline">¶</a></h2> +<dl class="method"> +<dt id="reset"> +<tt class="descname">reset</tt><big>(</big><big>)</big><a class="headerlink" href="#reset" title="Permalink to this definition">¶</a></dt> +<dd><p>Clears the callback’s <cite>called</cite> property.</p> +</dd></dl> + +</div> +<div class="section" id="mathjax-callback-methods"> +<h2>MathJax.Callback Methods<a class="headerlink" href="#mathjax-callback-methods" title="Permalink to this headline">¶</a></h2> +<dl class="method"> +<dt id="Delay"> +<tt class="descname">Delay</tt><big>(</big><em>time</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Delay" title="Permalink to this definition">¶</a></dt> +<dd><p>Waits for the specified time (given in milliseconds) and then +performs the callback. It returns the Callback object (or a blank +one if none was supplied). The returned callback structure has a +<cite>timeout</cite> property set to the result of the <tt class="docutils literal"><span class="pre">setTimeout()</span></tt> call +that was used to perform the wait so that you can cancel the wait, +if needed. Thus <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback.Delay()</span></tt> can be used to +start a timeout delay that executes the callback if an action +doesn’t occur within the given time (and if the action does occur, +the timeout can be canceled). Since +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback.Delay()</span></tt> returns a callback structure, it +can be used in a callback queue to insert a delay between queued +commands.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>time</strong> — the amount of time to wait</li> +<li><strong>callback</strong> — the callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="executeHooks"> +<tt class="descname">executeHooks</tt><big>(</big><em>hooks</em><span class="optional">[</span>, <em>data</em><span class="optional">[</span>, <em>reset</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#executeHooks" title="Permalink to this definition">¶</a></dt> +<dd><p>Calls each callback in the <cite>hooks</cite> array (or the single hook if it +is not an array), passing it the arguments stored in the data +array. It <cite>reset</cite> is <tt class="docutils literal"><span class="pre">true</span></tt>, then the callback’s +<a class="reference internal" href="#reset" title="reset"><tt class="xref py py-meth docutils literal"><span class="pre">reset()</span></tt></a> method will be called before each hook is +executed. If any of the hooks returns a <cite>Callback</cite> object, then +it collects those callbacks and returns a new callback that will +execute when all the ones returned by the hooks have been +completed. Otherwise, <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback.executeHooks()</span></tt> +returns <tt class="docutils literal"><span class="pre">null</span></tt>.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>hooks</strong> — array of hooks to be called, or a hook</li> +<li><strong>data</strong> — array of arguments to pass to each hook in turn</li> +<li><strong>reset</strong> — <tt class="docutils literal"><span class="pre">true</span></tt> if the <a class="reference internal" href="#reset" title="reset"><tt class="xref py py-meth docutils literal"><span class="pre">reset()</span></tt></a> method should be called</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">callback that waits for all the hooks to complete, or <tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="Queue"> +<tt class="descname">Queue</tt><big>(</big><span class="optional">[</span><em>callback</em>, <em>...</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Queue" title="Permalink to this definition">¶</a></dt> +<dd><p>Creates a <cite>MathJax.CallBack.Queue</cite> object and pushes the given +callbacks into the queue. See <a class="reference internal" href="../queues.html#using-queues"><em>Using Queues</em></a> +for more details about MathJax queues.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>callback</strong> — one or more callback specifications</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the <cite>Queue</cite> object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="Signal"> +<tt class="descname">Signal</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#Signal" title="Permalink to this definition">¶</a></dt> +<dd><p>Looks for a named signal, creates it if it doesn’t already exist, +and returns the signal object. See +<a class="reference internal" href="../signals.html#using-signals"><em>Using Signals</em></a> for more details.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>name</strong> — name of the signal to get or create</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the <cite>Signal</cite> object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The MathJax.Callback Class</a><ul> +<li><a class="reference internal" href="#specifying-a-callback">Specifying a callback</a><ul> +<li><a class="reference internal" href="#executing-a-callback-object">Executing a Callback Object</a></li> +</ul> +</li> +<li><a class="reference internal" href="#callback-object-properties">Callback Object Properties</a></li> +<li><a class="reference internal" href="#callback-object-methods">Callback Object Methods</a></li> +<li><a class="reference internal" href="#mathjax-callback-methods">MathJax.Callback Methods</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="html.html" + title="previous chapter">The MathJax.HTML Object</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="queue.html" + title="next chapter">The MathJax.Callback.Queue Class</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/api/callback.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="queue.html" title="The MathJax.Callback.Queue Class" + >next</a> |</li> + <li class="right" > + <a href="html.html" title="The MathJax.HTML Object" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >The MathJax API</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/api/elementjax.html b/docs/html/api/elementjax.html @@ -0,0 +1,286 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax.ElementJax Class — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="The MathJax API" href="index.html" /> + <link rel="next" title="The Base Jax Class" href="jax.html" /> + <link rel="prev" title="The MathJax.OutputJax Class" href="outputjax.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="jax.html" title="The Base Jax Class" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="outputjax.html" title="The MathJax.OutputJax Class" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-elementjax-class"> +<span id="api-element-jax"></span><h1>The MathJax.ElementJax Class<a class="headerlink" href="#the-mathjax-elementjax-class" title="Permalink to this headline">¶</a></h1> +<p>The element jax is the bridge between the input and output jax, and +contains the data produced by the input jax needed by the output jax +to display the results. It is tied to the individual <tt class="docutils literal"><span class="pre"><script></span></tt> tag +that produced it, and is the object used by JavaScript programs to +interact with the mathematics on the page.</p> +<p>An element jax is stored in the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file in a subdirectory of +the <tt class="docutils literal"><span class="pre">jax/element</span></tt> directory, with the subdirectory name being the +name of the element jax. Currently, there is only one element jax +class, the <cite>mml</cite> element jax, and it is stored in <tt class="docutils literal"><span class="pre">jax/element/mml</span></tt>.</p> +<p>The <cite>MathJax.ElementJax</cite> class is a subclass of the <a class="reference internal" href="jax.html#api-jax"><em>MathJax Jax</em></a> class, and inherits the properties and methods of that +class. Those listed below are the additional or overridden ones from +that class.</p> +<div class="section" id="class-properties"> +<h2>Class Properties<a class="headerlink" href="#class-properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">name</tt></dt> +<dd><p>The name of the jax.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">version</tt></dt> +<dd><p>The version number of the jax.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">directory</tt></dt> +<dd><p>The directory where the jax files are stored (e.g., <tt class="docutils literal"><span class="pre">"[MathJax]/jax/element/mml"</span></tt>);</p> +</dd></dl> + +</div> +<div class="section" id="instance-properties"> +<h2>Instance Properties<a class="headerlink" href="#instance-properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">inputJax</tt></dt> +<dd><p>A reference to the input jax that created the element.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">outputJax</tt></dt> +<dd><p>A reference to the output jax that has processed this element.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">inputID</tt></dt> +<dd><p>The DOM <cite>id</cite> of the <tt class="docutils literal"><span class="pre"><script></span></tt> tag that generated this element +(if it doesn’t have one initially, the MathJax hub will supply +one). Note that this is not a reference to the element itself; +that element will have a reference to this element jax, and if +<cite>inputID</cite> were a reference back, that would cause a reference +loop, which some browsers would not free properly during trash +collection, thus causing a memory leak.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">originalText</tt></dt> +<dd><p>A string indicating the original input text that was processed for +this element.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">mimeType</tt></dt> +<dd><p>The MIME-type of the element jax (<cite>jax/mml</cite> in the case of an +<cite>mml</cite> element jax).</p> +</dd></dl> + +<p>Other data specific to the element jax subclass may also appear here.</p> +</div> +<div class="section" id="methods"> +<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> +<dl class="method"> +<dt id="Text"> +<tt class="descname">Text</tt><big>(</big><em>text</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Text" title="Permalink to this definition">¶</a></dt> +<dd><p>Sets the input text for this element to the given text and +reprocesses the mathematics. (I.e., update the equation to the +new one given by <cite>text</cite>). When the processing is complete, the +<cite>callback</cite>, if any, is called.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>text</strong> — the new mathematic source string for the element</li> +<li><strong>callback</strong> — the callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt> +<tt class="descname">Reprocess</tt><big>(</big><span class="optional">[</span><em>callback</em><span class="optional">]</span><big>)</big></dt> +<dd><p>Remove the output and produce it again. This may be necessary if +there are changes to the CSS styles that would affect the layout +of the mathematics, for example. The <cite>callback</cite>, if any, is +called when the process completes.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>callback</strong> — the callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt> +<tt class="descname">Remove</tt><big>(</big><big>)</big></dt> +<dd><p>Removes the output for this element from the web page (but does +not remove the original <tt class="docutils literal"><span class="pre"><script></span></tt>). The <tt class="docutils literal"><span class="pre"><script></span></tt> will be +considered unprocessed, and the next call to +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.hub.Typeset()</span></tt> will re-display it.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><tt class="docutils literal"><span class="pre">null</span></tt></td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="SourceElement"> +<tt class="descname">SourceElement</tt><big>(</big><big>)</big><a class="headerlink" href="#SourceElement" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns a reference to the original <tt class="docutils literal"><span class="pre"><script></span></tt> DOM element +associated to this element jax.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body">the <tt class="docutils literal"><span class="pre"><script></span></tt> element</td> +</tr> +</tbody> +</table> +</dd></dl> + +<p>Output jax may add new methods to the base element jax class to +perform exporting to other formats. For example, a MathML output jax +could add <tt class="docutils literal"><span class="pre">toMathML()</span></tt>, or an accessibility output jax could add +<tt class="docutils literal"><span class="pre">toAudible()</span></tt>. These could be made available via the MathJax +contextual menu.</p> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The MathJax.ElementJax Class</a><ul> +<li><a class="reference internal" href="#class-properties">Class Properties</a></li> +<li><a class="reference internal" href="#instance-properties">Instance Properties</a></li> +<li><a class="reference internal" href="#methods">Methods</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="outputjax.html" + title="previous chapter">The MathJax.OutputJax Class</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="jax.html" + title="next chapter">The Base Jax Class</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/api/elementjax.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="jax.html" title="The Base Jax Class" + >next</a> |</li> + <li class="right" > + <a href="outputjax.html" title="The MathJax.OutputJax Class" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >The MathJax API</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/api/html.html b/docs/html/api/html.html @@ -0,0 +1,295 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax.HTML Object — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="The MathJax API" href="index.html" /> + <link rel="next" title="The MathJax.Callback Class" href="callback.html" /> + <link rel="prev" title="The MathJax.Message Object" href="message.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="callback.html" title="The MathJax.Callback Class" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="message.html" title="The MathJax.Message Object" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-html-object"> +<span id="api-html"></span><h1>The MathJax.HTML Object<a class="headerlink" href="#the-mathjax-html-object" title="Permalink to this headline">¶</a></h1> +<p>The <tt class="docutils literal"><span class="pre">MathJax.HTML</span></tt> object provides routines for creating HTML +elements and adding them to the page, and int particular, it contains +the code that processes MathJax’s <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>HTML snippets</em></a> +and turns them into actual DOM objects. It also implements the +methods used to manage the cookies used by MathJax.</p> +<div class="section" id="properties"> +<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">Cookie.prefix: "mjx"</tt></dt> +<dd><p>The prefix used for names of cookies stored by MathJax.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">Cookie.expires: 365</tt></dt> +<dd><p>The expiration time (in days) for cookies created by MathJax.</p> +</dd></dl> + +</div> +<div class="section" id="methods"> +<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> +<dl class="method"> +<dt id="Element"> +<tt class="descname">Element</tt><big>(</big><em>type</em><span class="optional">[</span>, <em>attributes</em><span class="optional">[</span>, <em>contents</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#Element" title="Permalink to this definition">¶</a></dt> +<dd><p>Creates a DOM element of the given type. If <cite>attributes</cite> is +non-<tt class="docutils literal"><span class="pre">null</span></tt>, it is an object that contains <cite>key:value</cite> pairs of +attributes to set for the newly created element. If <cite>contents</cite> is +non-<tt class="docutils literal"><span class="pre">null</span></tt>, it is an <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>HTML snippet</em></a> that +describes the contents to create for the element. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">div</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">HTML</span><span class="p">.</span><span class="nx">Element</span><span class="p">(</span> + <span class="s2">"div"</span><span class="p">,</span> + <span class="p">{</span><span class="nx">id</span><span class="o">:</span> <span class="s2">"MathDiv"</span><span class="p">,</span> <span class="nx">style</span><span class="o">:</span><span class="p">{</span><span class="nx">border</span><span class="o">:</span><span class="s2">"1px solid"</span><span class="p">,</span> <span class="nx">padding</span><span class="o">:</span><span class="s2">"5px"</span><span class="p">}},</span> + <span class="p">[</span><span class="s2">"Here is math: $x+1$"</span><span class="p">,[</span><span class="s2">"br"</span><span class="p">],</span><span class="s2">"and a display $$x+1\\over x-1$$"</span><span class="p">]</span> +<span class="p">);</span> +</pre></div> +</div> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>type</strong> — node type to be created</li> +<li><strong>attributes</strong> — object specifying attributes to set</li> +<li><strong>contents</strong> — HTML snippet representing contents of node</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the DOM element created</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="addElement"> +<tt class="descname">addElement</tt><big>(</big><em>parent</em>, <em>type</em><span class="optional">[</span>, <em>attributes</em><span class="optional">[</span>, <em>content</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#addElement" title="Permalink to this definition">¶</a></dt> +<dd><p>Creates a DOM element and appends it to the <cite>parent</cite> node +provided. It is equivalent to</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">parent</span><span class="p">.</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">HTML</span><span class="p">.</span><span class="nx">Element</span><span class="p">(</span><span class="nx">type</span><span class="p">,</span><span class="nx">attributes</span><span class="p">,</span><span class="nx">content</span><span class="p">))</span> +</pre></div> +</div> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>parent</strong> — the node where the element will be added</li> +<li><strong>attributes</strong> — object specifying attributes to set</li> +<li><strong>contents</strong> — HTML snippet representing contents of node</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the DOM element created</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="TextNode"> +<tt class="descname">TextNode</tt><big>(</big><em>text</em><big>)</big><a class="headerlink" href="#TextNode" title="Permalink to this definition">¶</a></dt> +<dd><p>Creates a DOM text node with the given text as its content.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>text</strong> — the text for the node</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the new text node</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="addText"> +<tt class="descname">addText</tt><big>(</big><em>parent</em>, <em>text</em><big>)</big><a class="headerlink" href="#addText" title="Permalink to this definition">¶</a></dt> +<dd><p>Creates a DOM text node with the given text and appends it to the +<cite>parent</cite> node.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>parent</strong> — the node where the text will be added</li> +<li><strong>text</strong> — the text for the new node</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the new text node</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">Cookie.Set(name,data)</tt></dt> +<dd><p>Creates a MathJax cookie using the <tt class="docutils literal"><span class="pre">MathJax.HTML.Cookie.prefix</span></tt> +and the <cite>name</cite> as the cookie name, and the <cite>key:value</cite> pairs in +the <cite>data</cite> object as the data for the cookie. For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">HTML</span><span class="p">.</span><span class="nx">Cookie</span><span class="p">.</span><span class="nx">Set</span><span class="p">(</span><span class="s2">"test"</span><span class="p">,{</span><span class="nx">x</span><span class="o">:</span><span class="mi">42</span><span class="p">,</span> <span class="nx">y</span><span class="o">:</span><span class="s2">"It Works!"</span><span class="p">});</span> +</pre></div> +</div> +<p>will create a cookie named “mjx:test” that stores the values of +<tt class="docutils literal"><span class="pre">x</span></tt> and <tt class="docutils literal"><span class="pre">y</span></tt> provided in the <cite>data</cite> object. This data can be +retrieved using the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.HTML.Cookie.Get()</span></tt> method +discussed below.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>name</strong> — the name that identifies the coookie</li> +<li><strong>data</strong> — object containing the data to store in the cookie</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">Cookie.Get(name[,obj])</tt></dt> +<dd><p>Looks up the data for the cookie named <cite>name</cite> and merges the data +into the given <cite>obj</cite> object, or returns a new object containing +the data. For instance, given the cookie stored by the example +above,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">data</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">HTML</span><span class="p">.</span><span class="nx">Cookie</span><span class="p">.</span><span class="nx">Get</span><span class="p">(</span><span class="s2">"test"</span><span class="p">);</span> +</pre></div> +</div> +<p>would set <tt class="docutils literal"><span class="pre">data</span></tt> to <tt class="docutils literal"><span class="pre">{x:42,</span> <span class="pre">y:"It</span> <span class="pre">Works!"}</span></tt>, while</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">data</span> <span class="o">=</span> <span class="p">{</span><span class="nx">x</span><span class="o">:</span><span class="mi">10</span><span class="p">,</span> <span class="nx">z</span><span class="o">:</span><span class="s2">"Safe"</span><span class="p">};</span> +<span class="nx">MathJax</span><span class="p">.</span><span class="nx">HTML</span><span class="p">.</span><span class="nx">Cookie</span><span class="p">.</span><span class="nx">Get</span><span class="p">(</span><span class="s2">"test"</span><span class="p">,</span><span class="nx">data</span><span class="p">);</span> +</pre></div> +</div> +<p>would leave <tt class="docutils literal"><span class="pre">data</span></tt> as <tt class="docutils literal"><span class="pre">{x:42,</span> <span class="pre">y:"It</span> <span class="pre">Works!",</span> <span class="pre">z:"Safe"}</span></tt>.</p> +</dd></dl> + +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The MathJax.HTML Object</a><ul> +<li><a class="reference internal" href="#properties">Properties</a></li> +<li><a class="reference internal" href="#methods">Methods</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="message.html" + title="previous chapter">The MathJax.Message Object</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="callback.html" + title="next chapter">The MathJax.Callback Class</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/api/html.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="callback.html" title="The MathJax.Callback Class" + >next</a> |</li> + <li class="right" > + <a href="message.html" title="The MathJax.Message Object" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >The MathJax API</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/api/hub.html b/docs/html/api/hub.html @@ -0,0 +1,677 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax.Hub Object — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="The MathJax API" href="index.html" /> + <link rel="next" title="The MathJax.Ajax Object" href="ajax.html" /> + <link rel="prev" title="The MathJax variable" href="variable.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="ajax.html" title="The MathJax.Ajax Object" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="variable.html" title="The MathJax variable" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-hub-object"> +<span id="api-hub"></span><h1>The MathJax.Hub Object<a class="headerlink" href="#the-mathjax-hub-object" title="Permalink to this headline">¶</a></h1> +<p>The MathJax Hub, <cite>MathJax.Hub</cite>, is the main control structure for +MathJax. It is where input and output <a class="reference internal" href="../glossary.html#term-jax"><em class="xref std std-term">jax</em></a> are tied together, +and it is what handles processing of the MathJax <tt class="docutils literal"><span class="pre"><script></span></tt> tags. +Processing of the mathematics on the page may require external files +to be loaded (when the mathematics includes less common functionality, +for example, that is defined in an extension file), and since file +loading is asynchronous, a number of the methods below may return +before their actions are completed. For this reason, they include +callback functions that are called when the action completes. These +can be used to synchronize actions that require the mathematics to be +completed before those action occur. See the <a class="reference internal" href="../callbacks.html#using-callbacks"><em>Using Callbacks</em></a> documentation for more details.</p> +<div class="section" id="properties"> +<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">config: { ... }</tt></dt> +<dd><p>This holds the configuration parameters for MathJax. Set these +values using <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> described below. The +options and their default values are given in the <a class="reference internal" href="../options/hub.html#configure-hub"><em>Core +Options</em></a> reference page.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">processUpdateTime: 500</tt></dt> +<dd><p>The minimum time (in milliseconds) between updates of the +“Processing Math” message.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">signal</tt></dt> +<dd><p>The hub processing signal (tied to the +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Register.MessageHook()</span></tt> method).</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">Browser</tt></dt> +<dd><p>The name of the browser as determined by MathJax. It will be one +of <tt class="docutils literal"><span class="pre">Firefox</span></tt>, <tt class="docutils literal"><span class="pre">Safari</span></tt>, <tt class="docutils literal"><span class="pre">Chrome</span></tt>, <tt class="docutils literal"><span class="pre">Opera</span></tt>, <tt class="docutils literal"><span class="pre">MSIE</span></tt>, +<tt class="docutils literal"><span class="pre">Konqueror</span></tt>, or <tt class="docutils literal"><span class="pre">unkown</span></tt>. This is actually an object with +additional properties and methods concerning the browser:</p> +<dl class="describe"> +<dt> +<tt class="descname">version</tt></dt> +<dd><p>The browser version number, e.g., <tt class="docutils literal"><span class="pre">"4.0"</span></tt></p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">isMac and isPC</tt></dt> +<dd><p>These are boolean values that indicate whether the browser is +running on a Macintosh computer or a Windows computer. They +will both be <tt class="docutils literal"><span class="pre">false</span></tt> for a Linux computer</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">isForefox, isSafari, isChrome, isOpera, isMSIE, isKonqueror</tt></dt> +<dd><p>These are <tt class="docutils literal"><span class="pre">true</span></tt> when the browser is the indicated one, and +<tt class="docutils literal"><span class="pre">false</span></tt> otherwise.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">versionAtLeast(version)</tt></dt> +<dd><p>This tests whether the browser version is at least that given +in the <cite>version</cite> string. Note that you can not simply do a +numeric comparison, as version 4.10 should be considered later +than 4.9, for example. Similarly, 4.10 is different from 4.1, +for instance.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">Select(choices)</tt></dt> +<dd><p>This lets you perform browser-specific functions. Here, +<cite>choices</cite> is an object whose properties are the names of the +browsers and whose values are the functions to be performed. +Each function is passed one parameter, which is the +<tt class="docutils literal"><span class="pre">MathJax.Hub.Browser</span></tt> object. You do not need to include +every browser as one of your choices (only those for which you +need to do special processing. For example:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Browser</span><span class="p">.</span><span class="nx">Select</span><span class="p">(</span> + <span class="nx">MSIE</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">browser</span><span class="p">)</span> <span class="p">{</span> + <span class="k">if</span> <span class="p">(</span><span class="nx">browser</span><span class="p">.</span><span class="nx">versionAtLeast</span><span class="p">(</span><span class="s2">"8.0"</span><span class="p">))</span> <span class="p">{...</span> <span class="k">do</span> <span class="nx">version</span> <span class="mi">8</span> <span class="nx">stuff</span> <span class="p">...</span> <span class="p">}</span> + <span class="p">...</span> <span class="k">do</span> <span class="nx">general</span> <span class="nx">MSIE</span> <span class="nx">stuff</span> <span class="p">...</span> + <span class="p">},</span> + + <span class="nx">Firefox</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">browser</span><span class="p">)</span> <span class="p">{</span> + <span class="k">if</span> <span class="p">(</span><span class="nx">browser</span><span class="p">.</span><span class="nx">isMac</span><span class="p">)</span> <span class="p">{...</span> <span class="k">do</span> <span class="nx">Mac</span> <span class="nx">stuff</span> <span class="p">...</span> <span class="p">}</span> + <span class="p">...</span> <span class="k">do</span> <span class="nx">general</span> <span class="nx">Firefox</span> <span class="nx">stuff</span> + <span class="p">}</span> +<span class="p">);</span> +</pre></div> +</div> +</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="methods"> +<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> +<dl class="method"> +<dt id="Config"> +<tt class="descname">Config</tt><big>(</big><em>options</em><big>)</big><a class="headerlink" href="#Config" title="Permalink to this definition">¶</a></dt> +<dd><p>Sets the configuration options (stored in <tt class="docutils literal"><span class="pre">MathJax.Hub.config</span></tt>) +to the values stored in the <cite>options</cite> object. See +<a class="reference internal" href="../configuration.html#configuration"><em>Configuring MathJax</em></a> for details on how this +is used and the options that you can set.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>options</strong> — object containing options to be set</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">Register.PreProcessor(callback)</tt></dt> +<dd><p>Used by preprocessors to register themselves with MathJax so that +they will be called during the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.PreProcess()</span></tt> +action.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>callback</strong> — the callback specification for the preprocessor</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">Register.MessageHook(type,callback)</tt></dt> +<dd><p>Registers a listener for a particular message being sent to the +hub processing signal (where <cite>PreProcessing</cite>, <cite>Processing</cite>, and +<cite>New Math</cite> messages are sent). When the message equals the +<cite>type</cite>, the <cite>callback</cite> will be called with the message as its +parameter.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>type</strong> — a string indicating the message to look for</li> +<li><strong>callback</strong> — a callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">Register.StartupHook(type,callback)</tt></dt> +<dd><p>Registers a listener for a particular message being sent to the +startup signal (where initialization and component startup +messages are sent). When the message equals the <cite>type</cite>, the +<cite>callback will be called with the message as its parameter. +See the :ref:`Using Signals <using-signals></cite> dcocumentation for +more details.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>type</strong> — a string indicating the message to look for</li> +<li><strong>callback</strong> — a callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">Register.LoadHook(file,callback)</tt></dt> +<dd><p>Registers a callback to be called when a particular file is +completely loaded and processed. (The callback is called when the +file makes its <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.loadComplete()</span></tt> call.) The +<cite>file</cite> should be the complete file name, e.g., +<tt class="docutils literal"><span class="pre">"[MathJax]/config/MathJax.js"</span></tt>.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>file</strong> — the name of the file to wait for</li> +<li><strong>callback</strong> — a callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt> +<tt class="descname">Queue</tt><big>(</big><em>callback</em>, <em>...</em><big>)</big></dt> +<dd><p>Pushes the given callbacks onto the main MathJax command queue. +This synchronizes the commands with MathJax so that they will be +performed in the proper order even when some run asynchronously. +See <a class="reference internal" href="../queues.html#using-queues"><em>Using Queues</em></a> for more details about how +to use queues, and the MathJax queue in particular. You may +supply as many <cite>callback</cite> specifications in one call to the +<a class="reference internal" href="callback.html#Queue" title="Queue"><tt class="xref py py-meth docutils literal"><span class="pre">Queue()</span></tt></a> method as you wish.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>callback</strong> — a callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object for the last callback added to the queue</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="Typeset"> +<tt class="descname">Typeset</tt><big>(</big><span class="optional">[</span><em>element</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#Typeset" title="Permalink to this definition">¶</a></dt> +<dd><p>Calls the preprocessors on the given element, and then typesets +any math elements within the element. If no <cite>element</cite> is +provided, the whole document is processed. The <cite>element</cite> is +either the DOM <cite>id</cite> of the element, or a reference to the DOM +element itself. The <cite>callback</cite> is called when the process is +complete. See the <a class="reference internal" href="../typeset.html#typeset-math"><em>Modifying Math</em></a> section +for details of how to use this method properly.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>element</strong> — the element whose math is to be typeset</li> +<li><strong>callback</strong> — the callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="PreProcess"> +<tt class="descname">PreProcess</tt><big>(</big><span class="optional">[</span><em>element</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#PreProcess" title="Permalink to this definition">¶</a></dt> +<dd><p>Calls the loaded preprocessors on the entire document, or on the +given DOM element. The <cite>element</cite> is either the DOM <cite>id</cite> of the +element, or a reference to the DOM element itself. The <cite>callback</cite> +is called when the processing is complete.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>element</strong> — the element to be preprocessed</li> +<li><strong>callback</strong> — the callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="Process"> +<tt class="descname">Process</tt><big>(</big><span class="optional">[</span><em>element</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#Process" title="Permalink to this definition">¶</a></dt> +<dd><p>Scans either the entire document or a given DOM <cite>element</cite> for +MathJax <tt class="docutils literal"><span class="pre"><script></span></tt> tags and processes the math those tags +contain. The <cite>element</cite> is either the DOM <cite>id</cite> of the element to +scan, or a reference to the DOM element itself. The <cite>callback</cite> is +called when the processing is complete.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>element</strong> — the element to be processed</li> +<li><strong>callback</strong> — the callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="Update"> +<tt class="descname">Update</tt><big>(</big><span class="optional">[</span><em>element</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#Update" title="Permalink to this definition">¶</a></dt> +<dd><p>Scans either the entire document or a given DOM element for +mathematics that has changed since the last time it was processed, +or is new, and typesets the mathematics they contain. The +<cite>element</cite> is either the DOM <cite>id</cite> of the element to scan, or a +reference to the DOM element itself. The <cite>callback</cite> is called +when the processing is complete.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>element</strong> — the element to be updated</li> +<li><strong>callback</strong> — the callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="Reprocess"> +<tt class="descname">Reprocess</tt><big>(</big><span class="optional">[</span><em>element</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#Reprocess" title="Permalink to this definition">¶</a></dt> +<dd><p>Removes any typeset mathematics from the document or DOM +element, and then processes the mathematics again, +re-typesetting everything. This may be necessary, for example, if +the CSS styles have changed and those changes would affect the +mathematics. The <cite>element</cite> is either the DOM <cite>id</cite> of the element +to scan, or a reference to the DOM element itself. The <cite>callback</cite> +is called when the processing is complete.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>element</strong> — the element to be reprocessed</li> +<li><strong>callback</strong> — the callback specification</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="getAllJax"> +<tt class="descname">getAllJax</tt><big>(</big><span class="optional">[</span><em>element</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#getAllJax" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns a list of all the element jax in the document or a +specific DOM element. The <cite>element</cite> is either the DOM <cite>id</cite> of the +element, or a reference to the DOM element itself.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>element</strong> — the element to be searched</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">array of <cite>element jax</cite> objects</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="getJaxByType"> +<tt class="descname">getJaxByType</tt><big>(</big><em>type</em><span class="optional">[</span>, <em>element</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#getJaxByType" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns a list of all the element jax of a given MIME-type in the +document or a specific DOM element. The <cite>element</cite> is either the +DOM <cite>id</cite> of the element to search, or a reference to the DOM +element itself.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>type</strong> — MIME-type of <cite>element jax</cite> to find</li> +<li><strong>element</strong> — the element to be searched</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">array of <cite>element jax</cite> objects</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="getJaxByInputType"> +<tt class="descname">getJaxByInputType</tt><big>(</big><em>type</em><span class="optional">[</span>, <em>element</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#getJaxByInputType" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns a list of all the element jax associated with input +<tt class="docutils literal"><span class="pre"><script></span></tt> tags with the given MIME-type within the given DOM +element or the whole document. The <cite>element</cite> is either the DOM +<cite>id</cite> of the element to search, or a reference to the DOM element +itself.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>type</strong> — MIME-type of input (e.g., <tt class="docutils literal"><span class="pre">"math/tex"</span></tt>)</li> +<li><strong>element</strong> — the element to be searched</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">array of <cite>element jax</cite> objects</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="getJaxFor"> +<tt class="descname">getJaxFor</tt><big>(</big><em>element</em><big>)</big><a class="headerlink" href="#getJaxFor" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns the element jax associated with a given DOM +element. If the element does not have an associated element jax, +<tt class="docutils literal"><span class="pre">null</span></tt> is returned. The <cite>element</cite> is either the DOM <cite>id</cite> of the +element, or a reference to the DOM element itself.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>element</strong> — the element whose element jax is required</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><cite>element jax</cite> object or <tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="isJax"> +<tt class="descname">isJax</tt><big>(</big><em>element</em><big>)</big><a class="headerlink" href="#isJax" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns <tt class="docutils literal"><span class="pre">0</span></tt> if the element is not a <tt class="docutils literal"><span class="pre"><script></span></tt> that can be +processed by MathJax or the result of an output jax, returns <tt class="docutils literal"><span class="pre">-1</span></tt> +if element is an unprocessed <tt class="docutils literal"><span class="pre"><script></span></tt> tag that could be +handled by MathJax, and returns <tt class="docutils literal"><span class="pre">1</span></tt> if element is a processed +<tt class="docutils literal"><span class="pre"><script></span></tt> tag or an element that is the result of an output jax.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>element</strong> — the element to inspect</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">integer (-1, 0, 1)</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="Insert"> +<tt class="descname">Insert</tt><big>(</big><em>dst</em>, <em>src</em><big>)</big><a class="headerlink" href="#Insert" title="Permalink to this definition">¶</a></dt> +<dd><p>Inserts data from the <cite>src</cite> object into the <cite>dst</cite> object. The +<cite>key:value</cite> pairs in <cite>src</cite> are (recursively) copied into <cite>dst</cite>, so +that if <cite>value</cite> is itself an object, its contents is copied into +the corresponding object in <cite>dst</cite>. That is, objects within <cite>src</cite> +are merged into the corresponding objects in <cite>dst</cite> (they don’t +replace them).</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>dst</strong> — the destination object</li> +<li><strong>src</strong> — the source object</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the modified destination object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="formatError"> +<tt class="descname">formatError</tt><big>(</big><em>script</em>, <em>error</em><big>)</big><a class="headerlink" href="#formatError" title="Permalink to this definition">¶</a></dt> +<dd><p>This is called when an internal error occurs during the processing +of a math element (i.e., an error in the MathJax code itself). +The <cite>script</cite> is a reference to the <tt class="docutils literal"><span class="pre"><script></span></tt> tag where the +error occurred, and <cite>error</cite> is the <tt class="docutils literal"><span class="pre">Error</span></tt> object for the error. +The default action is to insert an HTML snippet at the location of +the script, but this routine can be overriden durring MathJax +configuration in order to perform some other action. +<tt class="docutils literal"><span class="pre">MathJax.Hub.lastError</span></tt> holds the <tt class="docutils literal"><span class="pre">error</span></tt> value of the last +error on the page.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>script</strong> — the <tt class="docutils literal"><span class="pre"><script></span></tt> tag causing the error</li> +<li><strong>error</strong> — the <tt class="docutils literal"><span class="pre">Error</span></tt> object for the error</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The MathJax.Hub Object</a><ul> +<li><a class="reference internal" href="#properties">Properties</a></li> +<li><a class="reference internal" href="#methods">Methods</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="variable.html" + title="previous chapter">The MathJax variable</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="ajax.html" + title="next chapter">The MathJax.Ajax Object</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/api/hub.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="ajax.html" title="The MathJax.Ajax Object" + >next</a> |</li> + <li class="right" > + <a href="variable.html" title="The MathJax variable" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >The MathJax API</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/api/index.html b/docs/html/api/index.html @@ -0,0 +1,147 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax API — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="next" title="The MathJax variable" href="variable.html" /> + <link rel="prev" title="Modifying Math on the Page" href="../typeset.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="variable.html" title="The MathJax variable" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="../typeset.html" title="Modifying Math on the Page" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-api"> +<span id="mathjax-api"></span><h1>The MathJax API<a class="headerlink" href="#the-mathjax-api" title="Permalink to this headline">¶</a></h1> +<p>The following links document the various components that make up +MathJax. These are implemented as JavaScript objects contained within +the single global variable, <tt class="docutils literal"><span class="pre">MathJax</span></tt>. Although JavaScript includes +an objects with some inheritance capabilities, they do not constitute +a full object-oriented programming model, so MathJax implements +its own object library. This means there is an ambiguity when we +speak of an “object”, as it could be either a native JavaScript +object, or a MathJax object. We will use <cite>Object</cite> (capitalized) or +<cite>MathJax.Object</cite> for, when the distinction is important.</p> +<p>You may also want to view the <a class="reference internal" href="../index.html#advanced-topics"><em>advanced topics</em></a> +on the main MathJax documentation page.</p> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="variable.html">The MathJax variable</a></li> +<li class="toctree-l1"><a class="reference internal" href="hub.html">The MathJax.Hub object</a></li> +<li class="toctree-l1"><a class="reference internal" href="ajax.html">The MathJax.Ajax object</a></li> +<li class="toctree-l1"><a class="reference internal" href="message.html">The MathJax.Message object</a></li> +<li class="toctree-l1"><a class="reference internal" href="html.html">The MathJax.HTML object</a></li> +<li class="toctree-l1"><a class="reference internal" href="callback.html">The MathJax.CallBack class</a></li> +<li class="toctree-l1"><a class="reference internal" href="queue.html">The MathJax.CallBack.Queue class</a></li> +<li class="toctree-l1"><a class="reference internal" href="signal.html">The MathJax.CallBack.Signal class</a></li> +</ul> +</div> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="inputjax.html">The MathJax.InputJax class</a></li> +<li class="toctree-l1"><a class="reference internal" href="outputjax.html">The MathJax.OutputJax class</a></li> +<li class="toctree-l1"><a class="reference internal" href="elementjax.html">The MathJax.ElementJax class</a></li> +<li class="toctree-l1"><a class="reference internal" href="jax.html">The base Jax class</a></li> +</ul> +</div> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="object.html">The MathJax Object-Oriented Programming Model</a></li> +</ul> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="../typeset.html" + title="previous chapter">Modifying Math on the Page</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="variable.html" + title="next chapter">The MathJax variable</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/api/index.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="variable.html" title="The MathJax variable" + >next</a> |</li> + <li class="right" > + <a href="../typeset.html" title="Modifying Math on the Page" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/api/inputjax.html b/docs/html/api/inputjax.html @@ -0,0 +1,224 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax.InputJax Class — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="The MathJax API" href="index.html" /> + <link rel="next" title="The MathJax.OutputJax Class" href="outputjax.html" /> + <link rel="prev" title="The MathJax.Callback.Signal Class" href="signal.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="outputjax.html" title="The MathJax.OutputJax Class" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="signal.html" title="The MathJax.Callback.Signal Class" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-inputjax-class"> +<span id="api-input-jax"></span><h1>The MathJax.InputJax Class<a class="headerlink" href="#the-mathjax-inputjax-class" title="Permalink to this headline">¶</a></h1> +<p>Input jax are the components of MathJax that translate +mathematics from its original format (like <a class="reference internal" href="../glossary.html#term-tex"><em class="xref std std-term">TeX</em></a> or +<a class="reference internal" href="../glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a>) to the MathJax internal format (an <cite>element jax</cite>).</p> +<p>An input jax is stored as a pair of files in a subdirectory of the +<tt class="docutils literal"><span class="pre">jax/input</span></tt> directory, with the subdirectory name being the name of +the input jax. For example, the TeX input jax is stored in +<cite>jax/input/TeX</cite>. The first file, <tt class="docutils literal"><span class="pre">config.js</span></tt>, is loaded when +MathJax is being loaded and configured, and is indicated by listing +the input jax directory in the <cite>jax</cite> array of the MathJax +configuration. The <tt class="docutils literal"><span class="pre">config.js</span></tt> file creates a subclass of the +<cite>MathJax.InputJax</cite> object for the new input jax and registers that +with MathJax, along with the MIME-type that will be used to indicate +the mathematics that is to be processed by the input jax.</p> +<p>The main body of the input jax is stored in the second file, +<tt class="docutils literal"><span class="pre">jax.js</span></tt>, which is loaded when the input jax is first called on to +translate some mathematics. This file augments the original input jax +subclass with the additional methods needed to do the translation. +MathJax calls the input jax’s <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method when it needs +the input jax to translate the contents of a math <tt class="docutils literal"><span class="pre"><script></span></tt> tag.</p> +<p>The <cite>MathJax.InputJax</cite> class is a subclass of the <a class="reference internal" href="jax.html#api-jax"><em>MathJax Jax</em></a> class, and inherits the properties and methods of that +class. Those listed below are the additional or overridden ones from +that class.</p> +<div class="section" id="properties"> +<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">name</tt></dt> +<dd><p>The name of the jax.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">version</tt></dt> +<dd><p>The version number of the jax.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">directory</tt></dt> +<dd><p>The directory where the jax files are stored (e.g., <tt class="docutils literal"><span class="pre">"[MathJax]/jax/input/TeX"</span></tt>);</p> +</dd></dl> + +</div> +<div class="section" id="methods"> +<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> +<dl class="method"> +<dt> +<tt class="descname">Translate</tt><big>(</big><em>script</em><big>)</big></dt> +<dd><p>This is the main routine called by MathJax when a <tt class="docutils literal"><span class="pre"><script></span></tt> of +the appropriate type is found. The default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> +method simply loads the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file and returns that callback +for that load function so that MathJax will know when to try +the <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> action again. When the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file +loads, it should override the default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> with its +own version that does the actual translation; that way, when the +second Translate call is made, it will be to the actual +translation routine rather than the default loader.</p> +<p>The translation process should include the creation of an +<a class="reference internal" href="elementjax.html#api-element-jax"><em>Element Jax</em></a> that stores the data needed +for this element.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>script</strong> — the <tt class="docutils literal"><span class="pre"><script></span></tt> element to be translated</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the <cite>element jax</cite> resulting from the translation</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt> +<tt class="descname">Register</tt><big>(</big><em>mimetype</em><big>)</big></dt> +<dd><p>This registers the MIME-type associated with this input jax so +that MathJax knows to call this input jax when it sees a +<tt class="docutils literal"><span class="pre"><script></span></tt> of that type. An input jax can register more than +one type, but it will be responsible for distinguishing elements +of the various types from one another.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>mimetype</strong> — the MIME-type of the input this jax processes</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The MathJax.InputJax Class</a><ul> +<li><a class="reference internal" href="#properties">Properties</a></li> +<li><a class="reference internal" href="#methods">Methods</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="signal.html" + title="previous chapter">The MathJax.Callback.Signal Class</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="outputjax.html" + title="next chapter">The MathJax.OutputJax Class</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/api/inputjax.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="outputjax.html" title="The MathJax.OutputJax Class" + >next</a> |</li> + <li class="right" > + <a href="signal.html" title="The MathJax.Callback.Signal Class" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >The MathJax API</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/api/jax.html b/docs/html/api/jax.html @@ -0,0 +1,322 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The Base Jax Class — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="The MathJax API" href="index.html" /> + <link rel="next" title="The MathJax Object-Oriented Programming Model" href="object.html" /> + <link rel="prev" title="The MathJax.ElementJax Class" href="elementjax.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="object.html" title="The MathJax Object-Oriented Programming Model" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="elementjax.html" title="The MathJax.ElementJax Class" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-base-jax-class"> +<span id="api-jax"></span><h1>The Base Jax Class<a class="headerlink" href="#the-base-jax-class" title="Permalink to this headline">¶</a></h1> +<p>The <cite>MathJax.InputJax</cite>, <cite>MathJax.OutputJax</cite> and <cite>MathJax.ElementJax</cite> +classes are all subclasses of the base <cite>Jax</cite> class in MathJax. This +is a private class that implements the methods common to all three +other jax classes.</p> +<p>Unlike most MathJax.Object classes, calling the class object creates a +<em>subclass</em> of the class, rather than an instance of the class. E.g.,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">InputJax</span><span class="p">.</span><span class="nx">MyInputJax</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">InputJax</span><span class="p">({</span> + <span class="nx">name</span><span class="o">:</span> <span class="s2">"MyInputJax"</span><span class="p">,</span> + <span class="nx">version</span><span class="o">:</span> <span class="s2">"1.0"</span><span class="p">,</span> + <span class="p">...</span> +<span class="p">});</span> +</pre></div> +</div> +<p>creates <tt class="docutils literal"><span class="pre">MathJax.InputJax.MyInputJax</span></tt> as a subclass of <tt class="docutils literal"><span class="pre">MathJax.InputJax</span></tt>.</p> +<div class="section" id="class-properties"> +<h2>Class Properties<a class="headerlink" href="#class-properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">directory</tt></dt> +<dd><p>The name of the jax directory (usually <tt class="docutils literal"><span class="pre">"[MathJax]/jax").</span> +<span class="pre">Overridden</span> <span class="pre">in</span> <span class="pre">the</span> <span class="pre">subclass</span> <span class="pre">to</span> <span class="pre">be</span> <span class="pre">the</span> <span class="pre">specific</span> <span class="pre">directory</span> <span class="pre">for</span> <span class="pre">the</span> +<span class="pre">class,</span> <span class="pre">e.g.</span> <span class="pre">``"[MathJax]/jax/input"</span></tt>.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">extensionDir</tt></dt> +<dd><p>The name of the extensions directory (usually <tt class="docutils literal"><span class="pre">"[MathJax]/extensions"</span></tt>).</p> +</dd></dl> + +</div> +<div class="section" id="instance-properties"> +<h2>Instance Properties<a class="headerlink" href="#instance-properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">name</tt></dt> +<dd><p>The name of the jax.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">version</tt></dt> +<dd><p>The version number of the jax.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">directory</tt></dt> +<dd><p>The directory for the jax (e.g., <tt class="docutils literal"><span class="pre">"[MathJax]/jax/input/TeX"</span></tt>).</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">require: null</tt></dt> +<dd><p>An array of files to load before the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file calls the +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.loadComplete()</span></tt> method.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">config: {}</tt></dt> +<dd><p>An object that contains the default configuration options for the +jax. These can be modified by the author by including a +configuration subsection for the specific jax in question.</p> +</dd></dl> + +</div> +<div class="section" id="methods"> +<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> +<dl class="method"> +<dt id="Translate"> +<tt class="descname">Translate</tt><big>(</big><em>script</em><big>)</big><a class="headerlink" href="#Translate" title="Permalink to this definition">¶</a></dt> +<dd><p>This is the method that the <tt class="docutils literal"><span class="pre">MathJax.Hub</span></tt> calls when it needs +the input or output jax to process the given math <tt class="docutils literal"><span class="pre"><script></span></tt> +call. Its default action is to start loading the jax’s <tt class="docutils literal"><span class="pre">jax.js</span></tt> +file, and redefine the <a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method to be the +<a class="reference internal" href="#noTranslate" title="noTranslate"><tt class="xref py py-meth docutils literal"><span class="pre">noTranslate()</span></tt></a> method below. The <tt class="docutils literal"><span class="pre">jax.js</span></tt> file should +redefine the <a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method to perform the translation +operation for the specific jax. For an input jax, it should +return the <cite>ElementJax</cite> object that it created.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first"> +<li><dl class="first docutils"> +<dt><strong>script</strong> — reference to the DOM <tt class="docutils literal"><span class="pre"><script></span></tt> object for</dt> +<dd><p class="first last">the mathematics to be translated</p> +</dd> +</dl> +</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">an <cite>ElementJax</cite> object, or <tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="noTranslate"> +<tt class="descname">noTranslate</tt><big>(</big><em>script</em><big>)</big><a class="headerlink" href="#noTranslate" title="Permalink to this definition">¶</a></dt> +<dd><p>This is a temporary routine that is used while the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file +is loading. It throws an error indicating the the +<a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method hasn’t been redefined. That way, if +the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file failes to load for some reason, you will +receive an error trying to process mathematics with this input +jax.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first"> +<li><dl class="first docutils"> +<dt><strong>script</strong> — reference to the DOM <tt class="docutils literal"><span class="pre"><script></span></tt> object for</dt> +<dd><p class="first last">the mathematics to be translated</p> +</dd> +</dl> +</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="Register"> +<tt class="descname">Register</tt><big>(</big><em>mimetype</em><big>)</big><a class="headerlink" href="#Register" title="Permalink to this definition">¶</a></dt> +<dd><p>This method is overridden in the <cite>InputJax</cite>, <cite>OutputJax</cite> and +<cite>ElementJax</cite> subclasses to handle the registration of those +classes of jax.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>mimetype</strong> — the MIME-type to be associated with the jax</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt> +<tt class="descname">Config</tt><big>(</big><big>)</big></dt> +<dd><p>Inserts the configuration block for this jax from the author’s +configuration specification into the jax’s <tt class="docutils literal"><span class="pre">config</span></tt> property. +If the configuration includes an <tt class="docutils literal"><span class="pre">Augment</span></tt> object, that is used +to augment the jax (that is, the configuration can override the +methods of the object, as well as the data). This is called +automatically during the loading of the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file.</p> +</dd></dl> + +<dl class="method"> +<dt id="Startup"> +<tt class="descname">Startup</tt><big>(</big><big>)</big><a class="headerlink" href="#Startup" title="Permalink to this definition">¶</a></dt> +<dd><p>This is a method that can be overridden in the subclasses to +perform initialization at startup time (after the configuration +has occurred).</p> +</dd></dl> + +<dl class="method"> +<dt> +<tt class="descname">loadComplete</tt><big>(</big><em>file</em><big>)</big></dt> +<dd><p>This is called by the <tt class="docutils literal"><span class="pre">config.js</span></tt> and <tt class="docutils literal"><span class="pre">jax.js</span></tt> files when they +are completely loaded and are ready to signal that fact to +MathJax. For <tt class="docutils literal"><span class="pre">config.js</span></tt>, this simply calls the +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.loadComplete()</span></tt> method for the <tt class="docutils literal"><span class="pre">config.js</span></tt> +file. For <tt class="docutils literal"><span class="pre">jax.js</span></tt>, the actions performed here are the +following:</p> +<blockquote> +<div><ol class="arabic simple"> +<li>Post the “[name] Jax Config” message to the startup signal.</li> +<li>Perform the jax’s <a class="reference internal" href="hub.html#Config" title="Config"><tt class="xref py py-meth docutils literal"><span class="pre">Config()</span></tt></a> method.</li> +<li>Post the “[name] Jax Require” message to the startup signal.</li> +<li>Load the files from the jax’s <tt class="docutils literal"><span class="pre">require</span></tt> array (which may +have been modified during the configuration process).</li> +<li>Post the “[name] Jax Startup” message to the startup signal.</li> +<li>Perform the jax’s <a class="reference internal" href="#Startup" title="Startup"><tt class="xref py py-meth docutils literal"><span class="pre">Startup()</span></tt></a> method.</li> +<li>Post the “[name] Jax Ready” message to the startup signal.</li> +<li>perform the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.loadComplete()</span></tt> call for the +<tt class="docutils literal"><span class="pre">jax.js</span></tt> file.</li> +</ol> +</div></blockquote> +</dd></dl> + +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The Base Jax Class</a><ul> +<li><a class="reference internal" href="#class-properties">Class Properties</a></li> +<li><a class="reference internal" href="#instance-properties">Instance Properties</a></li> +<li><a class="reference internal" href="#methods">Methods</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="elementjax.html" + title="previous chapter">The MathJax.ElementJax Class</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="object.html" + title="next chapter">The MathJax Object-Oriented Programming Model</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/api/jax.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="object.html" title="The MathJax Object-Oriented Programming Model" + >next</a> |</li> + <li class="right" > + <a href="elementjax.html" title="The MathJax.ElementJax Class" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >The MathJax API</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/api/message.html b/docs/html/api/message.html @@ -0,0 +1,227 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax.Message Object — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="The MathJax API" href="index.html" /> + <link rel="next" title="The MathJax.HTML Object" href="html.html" /> + <link rel="prev" title="The MathJax.Ajax Object" href="ajax.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="html.html" title="The MathJax.HTML Object" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="ajax.html" title="The MathJax.Ajax Object" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-message-object"> +<span id="api-message"></span><h1>The MathJax.Message Object<a class="headerlink" href="#the-mathjax-message-object" title="Permalink to this headline">¶</a></h1> +<p>The <tt class="docutils literal"><span class="pre">MathJax.Message</span></tt> object contains the methods used to manage the +small message area that appears at the lower-left corner of the +window. MathJax uses this area to inform the user of time-consuming +actions, like loading files and fonts, or how far along in the +typesetting process it is.</p> +<p>The page author can customize the look of the message window by +setting styles for the <tt class="docutils literal"><span class="pre">#MathJax_Message</span></tt> selector (which can be +set via</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">styles</span><span class="o">:</span> <span class="p">{</span> + <span class="s2">"#MathJax_Message"</span><span class="o">:</span> <span class="p">{</span> + <span class="p">...</span> + <span class="p">}</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>Because of a bug in Internet Explorer, in order to change the side of +the screen where the the message occurs, you must also set the side +for <tt class="docutils literal"><span class="pre">#MathJax_MSIE_Frame</span></tt>, as in</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">styles</span><span class="o">:</span> <span class="p">{</span> + <span class="s2">"#MathJax_Message"</span><span class="o">:</span> <span class="p">{</span><span class="nx">left</span><span class="o">:</span> <span class="s2">""</span><span class="p">,</span> <span class="nx">right</span><span class="o">:</span> <span class="mi">0</span><span class="p">},</span> + <span class="s2">"#MathJax_MSIE_Frame"</span><span class="o">:</span> <span class="p">{</span><span class="nx">left</span><span class="o">:</span> <span class="s2">""</span><span class="p">,</span> <span class="nx">right</span><span class="o">:</span> <span class="mi">0</span><span class="p">}</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>It is possible that a message is already being displayed when another +message needs to be posted. For this reason, when a message is +displayed on screen, it gets an id number that is used when you want +to remove or change that message. That way, when a message is +removed, the previous message (if any) can be redisplayed if it hasn’t +been removed. This allows for intermittent messages (like file +loading messages) to obscure longer-term message (like “Processing +Math” messages) temporarily.</p> +<div class="section" id="methods"> +<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> +<dl class="method"> +<dt id="Set"> +<tt class="descname">Set</tt><big>(</big><em>message</em><span class="optional">[</span>, <em>n</em><span class="optional">[</span>, <em>delay</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#Set" title="Permalink to this definition">¶</a></dt> +<dd><p>This sets the message being displayed to the given <cite>message</cite> +string. If <cite>n</cite> is not <tt class="docutils literal"><span class="pre">null</span></tt>, it represents a message id +number and the text is set for that message id, otherwise a new id +number is created for this message. If <cite>delay</cite> is provided, it is +the time (in milliseconds) to display the message before it is +cleared. If <cite>delay</cite> is not provided, the message will not be +removed automatically; you must call the +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Messsage.Clear()</span></tt> method by hand to remove it.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>message</strong> — the text to display in the message area</li> +<li><strong>n</strong> — the message id number</li> +<li><strong>delay</strong> — amout of time to display the message</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the message id nuber for this message.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="Clear"> +<tt class="descname">Clear</tt><big>(</big><em>n</em><span class="optional">[</span>, <em>delay</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Clear" title="Permalink to this definition">¶</a></dt> +<dd><p>This causes the message with id <cite>n</cite> to be removed after the given +<cite>delay</cite>, in milliseconds. The default delay is 600 milliseconds.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>n</strong> — the message id number</li> +<li><strong>delay</strong> — the delay before removing the message</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="Log"> +<tt class="descname">Log</tt><big>(</big><big>)</big><a class="headerlink" href="#Log" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns a string of all the messages issued so far, separated by +newlines. This is used in debugging MathJax operations.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body">string of all messages so far</td> +</tr> +</tbody> +</table> +</dd></dl> + +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The MathJax.Message Object</a><ul> +<li><a class="reference internal" href="#methods">Methods</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="ajax.html" + title="previous chapter">The MathJax.Ajax Object</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="html.html" + title="next chapter">The MathJax.HTML Object</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/api/message.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="html.html" title="The MathJax.HTML Object" + >next</a> |</li> + <li class="right" > + <a href="ajax.html" title="The MathJax.Ajax Object" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >The MathJax API</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/api/object.html b/docs/html/api/object.html @@ -0,0 +1,359 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax Object-Oriented Programming Model — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="The MathJax API" href="index.html" /> + <link rel="next" title="Converting to MathJax from jsMath" href="../jsMath.html" /> + <link rel="prev" title="The Base Jax Class" href="jax.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="../jsMath.html" title="Converting to MathJax from jsMath" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="jax.html" title="The Base Jax Class" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-object-oriented-programming-model"> +<span id="api-object"></span><h1>The MathJax Object-Oriented Programming Model<a class="headerlink" href="#the-mathjax-object-oriented-programming-model" title="Permalink to this headline">¶</a></h1> +<p>MathJax uses an object-oriented programming model for its main +components, such as the <cite>Input jax</cite>, <cite>Output jax</cite>, and <cite>Element jax</cite>. +The model is intended to be light-weight and is based on JavaScript’s +prototype inheritance mechanism. Object classes are created by making +subclasses of <cite>MathJax.Object</cite> or one of its subclasses, and are +instantiated by calling the object class as you would a function.</p> +<p>For example:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">Foo</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">({</span> + <span class="nx">Init</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">SetX</span><span class="p">(</span><span class="nx">x</span><span class="p">)},</span> + <span class="nx">getX</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">x</span><span class="p">},</span> + <span class="nx">setX</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">x</span> <span class="o">=</span> <span class="nx">x</span><span class="p">}</span> +<span class="p">});</span> +<span class="kd">var</span> <span class="nx">foo</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">Foo</span><span class="p">(</span><span class="s2">"bar"</span><span class="p">);</span> +<span class="nx">foo</span><span class="p">.</span><span class="nx">getX</span><span class="p">();</span> <span class="c1">// returns "bar"</span> +<span class="nx">foo</span><span class="p">.</span><span class="nx">setX</span><span class="p">(</span><span class="s2">"foobar"</span><span class="p">);</span> +<span class="nx">foo</span><span class="p">.</span><span class="nx">getX</span><span class="p">();</span> <span class="c1">// returns "foobar"</span> +</pre></div> +</div> +<p>Object classes can have static properties and methods, which are +accessed via the object class variable. E.g., +<tt class="docutils literal"><span class="pre">MathJax.Object.Foo.SUPER</span></tt> or <tt class="docutils literal"><span class="pre">MathJax.Object.Foo.Augment()</span></tt> for +the object in the example above. Static values are not inherited by +subclasses.</p> +<div class="section" id="static-properties"> +<h2>Static Properties<a class="headerlink" href="#static-properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">SUPER</tt></dt> +<dd><p>Pointer to the super class for this subclass. (It is a reference to +<cite>MathJax.Object</cite> in the example above.)</p> +</dd></dl> + +</div> +<div class="section" id="static-methods"> +<h2>Static Methods<a class="headerlink" href="#static-methods" title="Permalink to this headline">¶</a></h2> +<dl class="method"> +<dt id="Subclass"> +<tt class="descname">Subclass</tt><big>(</big><em>def</em><span class="optional">[</span>, <em>static</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Subclass" title="Permalink to this definition">¶</a></dt> +<dd><p>Creates a subclass of the given class using the contents of the +<cite>def</cite> object to define new methods and properties of the object +class, and the contents of the optional <cite>static</cite> object to define +new static methods and properties.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>def</strong> — object that defines the properties and methods</li> +<li><strong>static</strong> — object that defines static properties and methods</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the new object class</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="Augment"> +<tt class="descname">Augment</tt><big>(</big><em>def</em><span class="optional">[</span>, <em>static</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Augment" title="Permalink to this definition">¶</a></dt> +<dd><p>Adds new properties and methods to the class prototype. All +instances of the object already in existence will receive the new +properties and methods automatically.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>def</strong> — object that defines the properties and methods</li> +<li><strong>static</strong> — object that defines static properties and methods</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the object class itself</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</div> +<div class="section" id="properties"> +<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">constructor</tt></dt> +<dd><p>Pointer to the constructor function for this class. E.g., +<tt class="docutils literal"><span class="pre">foo.constructor</span></tt> would be a reference to <tt class="docutils literal"><span class="pre">MathJax.Object.Foo</span></tt> +in the example above.</p> +</dd></dl> + +</div> +<div class="section" id="methods"> +<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> +<dl class="method"> +<dt id="Init"> +<tt class="descname">Init</tt><big>(</big><span class="optional">[</span><em>data</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Init" title="Permalink to this definition">¶</a></dt> +<dd><p>An optional function that is called when an instance of the class +is created. When called, the <cite>this</cite> variable is set to the newly +instantiated object, and the <cite>data</cite> is whatever was passed to the +object constructor. For instance, in the example above, the +variable <tt class="docutils literal"><span class="pre">foo</span></tt> is created by calling +<tt class="docutils literal"><span class="pre">MathJax.Object.Foo("bar")</span></tt>, which calls the +<tt class="docutils literal"><span class="pre">MathJax.Object.Foo</span></tt> object’s <a class="reference internal" href="#Init" title="Init"><tt class="xref py py-meth docutils literal"><span class="pre">Init()</span></tt></a> method with <cite>data</cite> +equal to <tt class="docutils literal"><span class="pre">"bar"</span></tt>. If desired, the <a class="reference internal" href="#Init" title="Init"><tt class="xref py py-meth docutils literal"><span class="pre">Init()</span></tt></a> method can +create a <em>different</em> object, and return that, in which case this +becomes the return value for the object constructor.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>data</strong> — the data from the constructor call</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt> or the object to be returned by the constructor</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="isa"> +<tt class="descname">isa</tt><big>(</big><em>class</em><big>)</big><a class="headerlink" href="#isa" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns <tt class="docutils literal"><span class="pre">true</span></tt> if the object is an instance of the given class, +or of a subclass of the given class, and <tt class="docutils literal"><span class="pre">false</span></tt> otherwise. So +using the <tt class="docutils literal"><span class="pre">foo</span></tt> value defined above,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">foo</span><span class="p">.</span><span class="nx">isa</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">);</span> <span class="c1">// returns true</span> +<span class="nx">foo</span><span class="p">.</span><span class="nx">isa</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">Foo</span><span class="p">);</span> <span class="c1">// returns true</span> +<span class="nx">foo</span><span class="p">.</span><span class="nx">isa</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">InputJax</span><span class="p">);</span> <span class="c1">// returns false</span> +</pre></div> +</div> +</dd></dl> + +<dl class="method"> +<dt id="can"> +<tt class="descname">can</tt><big>(</big><em>method</em><big>)</big><a class="headerlink" href="#can" title="Permalink to this definition">¶</a></dt> +<dd><p>Checks if the object has the given <cite>method</cite> and returns <tt class="docutils literal"><span class="pre">true</span></tt> +if so, otherwise returns <tt class="docutils literal"><span class="pre">false</span></tt>. This allows you to test if an +object has a particular function available before trying to call +it (i.e., if an object implements a particular feature). For example:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">foo</span><span class="p">.</span><span class="nx">can</span><span class="p">(</span><span class="s2">"getX"</span><span class="p">);</span> <span class="c1">// returns true</span> +<span class="nx">foo</span><span class="p">.</span><span class="nx">can</span><span class="p">(</span><span class="s2">"bar"</span><span class="p">);</span> <span class="c1">// returns false</span> +</pre></div> +</div> +</dd></dl> + +<dl class="method"> +<dt id="has"> +<tt class="descname">has</tt><big>(</big><em>property</em><big>)</big><a class="headerlink" href="#has" title="Permalink to this definition">¶</a></dt> +<dd><p>Checks if the object has the given <cite>property</cite> and returns <tt class="docutils literal"><span class="pre">true</span></tt> +if so, otherwise returns <tt class="docutils literal"><span class="pre">false</span></tt>. This allows you to test if an +object has a particular property available before trying to use +it. For example:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">foo</span><span class="p">.</span><span class="nx">has</span><span class="p">(</span><span class="s2">"getX"</span><span class="p">);</span> <span class="c1">// returns true</span> +<span class="nx">foo</span><span class="p">.</span><span class="nx">has</span><span class="p">(</span><span class="s2">"x"</span><span class="p">);</span> <span class="c1">// returns true</span> +<span class="nx">foo</span><span class="p">.</span><span class="nx">has</span><span class="p">(</span><span class="s2">"bar"</span><span class="p">);</span> <span class="c1">// returns false</span> +</pre></div> +</div> +</dd></dl> + +</div> +<div class="section" id="accessing-the-super-class"> +<h2>Accessing the Super Class<a class="headerlink" href="#accessing-the-super-class" title="Permalink to this headline">¶</a></h2> +<p>If a subclass overrides a method of its parent class, it may want to +call the original function as part of its replacement method. The +semantics for this are a bit awkward, but work efficiently. Within a +method, the value <tt class="docutils literal"><span class="pre">arguments.callee.SUPER</span></tt> refers to the super +class, so you can access any method of the superclass using that. In +order to have <cite>this</cite> refer to the current object when you call the +super class, however, you need to use <tt class="docutils literal"><span class="pre">call()</span></tt> or +<tt class="docutils literal"><span class="pre">apply()</span></tt> to access the given method.</p> +<p>For example, <tt class="docutils literal"><span class="pre">arguments.callee.SUPER.method.call(this,data)</span></tt> would +call the superclass’ <cite>method</cite> and pass it <cite>data</cite> as its argument, +properly passing the current object as <cite>this</cite>. Alternatively, you can +use <tt class="docutils literal"><span class="pre">this.SUPER(arguments)</span></tt> in place of <tt class="docutils literal"><span class="pre">arguments.callee.SUPER</span></tt>. +It is also possible to refer to the super class explicitly rather than +through <tt class="docutils literal"><span class="pre">arguments.callee.SUPER</span></tt>, as in the following example:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class1</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">({</span> + <span class="nx">Init</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">x</span> <span class="o">=</span> <span class="nx">x</span><span class="p">},</span> + <span class="nx">XandY</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="s2">"Class1: x and y = "</span> <span class="o">+</span> <span class="k">this</span><span class="p">.</span><span class="nx">x</span> <span class="o">+</span> <span class="s2">" and "</span> <span class="o">+</span> <span class="nx">y</span><span class="p">}</span> +<span class="p">});</span> + +<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class2</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class1</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">({</span> + <span class="nx">XandY</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="s2">"Class2: "</span><span class="o">+</span><span class="nx">arguments</span><span class="p">.</span><span class="nx">callee</span><span class="p">.</span><span class="nx">SUPER</span><span class="p">.</span><span class="nx">XandY</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="k">this</span><span class="p">,</span><span class="nx">y</span><span class="p">)}</span> +<span class="p">});</span> + +<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class3</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class2</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">({</span> + <span class="nx">XandY</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="s2">"Class3: "</span><span class="o">+</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class2</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">XandY</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="k">this</span><span class="p">,</span><span class="nx">y</span><span class="p">)}</span> +<span class="p">});</span> + +<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class4</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class1</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">({</span> + <span class="nx">XandY</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="s2">"Class4: "</span><span class="o">+</span><span class="k">this</span><span class="p">.</span><span class="nx">SUPER</span><span class="p">(</span><span class="nx">arguments</span><span class="p">).</span><span class="nx">XandY</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="k">this</span><span class="p">,</span><span class="nx">y</span><span class="p">)}</span> +<span class="p">});</span> + +<span class="kd">var</span> <span class="nx">foo</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class2</span><span class="p">(</span><span class="s2">"foo"</span><span class="p">);</span> +<span class="nx">foo</span><span class="p">.</span><span class="nx">XandY</span><span class="p">(</span><span class="s2">"bar"</span><span class="p">);</span> <span class="c1">// returns "Class2: Class1: x and y = foo and bar"</span> +<span class="kd">var</span> <span class="nx">bar</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class3</span><span class="p">(</span><span class="s2">"bar"</span><span class="p">);</span> +<span class="nx">bar</span><span class="p">.</span><span class="nx">XandY</span><span class="p">(</span><span class="s2">"foo"</span><span class="p">);</span> <span class="c1">// returns "Class3: Class2: Class1: x and y = bar and foo"</span> +<span class="kd">var</span> <span class="nx">moo</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class4</span><span class="p">(</span><span class="s2">"moo"</span><span class="p">);</span> +<span class="nx">moo</span><span class="p">.</span><span class="nx">XandY</span><span class="p">(</span><span class="s2">"cow"</span><span class="p">);</span> <span class="c1">// returns "Class4: Class1: x and y = moo and cow"</span> +</pre></div> +</div> +<p>Since both of these mechanisms are rather awkward, MathJax provides an +alternative syntax that is easier on the programmer, but at the cost +of some inefficiency in creating the subclass and in calling methods +that access the super class.</p> +<p>Since most calls to the super class are to the overridden method, not +to some other method, the method name and the <tt class="docutils literal"><span class="pre">call()</span></tt> are +essentially redundant. You can get a more convenient syntax by +wrapping the <cite>def</cite> for the <a class="reference internal" href="#Subclass" title="Subclass"><tt class="xref py py-meth docutils literal"><span class="pre">Subclass()</span></tt></a> call in a call to +<tt class="docutils literal"><span class="pre">MathJax.Object.SimpleSUPER()</span></tt>, as in the following example:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class1</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">({</span> + <span class="nx">Init</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">x</span> <span class="o">=</span> <span class="nx">x</span><span class="p">},</span> + <span class="nx">XandY</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="s2">"Class1: x and y = "</span> <span class="o">+</span> <span class="k">this</span><span class="p">.</span><span class="nx">x</span> <span class="o">+</span> <span class="s2">" and "</span> <span class="o">+</span> <span class="nx">y</span><span class="p">}</span> +<span class="p">});</span> + +<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class2</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class1</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">(</span> + <span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">SimpleSUPER</span><span class="p">({</span> + <span class="nx">XandY</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">y</span><span class="p">)</span> <span class="p">{</span><span class="k">return</span> <span class="s2">"Class2: "</span><span class="o">+</span><span class="k">this</span><span class="p">.</span><span class="nx">SUPER</span><span class="p">(</span><span class="nx">y</span><span class="p">)},</span> + <span class="nx">AnotherMethod</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">x</span><span class="p">}</span> <span class="c1">// it's OK if a method doesn't use SUPER</span> + <span class="p">})</span> +<span class="p">);</span> + +<span class="kd">var</span> <span class="nx">foo</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Class2</span><span class="p">(</span><span class="s2">"foo"</span><span class="p">);</span> +<span class="nx">foo</span><span class="p">.</span><span class="nx">XandY</span><span class="p">(</span><span class="s2">"bar"</span><span class="p">);</span> <span class="c1">// returns "Class2: Class1: x and y = foo and bar"</span> +</pre></div> +</div> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The MathJax Object-Oriented Programming Model</a><ul> +<li><a class="reference internal" href="#static-properties">Static Properties</a></li> +<li><a class="reference internal" href="#static-methods">Static Methods</a></li> +<li><a class="reference internal" href="#properties">Properties</a></li> +<li><a class="reference internal" href="#methods">Methods</a></li> +<li><a class="reference internal" href="#accessing-the-super-class">Accessing the Super Class</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="jax.html" + title="previous chapter">The Base Jax Class</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="../jsMath.html" + title="next chapter">Converting to MathJax from jsMath</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/api/object.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="../jsMath.html" title="Converting to MathJax from jsMath" + >next</a> |</li> + <li class="right" > + <a href="jax.html" title="The Base Jax Class" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >The MathJax API</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/api/outputjax.html b/docs/html/api/outputjax.html @@ -0,0 +1,249 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax.OutputJax Class — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="The MathJax API" href="index.html" /> + <link rel="next" title="The MathJax.ElementJax Class" href="elementjax.html" /> + <link rel="prev" title="The MathJax.InputJax Class" href="inputjax.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="elementjax.html" title="The MathJax.ElementJax Class" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="inputjax.html" title="The MathJax.InputJax Class" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-outputjax-class"> +<span id="api-output-jax"></span><h1>The MathJax.OutputJax Class<a class="headerlink" href="#the-mathjax-outputjax-class" title="Permalink to this headline">¶</a></h1> +<p>Output jax are the components of MathJax that translate +mathematics from the MathJax internal format (an <cite>element jax</cite>) +to whatever output is required to represent the mathematics (e.g., +MathML elements, or HTML-with-CSS that formats the mathematics on screen).</p> +<p>An output jax is stored as a pair of files in a subdirectory of the +the <tt class="docutils literal"><span class="pre">jax/output</span></tt> directory, with the subdirectory name being the +name of the output jax. For example, the NativeMML output jax is +stored in <cite>jax/output/NativeMML</cite>. The first file, <tt class="docutils literal"><span class="pre">config.js</span></tt>, is +loaded when MathJax is being loaded and configured, and is indicated +by listing the input jax directory in the <cite>jax</cite> array of the MathJax +configuration. The <tt class="docutils literal"><span class="pre">config.js</span></tt> file creates a subclass of the +<cite>MathJax.OutputJax</cite> object for the new output jax and registers it +with MathJax, along with the MIME-type of the element jax that it can +process.</p> +<p>The main body of the output jax is stored in the second file, <tt class="docutils literal"><span class="pre">jax.js</span></tt>, +which is loaded when the output jax is first called on to translate +some mathematics. This file augments the original output jax +subclass with the additional methods needed to produce the output. +MathJax calls the input jax’s <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method when it needs +the output jax to translate an element jax to produce output.</p> +<p>The <cite>MathJax.OutputJax</cite> class is a subclass of the <a class="reference internal" href="jax.html#api-jax"><em>MathJax Jax</em></a> class, and inherits the properties and methods of that +class. Those listed below are the additional or overridden ones from +that class.</p> +<div class="section" id="properties"> +<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">name</tt></dt> +<dd><p>The name of the jax.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">version</tt></dt> +<dd><p>The version number of the jax.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">directory</tt></dt> +<dd><p>The directory where the jax files are stored (e.g., <tt class="docutils literal"><span class="pre">"[MathJax]/jax/output/HTML-CSS"</span></tt>);</p> +</dd></dl> + +</div> +<div class="section" id="methods"> +<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> +<dl class="method"> +<dt> +<tt class="descname">Translate</tt><big>(</big><em>script</em><big>)</big></dt> +<dd><p>This is the main routine called by MathJax when an element jax is +to be converted to output. The default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> +method simply loads the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file and returns that callback +for that load function so that MathJax will know when to try +the <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> action again. When the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file +loads, it should override the default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> with its +own version that does the actual translation; that way, when the +second Translate call is made, it will be to the actual +translation routine rather than the default loader.</p> +<p>You should use <tt class="docutils literal"><span class="pre">MathJax.Hub.getJaxFor(script)</span></tt> to obtain the +element jax for the given script. The translation process may add +modify the element jax (e.g., if it has data that needs to be +stored with the jax), and may insert DOM elements into the +document near the jax’s <tt class="docutils literal"><span class="pre"><script></span></tt> tag.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>script</strong> — the <tt class="docutils literal"><span class="pre"><script></span></tt> element to be translated</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the <cite>element jax</cite> resulting from the translation</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt> +<tt class="descname">Register</tt><big>(</big><em>mimetype</em><big>)</big></dt> +<dd><p>This registers the MIME-type for the element jax associated with +this output jax so that MathJax knows to call this jax when it +wants to display an element jax of that type. Several output jax +may register for the same input jax, in which case the first one +to register will be the default one for that type.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>mimetype</strong> — the MIME-type of the input this jax processes</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt> +<tt class="descname">Remove</tt><big>(</big><em>jax</em><big>)</big></dt> +<dd><p>Removes the output associated with the given element jax. The +routine can use <tt class="docutils literal"><span class="pre">jax.SourceElement()</span></tt> to locate the <tt class="docutils literal"><span class="pre"><script></span></tt> +tag associated with the element jax.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>jax</strong> — the element jax whose display should be removed</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The MathJax.OutputJax Class</a><ul> +<li><a class="reference internal" href="#properties">Properties</a></li> +<li><a class="reference internal" href="#methods">Methods</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="inputjax.html" + title="previous chapter">The MathJax.InputJax Class</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="elementjax.html" + title="next chapter">The MathJax.ElementJax Class</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/api/outputjax.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="elementjax.html" title="The MathJax.ElementJax Class" + >next</a> |</li> + <li class="right" > + <a href="inputjax.html" title="The MathJax.InputJax Class" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >The MathJax API</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/api/queue.html b/docs/html/api/queue.html @@ -0,0 +1,250 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax.Callback.Queue Class — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="The MathJax API" href="index.html" /> + <link rel="next" title="The MathJax.Callback.Signal Class" href="signal.html" /> + <link rel="prev" title="The MathJax.Callback Class" href="callback.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="signal.html" title="The MathJax.Callback.Signal Class" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="callback.html" title="The MathJax.Callback Class" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-callback-queue-class"> +<span id="api-queue"></span><h1>The MathJax.Callback.Queue Class<a class="headerlink" href="#the-mathjax-callback-queue-class" title="Permalink to this headline">¶</a></h1> +<p>The <tt class="docutils literal"><span class="pre">MathJax.Callback.Queue</span></tt> object is one of the key mechanisms +used by MathJax to synchronize its actions with those that occur +asynchronously, like loading files and stylesheets. A <cite>Queue</cite> obejct +is used to coordinate a sequence of actions so that they are performed +one after another, even when one action has to wait for an +asynchronous process to complete. This guarantees that operations are +performed in the right order even when the code must wait for some +other action to occur. See <a class="reference internal" href="../synchronize.html#synchronization"><em>Synchronizing with MathJax</em></a> for more details, and <a class="reference internal" href="../queues.html#using-queues"><em>Using Queues</em></a> in particular for examples of how to specify and use +MathJax <cite>Queue</cite> objects.</p> +<div class="section" id="properties"> +<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">pending</tt></dt> +<dd><p>This is non-zero when the queue is waiting for a command to +complete, i.e. a command being processed returns a <cite>Callback</cite> +object, indicating that the queue should wait for that action to +complete before processing additional commands.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">running</tt></dt> +<dd><p>This is non-zero when the queue is executing one of the commands in +the queue.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">queue</tt></dt> +<dd><p>An array containing the queued commands that are yet to be performed.</p> +</dd></dl> + +</div> +<div class="section" id="methods"> +<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> +<dl class="method"> +<dt id="Push"> +<tt class="descname">Push</tt><big>(</big><em>callback</em>, <em>...</em><big>)</big><a class="headerlink" href="#Push" title="Permalink to this definition">¶</a></dt> +<dd><p>Adds commands to the queue and runs them (if the queue is not +pending or running another command). If one of the callbacks is +an actual <cite>Callback</cite> object rather than a callback specification, +then the command queued is an internal command to wait for the +given callback to complete. That is, that callback is not itself +queued to be executed, but a wait for that callback is queued. +The <a class="reference internal" href="#Push" title="Push"><tt class="xref py py-meth docutils literal"><span class="pre">Push()</span></tt></a> method returns the last callback that was +added to the queue (so that it can be used for further +synchronization, say as an entry in some other queue).</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>callback</strong> — the callback specifications to be added to the queue</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the last callback object added to the queue</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt> +<tt class="descname">Process</tt><big>(</big><big>)</big></dt> +<dd><blockquote> +<div>Process the commands in the queue, provided the queue is not +waiting for another command to complete. This method is used +internally; you should not need to call it yourself.</div></blockquote> +</dd></dl> + +<dl class="method"> +<dt id="Suspend"> +<tt class="descname">Suspend</tt><big>(</big><big>)</big><a class="headerlink" href="#Suspend" title="Permalink to this definition">¶</a></dt> +<dd><p>Increments the <cite>running</cite> property, indicating that any commands that +are added the queue should not be executed immediately, but should +be queued for later execution (when its <a class="reference internal" href="#Resume" title="Resume"><tt class="xref py py-meth docutils literal"><span class="pre">Resume()</span></tt></a> is +called). This method is used internally; you should not need to +call it yourself.</p> +</dd></dl> + +<dl class="method"> +<dt id="Resume"> +<tt class="descname">Resume</tt><big>(</big><big>)</big><a class="headerlink" href="#Resume" title="Permalink to this definition">¶</a></dt> +<dd><p>Decrements the <cite>running</cite> property, if it is positive. When it is +zero, commands can be processed, but that is not done +automatically — you would need to call <a class="reference internal" href="hub.html#Process" title="Process"><tt class="xref py py-meth docutils literal"><span class="pre">Process()</span></tt></a> to make +that happen. This method is used internally; you should not need +to call it yourself.</p> +</dd></dl> + +<dl class="method"> +<dt id="wait"> +<tt class="descname">wait</tt><big>(</big><em>callback</em><big>)</big><a class="headerlink" href="#wait" title="Permalink to this definition">¶</a></dt> +<dd><p>Used internally when an entry in the queue is a <cite>Callback</cite> object +rather than a callback specification. A callback to this function +(passing it the original callback) is queued instead, and it +simply returns the callback it was passed. Since the queue will +wait for a callback if it is the return value of one of the +commands it executes, this effectively make the queue wait for the +original callback at that point in the command queue.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>callback</strong> — the function to complete before returning to the queue</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the passed callback function</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="call"> +<tt class="descname">call</tt><big>(</big><big>)</big><a class="headerlink" href="#call" title="Permalink to this definition">¶</a></dt> +<dd><p>An internal function used to restart processing of the queue after +it has been waiting for a command to complete.</p> +</dd></dl> + +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The MathJax.Callback.Queue Class</a><ul> +<li><a class="reference internal" href="#properties">Properties</a></li> +<li><a class="reference internal" href="#methods">Methods</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="callback.html" + title="previous chapter">The MathJax.Callback Class</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="signal.html" + title="next chapter">The MathJax.Callback.Signal Class</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/api/queue.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="signal.html" title="The MathJax.Callback.Signal Class" + >next</a> |</li> + <li class="right" > + <a href="callback.html" title="The MathJax.Callback Class" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >The MathJax API</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/api/signal.html b/docs/html/api/signal.html @@ -0,0 +1,337 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax.Callback.Signal Class — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="The MathJax API" href="index.html" /> + <link rel="next" title="The MathJax.InputJax Class" href="inputjax.html" /> + <link rel="prev" title="The MathJax.Callback.Queue Class" href="queue.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="inputjax.html" title="The MathJax.InputJax Class" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="queue.html" title="The MathJax.Callback.Queue Class" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-callback-signal-class"> +<span id="api-signal"></span><h1>The MathJax.Callback.Signal Class<a class="headerlink" href="#the-mathjax-callback-signal-class" title="Permalink to this headline">¶</a></h1> +<p>The <tt class="docutils literal"><span class="pre">MathJax.Callback.Signal</span></tt> object is one of the key mechanisms +used by MathJax to synchronize its actions with those that occur +asynchronously, like loading files and stylesheets. A <cite>Signal</cite> object +is used to pulicise the fact that MathJax has performed certain +actions, giving other code running the the web page the chance to +react to those actions. See <a class="reference internal" href="../synchronize.html#synchronization"><em>Synchronizing with MathJax</em></a> for more details, and <a class="reference internal" href="../signals.html#using-signals"><em>Using Signals</em></a> in particular for examples of how to specify and use +MathJax <cite>Signal</cite> objects.</p> +<p>The <cite>Callback Signal</cite> object is a subclass of the <a class="reference internal" href="queue.html#api-queue"><em>Callback Queue</em></a> object.</p> +<div class="section" id="properties"> +<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">name</tt></dt> +<dd><p>The name of the signal. Each signal is named so that +various components can access it. The first one to request a +particular signal causes it to be created, and other requests for +the signal return references to the same object.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">posted</tt></dt> +<dd><p>Array used internally to stored the post history so that when new +listeners express interests in this signal, they can be informed +of the signals that have been posted so far. This can be cleared +using the signal’s <a class="reference internal" href="message.html#Clear" title="Clear"><tt class="xref py py-meth docutils literal"><span class="pre">Clear()</span></tt></a> method.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">listeners</tt></dt> +<dd><p>Array of callbacks to the listeners who have expressed interest in +hearing about posts to this signal. When a post occurs, the +listeners are called in each turn, passing them the message that +was posted.</p> +</dd></dl> + +</div> +<div class="section" id="methods"> +<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2> +<dl class="method"> +<dt id="Post"> +<tt class="descname">Post</tt><big>(</big><em>message</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Post" title="Permalink to this definition">¶</a></dt> +<dd><p>Posts a message to all the listeners for the signal. The listener +callbacks are called in turn (with the message as an argument), +and if any return a <cite>Callback</cite> object, the posting will be +suspended until the callback is exectured. In this way, the +<a class="reference internal" href="#Post" title="Post"><tt class="xref py py-meth docutils literal"><span class="pre">Post()</span></tt></a> call can operate asynchronously, and so the +<cite>callback</cite> parameter is used to synchronize with its operation; +the <cite>callback</cite> will be called when all the listeners have responded +to the post.</p> +<p>If a <a class="reference internal" href="#Post" title="Post"><tt class="xref py py-meth docutils literal"><span class="pre">Post()</span></tt></a> to this signal occurs while waiting for the +response from a listener (either because a listener returned a +<cite>Callback</cite> object and we are waiting for it to complete when the +<a class="reference internal" href="#Post" title="Post"><tt class="xref py py-meth docutils literal"><span class="pre">Post()</span></tt></a> occurred, or because the listener itself called the +<tt class="docutils literal"><span class="pre">Post()</span></tt> method), the new message will be queued and will be +posted after the current message has been sent to all the +listeners, and they have all responded. This is another way in +which posting can be asynchronous; the only sure way to know that +a posting has occurred is through its <cite>callback</cite>. When the posting +is complete, the callback is called, passing it the signal object +that has just completed.</p> +<p>Returns the callback object (or a blank callback object if none +was provided).</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>message</strong> — the message to send through the signal</li> +<li><strong>callback</strong> — called after the message is posted</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback or a blank callback</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt> +<tt class="descname">Clear</tt><big>(</big><span class="optional">[</span><em>callback</em><span class="optional">]</span><big>)</big></dt> +<dd><p>This causes the history of past messages to be cleared so new +listeners will not receive them. Note that since the signal may +be operating asynchronously, the <a class="reference internal" href="message.html#Clear" title="Clear"><tt class="xref py py-meth docutils literal"><span class="pre">Clear()</span></tt></a> may be queued for +later. In this way, the <a class="reference internal" href="#Post" title="Post"><tt class="xref py py-meth docutils literal"><span class="pre">Post()</span></tt></a> and <a class="reference internal" href="message.html#Clear" title="Clear"><tt class="xref py py-meth docutils literal"><span class="pre">Clear()</span></tt></a> +operations will be performed in the proper order even when they +are delayed. The <cite>callback</cite> is called when the <a class="reference internal" href="message.html#Clear" title="Clear"><tt class="xref py py-meth docutils literal"><span class="pre">Clear()</span></tt></a> +operation is completed.</p> +<p>Returns the callback (or a blank callback if none is provided).</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>callback</strong> — called after the signal history is cleared</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback or a blank callback</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="Interest"> +<tt class="descname">Interest</tt><big>(</big><em>callback</em><span class="optional">[</span>, <em>ignorePast</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Interest" title="Permalink to this definition">¶</a></dt> +<dd><p>This method registers a new listener on the signal. It creates a +<cite>Callback</cite> object from the callback specification, attaches it to +the signal, and returns that <cite>Callback</cite> object. When new messages +are posted to the signal, it runs the callback, passing it the +message that was posted. If the callback itself returns a +<cite>Callback</cite> object, that indicates that the listener has started an +asynchronous operation and the poster should wait for that +callback to complete before allowing new posts on the signal.</p> +<p>If <cite>ignorePast</cite> is <tt class="docutils literal"><span class="pre">false</span></tt> or not present, then before +<a class="reference internal" href="#Interest" title="Interest"><tt class="xref py py-meth docutils literal"><span class="pre">Interest()</span></tt></a> returns, the callback will be called with all +the past messages that have been sent to the signal.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>callback</strong> — called whenever a message is posted (past or present)</li> +<li><strong>ignorePast</strong> — <tt class="docutils literal"><span class="pre">true</span></tt> means ignore previous messages</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="NoInterest"> +<tt class="descname">NoInterest</tt><big>(</big><em>callback</em><big>)</big><a class="headerlink" href="#NoInterest" title="Permalink to this definition">¶</a></dt> +<dd><p>This removes a listener from the signal so that no new messages +will be sent to it. The callback should be the one returned by +the original <a class="reference internal" href="#Interest" title="Interest"><tt class="xref py py-meth docutils literal"><span class="pre">Interest()</span></tt></a> call that attached the listener to +the signal in the first place. Once removed, the listener will no +longer receive messages from the signal.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>callback</strong> — the listener to be removed from signal</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="MessageHook"> +<tt class="descname">MessageHook</tt><big>(</big><em>message</em>, <em>callback</em><big>)</big><a class="headerlink" href="#MessageHook" title="Permalink to this definition">¶</a></dt> +<dd><p>This creates a callback that is called whenever the signal posts +the given message. This is a little easier than having to write a +function that must check the message each time it is called. +Although the <cite>message</cite> here is a string, if a message posted to the +signal is an array, then only the first element of that array is +used to match against message. That way, if a message contains an +identifier plus arguments, the hook will match the identifier and +still get called with the complete set of arguments.</p> +<p>Returns the <cite>Callback</cite> object that was produced.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>message</strong> — the message to look for from the signal</li> +<li><strong>callback</strong> — called when the message is posted</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="ExecuteHook"> +<tt class="descname">ExecuteHook</tt><big>(</big><em>message</em><big>)</big><a class="headerlink" href="#ExecuteHook" title="Permalink to this definition">¶</a></dt> +<dd><p>Used internally to call the listeners when a particular +message is posted to the signal.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple"> +<li><strong>message</strong> — the posted message</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The MathJax.Callback.Signal Class</a><ul> +<li><a class="reference internal" href="#properties">Properties</a></li> +<li><a class="reference internal" href="#methods">Methods</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="queue.html" + title="previous chapter">The MathJax.Callback.Queue Class</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="inputjax.html" + title="next chapter">The MathJax.InputJax Class</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/api/signal.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="inputjax.html" title="The MathJax.InputJax Class" + >next</a> |</li> + <li class="right" > + <a href="queue.html" title="The MathJax.Callback.Queue Class" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >The MathJax API</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/api/variable.html b/docs/html/api/variable.html @@ -0,0 +1,223 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax variable — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="The MathJax API" href="index.html" /> + <link rel="next" title="The MathJax.Hub Object" href="hub.html" /> + <link rel="prev" title="The MathJax API" href="index.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="hub.html" title="The MathJax.Hub Object" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="index.html" title="The MathJax API" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">The MathJax API</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-variable"> +<h1>The MathJax variable<a class="headerlink" href="#the-mathjax-variable" title="Permalink to this headline">¶</a></h1> +<p>MathJax has a single global variable, <tt class="docutils literal"><span class="pre">MathJax</span></tt>, in which all its +data, and the data for loaded components, are stored. The MathJax +variable is a nested structure, with its top-level properties being +objects themselves.</p> +<div class="section" id="main-mathjax-components"> +<h2>Main MathJax Components<a class="headerlink" href="#main-mathjax-components" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">MathJax.Hub</tt></dt> +<dd><p>Contains the MathJax hub code and variables, including the startup +code, the onload handler, the browser data, and so forth.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">MathJax.Ajax</tt></dt> +<dd><p>Contains the code for loading external modules and creating +stylesheets. Most of the code that causes most of MathJax to +operate asynchronously is handled here.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">MathJax.Message</tt></dt> +<dd><p>Contains the code to handle the intermittant message window that +periodically appears in the lower left-hand corner of the window.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">MathJax.HTML</tt></dt> +<dd><p>Contains support code for creating HTML elements dynamically from +descriptions stored in JavaScript objects.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">MathJax.CallBack</tt></dt> +<dd><p>Contains the code for managing MathJax callbacks, queues and +signals.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">MathJax.Extensions</tt></dt> +<dd><p>Initially empty, this is where extensions can load their code. +For example, the <cite>tex2jax</cite> preprocessor creates +<tt class="docutils literal"><span class="pre">MathJax.Extensions.tex2jax</span></tt> for its code and variables.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">MathJax.Object</tt></dt> +<dd><p>Contains the code for the MathJax object-oriented programming model.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">MathJax.InputJax</tt></dt> +<dd><p>The base class for all input <cite>jax</cite> objects. Subclasses for +specific input jax are created as sub-objects of +<tt class="docutils literal"><span class="pre">MathJax.InputJax</span></tt>. For example, the TeX input jax loads itself +as <tt class="docutils literal"><span class="pre">MathJax.InputJax.TeX</span></tt>.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">MathJax.OutputJax</tt></dt> +<dd><p>The base class for all output <cite>jax</cite> objects. Subclasses for +specific output jax are created as sub-objects of +<tt class="docutils literal"><span class="pre">MathJax.OutputJax</span></tt>. For example, the HTML-CSS output jax loads +itself as <tt class="docutils literal"><span class="pre">MathJax.OutputJax["HTML-CSS"]</span></tt>.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">MathJax.ElementJax</tt></dt> +<dd><p>The base class for all element <cite>jax</cite> objects. Subclasses for +specific element jax are creates as sub-objects of +<tt class="docutils literal"><span class="pre">MathJax.ElementJax</span></tt>. For example, the mml element jax loads +itself as <tt class="docutils literal"><span class="pre">MathJax.ElementJax.mml</span></tt>.</p> +</dd></dl> + +</div> +<div class="section" id="properties"> +<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2> +<dl class="describe"> +<dt> +<tt class="descname">MathJax.version</tt></dt> +<dd><p>The version number of the MathJax library.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">MathJax.isReady</tt></dt> +<dd><p>This is set to <tt class="docutils literal"><span class="pre">true</span></tt> when MathJax is set up and ready to +perform typesetting actions (and is <tt class="docutils literal"><span class="pre">null</span></tt> otherwise).</p> +</dd></dl> + +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The MathJax variable</a><ul> +<li><a class="reference internal" href="#main-mathjax-components">Main MathJax Components</a></li> +<li><a class="reference internal" href="#properties">Properties</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="index.html" + title="previous chapter">The MathJax API</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="hub.html" + title="next chapter">The MathJax.Hub Object</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/api/variable.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="hub.html" title="The MathJax.Hub Object" + >next</a> |</li> + <li class="right" > + <a href="index.html" title="The MathJax API" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >The MathJax API</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/callbacks.html b/docs/html/callbacks.html @@ -0,0 +1,308 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Using Callbacks — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" /> + <link rel="next" title="Using Queues" href="queues.html" /> + <link rel="prev" title="Synchronizing your code with MathJax" href="synchronize.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="queues.html" title="Using Queues" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="synchronize.html" title="Synchronizing your code with MathJax" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="synchronize.html" accesskey="U">Synchronizing your code with MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="using-callbacks"> +<span id="id1"></span><h1>Using Callbacks<a class="headerlink" href="#using-callbacks" title="Permalink to this headline">¶</a></h1> +<p>A “callback” is a function that MathJax calls when it completes an +action that may occur asynchronously (like loading a file). Many of +MathJax’s functions operate asynchronously, and MathJax uses callbacks +to allow you to synchronize your code with the action of those +functions. The <cite>MathJax.Callback</cite> structure manages these callbacks. +Callbacks can include not only a function to call, but also data to be +passed to the function, and an object to act as the JavaScript <cite>this</cite> +value in the resulting call (i.e., the object on which the callback is +to execute).</p> +<p>Callbacks can be collected into <a class="reference internal" href="queues.html#using-queues"><em>Queues</em></a> where the +callbacks will be processed in order, with later callbacks waiting +until previous ones have completed before they are called. They are +also used with <a class="reference internal" href="signals.html#using-signals"><em>Signals</em></a> as the means of +receiving information about the signals as they occur.</p> +<p>A number of methods in <cite>MathJax.Hub</cite> and <cite>MathJax.Ajax</cite> accept +callback specifications as arguments and return callback structures. +These routines always will return a callback even when none was +specified in the arguments, and in that case, the callback is a “do +nothing” callback. The reason for this is so that the resulting +callback can be used can be used in a <cite>MathJax.Callback.Queue</cite> for +synchronization purposes, so that the actions following it in the +queue will not be performed until after the callback has been fired.</p> +<p>For example, the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> method can be used to +load external files, and it returns a callback that is called when the +file has been loaded and executed. If you want to load several files +and wait for them all to be loaded before performing some action, you +can create a <cite>Queue</cite> into which you push the results of the +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> calls, and then push a callback for the +action. The final action will not be performed until all the +file-load callbacks (which preceed it int he queue) have been called; +i.e., the action will not occur until all the files are loaded.</p> +<div class="section" id="specifying-a-callback"> +<h2>Specifying a Callback<a class="headerlink" href="#specifying-a-callback" title="Permalink to this headline">¶</a></h2> +<p>Callbacks can be specified in a number of different ways, depending on +the functionality that is required of the callback. The easiest case +is to simply provide a function to be called, but it is also possible +to include data to pass to the function when it is called, and to +specify the object that will be used as <cite>this</cite> when the function is +called.</p> +<p>For example, the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> method can accept a +callback as its second argument (it will be called when the file given +as the first argument is loaded and executed). So you can call</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/config/myConfig.js"</span><span class="p">,</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> + <span class="nx">alert</span><span class="p">(</span><span class="s2">"My configuration file is loaded"</span><span class="p">);</span> +<span class="p">});</span> +</pre></div> +</div> +<p>and an alert will appear when the file is loaded. An example of +passing arguments to the callback function includes the following:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">loadHook</span> <span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"loadHook: "</span><span class="o">+</span><span class="nx">x</span><span class="p">)}</span> +<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/config/myConfig.js"</span><span class="p">,[</span><span class="nx">loadHook</span><span class="p">,</span><span class="s2">"myConfig"</span><span class="p">]);</span> +</pre></div> +</div> +<p>Here, the <tt class="docutils literal"><span class="pre">loadHook()</span></tt> function accepts one argument and generates +an alert that includes the value passed to it. The callback in the +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> call is <tt class="docutils literal"><span class="pre">[loadHook,"myConfig"]</span></tt>, +which means that (the equivalent of) <tt class="docutils literal"><span class="pre">loadHook("myConfig")</span></tt> will be +performed when the file is loaded. The result should be an alert with +the text <cite>loadHook: myConfig</cite>.</p> +<p>The callback for the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> method actually +gets called with a status value, in addition to any parameters already +included in the callback specification, that indicates whether the +file loaded successfully, or failed for some reason (perhaps the file +couldn’t be found, or it failed to compile and run). So you could use</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/config/myConfig.js"</span><span class="p">,</span><span class="kd">function</span> <span class="p">(</span><span class="nx">status</span><span class="p">)</span> <span class="p">{</span> + <span class="k">if</span> <span class="p">(</span><span class="nx">status</span> <span class="o">===</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">STATUS</span><span class="p">.</span><span class="nx">OK</span><span class="p">)</span> <span class="p">{</span> + <span class="nx">alert</span><span class="p">(</span><span class="s2">"My configuration file is loaded"</span><span class="p">);</span> + <span class="p">}</span> <span class="k">else</span> <span class="p">{</span> + <span class="nx">alert</span><span class="p">(</span><span class="s2">"My configuration file failed to load!"</span><span class="p">);</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>to check if the file loaded properly. With additional parameters, the +example might be</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">loadHook</span> <span class="p">(</span><span class="nx">x</span><span class="p">,</span><span class="nx">status</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"loadHook: "</span><span class="o">+</span><span class="nx">x</span><span class="o">+</span><span class="s2">" has status "</span><span class="o">+</span><span class="nx">status</span><span class="p">)}</span> +<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/config/myConfig.js"</span><span class="p">,[</span><span class="nx">loadHook</span><span class="p">,</span><span class="s2">"myConfig"</span><span class="p">]);</span> +</pre></div> +</div> +<p>Note that the parameters given in the callback specification are used +first, and then additional parameters from the call to the callback +come afterward.</p> +<div class="section" id="callbacks-to-object-methods"> +<h3>Callbacks to Object Methods<a class="headerlink" href="#callbacks-to-object-methods" title="Permalink to this headline">¶</a></h3> +<p>When you use a method of a JavaScript object, a special variable +called <cite>this</cite> is defined that refers to the object whose method is +being called. It allows you to access other methods or properties of +the object without knowing explicitly where the object is stored.</p> +<p>For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">aPerson</span> <span class="o">=</span> <span class="p">{</span> + <span class="nx">firstname</span><span class="o">:</span> <span class="s2">"John"</span><span class="p">,</span> + <span class="nx">lastname</span><span class="o">:</span> <span class="s2">"Smith"</span><span class="p">,</span> + <span class="nx">showName</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">firstname</span><span class="o">+</span><span class="s2">" "</span><span class="o">+</span><span class="k">this</span><span class="p">.</span><span class="nx">lastname</span><span class="p">)}</span> +<span class="p">};</span> +</pre></div> +</div> +<p>creates an object that contains three items, a <cite>firstname</cite>, and +<cite>lastname</cite>, and a method that shows the person’s full name in an +alert. So <tt class="docutils literal"><span class="pre">aPerson.fullName()</span></tt> would cause an alert with the text +<tt class="docutils literal"><span class="pre">John</span> <span class="pre">Smith</span></tt> to appear. Note, however that this only works if the +method is called as <tt class="docutils literal"><span class="pre">aPerson.showName()</span></tt>; if instead you did</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">f</span> <span class="o">=</span> <span class="nx">aPerson</span><span class="p">.</span><span class="nx">showName</span><span class="p">;</span> <span class="c1">// assign f the function from aPerson</span> +<span class="nx">f</span><span class="p">();</span> <span class="c1">// and call the function</span> +</pre></div> +</div> +<p>the association of the function with the data in <tt class="docutils literal"><span class="pre">aPerson</span></tt> is lost, +and the alert will probably show <tt class="docutils literal"><span class="pre">undefined</span> <span class="pre">undefined</span></tt>. (In this +case, <tt class="docutils literal"><span class="pre">f</span></tt> will be called with <tt class="docutils literal"><span class="pre">this</span></tt> set to the <tt class="docutils literal"><span class="pre">window</span></tt> +variable, and so <tt class="docutils literal"><span class="pre">this.firstname</span></tt> and <tt class="docutils literal"><span class="pre">this.lastname</span></tt> will refer +to undefined values.)</p> +<p>Because of this, it is difficult to use an object’s method as a +callback if you refer to it as a function directly. For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">aFile</span> <span class="o">=</span> <span class="p">{</span> + <span class="nx">name</span><span class="o">:</span> <span class="s2">"[MathJax]/config/myConfig.js"</span><span class="p">,</span> + <span class="nx">onload</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">status</span><span class="p">)</span> <span class="p">{</span> + <span class="nx">alert</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">name</span><span class="o">+</span><span class="s2">" is loaded with status "</span><span class="o">+</span><span class="nx">status</span><span class="p">);</span> + <span class="p">}</span> +<span class="p">};</span> + +<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="nx">aFile</span><span class="p">.</span><span class="nx">name</span><span class="p">,</span><span class="nx">aFile</span><span class="p">.</span><span class="nx">onload</span><span class="p">);</span> +</pre></div> +</div> +<p>would produce an alert indicating that “undefined” was loaded with a +particular status. That is because <tt class="docutils literal"><span class="pre">aFile.onload</span></tt> is a reference to +the <cite>onload</cite> method, which is just a function, and the association +with the <cite>aFile</cite> object is lost. One could do</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="nx">aFile</span><span class="p">.</span><span class="nx">name</span><span class="p">,</span><span class="kd">function</span> <span class="p">(</span><span class="nx">status</span><span class="p">)</span> <span class="p">{</span><span class="nx">aFile</span><span class="p">.</span><span class="nx">onload</span><span class="p">(</span><span class="nx">status</span><span class="p">)});</span> +</pre></div> +</div> +<p>but that seems needlessly verbose, and it produces a closure when one +is not really needed. Instead, MathJax provides an alternative +specification for a callback that allows you to specify both the +method and the object it comes from:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="nx">aFile</span><span class="p">.</span><span class="nx">name</span><span class="p">,[</span><span class="s2">"onload"</span><span class="p">,</span><span class="nx">aFile</span><span class="p">]);</span> +</pre></div> +</div> +<p>This requests that the callback should call <tt class="docutils literal"><span class="pre">aFile.onload</span></tt> as the +function, which will maintain the connection between <tt class="docutils literal"><span class="pre">aFile</span></tt> and its +method, thus preserving the correct value for <cite>this</cite> within the method.</p> +<p>As in the previous cases, you can pass parameters to the method as +well by including them in the array that specifies the callback:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"filename"</span><span class="p">,[</span><span class="s2">"method"</span><span class="p">,</span><span class="nx">object</span><span class="p">,</span><span class="nx">arg1</span><span class="p">,</span><span class="nx">arg2</span><span class="p">,...]);</span> +</pre></div> +</div> +<p>This approach is useful when you are pushing a callback for one one +MathJax’s Hub routines into the MathJax processing queue. For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Typeset"</span><span class="p">,</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">,</span><span class="s2">"MathDiv"</span><span class="p">]);</span> +</pre></div> +</div> +<p>pushes the equivalent of <tt class="docutils literal"><span class="pre">MathJax.Hub.Typeset("MathDiv")</span></tt> into the +processing queue.</p> +<p>See the <a class="reference internal" href="api/callback.html#api-callback"><em>Callback Object</em></a> reference pages for more +information about the valid methods of specifying a callback.</p> +</div> +<div class="section" id="creating-a-callback-explicitly"> +<h3>Creating a Callback Explicitly<a class="headerlink" href="#creating-a-callback-explicitly" title="Permalink to this headline">¶</a></h3> +<p>When you call a method that accepts a callback, you usually pass it a +callback specification (like in the examples above), which <em>describes</em> +a callback (the method will create the actual <cite>Callback</cite> object, and +return that to you as its return value). You don’t usually create +<cite>Callback</cite> objects directly yourself.</p> +<p>There are times, however, when you may wish to create a callback +object for use with functions that don’t create callbacks for you. +For example, the <tt class="docutils literal"><span class="pre">setTimeout()</span></tt> function can take a function as its +argument, and you may want that function to be a method of an object, +and would run into the problem described in the previous section if +you simply passed the object’s method to <tt class="docutils literal"><span class="pre">setTimeout()</span></tt>. Or you +might want to pass an argument to the function called by +<tt class="docutils literal"><span class="pre">setTimeout()</span></tt>. (Altough the <tt class="docutils literal"><span class="pre">setTimeout()</span></tt> function can accept +additional arguements that are supposed to be passed on to the code +when it is called, Internet Explorer does not implement that feature, +so you can’t rely on it.) You can use a <cite>Callback</cite> object to +do this, and the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback()</span></tt> method will create one for +you. For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">myTimer</span> <span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"x = "</span><span class="o">+</span><span class="nx">x</span><span class="p">)}</span> +<span class="nx">setTimeout</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">([</span><span class="nx">f</span><span class="p">,</span><span class="s2">"Hello World!"</span><span class="p">]),</span><span class="mi">500</span><span class="p">);</span> +</pre></div> +</div> +<p>would create a callback that calls <tt class="docutils literal"><span class="pre">f("Hello</span> <span class="pre">World!")</span></tt>, and +schedules it to be called in half a second.</p> +</div> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">Using Callbacks</a><ul> +<li><a class="reference internal" href="#specifying-a-callback">Specifying a Callback</a><ul> +<li><a class="reference internal" href="#callbacks-to-object-methods">Callbacks to Object Methods</a></li> +<li><a class="reference internal" href="#creating-a-callback-explicitly">Creating a Callback Explicitly</a></li> +</ul> +</li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="synchronize.html" + title="previous chapter">Synchronizing your code with MathJax</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="queues.html" + title="next chapter">Using Queues</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/callbacks.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="queues.html" title="Using Queues" + >next</a> |</li> + <li class="right" > + <a href="synchronize.html" title="Synchronizing your code with MathJax" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="synchronize.html" >Synchronizing your code with MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/community.html b/docs/html/community.html @@ -0,0 +1,158 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax Community — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="The MathJax Processing Model" href="model.html" /> + <link rel="prev" title="MathJax Output Formats" href="output.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="model.html" title="The MathJax Processing Model" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="output.html" title="MathJax Output Formats" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-community"> +<h1>The MathJax Community<a class="headerlink" href="#the-mathjax-community" title="Permalink to this headline">¶</a></h1> +<p>If you are an active MathJax user, you may wish to become involved in +the wider community of MathJax users. The MathJax project maintains +forums where users can ask questions about how to use MathJax, make +suggestions about future features for MathJax, and present their own +solutions to problems that they have faced. There is also a +bug-traking system where you can report errors that you have found +with MathJax in your environment.</p> +<div class="section" id="forums"> +<span id="community-forums"></span><h2>Forums<a class="headerlink" href="#forums" title="Permalink to this headline">¶</a></h2> +<p>If you need help using MathJax or you have solutions you want to share, please +use the <a class="reference external" href="http://groups.google.com/group/mathjax-users">MathJax Users Google Group</a>. We try hard to answer +questions quickly, and users are welcome to help with that as well. Also, users +can post code snippets showing how they have used MathJax, so it may be a good +place to find the examples you are looking for.</p> +<p>If you want to discuss MathJax development, please use the <a class="reference external" href="http://groups.google.com/group/mathjax-dev">MathJax Dev Google +Group</a>. We made this group +to discuss anything beyond what an end-user might be interested in, so if you +having any suggestions or questions about MathJax performance, technology, or +design, feel free to submit it to the group.</p> +<p>The community is only as good as the users who participate, so if +you have something to offer, please take time to make a post on one of +our groups.</p> +</div> +<div class="section" id="issue-tracking"> +<span id="community-tracker"></span><h2>Issue tracking<a class="headerlink" href="#issue-tracking" title="Permalink to this headline">¶</a></h2> +<p>Found a bug or want to suggest an improvement? Post it to our <a class="reference external" href="http://github.com/mathjax/mathjax/issues">issue tracker</a>. We monitor the tracker closely, +and work hard to respond to problems quickly.</p> +<p>Before you create a new issue, however, please search the issues to see if it +has already been reported. You could also be using an outdated version of +MathJax, so be sure to <a class="reference internal" href="installation.html#getting-mathjax-svn"><em>upgrade your copy</em></a> to verify +that the problem persists in the lastest version.</p> +</div> +<div class="section" id="powered-by-mathjax"> +<span id="badge"></span><h2>“Powered by MathJax”<a class="headerlink" href="#powered-by-mathjax" title="Permalink to this headline">¶</a></h2> +<p>If you are using MathJax and want to show your support, please consider using +our <a class="reference external" href="http://www.mathjax.org/community/mathjax-badge">“Powered by MathJax” badge</a>.</p> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The MathJax Community</a><ul> +<li><a class="reference internal" href="#forums">Forums</a></li> +<li><a class="reference internal" href="#issue-tracking">Issue tracking</a></li> +<li><a class="reference internal" href="#powered-by-mathjax">“Powered by MathJax”</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="output.html" + title="previous chapter">MathJax Output Formats</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="model.html" + title="next chapter">The MathJax Processing Model</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/community.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="model.html" title="The MathJax Processing Model" + >next</a> |</li> + <li class="right" > + <a href="output.html" title="MathJax Output Formats" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/configuration.html b/docs/html/configuration.html @@ -0,0 +1,437 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Loading and Configuring MathJax — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="The Core Configuration Options" href="options/hub.html" /> + <link rel="prev" title="Installing and Testing MathJax" href="installation.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="options/hub.html" title="The Core Configuration Options" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="installation.html" title="Installing and Testing MathJax" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="loading-and-configuring-mathjax"> +<span id="loading"></span><h1>Loading and Configuring MathJax<a class="headerlink" href="#loading-and-configuring-mathjax" title="Permalink to this headline">¶</a></h1> +<p>You load MathJax into a web page by including its main JavaScript file +into the page. That is done via a <tt class="docutils literal"><span class="pre"><script></span></tt> tag that links to the +<tt class="docutils literal"><span class="pre">MathJax.js</span></tt> file. Place the following line in the <tt class="docutils literal"><span class="pre"><head></span></tt> +section of your document:</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span> +</pre></div> +</div> +<p>where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is replaced by the URL of the MathJax +directory on your server, or (if you are using MathJax locally rather +than through a server) the location of that directory on your hard +disk. For example, if the MathJax directory is at the top level of +your web server’s directory hierarchy, you might use</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span> +</pre></div> +</div> +<p>to load MathJax.</p> +<p>Although it is possible to load MathJax from a site other than your +own web server, there are issues involved in doing so that you need to +take into consideration. See the <a class="reference internal" href="installation.html#cross-domain-linking"><em>Notes About Shared Servers</em></a> for more details. Please do <strong>not</strong> link to +the copy of MathJax at <tt class="docutils literal"><span class="pre">www.mathjax.org</span></tt>, as we do not have the +resources to act as a web service for all the sites on the web that +would like to display mathematics. If you are able to run MathJax +from your own server, please do so (this will probably give you better +response time in any case).</p> +<p>It is best to load MathJax in the document’s <tt class="docutils literal"><span class="pre"><head></span></tt> block, but it +is also possible to load MathJax into the <tt class="docutils literal"><span class="pre"><body></span></tt> section, if +needed. If you do this, load it as early as possible, as +MathJax will begin to load its components as soon as it is included in +the page, and that will help speed up the processing of the +mathematics on your page. MathJax does expect there to be a +<tt class="docutils literal"><span class="pre"><head></span></tt> section to the document, however, so be sure there is one +if you are loading MathJax in the <tt class="docutils literal"><span class="pre"><body></span></tt>.</p> +<p>It is also possible to load MathJax dynamically after the page has +been prepared, for example, via a <a class="reference external" href="http://www.greasespot.net/">GreaseMonkey</a> script, or using a specially prepared +<a class="reference external" href="http://en.wikipedia.org/wiki/Bookmarklet">bookmarklet</a>. This is an +advanced topic, however; see <a class="reference internal" href="dynamic.html#ajax-mathjax"><em>Loading MathJax Dynamically</em></a> for more details.</p> +<div class="section" id="configuring-mathjax"> +<h2>Configuring MathJax<a class="headerlink" href="#configuring-mathjax" title="Permalink to this headline">¶</a></h2> +<p>There are several ways to configure MathJax, but the easiest is to use +the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file that comes with MathJax. See the +comments in that file, or the <a class="reference internal" href="#configuration"><em>configuration details</em></a> section, for explanations of the meanings of the various +configuration options. You can edit the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file to +change any of the settings that you want to customize. When you +include MathJax in your page via</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span> +</pre></div> +</div> +<p>it will load <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> automatically as one of its +first actions.</p> +<p>Alternatively, you can configure MathJax efficiently by calling +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> when you include MathJax in your page, as +follows:</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></span> + <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">],</span> + <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</span><span class="p">],</span> + <span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s2">"\\("</span><span class="p">,</span><span class="s2">"\\)"</span><span class="p">]</span> <span class="p">],</span> + <span class="nx">displayMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">'$$'</span><span class="p">,</span><span class="s1">'$$'</span><span class="p">],</span> <span class="p">[</span><span class="s2">"\\["</span><span class="p">,</span><span class="s2">"\\]"</span><span class="p">]</span> <span class="p">],</span> + <span class="p">},</span> + <span class="s2">"HTML-CSS"</span><span class="o">:</span> <span class="p">{</span> <span class="nx">availableFonts</span><span class="o">:</span> <span class="p">[</span><span class="s2">"TeX"</span><span class="p">]</span> <span class="p">}</span> + <span class="p">});</span> +<span class="nt"></script></span> +</pre></div> +</div> +<p>This example includes the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor and configures it +to use both the standard TeX and LaTeX math delimiters. It uses the +TeX input processor and the HTML-CSS output processor, and forces the +HTML-CSS processor to use the TeX fonts rather that other locally +installed fonts (e.g., <a class="reference internal" href="glossary.html#term-stix"><em class="xref std std-term">STIX</em></a> fonts). See the +<a class="reference internal" href="#configuration"><em>configuration options</em></a> section (or the comments +in the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file) for more information about the +configuration options that you can include in the +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. Note that if you configure MathJax +using this in-line approach, the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file is <strong>not</strong> +loaded.</p> +<p>Finally, if you would like to use several different configuration +files (like <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt>, but with different settings in each +one), you can copy <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> to <tt class="docutils literal"><span class="pre">config/MathJax-2.js</span></tt>, +or some other convenient name, and use</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></span> + <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> <span class="nx">config</span><span class="o">:</span> <span class="s2">"MathJax-2.js"</span> <span class="p">});</span> +<span class="nt"></script></span> +</pre></div> +</div> +<p>to load the alternative configuration file <tt class="docutils literal"><span class="pre">config/MathJax-2.js</span></tt> +from the MathJax <tt class="docutils literal"><span class="pre">config</span></tt> directory. In this way, you can have as +many distinct configuration files as you need.</p> +</div> +<div class="section" id="common-configurations"> +<span id="id1"></span><h2>Common Configurations<a class="headerlink" href="#common-configurations" title="Permalink to this headline">¶</a></h2> +<p>The following examples show configurations that are useful for some +common situations. This is certainly not an exhaustive list, and +there are variations possible for any of them. Again, the comments in +the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file can help you decide what settings to +include, even if you are using the in-line configuration method.</p> +<div class="section" id="the-tex-setup"> +<h3>The TeX setup<a class="headerlink" href="#the-tex-setup" title="Permalink to this headline">¶</a></h3> +<p>This example calls the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor to identify +mathematics in the page by looking for TeX and LaTeX math delimiters. +It uses <tt class="docutils literal"><span class="pre">$...$</span></tt> and <tt class="docutils literal"><span class="pre">\(...\)</span></tt> for in-line mathematics, while +<tt class="docutils literal"><span class="pre">$$...$$</span></tt> and <tt class="docutils literal"><span class="pre">\[...\]</span></tt> mark displayed equations. Because dollar +signs are used to mark mathematics, if you want to produce an actual +dollar sign in your document, you must “escape” it using a slash: +<tt class="docutils literal"><span class="pre">\$</span></tt>. This configuration also loads the <tt class="docutils literal"><span class="pre">AMSmath</span></tt> and +<tt class="docutils literal"><span class="pre">AMSsymbols</span></tt> extensions so that the macros and environments they +provide are defined for use on the page.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">,</span><span class="s2">"TeX/AMSmath.js"</span><span class="p">,</span><span class="s2">"TeX/AMSsymbols.js"</span><span class="p">],</span> + <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">],</span> + <span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s1">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],[</span><span class="s2">"\\("</span><span class="p">,</span><span class="s2">"\\)"</span><span class="p">]],</span> + <span class="nx">processEscapes</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span> + <span class="p">},</span> +<span class="p">});</span> +</pre></div> +</div> +<p>Other extensions that you may consider adding to the <cite>extensions</cite> +array include: <tt class="docutils literal"><span class="pre">TeX/noErrors.js</span></tt>, which shows the original TeX code +if an error occurs while processing the mathematics (rather than an +error message), <tt class="docutils literal"><span class="pre">TeX/noUndefined.js</span></tt>, which shows undefined +macros names in red (rather than producing an error), and +<tt class="docutils literal"><span class="pre">TeX/autobold.js</span></tt>, which automatically inserts <tt class="docutils literal"><span class="pre">\boldsymbol{...}</span></tt> +around your mathematics when it appears in a section of your page that +is in bold. Most of the other TeX extensions are loaded automatically +when needed, and so do not need to be included explicitly in your +<cite>extensions</cite> array.</p> +<p>See the <a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration</em></a> section for +other configuration options for the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor, and the +<a class="reference internal" href="options/TeX.html#configure-tex"><em>TeX input jax configuration</em></a> section for options +that control the TeX input processor.</p> +</div> +<div class="section" id="the-mathml-setup"> +<h3>The MathML setup<a class="headerlink" href="#the-mathml-setup" title="Permalink to this headline">¶</a></h3> +<p>This example calls the <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessor to identify +mathematics in the page that is in <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> format, which uses +<tt class="docutils literal"><span class="pre"><math</span> <span class="pre">display="block"></span></tt> to indicate displayed equations, and +<tt class="docutils literal"><span class="pre"><math</span> <span class="pre">display="inline"></span></tt> or simply <tt class="docutils literal"><span class="pre"><math></span></tt> to mark in-line +formulas.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"mml2jax.js"</span><span class="p">],</span> + <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/MathML"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">]</span> +<span class="p">});</span> +</pre></div> +</div> +<p>Note that this will work in HTML files, not just XHTML files (MathJax +works with both), and that the web page need not be served with any +special MIME-type. Also note that, unless you are using XHTML rather +than HTML, you should not include a namespace prefix for your +<tt class="docutils literal"><span class="pre"><math></span></tt> tags; for example, you should not use <tt class="docutils literal"><span class="pre"><m:math></span></tt> except +in a file where you have tied the <tt class="docutils literal"><span class="pre">m</span></tt> namespace to the MathML DTD.</p> +<p>See the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration</em></a> section for +other configuration options for the <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessor, and the +<a class="reference internal" href="options/MathML.html#configure-mathml"><em>MathML input jax configuration</em></a> section for +options that control the MathML input processor.</p> +</div> +<div class="section" id="both-tex-and-mathml"> +<h3>Both TeX and MathML<a class="headerlink" href="#both-tex-and-mathml" title="Permalink to this headline">¶</a></h3> +<p>This example provides for both TeX and MathML input in the same file. +It calls on both the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> and <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessors and the +TeX and MathML input jax to do the job.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">,</span> <span class="s2">"mml2jax.js"</span><span class="p">],</span> + <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="s2">"input/MathML"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</span><span class="p">],</span> +<span class="p">});</span> +</pre></div> +</div> +<p>Notice that no <tt class="docutils literal"><span class="pre">tex2jax</span></tt> configuration section is included, so it +uses its default options (no single dollar signs for in-line math).</p> +<p>The majority of the code for the TeX and MathML input processors are +not loaded until they are actually needed by the mathematics on the +page, so if this configuration is used on a page that include only +MathML, the TeX input processor will not be loaded. Thus it is +reasonably efficient to specify both input processors even if only one +(or neither one) is used.</p> +</div> +<div class="section" id="tex-input-with-mathml-output"> +<h3>TeX input with MathML output<a class="headerlink" href="#tex-input-with-mathml-output" title="Permalink to this headline">¶</a></h3> +<p>This example configures MathJax to use the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor +and TeX input processor, but the choice of output format is determined +by MathJax depending on the capabilities of the user’s browser. The +is performed by the <tt class="docutils literal"><span class="pre">MMLorHTML.js</span></tt> configuration file that is loaded +in the <cite>config`</cite> array.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">"MMLorHTML.js"</span><span class="p">],</span> + <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">],</span> + <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">]</span> +<span class="p">});</span> +</pre></div> +</div> +<p>With this setup, Firefox or Internet Explorer with the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer +plugin</a> installed +will use the NativeMML output processor, while all other browsers will +use the HTML-CSS output processor. Since native MathML support is +faster than MathJax’s HTML-CSS processor, this will mean that the web +pages will display faster for Firefox and IE than they would +otherwise. This speed comes at the cost, however, as you are now +relying on the native MathML support to render the mathematics, and +that is outside of MathJax’s control. There may be spacing or other +display differences (compared to MathJax’s HTML-CSS output) when the +NativeMML output processor is used.</p> +<p>See <a class="reference internal" href="output.html#output-formats"><em>MathJax Output Formats</em></a> for more +information on the NativeMML and HTML-CSS output processors. See the +<a class="reference internal" href="options/MMLorHTML.html#configure-mmlorhtml"><em>MMLorHTML configuration</em></a> section for +details on the options that control the <tt class="docutils literal"><span class="pre">MMLorHTML</span></tt> configuration.</p> +</div> +<div class="section" id="mathml-input-and-output-in-all-browsers"> +<h3>MathML input and output in all browsers<a class="headerlink" href="#mathml-input-and-output-in-all-browsers" title="Permalink to this headline">¶</a></h3> +<p>This example configures MathJax to look for MathML within your page, +and to display it using the browser’s native MathML support, if +possible, or its HTML-CSS output if not.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">"MMLorHTML.js"</span><span class="p">],</span> + <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"mml2jax.js"</span><span class="p">],</span> + <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/MathML"</span><span class="p">]</span> +<span class="p">});</span> +</pre></div> +</div> +<p>Using this configuration, MathJax finally makes MathML available in +all modern browsers.</p> +<p>See the <a class="reference internal" href="options/MMLorHTML.html#configure-mmlorhtml"><em>MMLorHTML configuration</em></a> section +for details on the options that control the <tt class="docutils literal"><span class="pre">MMLorHTML</span></tt> +configuration file, the <a class="reference internal" href="options/MathML.html#configure-mathml"><em>MathML configuration</em></a> +section for the options that control the MathML output processor, and +the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration</em></a> section for the +options that control the <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessor.</p> +</div> +</div> +<div class="section" id="configuration-objects"> +<span id="configuration"></span><h2>Configuration Objects<a class="headerlink" href="#configuration-objects" title="Permalink to this headline">¶</a></h2> +<p>The various components of MathJax, including its input and output +processors, its preprocessors, its extensions, and the MathJax core, +all can be configured through the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file, or via a +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call (indeed, if you look closely, you +will see that <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> is itself one big call to +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt>). Anything that is in +<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> can be included in-line to configure MathJax.</p> +<p>The structure that you pass to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> is a +JavaScript object that includes name-value pairs giving the names of +parameters and their values, with pairs separated by commas. Be +careful not to include a comma after the last value, however, as some +browsers (namely Internet Explorer) will fail to process the +configuration if you do.</p> +<p>The MathJax components, like the TeX input processor, have their own +sections in the configuration object, labeled by the component name, +and using an configuration object as its value. The object is itself +a configuration object made up of name-value pairs that give the +configuration options for the component.</p> +<p>For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">showProcessingMessages</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span> + <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</span><span class="p">],</span> + <span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">TagSide</span><span class="o">:</span> <span class="s2">"left"</span><span class="p">,</span> + <span class="nx">Macros</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">RR</span><span class="o">:</span> <span class="s1">'{\\bf R}'</span><span class="p">,</span> + <span class="nx">bold</span><span class="o">:</span> <span class="p">[</span><span class="s1">'{\\bf #1}'</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span> + <span class="p">}</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>is a configuration that includes two settings for the MathJax Hub (one +for <cite>showProcessingMessages</cite> and one of the <cite>jax</cite> array), and a +configuration object for the TeX input processor. The latter includes +a setting for the TeX input processor’s <cite>TagSide</cite> option (to set tags +on the left rather than the right) and a setting for <cite>Macros</cite>, which +defines new TeX macros (in this case, two macros, one called <tt class="docutils literal"><span class="pre">\RR</span></tt> +that produces a bold “R”, and one called <tt class="docutils literal"><span class="pre">\bold</span></tt> that puts is +argument in bold face).</p> +<p>The <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file is another example that shows nearly +all the configuration options for all of MathJax’s components.</p> +</div> +<div class="section" id="configuration-options-by-component"> +<h2>Configuration Options by Component<a class="headerlink" href="#configuration-options-by-component" title="Permalink to this headline">¶</a></h2> +<p>The individual options are explained in the following sections, which +are categorized by the component they affect.</p> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="options/hub.html">The core options</a></li> +</ul> +</div> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="options/tex2jax.html">The tex2jax preprocessor options</a></li> +<li class="toctree-l1"><a class="reference internal" href="options/mml2jax.html">The mml2jax preprocessor options</a></li> +<li class="toctree-l1"><a class="reference internal" href="options/jsMath2jax.html">The jsMath2jax preprocessor options</a></li> +</ul> +</div> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="options/TeX.html">The TeX input processor options</a></li> +<li class="toctree-l1"><a class="reference internal" href="options/MathML.html">The MathML input processor options</a></li> +<li class="toctree-l1"><a class="reference internal" href="options/HTML-CSS.html">The HTML-CSS output processor options</a></li> +<li class="toctree-l1"><a class="reference internal" href="options/NativeMML.html">The NativeMML output processor options</a></li> +<li class="toctree-l1"><a class="reference internal" href="options/MMLorHTML.html">The MMLorHTML configuration options</a></li> +</ul> +</div> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="options/MathMenu.html">The MathMenu options</a></li> +<li class="toctree-l1"><a class="reference internal" href="options/MathZoom.html">The MathZoom options</a></li> +<li class="toctree-l1"><a class="reference internal" href="options/FontWarnings.html">The FontWarnings options</a></li> +</ul> +</div> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">Loading and Configuring MathJax</a><ul> +<li><a class="reference internal" href="#configuring-mathjax">Configuring MathJax</a></li> +<li><a class="reference internal" href="#common-configurations">Common Configurations</a><ul> +<li><a class="reference internal" href="#the-tex-setup">The TeX setup</a></li> +<li><a class="reference internal" href="#the-mathml-setup">The MathML setup</a></li> +<li><a class="reference internal" href="#both-tex-and-mathml">Both TeX and MathML</a></li> +<li><a class="reference internal" href="#tex-input-with-mathml-output">TeX input with MathML output</a></li> +<li><a class="reference internal" href="#mathml-input-and-output-in-all-browsers">MathML input and output in all browsers</a></li> +</ul> +</li> +<li><a class="reference internal" href="#configuration-objects">Configuration Objects</a></li> +<li><a class="reference internal" href="#configuration-options-by-component">Configuration Options by Component</a><ul> +</ul> +</li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="installation.html" + title="previous chapter">Installing and Testing MathJax</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="options/hub.html" + title="next chapter">The Core Configuration Options</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/configuration.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="options/hub.html" title="The Core Configuration Options" + >next</a> |</li> + <li class="right" > + <a href="installation.html" title="Installing and Testing MathJax" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/dynamic.html b/docs/html/dynamic.html @@ -0,0 +1,277 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Loading MathJax Dynamically — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="Modifying Math on the Page" href="typeset.html" /> + <link rel="prev" title="Using Signals" href="signals.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="typeset.html" title="Modifying Math on the Page" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="signals.html" title="Using Signals" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="loading-mathjax-dynamically"> +<span id="ajax-mathjax"></span><h1>Loading MathJax Dynamically<a class="headerlink" href="#loading-mathjax-dynamically" title="Permalink to this headline">¶</a></h1> +<p>MathJax is designed to be included via a <tt class="docutils literal"><span class="pre"><script></span></tt> tag in the +<tt class="docutils literal"><span class="pre"><head></span></tt> section of your HTML document, and it does rely on being +part of the original document in that it uses an <tt class="docutils literal"><span class="pre">onload</span></tt> event +handler to synchronize its actions with the loading of the page. +If you wish to insert MathJax into a document after it has +been loaded, that will normally occur <em>after</em> the page’s <tt class="docutils literal"><span class="pre">onload</span></tt> +handler has fired, and so MathJax will not be able to tell if it is +safe for it to process the contents of the page. Indeed, it will wait +forever for its <tt class="docutils literal"><span class="pre">onload</span></tt> handler to fire, and so will never process +the page.</p> +<p>To solve this problem, you will need to call MathJax’s <tt class="docutils literal"><span class="pre">onload</span></tt> +handler yourself, to let it know that it is OK to typeset the +mathematics on the page. You accomplish this by calling the +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Startup.onload()</span></tt> method as part of your MathJax +startup script. To do this, you will need to give MathJax an in-line +configuration, so you will not be able to use the +<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file (though you can add it to your in-line +configuration’s <cite>config</cite> array).</p> +<p>Here is an example of how to load and configure MathJax dynamically:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> + <span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">"script"</span><span class="p">);</span> + <span class="nx">script</span><span class="p">.</span><span class="nx">type</span> <span class="o">=</span> <span class="s2">"text/javascript"</span><span class="p">;</span> + <span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">"/MathJax/MathJax.js"</span><span class="p">;</span> <span class="c1">// use the location of your MathJax</span> + + <span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Config({'</span> <span class="o">+</span> + <span class="s1">'extensions: ["tex2jax.js"],'</span> <span class="o">+</span> + <span class="s1">'jax: ["input/TeX","output/HTML-CSS"]'</span> <span class="o">+</span> + <span class="s1">'});'</span> <span class="o">+</span> + <span class="s1">'MathJax.Hub.Startup.onload();'</span><span class="p">;</span> + + <span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> + <span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> + + <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">"head"</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">script</span><span class="p">);</span> +<span class="p">})();</span> +</pre></div> +</div> +<p>Be sure to set the <tt class="docutils literal"><span class="pre">src</span></tt> to the correct URL for your copy of +MathJax. You can adjust the <tt class="docutils literal"><span class="pre">config</span></tt> variable to your needs, but be +careful to get the commas right. The <tt class="docutils literal"><span class="pre">window.opera</span></tt> test is because +Opera doesn’t handle setting <tt class="docutils literal"><span class="pre">script.text</span></tt> properly, while Internet +Explorer doesn’t handle setting the <tt class="docutils literal"><span class="pre">innerHTML</span></tt> of a script tag.</p> +<p>Here is a version that uses the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file to +configure MathJax:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> + <span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">"script"</span><span class="p">);</span> + <span class="nx">script</span><span class="p">.</span><span class="nx">type</span> <span class="o">=</span> <span class="s2">"text/javascript"</span><span class="p">;</span> + <span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">"/MathJax/MathJax.js"</span><span class="p">;</span> <span class="c1">// use the location of your MathJax</span> + + <span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Config({ config: "MathJax.js" }); '</span> <span class="o">+</span> + <span class="s1">'MathJax.Hub.Startup.onload();'</span><span class="p">;</span> + + <span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> + <span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> + + <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">"head"</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">script</span><span class="p">);</span> +<span class="p">})();</span> +</pre></div> +</div> +<p>Note that the <strong>only</strong> reliable way to configure MathJax is to use an +in-line configuration of the type discussed above. You should <strong>not</strong> +call <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> directly in your code, as it will +not run at the correct time — it will either run too soon, in which +case <tt class="docutils literal"><span class="pre">MathJax</span></tt> may not be defined and the function will throw an +error, or it will run too late, after MathJax has already finished its +configuration process, so your changes will not have the desired +effect.</p> +<div class="section" id="mathjax-and-greasemonkey"> +<h2>MathJax and GreaseMonkey<a class="headerlink" href="#mathjax-and-greasemonkey" title="Permalink to this headline">¶</a></h2> +<p>You can use techniques like the ones discussed above to good effect in +GreaseMonkey scripts. There are GreaseMonkey work-alikes for all the +major browsers:</p> +<ul class="simple"> +<li>Firefox: <a class="reference external" href="http://addons.mozilla.org/firefox/addon/748">GreaseMonkey</a></li> +<li>Safari: <a class="reference external" href="http://8-p.info/greasekit/">GreaseKit</a> (also requires <a class="reference external" href="http://www.culater.net/software/SIMBL/SIMBL.php">SIMBL</a>)</li> +<li>Opera: Built-in (<a class="reference external" href="http://www.ghacks.net/2008/08/10/greasemonkey-in-opera/">instructions</a>)</li> +<li>Internet Explorer: <a class="reference external" href="http://www.ie7pro.com/">IEPro7</a></li> +<li>Chrome: Built-in for recent releases</li> +</ul> +<p>Note, however, that most browsers don’t allow you to insert a script +that loads a <tt class="docutils literal"><span class="pre">file://</span></tt> URL into a page that comes from the web (for +security reasons). That means that you can’t have your GreaseMonkey +script load a local copy of MathJax, so you have to refer to a +server-based copy. In the scripts below, you need to insert the URL +of a copy of MathJax from your own server.</p> +<hr class="docutils" /> +<p>Here is a script that runs MathJax in any document that contains +MathML (whether its includes MathJax or not). That allows +browsers that don’t have native MathML support to view any web pages +with MathML, even if they say it only works in Forefox and +IE+MathPlayer.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="c1">// ==UserScript==</span> +<span class="c1">// @name MathJax MathML</span> +<span class="c1">// @namespace http://www.mathjax.org/</span> +<span class="c1">// @description Insert MathJax into pages containing MathML</span> +<span class="c1">// @include *</span> +<span class="c1">// ==/UserScript==</span> + +<span class="k">if</span> <span class="p">((</span><span class="nb">window</span><span class="p">.</span><span class="nx">unsafeWindow</span> <span class="o">==</span> <span class="kc">null</span> <span class="o">?</span> <span class="nb">window</span> <span class="o">:</span> <span class="nx">unsafeWindow</span><span class="p">).</span><span class="nx">MathJax</span> <span class="o">==</span> <span class="kc">null</span><span class="p">)</span> <span class="p">{</span> + <span class="k">if</span> <span class="p">((</span><span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">"math"</span><span class="p">).</span><span class="nx">length</span> <span class="o">></span> <span class="mi">0</span><span class="p">)</span> <span class="o">||</span> + <span class="p">(</span><span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagNameNS</span> <span class="o">==</span> <span class="kc">null</span> <span class="o">?</span> <span class="kc">false</span> <span class="o">:</span> + <span class="p">(</span><span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagNameNS</span><span class="p">(</span><span class="s2">"http://www.w3.org/1998/Math/MathML"</span><span class="p">,</span><span class="s2">"math"</span><span class="p">).</span><span class="nx">length</span> <span class="o">></span> <span class="mi">0</span><span class="p">)))</span> <span class="p">{</span> + <span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">"script"</span><span class="p">);</span> + <span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">"http://www.yoursite.edu/MathJax/MathJax.js"</span><span class="p">;</span> <span class="c1">// put your URL here</span> + <span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Config({'</span> <span class="o">+</span> + <span class="s1">'extensions:["mml2jax.js"],'</span> <span class="o">+</span> + <span class="s1">'jax:["input/MathML","output/HTML-CSS"]'</span> <span class="o">+</span> + <span class="s1">'});'</span> <span class="o">+</span> + <span class="s1">'MathJax.Hub.Startup.onload()'</span><span class="p">;</span> + <span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> <span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> + <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">"head"</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">script</span><span class="p">);</span> + <span class="p">}</span> +<span class="p">}</span> +</pre></div> +</div> +<p><strong>Source</strong>: <a class="reference external" href="_static/mathjax_mathml.user.js">mathjax_mathml.user.js</a></p> +<hr class="docutils" /> +<p>Here is a script that runs MathJax in Wikipedia pages after first +converting the math images to their original TeX code.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="c1">// ==UserScript==</span> +<span class="c1">// @name MathJax in Wikipedia</span> +<span class="c1">// @namespace http://www.mathjax.org/</span> +<span class="c1">// @description Insert MathJax into Wikipedia pages</span> +<span class="c1">// @include http://en.wikipedia.org/wiki/*</span> +<span class="c1">// ==/UserScript==</span> + +<span class="k">if</span> <span class="p">((</span><span class="nb">window</span><span class="p">.</span><span class="nx">unsafeWindow</span> <span class="o">==</span> <span class="kc">null</span> <span class="o">?</span> <span class="nb">window</span> <span class="o">:</span> <span class="nx">unsafeWindow</span><span class="p">).</span><span class="nx">MathJax</span> <span class="o">==</span> <span class="kc">null</span><span class="p">)</span> <span class="p">{</span> + <span class="c1">//</span> + <span class="c1">// Replace the images with MathJax scripts of type math/tex</span> + <span class="c1">//</span> + <span class="kd">var</span> <span class="nx">images</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s1">'img'</span><span class="p">);</span> + <span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">i</span> <span class="o">=</span> <span class="nx">images</span><span class="p">.</span><span class="nx">length</span> <span class="o">-</span> <span class="mi">1</span><span class="p">;</span> <span class="nx">i</span> <span class="o">>=</span> <span class="mi">0</span><span class="p">;</span> <span class="nx">i</span><span class="o">--</span><span class="p">)</span> <span class="p">{</span> + <span class="kd">var</span> <span class="nx">img</span> <span class="o">=</span> <span class="nx">images</span><span class="p">[</span><span class="nx">i</span><span class="p">];</span> + <span class="k">if</span> <span class="p">(</span><span class="nx">img</span><span class="p">.</span><span class="nx">className</span> <span class="o">===</span> <span class="s2">"tex"</span><span class="p">)</span> <span class="p">{</span> + <span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">"script"</span><span class="p">);</span> <span class="nx">script</span><span class="p">.</span><span class="nx">type</span> <span class="o">=</span> <span class="s2">"math/tex"</span><span class="p">;</span> + <span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">img</span><span class="p">.</span><span class="nx">alt</span><span class="p">}</span> <span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">img</span><span class="p">.</span><span class="nx">alt</span><span class="p">}</span> + <span class="nx">img</span><span class="p">.</span><span class="nx">parentNode</span><span class="p">.</span><span class="nx">replaceChild</span><span class="p">(</span><span class="nx">script</span><span class="p">,</span><span class="nx">img</span><span class="p">);</span> + <span class="p">}</span> + <span class="p">}</span> + <span class="c1">//</span> + <span class="c1">// Load MathJax and have it process the page</span> + <span class="c1">//</span> + <span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">"script"</span><span class="p">);</span> + <span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">"http://www.yoursite.edu/MathJax/MathJax.js"</span><span class="p">;</span> <span class="c1">// put your URL here</span> + <span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Config({'</span> <span class="o">+</span> + <span class="s1">'config: ["MMLorHTML.js"],'</span> <span class="o">+</span> + <span class="s1">'extensions:["TeX/noErrors.js","TeX/noUndefined.js",'</span> <span class="o">+</span> + <span class="s1">'"TeX/AMSmath.js","TeX/AMSsymbols.js"],'</span> <span class="o">+</span> + <span class="s1">'jax:["input/TeX"]'</span> <span class="o">+</span> + <span class="s1">'});'</span> <span class="o">+</span> + <span class="s1">'MathJax.Hub.Startup.onload()'</span><span class="p">;</span> + <span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> <span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> + <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">"head"</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">script</span><span class="p">);</span> +<span class="p">}</span> +</pre></div> +</div> +<p><strong>Source</strong>: <a class="reference external" href="_static/mathjax_wikipedia.user.js">mathjax_wikipedia.user.js</a></p> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">Loading MathJax Dynamically</a><ul> +<li><a class="reference internal" href="#mathjax-and-greasemonkey">MathJax and GreaseMonkey</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="signals.html" + title="previous chapter">Using Signals</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="typeset.html" + title="next chapter">Modifying Math on the Page</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/dynamic.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="typeset.html" title="Modifying Math on the Page" + >next</a> |</li> + <li class="right" > + <a href="signals.html" title="Using Signals" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/genindex.html b/docs/html/genindex.html @@ -0,0 +1,298 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Index — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="#" title="General Index" + accesskey="I">index</a></li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + + <h1 id="index">Index</h1> + + <div class="genindex-jumpbox"> + <a href="#A"><strong>A</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#E"><strong>E</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#H"><strong>H</strong></a> | <a href="#I"><strong>I</strong></a> | <a href="#J"><strong>J</strong></a> | <a href="#L"><strong>L</strong></a> | <a href="#M"><strong>M</strong></a> | <a href="#N"><strong>N</strong></a> | <a href="#P"><strong>P</strong></a> | <a href="#Q"><strong>Q</strong></a> | <a href="#R"><strong>R</strong></a> | <a href="#S"><strong>S</strong></a> | <a href="#T"><strong>T</strong></a> | <a href="#U"><strong>U</strong></a> | <a href="#W"><strong>W</strong></a> + </div> +<h2 id="A">A</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/html.html#addElement">addElement()</a></dt> + <dt><a href="api/html.html#addText">addText()</a></dt> +</dl></td> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/object.html#Augment">Augment()</a></dt> +</dl></td> +</tr></table> + +<h2 id="C">C</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/queue.html#call">call()</a></dt> + <dt><a href="glossary.html#term-callback">Callback</a></dt> + <dt><a href="glossary.html#term-callback-queue">Callback Queue</a></dt> + <dt><a href="glossary.html#term-callback-signal">Callback Signal</a></dt> +</dl></td> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/object.html#can">can()</a></dt> + <dt><a href="api/message.html#Clear">Clear()</a></dt> + <dt><a href="api/hub.html#Config">Config()</a></dt> +</dl></td> +</tr></table> + +<h2 id="D">D</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/callback.html#Delay">Delay()</a></dt> +</dl></td> +</tr></table> + +<h2 id="E">E</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/html.html#Element">Element()</a></dt> + <dt><a href="api/signal.html#ExecuteHook">ExecuteHook()</a></dt> +</dl></td> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/callback.html#executeHooks">executeHooks()</a></dt> +</dl></td> +</tr></table> + +<h2 id="F">F</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/ajax.html#fileURL">fileURL()</a></dt> +</dl></td> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/hub.html#formatError">formatError()</a></dt> +</dl></td> +</tr></table> + +<h2 id="G">G</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/hub.html#getAllJax">getAllJax()</a></dt> + <dt><a href="api/hub.html#getJaxByInputType">getJaxByInputType()</a></dt> +</dl></td> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/hub.html#getJaxByType">getJaxByType()</a></dt> + <dt><a href="api/hub.html#getJaxFor">getJaxFor()</a></dt> +</dl></td> +</tr></table> + +<h2 id="H">H</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/object.html#has">has()</a></dt> +</dl></td> + <td style="width: 33%" valign="top"><dl> + <dt><a href="glossary.html#term-html-css">HTML-CSS</a></dt> +</dl></td> +</tr></table> + +<h2 id="I">I</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/object.html#Init">Init()</a></dt> + <dt><a href="api/hub.html#Insert">Insert()</a></dt> + <dt><a href="api/signal.html#Interest">Interest()</a></dt> +</dl></td> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/object.html#isa">isa()</a></dt> + <dt><a href="api/hub.html#isJax">isJax()</a></dt> +</dl></td> +</tr></table> + +<h2 id="J">J</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="glossary.html#term-jax">jax</a></dt> +</dl></td> +</tr></table> + +<h2 id="L">L</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="glossary.html#term-latex">LaTeX</a></dt> + <dt><a href="api/ajax.html#Load">Load()</a></dt> + <dt><a href="api/ajax.html#loadComplete">loadComplete()</a></dt> + <dt><a href="api/ajax.html#loadError">loadError()</a></dt> +</dl></td> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/ajax.html#loadHook">loadHook()</a></dt> + <dt><a href="api/ajax.html#loadTimeout">loadTimeout()</a></dt> + <dt><a href="api/message.html#Log">Log()</a></dt> +</dl></td> +</tr></table> + +<h2 id="M">M</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="glossary.html#term-mathml">MathML</a></dt> +</dl></td> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/signal.html#MessageHook">MessageHook()</a></dt> +</dl></td> +</tr></table> + +<h2 id="N">N</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/signal.html#NoInterest">NoInterest()</a></dt> +</dl></td> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/jax.html#noTranslate">noTranslate()</a></dt> +</dl></td> +</tr></table> + +<h2 id="P">P</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/signal.html#Post">Post()</a></dt> + <dt><a href="api/hub.html#PreProcess">PreProcess()</a></dt> +</dl></td> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/hub.html#Process">Process()</a></dt> + <dt><a href="api/queue.html#Push">Push()</a></dt> +</dl></td> +</tr></table> + +<h2 id="Q">Q</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/callback.html#Queue">Queue()</a></dt> +</dl></td> +</tr></table> + +<h2 id="R">R</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/jax.html#Register">Register()</a></dt> + <dt><a href="api/hub.html#Reprocess">Reprocess()</a></dt> + <dt><a href="api/ajax.html#Require">Require()</a></dt> +</dl></td> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/callback.html#reset">reset()</a></dt> + <dt><a href="api/queue.html#Resume">Resume()</a></dt> +</dl></td> +</tr></table> + +<h2 id="S">S</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/message.html#Set">Set()</a></dt> + <dt><a href="api/callback.html#Signal">Signal()</a></dt> + <dt><a href="api/elementjax.html#SourceElement">SourceElement()</a></dt> + <dt><a href="api/jax.html#Startup">Startup()</a></dt> +</dl></td> + <td style="width: 33%" valign="top"><dl> + <dt><a href="glossary.html#term-stix">STIX</a></dt> + <dt><a href="api/ajax.html#Styles">Styles()</a></dt> + <dt><a href="api/object.html#Subclass">Subclass()</a></dt> + <dt><a href="api/queue.html#Suspend">Suspend()</a></dt> +</dl></td> +</tr></table> + +<h2 id="T">T</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="glossary.html#term-tex">TeX</a></dt> + <dt><a href="api/elementjax.html#Text">Text()</a></dt> + <dt><a href="api/html.html#TextNode">TextNode()</a></dt> +</dl></td> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/jax.html#Translate">Translate()</a></dt> + <dt><a href="api/hub.html#Typeset">Typeset()</a></dt> +</dl></td> +</tr></table> + +<h2 id="U">U</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/hub.html#Update">Update()</a></dt> +</dl></td> +</tr></table> + +<h2 id="W">W</h2> +<table style="width: 100%" class="indextable genindextable"><tr> + <td style="width: 33%" valign="top"><dl> + <dt><a href="api/queue.html#wait">wait()</a></dt> +</dl></td> +</tr></table> + + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + + + +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="#" title="General Index" + >index</a></li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/glossary.html b/docs/html/glossary.html @@ -0,0 +1,163 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Glossary — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="prev" title="CSS Style Objects" href="CSS-styles.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="CSS-styles.html" title="CSS Style Objects" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="glossary"> +<span id="id1"></span><h1>Glossary<a class="headerlink" href="#glossary" title="Permalink to this headline">¶</a></h1> +<dl class="glossary docutils"> +<dt id="term-callback">Callback</dt> +<dd>A JavaScript function that is used to perform actions that +must wait for other actions to complete before they are +performed.</dd> +<dt id="term-callback-queue">Callback Queue</dt> +<dd>MathJax uses <cite>Queues</cite> to synchronize its activity so that +actions that operate asynchronously (like loading files) will +be performed in the right order. <a class="reference internal" href="#term-callback"><em class="xref std std-term">Callback</em></a> functions +are pushed onto the queue, and are performed in order, with +MathJax handling the synchronization if operations need to +wait for other actions to finish.</dd> +<dt id="term-callback-signal">Callback Signal</dt> +<dd>A JavaScript object that acts as a mailbox for MathJax events. +Like an event handler, but it also keeps a history of +messages. Your code can register an “interest” in a signal, +or can register a <a class="reference internal" href="#term-callback"><em class="xref std std-term">callback</em></a> to be called when a +particular message is sent along the signal channel.</dd> +<dt id="term-html-css">HTML-CSS</dt> +<dd>MathJax output form that employs only on HTML and CSS 2.1, +allowing MathJax to remain compatible across all browsers.</dd> +<dt id="term-jax">jax</dt> +<dd>MathJax’s input and output processors are called “jax”, as is +its internal format manager. The code for the jax are in the +<tt class="docutils literal"><span class="pre">MathJax/jax</span></tt> directory.</dd> +<dt id="term-latex">LaTeX</dt> +<dd><p class="first">LaTeX is a variant of <a class="reference internal" href="#term-tex"><em class="xref std std-term">TeX</em></a> that is now the dominant TeX style.</p> +<div class="admonition-see-also last admonition seealso"> +<p class="first admonition-title">See also</p> +<p class="last"><a class="reference external" href="http://en.wikipedia.org/wiki/LaTeX">LaTeX Wikipedia entry</a></p> +</div> +</dd> +<dt id="term-mathml">MathML</dt> +<dd><p class="first">An XML specification created to describe mathematical +notations and capture both its structure and content. MathML +is much more verbose than <a class="reference internal" href="#term-tex"><em class="xref std std-term">TeX</em></a>, but is much more +machine-readable.</p> +<div class="admonition-see-also last admonition seealso"> +<p class="first admonition-title">See also</p> +<p class="last"><a class="reference external" href="http://en.wikipedia.org/wiki/MathML">MathML Wikipedia entry</a></p> +</div> +</dd> +<dt id="term-stix">STIX</dt> +<dd><p class="first">The Scientific and Technical Information Exchange font +package. A comprehensive set of scientific glyphs.</p> +<div class="admonition-see-also last admonition seealso"> +<p class="first admonition-title">See also</p> +<p class="last"><a class="reference external" href="http://stixfonts.org/">STIX project</a></p> +</div> +</dd> +<dt id="term-tex">TeX</dt> +<dd><p class="first">A document markup language with robust math markup commands +developed by Donald Knuth in the late 1970’s, but still in +extensive use today. It became the industry standard for +typesetting of mathematics, and is one of the most common +formats for mathematical journals, articles, and books.</p> +<div class="admonition-see-also last admonition seealso"> +<p class="first admonition-title">See also</p> +<p class="last"><a class="reference external" href="http://en.wikipedia.org/wiki/TeX">TeX Wikipedia entry</a></p> +</div> +</dd> +</dl> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="CSS-styles.html" + title="previous chapter">CSS Style Objects</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/glossary.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="CSS-styles.html" title="CSS Style Objects" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/index.html b/docs/html/index.html @@ -0,0 +1,180 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>MathJax Documentation — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="#" /> + <link rel="next" title="What is MathJax?" href="mathjax.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="mathjax.html" title="What is MathJax?" + accesskey="N">next</a> |</li> + <li><a href="#">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="mathjax-documentation"> +<h1>MathJax Documentation<a class="headerlink" href="#mathjax-documentation" title="Permalink to this headline">¶</a></h1> +<p>MathJax is an open-source JavaScript display engine for LaTeX and +MathML that works in all modern browsers.</p> +<div class="section" id="basic-usage"> +<h2>Basic Usage<a class="headerlink" href="#basic-usage" title="Permalink to this headline">¶</a></h2> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="mathjax.html">What is MathJax?</a></li> +<li class="toctree-l1"><a class="reference internal" href="start.html">Getting Started with MathJax</a></li> +<li class="toctree-l1"><a class="reference internal" href="installation.html">Installing and Testing MathJax</a></li> +<li class="toctree-l1"><a class="reference internal" href="configuration.html">Loading and Configuring MathJax</a></li> +<li class="toctree-l1"><a class="reference internal" href="platforms/index.html">Using MathJax in Web Platforms</a></li> +</ul> +</div> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="tex.html">MathJax TeX and LaTeX Support</a></li> +<li class="toctree-l1"><a class="reference internal" href="mathml.html">MathJax MathML Support</a></li> +<li class="toctree-l1"><a class="reference internal" href="output.html">MathJax Output Formats</a></li> +</ul> +</div> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="community.html">The MathJax Community</a></li> +</ul> +</div> +</div> +<div class="section" id="advanced-topics"> +<span id="id1"></span><h2>Advanced Topics<a class="headerlink" href="#advanced-topics" title="Permalink to this headline">¶</a></h2> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="model.html">The MathJax Processing Model</a></li> +<li class="toctree-l1"><a class="reference internal" href="startup.html">The MathJax Startup Sequence</a></li> +<li class="toctree-l1"><a class="reference internal" href="synchronize.html">Synchronizing Your Code with MathJax</a></li> +<li class="toctree-l1"><a class="reference internal" href="dynamic.html">Loading MathJax Dynamically</a></li> +<li class="toctree-l1"><a class="reference internal" href="typeset.html">Modifying Math on the Page</a></li> +</ul> +</div> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="api/index.html">Details of the MathJax API</a></li> +</ul> +</div> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="jsMath.html">Converting to MathJax from jsMath</a></li> +</ul> +</div> +</div> +<div class="section" id="reference-pages"> +<h2>Reference Pages<a class="headerlink" href="#reference-pages" title="Permalink to this headline">¶</a></h2> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="HTML-snippets.html">HTML snippets</a></li> +<li class="toctree-l1"><a class="reference internal" href="CSS-styles.html">CSS style objects</a></li> +<li class="toctree-l1"><a class="reference internal" href="glossary.html">Glossary</a></li> +</ul> +</div> +<ul class="simple"> +<li><a class="reference internal" href="search.html"><em>Search</em></a></li> +</ul> +<hr class="docutils" /> +<p>This version of the documentation was built March 03, 2011.</p> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="#">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">MathJax Documentation</a><ul> +<li><a class="reference internal" href="#basic-usage">Basic Usage</a><ul> +</ul> +</li> +<li><a class="reference internal" href="#advanced-topics">Advanced Topics</a><ul> +</ul> +</li> +<li><a class="reference internal" href="#reference-pages">Reference Pages</a><ul> +</ul> +</li> +</ul> +</li> +</ul> + + <h4>Next topic</h4> + <p class="topless"><a href="mathjax.html" + title="next chapter">What is MathJax?</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/index.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="mathjax.html" title="What is MathJax?" + >next</a> |</li> + <li><a href="#">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/installation.html b/docs/html/installation.html @@ -0,0 +1,318 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Installing and Testing MathJax — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="Loading and Configuring MathJax" href="configuration.html" /> + <link rel="prev" title="Getting Started" href="start.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="configuration.html" title="Loading and Configuring MathJax" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="start.html" title="Getting Started" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="installing-and-testing-mathjax"> +<span id="installation"></span><h1>Installing and Testing MathJax<a class="headerlink" href="#installing-and-testing-mathjax" title="Permalink to this headline">¶</a></h1> +<p>MathJax can be loaded from a public web server or privately from your hard drive +or other local media. To use MathJax in either way, you will need to obtain a +copy of MathJax and its font package. There are three ways to do this: via +<tt class="docutils literal"><span class="pre">git</span></tt>, <tt class="docutils literal"><span class="pre">svn</span></tt>, or via a pre-packaged archive. We recommend git or svn, as it +is easier to keep your installation up to date with these tools.</p> +<div class="section" id="obtaining-mathjax-via-git"> +<span id="getting-mathjax-git"></span><h2>Obtaining MathJax via Git<a class="headerlink" href="#obtaining-mathjax-via-git" title="Permalink to this headline">¶</a></h2> +<p>The easiest way to get MathJax and keep it up to date is to use the <a class="reference external" href="http://git-scm.com/">Git</a> version control system to access our <a class="reference external" href="http://github.com/mathjax/mathjax">GitHub repository</a>. Use the commands</p> +<div class="highlight-sh"><div class="highlight"><pre>git clone git://github.com/mathjax/MathJax.git mathjax +</pre></div> +</div> +<p>to obtain and set up a copy of MathJax. Note that there is no longer +a <tt class="docutils literal"><span class="pre">fonts.zip</span></tt> file, and that the <tt class="docutils literal"><span class="pre">fonts</span></tt> directory is now part of +the repository itself.</p> +<p>Whenever you want to update MathJax, you can now use</p> +<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>mathjax +git remote show origin +</pre></div> +</div> +<p>to check if there are updates to MathJax (this will print several +lines of data, but the last line should tell you if your copy is up to +date or out of date). If MathJax needs updating, use</p> +<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>mathjax +git pull origin +</pre></div> +</div> +<p>to udpate your copy of MathJax to the current release version. If you +keep MathJax updated in this way, you will be sure that you have the +latest bug fixes and new features as they become available.</p> +<p>This gets you the current development copy of MathJax, which is the +“bleeding-edge” version that contains all the latest changes to +MathJax. At times, however, these may be less stable than the +“release” version. If you prefer to use the most stable version (that +may not include all the latest patches and features), use <tt class="docutils literal"><span class="pre">git</span> <span class="pre">tag</span> +<span class="pre">-l</span></tt> to see all versions and use <tt class="docutils literal"><span class="pre">git</span> <span class="pre">checkout</span> <span class="pre"><tag_name></span></tt> to +checkout that version of MathJax. When you want to upgrade to a new +release, you will need to repeat this for the latest release tag.</p> +</div> +<div class="section" id="obtaining-mathjax-via-svn"> +<span id="getting-mathjax-svn"></span><h2>Obtaining MathJax via SVN<a class="headerlink" href="#obtaining-mathjax-via-svn" title="Permalink to this headline">¶</a></h2> +<p>If you are more comfortable with the <a class="reference external" href="http://subversion.apache.org/">subversion</a> source control system, you may want +to use GitHub’s <tt class="docutils literal"><span class="pre">svn</span></tt> service to obtain MathJax. If you want to get the +latest revision using <tt class="docutils literal"><span class="pre">svn</span></tt>, use the commands</p> +<div class="highlight-sh"><div class="highlight"><pre>svn checkout http://svn.github.com/mathjax/MathJax.git mathjax +</pre></div> +</div> +<p>to obtain and set up a copy of MathJax. Note that there is no longer +a <tt class="docutils literal"><span class="pre">fonts.zip</span></tt> file, and that the <tt class="docutils literal"><span class="pre">fonts</span></tt> directory is now part of +the repository itself.</p> +<p>Whenever you want to update MathJax, you can now use</p> +<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>mathjax +svn status -u +</pre></div> +</div> +<p>to check if there are updates to MathJax. If MathJax needs updating, +use</p> +<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>mathjax +svn update +</pre></div> +</div> +<p>to udpate your copy of MathJax to the current release version. If you +keep MathJax updated in this way, you will be sure that you have the +latest bug fixes and new features as they become available.</p> +<p>This gets you the current development copy of MathJax, which is the +“bleeding-edge” version that contains all the latest changes to +MathJax. At times, however, these may be less stable than the +“release” version. If you prefer to use one of the tagged releases +instead, then either use <tt class="docutils literal"><span class="pre">git</span></tt> as described above, or one of the +archive files as described below. You can use</p> +<div class="highlight-sh"><div class="highlight"><pre>svn checkout http://svn.github.com/mathjax/MathJax.git@nnn mathjax +</pre></div> +</div> +<p>to check out revision number <cite>nnn</cite>, but it is not easy to tell what +svn revision number is associated with a particular release. GitHub’s +<tt class="docutils literal"><span class="pre">svn</span></tt> service doesn’t appear to allow you to sepecify a particular +tagged version.</p> +</div> +<div class="section" id="obtaining-mathjax-via-an-archive"> +<span id="getting-mathjax-zip"></span><h2>Obtaining MathJax via an archive<a class="headerlink" href="#obtaining-mathjax-via-an-archive" title="Permalink to this headline">¶</a></h2> +<p>Release versions of MathJax are available in archive files from the +<a class="reference external" href="http://www.mathjax.org/download/">MathJax download page</a> or the +<a class="reference external" href="http://github.com/mathjax/mathjax/">GitHub downloads</a> (click the +big download button on the right), where you can download the archive +that you need.</p> +<p>You should download the v1.1 archive (which will get you a file with a +name like <tt class="docutils literal"><span class="pre">mathjax-MathJax-v1.1-X-XXXXXXXX.zip</span></tt>, where the X’s are +some sequence of random-looking letters and numbers), then simply unzip +it. Once the MathJax directory is unpacked, you should move it to the +desired location on your server (or your hard disk, if you are using +it locally rather then through a web server). One natural location is +to put it at the top level of your web server’s hierarchy. That would +let you refer to the main MathJax file as <tt class="docutils literal"><span class="pre">/MathJax/MathJax.js</span></tt> from +within any page on your server.</p> +<p>From the <a class="reference external" href="http://github.com/mathjax/mathjax/">MathJax GitHub download link</a> (the big download button at the +right), you can also select the <tt class="docutils literal"><span class="pre">Download</span> <span class="pre">.tar.gz</span></tt> or <tt class="docutils literal"><span class="pre">Download</span> +<span class="pre">.zip</span></tt> buttons to get a copy of the current “bleeding-edge” version of +MathJax that contains all the latest changes and bug-fixes.</p> +</div> +<div class="section" id="testing-your-installation"> +<h2>Testing your installation<a class="headerlink" href="#testing-your-installation" title="Permalink to this headline">¶</a></h2> +<p>Use the HTML files in the <tt class="docutils literal"><span class="pre">test</span></tt> directory to see if your +installation is working properly:</p> +<div class="highlight-python"><pre>test/ + index.html # Tests default configuration + index-images.html # Tests image-font fallback display + sample.html # Sample page with lots of pretty equations</pre> +</div> +<p>Open these files in your browser to see that they appear to be working +properly. If you have installed MathJax on a server, use the web +address for those files rather than opening them locally. When you +view the <tt class="docutils literal"><span class="pre">index.html</span></tt> file, you should see (after a few moments) a +message that MathJax appears to be working. If not, you should check +that the files have been transferred to the server completely, that +the fonts archive has been unpacked in the correct location, and that +the permissions allow the server to access the files and folders that +are part of the MathJax directory (be sure to verify the MathJax +folder’s permissions as well). Checking the server logs may help +locate problems with the installation.</p> +</div> +<div class="section" id="notes-about-shared-installations"> +<span id="cross-domain-linking"></span><h2>Notes about shared installations<a class="headerlink" href="#notes-about-shared-installations" title="Permalink to this headline">¶</a></h2> +<p>Typically, you want to have MathJax installed on the same server as +your web pages that use MathJax. There are times, however, when that +may be impractical, or when you want to use a MathJax installation at +a different site. For example, a departmental server at +<tt class="docutils literal"><span class="pre">www.math.yourcollege.edu</span></tt> might like to use a college-wide +installation at <tt class="docutils literal"><span class="pre">www.yourcollege.edu</span></tt> rather than installing a +separate copy on the departmental machine. MathJax can certainly +be loaded from another server, but there is one imporant caveat — +Firefox’s same-origin security policy for cross-domain scripting.</p> +<p>Firefox’s interpretation of the same-origin policy is more strict than +most other browsers, and it affects how fonts are loaded with the +<cite>@font-face</cite> CSS directive. MathJax uses this directive to load +web-based math fonts into a page when the user doesn’t have them +installed locally on their own computer. Firefox’s security policy, +however, only allows this when the fonts come from the same server as +the web page itself, so if you load MathJax (and hence its web fonts) +from a different server, Firefox won’t be able to access those web +fonts. In this case, MathJax will pause while waiting for the font to +download (which will never happen) and will time out after about 15 +seconds for each font it tries to access. Typically that is three or +four fonts, so your Firefox users will experience a minute or so +delay before mathematics is displayed, and then it will probably +display incorrectly because the browser doesn’t have access to the +correct fonts.</p> +<p>There is a solution to this, however, if you manage the server where +MathJax is installed, and if that server is running the <a class="reference external" href="http://www.apache.org/">Apache web +server</a>. In the remote server’s +<tt class="docutils literal"><span class="pre">MathJax/fonts/HTML-CSS/TeX/otf</span></tt> folder, create a file called +<tt class="docutils literal"><span class="pre">.htaccess</span></tt> that contains the following lines:</p> +<div class="highlight-python"><pre><FilesMatch "\.(ttf|otf|eot)$"> +<IfModule mod_headers.c> +Header set Access-Control-Allow-Origin "*" +</IfModule> +</FilesMatch></pre> +</div> +<p>and make sure the permissions allow the server to read this file. +(The file’s name starts with a period, which causes it to be an +“invisible” file on unix-based operating systems. Some systems, +particularly graphic user interfaces, may not allow you to create such +files, so you might need to use the command-line interface to +accomplish this.)</p> +<p>This file should make it possible for pages at other sites to load +MathJax from this server in such a way that Firefox will be able to +download the web-based fonts. If you want to restrict the sites that +can access the web fonts, change the <tt class="docutils literal"><span class="pre">Access-Control-Allow-Origin</span></tt> +line to something like:</p> +<div class="highlight-python"><pre>Header set Access-Control-Allow-Origin "http://www.math.yourcollege.edu"</pre> +</div> +<p>so that only pages at <tt class="docutils literal"><span class="pre">www.math.yourcollege.edu</span></tt> will be able to +download the fonts from this site. See the open font library +discussion of <a class="reference external" href="http://openfontlibrary.org/wiki/Web_Font_linking_and_Cross-Origin_Resource_Sharing">web-font linking</a> +for more details.</p> +</div> +<div class="section" id="forefox-and-local-fonts"> +<span id="ff-local-fonts"></span><h2>Forefox and Local Fonts<a class="headerlink" href="#forefox-and-local-fonts" title="Permalink to this headline">¶</a></h2> +<p>Firefox’s same-origin security policy affects its ability to load +web-based fonts, as described above. This has implications not only +to cross-domain loading of MathJax, but also to using MathJax locally +from your hard disk. Firefox’s interpretation of the same-origin +policy for local files is that the “same domain” for a page is the +directory where that page exists, or any of its subdirectories. So if +you use MathJax in a page with a <tt class="docutils literal"><span class="pre">file://</span></tt> URL, and if MathJax is +loaded from a diretory other than the one containing the original +page, then MathJax will not be able to access the web-based fonts in +Firefox. In that case, MathJax will fall back on image fonts to +display the mathematics.</p> +<p>In order for Firefox to be able to load the fonts properly for a local +file, your MathJax installation must be in a subdirectory of the one +containing the page that uses MathJax. This is an unfortunate +restriction, but it is a limitiation imposed by Firefox’s security +model that MathJax can not circumvent. Currently, this is not a +problem for other browsers.</p> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">Installing and Testing MathJax</a><ul> +<li><a class="reference internal" href="#obtaining-mathjax-via-git">Obtaining MathJax via Git</a></li> +<li><a class="reference internal" href="#obtaining-mathjax-via-svn">Obtaining MathJax via SVN</a></li> +<li><a class="reference internal" href="#obtaining-mathjax-via-an-archive">Obtaining MathJax via an archive</a></li> +<li><a class="reference internal" href="#testing-your-installation">Testing your installation</a></li> +<li><a class="reference internal" href="#notes-about-shared-installations">Notes about shared installations</a></li> +<li><a class="reference internal" href="#forefox-and-local-fonts">Forefox and Local Fonts</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="start.html" + title="previous chapter">Getting Started</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="configuration.html" + title="next chapter">Loading and Configuring MathJax</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/installation.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="configuration.html" title="Loading and Configuring MathJax" + >next</a> |</li> + <li class="right" > + <a href="start.html" title="Getting Started" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/jsMath.html b/docs/html/jsMath.html @@ -0,0 +1,131 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Converting to MathJax from jsMath — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="Describing HTML snippets" href="HTML-snippets.html" /> + <link rel="prev" title="The MathJax Object-Oriented Programming Model" href="api/object.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="HTML-snippets.html" title="Describing HTML snippets" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="api/object.html" title="The MathJax Object-Oriented Programming Model" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="converting-to-mathjax-from-jsmath"> +<span id="jsmath-support"></span><h1>Converting to MathJax from jsMath<a class="headerlink" href="#converting-to-mathjax-from-jsmath" title="Permalink to this headline">¶</a></h1> +<p>MathJax is the successor to the popular <a class="reference external" href="http://www.math.union.edu/locate/jsMath/">jsMath</a> package for rendering +mathematics in web pages. Like jsMath, MathJax works by locating and +processing the mathematics within the webpage once it has been loaded +in the browser by a user viewing your web pages. If you are using +jsMath with its <tt class="docutils literal"><span class="pre">tex2math</span></tt> preprocessor, then switching to MathJax +should be easy, and is simply a matter of configuring MathJax +appropriately. See the section on <a class="reference internal" href="configuration.html#configuration"><em>Configuring MathJax</em></a> for details about loading and configuring MathJax.</p> +<p>On the other hand, if you are using jsMath’s <tt class="docutils literal"><span class="pre"><span</span> +<span class="pre">class="math">...</span></span></tt> and <tt class="docutils literal"><span class="pre"><div</span> <span class="pre">class="math">...</div></span></tt> tags to +mark the mathematics in your document, then you should use MathJax’s +<tt class="docutils literal"><span class="pre">jsMath2jax</span></tt> preprocessor when you switch to MathJax. To do this, +include <tt class="docutils literal"><span class="pre">"jsMath2jax.js"</span></tt> in the <cite>extensions</cite> array of your +configuration, with the <cite>jax</cite> array set to include <tt class="docutils literal"><span class="pre">"input/TeX"</span></tt>.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"jsMath2jax.js"</span><span class="p">],</span> +<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="p">...]</span> +</pre></div> +</div> +<p>There are a few configuration options for <tt class="docutils literal"><span class="pre">jsMath2jax</span></tt>, which you +can find in the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file, or in the <a class="reference internal" href="options/jsMath2jax.html#configure-jsmath2jax"><em>jsMath +configuration options</em></a> section.</p> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="api/object.html" + title="previous chapter">The MathJax Object-Oriented Programming Model</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="HTML-snippets.html" + title="next chapter">Describing HTML snippets</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/jsMath.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="HTML-snippets.html" title="Describing HTML snippets" + >next</a> |</li> + <li class="right" > + <a href="api/object.html" title="The MathJax Object-Oriented Programming Model" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/mathjax.html b/docs/html/mathjax.html @@ -0,0 +1,140 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>What is MathJax? — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="Getting Started" href="start.html" /> + <link rel="prev" title="MathJax Documentation" href="index.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="start.html" title="Getting Started" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="index.html" title="MathJax Documentation" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="what-is-mathjax"> +<h1>What is MathJax?<a class="headerlink" href="#what-is-mathjax" title="Permalink to this headline">¶</a></h1> +<p>MathJax is an open-source JavaScript display engine for LaTeX and +MathML that works in all modern browsers. It was designed with the +goal of consolidating the recent advances in web technologies into a +single, definitive, math-on-the-web platform supporting the major +browsers and operating systems. It requires no setup on the part of +the user (no plugins to downlaod or software to install), so the page +author can write web documents that include mathematics and be +confident that users will be able to view it naturally and easily. +One simply includes MathJax and some mathematics in a web page, and +MathJax does the rest.</p> +<p>MathJax uses web-based fonts (in those browsers that support it) to +produce high-quality typesetting that scales and prints at full +resolution (unlike mathematics included as images). MathJax can be +used with screen readers, providing accessibility for the visually +impaired. With MathJax, mathematics is text-based rather than +image-based, and so it is available for search engines, meaning that +your equations can be searchable, just like the text of your pages. +MathJax allows page authors to write formulas using TeX and LaTeX +notation, or <a class="reference external" href="http://www.w3.org/TR/MathML3">MathML</a>, a World Wide +Web Constortium standard for representing mathematics in XML format. +MathJax will even convert TeX notation into MathML, so that it can be +rendered more quickly by those browsers that support MathML natively, +or so that you can copy and past it into other programs.</p> +<p>MathJax is modular, so it loads components only when necessary, and +can be extended to include new capabilities as needed. MathJax is +highly configurable, allowing authors to customize it for the special +requirements of their web sites. Finally, MathJax has a rich +application programming interface (API) that can be used to make the +mathematics on your web pages interactive and dynamic.</p> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="index.html" + title="previous chapter">MathJax Documentation</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="start.html" + title="next chapter">Getting Started</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/mathjax.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="start.html" title="Getting Started" + >next</a> |</li> + <li class="right" > + <a href="index.html" title="MathJax Documentation" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/mathml.html b/docs/html/mathml.html @@ -0,0 +1,197 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>MathJax MathML Support — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="MathJax Output Formats" href="output.html" /> + <link rel="prev" title="MathJax TeX and LaTeX Support" href="tex.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="output.html" title="MathJax Output Formats" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="tex.html" title="MathJax TeX and LaTeX Support" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="mathjax-mathml-support"> +<span id="mathml-support"></span><h1>MathJax MathML Support<a class="headerlink" href="#mathjax-mathml-support" title="Permalink to this headline">¶</a></h1> +<p>The support for <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> in MathJax consists of three parts: the +<cite>mml2jax</cite> preprocessor, the MathML input processor, and the NativeMML +output processor. The first of these looks for <tt class="docutils literal"><span class="pre"><math></span></tt> tags within +your document and marks them for later processing by MathJax. The +second converts the MathML to the internal format used by MathJax, and +the third turns the internal format into MathML within the page so +that it can be displayed by the browser’s native MathML support.</p> +<p>Because of MathJax’s modular design, you do not need to use all three +of these components. For example, you could use the <cite>tex2jax</cite> +preprocessor and the TeX input processor, but the NativeMML output +processor, so that your mathematics is entered in TeX format, but +displayed as MathML. Or you could use the <cite>mml2jax</cite> reprocessor and +MathML input processor with the HTML-CSS output processor to make +MathML available in browsers that don’t have native MathML support. +It is also possible to have MathJax select the output processor for +you so that MathML is used in those browsers that support it, while +HTML-CSS is used for those that don’t. See the <a class="reference internal" href="configuration.html#common-configurations"><em>common +configurations</em></a> section for details and +examples.</p> +<p>Of course it is also possible to use all three components together. +It may seem strange to go through an internal format just to return to +MathML in the end, but this is actually what makes it possible to view +MathML within an HTML page (rather than an XHTML page), without +the complications of handling special MIME-types for the document, or +any of the other setup issues that make using native MathML +difficult. MathJax handles the setup and properly marks the +mathematics so that the browser will render it as MathML. In +addition, MathJax provides its contextual menu for the MathML, which +lets the user zoom the mathematics for easier reading, get the copy +the source markup, and so on, so there is added value to using MathJax +even whith a pure MathML workflow.</p> +<div class="section" id="mathml-in-html-pages"> +<h2>MathML in HTML pages<a class="headerlink" href="#mathml-in-html-pages" title="Permalink to this headline">¶</a></h2> +<p>For MathML that is handled via the pre-processor, you should not use +the named MathML entities, but rather use the numeric entities like +<tt class="docutils literal"><span class="pre">&#x221A;</span></tt> or unicode characters embedded in the page itself. The +reason is that entities are replaced by the browser before MathJax +runs, and some browsers report errors for unknown entities. For +browsers that are not MathML-aware, that will cause errors to be +displayed for the MathML entities. While that might not occur in the +browser you are using to compose your pages, it can happen with other +browsers, so you should avoid the named entities whenever possible. +If you must use named entities, you may need to declare them in the +<cite>DOCTYPE</cite> declaration by hand.</p> +<p>When you use MathML in an HTML document rather than an XHTML one +(MathJax will work woth both), you should not use the “self-closing” +form for tags with no content, but should use separate open and close +tags. That is, use</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><mspace</span> <span class="na">width=</span><span class="s">"thinmathspace"</span><span class="nt">></mspace></span> +</pre></div> +</div> +<p>rather than <tt class="docutils literal"><span class="pre"><mspace</span> <span class="pre">width="thinmathspace</span> <span class="pre">/></span></tt>. This is because HTML +does not have self-closing tags, and some browsers will get the +nesting of tags wrong if you attempt to use them. For example, with +<tt class="docutils literal"><span class="pre"><mspace</span> <span class="pre">width="1em"</span> <span class="pre">/></span></tt>, since there is no closing tag, the rest of +the mathematics will become the content of the <tt class="docutils literal"><span class="pre"><mspace></span></tt> tag; but +since <tt class="docutils literal"><span class="pre"><mspace></span></tt> should have no content, the rest of the mathematics +will not be displayed. This is a common error that should be avoided.</p> +</div> +<div class="section" id="supported-mathml-commands"> +<h2>Supported MathML commands<a class="headerlink" href="#supported-mathml-commands" title="Permalink to this headline">¶</a></h2> +<p>MathJax supports the <a class="reference external" href="http://www.w3.org/TR/MathML3/">MathML3.0</a> +presentation mathematics tags, with some limitations. The MathML +support is still under active development, so some tags are not yet +implemented, and some features are not fully developed, but are +coming.</p> +<p>The deficiencies include:</p> +<ul class="simple"> +<li>No support for the elementary math tags: <tt class="docutils literal"><span class="pre">mstack</span></tt>, <tt class="docutils literal"><span class="pre">mlongdiv</span></tt>, +<tt class="docutils literal"><span class="pre">msgroup</span></tt>, <tt class="docutils literal"><span class="pre">msrow</span></tt>, <tt class="docutils literal"><span class="pre">mscarries</span></tt>, and <tt class="docutils literal"><span class="pre">mscarry</span></tt>.</li> +<li>Limited support for line breaking (they are only allowed in direct +children of <tt class="docutils literal"><span class="pre">mrow</span></tt> or implied <tt class="docutils literal"><span class="pre">mrow</span></tt> elements.</li> +<li>No support for alignment groups in table.</li> +<li>No support for right-to-left rendering.</li> +</ul> +<p>See the <a class="reference external" href="http://www.w3.org/Math/testsuite/results/tests.html">results of the MathML3.0 test suite</a> for details.</p> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">MathJax MathML Support</a><ul> +<li><a class="reference internal" href="#mathml-in-html-pages">MathML in HTML pages</a></li> +<li><a class="reference internal" href="#supported-mathml-commands">Supported MathML commands</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="tex.html" + title="previous chapter">MathJax TeX and LaTeX Support</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="output.html" + title="next chapter">MathJax Output Formats</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/mathml.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="output.html" title="MathJax Output Formats" + >next</a> |</li> + <li class="right" > + <a href="tex.html" title="MathJax TeX and LaTeX Support" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/model.html b/docs/html/model.html @@ -0,0 +1,308 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax Processing Model — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="The MathJax Startup Sequence" href="startup.html" /> + <link rel="prev" title="The MathJax Community" href="community.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="startup.html" title="The MathJax Startup Sequence" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="community.html" title="The MathJax Community" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-processing-model"> +<h1>The MathJax Processing Model<a class="headerlink" href="#the-mathjax-processing-model" title="Permalink to this headline">¶</a></h1> +<p>The purpose of MathJax is to bring the ability to include mathematics +easily in web pages to as wide a range of browsers as possible. +Authors can specify mathematics in a variety of formats (e.g., +<a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> or <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a>), and MathJax provides high-quality +mathematical typesetting even in those browsers that do not have +native MathML support. This all happens without the need for special +downloads or plugins, but rendering will be enhanced if high-quality +math fonts (e.g., <a class="reference internal" href="glossary.html#term-stix"><em class="xref std std-term">STIX</em></a>) are available to the browser.</p> +<p>MathJax is broken into several different kinds of components: page +preprocessors, input processors, output processors, and the MathJax +Hub that organizes and connects the others. The input and output +processors are called <a class="reference internal" href="glossary.html#term-jax"><em class="xref std std-term">jax</em></a>, and are described in more detail +below.</p> +<p>When MathJax runs, it looks through the page for special tags that +hold mathematics; for each such tag, it locates an appropriate input +jax which it uses to convert the mathematics into an internal form +(called an element jax), and then calls an output jax to transform the +internal format into HTML content that displays the mathematics within +the page. The page author configures MathJax by indicating which +input and output jax are to be used.</p> +<p>Often, and especially with pages that are authored by hand, the +mathematics is not stored (initially) within the special tags needed +by MathJax, as that would require more notation than the average page +author is willing to type. Instead, it is entered in a form that is +more natural to the page author, for example, using the standard TeX +math delimiters <tt class="docutils literal"><span class="pre">$...$</span></tt> and <tt class="docutils literal"><span class="pre">$$...$$</span></tt> to indicate what part of the +document is to be typeset as mathematics. In this case, MathJax can +run a preprocessor to locate the math delimiters and replace them by +the special tags that it uses to mark the formulas. There are +preprocessors for <a class="reference internal" href="tex.html#tex-support"><em>TeX notation</em></a>, <a class="reference internal" href="mathml.html#mathml-support"><em>MathML +notation</em></a>, and the <a class="reference internal" href="jsMath.html#jsmath-support"><em>jsMath notation</em></a> that uses <cite>span</cite> and <cite>div</cite> tags.</p> +<p>For pages that are constructed programatically, such as HTML +pages that result from running a processor on text in some other +format (e.g., pages produced from Markdown documents, or via programs +like <cite>tex4ht</cite>), it would be best to use MathJax’s special tags +directly, as described below, rather than having MathJax run +another preprocessor. This will speed up the final display of the +mathematics, since the extra preprocessing step would not be needed, +and it also avoids the conflict between the use of the less-than sign, +<tt class="docutils literal"><span class="pre"><</span></tt>, in mathematics and asn an HTML special character (that starts +an HTML tag).</p> +<div class="section" id="how-mathematics-is-stored-in-the-page"> +<h2>How mathematics is stored in the page<a class="headerlink" href="#how-mathematics-is-stored-in-the-page" title="Permalink to this headline">¶</a></h2> +<p>In order to identify mathematics in the page, MathJax uses special +<tt class="docutils literal"><span class="pre"><script></span></tt> tags to enclose the mathematics. This is done because +such tags can be located easily, and because their content is not +further processed by the browser; for example, less-than signs can be +used as they are in mathematics, without worrying about them being +mistaken for the beginnings of HTML tags. One may also consider the +math notation as a form of “script” for the mathematics, so a +<tt class="docutils literal"><span class="pre"><script></span></tt> tag makes at least some sense for storing the math.</p> +<p>Each <tt class="docutils literal"><span class="pre"><script></span></tt> tag has a <tt class="docutils literal"><span class="pre">type</span></tt> attribute that identifies the +kind of script that the tag contains. The usual (and default) value +is <tt class="docutils literal"><span class="pre">type="text/javascript"</span></tt>, and when a script has this type, the +browser executes the script as a javascript program. MathJax, +however, uses the type <cite>math/tex</cite> to identify mathematics in the TeX +and LaTeX notation, and <cite>math/mml</cite> for mathematics in MathML +notation. When the <cite>tex2jax</cite> or <cite>mml2jax</cite> preprocessors run, they +create <tt class="docutils literal"><span class="pre"><script></span></tt> tags with these types so that MathJax can process +them when it runs its main typesetting pass.</p> +<p>For example,</p> +<div class="highlight-html"><pre><script type="math/tex">x+\sqrt{1-x^2}</script></pre> +</div> +<p>represents an in-line equation in TeX notation, and</p> +<div class="highlight-html"><pre><script type="math/tex; mode=display"> + \sum_{n=1}^\infty {1\over n^2} = {\pi^2\over 6} +</script></pre> +</div> +<p>is a displayed TeX equation.</p> +<p>Alternatively, using MathML notation, you could use</p> +<div class="highlight-html"><pre><script type="math/mml"> + <math> + <mi>x</mi> + <mo>+</mo> + <msqrt> + <mn>1</mn> + <mo>&#x2212;<!-- − --></mo> + <msup> + <mi>x</mi> + <mn>2</mn> + </msup> + </msqrt> + </math> +</script></pre> +</div> +<p>for in-line math, or</p> +<div class="highlight-html"><pre><script type="math/mml"> + <math display="block"> + <mrow> + <munderover> + <mo>&#x2211;<!-- ∑ --></mo> + <mrow> + <mi>n</mi> + <mo>=</mo> + <mn>1</mn> + </mrow> + <mi mathvariant="normal">&#x221E;<!-- ∞ --></mi> + </munderover> + </mrow> + <mrow> + <mfrac> + <mn>1</mn> + <msup> + <mi>n</mi> + <mn>2</mn> + </msup> + </mfrac> + </mrow> + <mo>=</mo> + <mrow> + <mfrac> + <msup> + <mi>&#x03C0;<!-- π --></mi> + <mn>2</mn> + </msup> + <mn>6</mn> + </mfrac> + </mrow> + </math> +</script></pre> +</div> +<p>for displayed equations in MathML notation. +As other input jax are created, they will use other types to identify +the mathematics they can process.</p> +<p>Page authors can use one of MathJax’s preprocessors to convert from +math delimiters that are more natural for the author to type (e.g., +TeX math delimiters like <tt class="docutils literal"><span class="pre">$$...$$</span></tt>) to MathJax’s <tt class="docutils literal"><span class="pre"><script></span></tt> +format. Blog and wiki software could extend from their own markup +languages to include math delimiters, which they could convert to +MathJax’s <tt class="docutils literal"><span class="pre"><script></span></tt> format automatically.</p> +<p>Note, however, that Internet Explorer has a bug that causes it to +remove the space before a <tt class="docutils literal"><span class="pre"><script></span></tt> tag if there is also a space +after it, which can cause serious spacing problems with in-line math +in Internet Explorer. There are three possible solutions to this in +MathJax. The recommended way is to use a math preview (an element +with class <tt class="docutils literal"><span class="pre">MathJax_Preview</span></tt>) that is non-empty and comes right +before the <tt class="docutils literal"><span class="pre"><script></span></tt> tag. Its contents can be just the word +<tt class="docutils literal"><span class="pre">[math]</span></tt>, so it does not have to be specific to the mathematics +script that follows; it just has to be non-empty (though it could have +its style set to <tt class="docutils literal"><span class="pre">display:none</span></tt>). See also the <tt class="docutils literal"><span class="pre">preJax</span></tt> and +<tt class="docutils literal"><span class="pre">postJax</span></tt> options in the <a class="reference internal" href="options/hub.html#configure-hub"><em>Core Configuration Options</em></a> document for another approach.</p> +</div> +<div class="section" id="the-components-of-mathjax"> +<h2>The components of MathJax<a class="headerlink" href="#the-components-of-mathjax" title="Permalink to this headline">¶</a></h2> +<p>The main components of MathJax are its preprocessors, its input and +output jax, and the MathJax Hub, which coordinates the actions of the +other components.</p> +<p><strong>Input jax</strong> are associated with the different script types (like +<em class="mimetype">math/tex</em> or <em class="mimetype">math/mml</em>) and the mapping of a +particular type to a particular jax is made when the various jax +register their abilities with the MathJax Hub at configuration time. +For example, the MathML input jax registers the <em class="mimetype">math/mml</em> +type, so MathJax will know to call the MathML input jax when it sees +math elements of that type. The role of the input jax is to convert +the math notation entered by the author into the internal format used +by MathJax (called an <cite>element jax</cite>). This internal format is +essentially MathML (represented as JavaScript objects), so an input +jax acts as a translator into MathML.</p> +<p><strong>Output jax</strong> convert that internal element jax format into a specific +output format. For example, the NativeMML output jax inserts MathML +tags into the page to represent the mathematics, while the HTML-CSS +output jax uses HTML with CSS styling to lay out the mathematics so +that it can be displayed even in browsers that dont understand +MathML. Output jax could be produced that render the mathematics +using SVG, for example, or that speak an equation for the blind +users. The MathJax contextual menu can be used to switch between the +output jax that are available.</p> +<p>Each input and output jax has a small configuration file that is +loaded when that input jax is included in the <cite>jax</cite> array in the +MathJax configuration, and a larger file that implements the core +functionality of that particular jax. The latter file is loaded +when the first time the jax is needed by MathJax to process some +mathematics.</p> +<p>The <strong>MathJax Hub</strong> keeps track of the internal representations of the +various mathematical equations on the page, and can be queried to +obtain information about those equations. For example, one can obtain +a list of all the math elements on the page, or look up a particular +one, or find all the elements with a given input format, and so on. +In a dynamically generated web page, an equation where the source +mathematics has changed can be asked to re-render itself, or if a new +paragraph is generated that might include mathematics, MathJax can be +asked to process the equations it contains.</p> +<p>The Hub also manages issues concerning mouse events and other user +interaction with the equation itself. Parts of equations can be made +active so that mouse clicks cause event handlers to run, or activate +hyperlinks to other pages, and so on, making the mathematics as +dynamic as the rest of the page.</p> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">The MathJax Processing Model</a><ul> +<li><a class="reference internal" href="#how-mathematics-is-stored-in-the-page">How mathematics is stored in the page</a></li> +<li><a class="reference internal" href="#the-components-of-mathjax">The components of MathJax</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="community.html" + title="previous chapter">The MathJax Community</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="startup.html" + title="next chapter">The MathJax Startup Sequence</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/model.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="startup.html" title="The MathJax Startup Sequence" + >next</a> |</li> + <li class="right" > + <a href="community.html" title="The MathJax Community" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/objects.inv b/docs/html/objects.inv Binary files differ. diff --git a/docs/html/options/FontWarnings.html b/docs/html/options/FontWarnings.html @@ -0,0 +1,267 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The FontWarnings extension — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> + <link rel="next" title="Using MathJax in popular web platforms" href="../platforms/index.html" /> + <link rel="prev" title="The MathZoom extension" href="MathZoom.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="../platforms/index.html" title="Using MathJax in popular web platforms" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="MathZoom.html" title="The MathZoom extension" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-fontwarnings-extension"> +<span id="configure-fontwarnings"></span><h1>The FontWarnings extension<a class="headerlink" href="#the-fontwarnings-extension" title="Permalink to this headline">¶</a></h1> +<p>The options below control the operation of the <cite>FontWarnings</cite> +extension that is run when you include <tt class="docutils literal"><span class="pre">"FontWarnings.js"</span></tt> in the +<cite>extensions</cite> array of your configuration. They are listed with their +default values. To set any of these options, include a +<tt class="docutils literal"><span class="pre">FontWarnings</span></tt> section in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. +For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">FontWarnings</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">fadeoutTime</span><span class="o">:</span> <span class="mi">2</span><span class="o">*</span><span class="mi">1000</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>would set the <tt class="docutils literal"><span class="pre">fadeoutTime</span></tt> option to 2000 milliseconds (2 seconds).</p> +<dl class="describe"> +<dt> +<tt class="descname">messageStyle: { ... }</tt></dt> +<dd><p>This sets the CSS styles to be used for the font warning message +window. See the <tt class="docutils literal"><span class="pre">extensions/FontWarnings.js</span></tt> file for details of +what are set by default. See the <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS style objects</em></a> for details about how to specify CSS styles +via javascript objects.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">Message: { ... }</tt></dt> +<dd><p>This block contains HTML snippets to be used for the various +messages that the FontWarning extension can produce. There are +three messages that you can redefine to suit your needs:</p> +<dl class="describe"> +<dt> +<tt class="descname">webFont: [ ... ]</tt></dt> +<dd><p>The message used for when MathJax uses web-based fonts (rather +than local fonts installed on the user’s system).</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">imageFonts: [ ... ]</tt></dt> +<dd><p>The message used for when MathJax must use image fonts rather +than local or web-based fonts (for those browsers that don’t +handle the <tt class="docutils literal"><span class="pre">@font-face</span></tt> CSS directive).</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">noFonts: [ ... ]</tt></dt> +<dd><p>The message used when MathJax is unable to find any font to use +(i.e., neither local nor web-based nor image-based fonts are +available).</p> +</dd></dl> + +<p>Any message that is set to <tt class="docutils literal"><span class="pre">null</span></tt> rather than an HTML snippet +array will not be presented to the user, so you can set, for +example, the <tt class="docutils literal"><span class="pre">webFont</span></tt> message to <tt class="docutils literal"><span class="pre">null</span></tt> in order to have the +<tt class="docutils literal"><span class="pre">imageFonts</span></tt> and <tt class="docutils literal"><span class="pre">noFonts</span></tt> messages, but no message if MathJax +uses web-based fonts.</p> +<p>See the description of <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>HTML snippets</em></a> for +details about how to describe the messages using HTML snippets. +Note that in addition to the usual rules for defining such +snippets, the FontWarnings snippets can include references to +pre-defined snippets (that represent elements common to all three +messages). These are defined below in the <tt class="docutils literal"><span class="pre">HTML</span></tt> block, and are +referenced using <tt class="docutils literal"><span class="pre">["name"]</span></tt> within the snippet, where <cite>name</cite> is +the name of one of the snippets defined in the <tt class="docutils literal"><span class="pre">HTML</span></tt> +configuration block. For example</p> +<div class="highlight-javascript"><pre> Message: { + noFonts: [ + ["closeBox"], + "MathJax is unable to locate a font to use to display ", + "its mathematics, and image fonts are not available, so it ", + "is falling back on generic unicode characters in hopes that ", + "your browser will be able to display them. Some characters ", + "may not show up properly, or possibly not at all.", + ["fonts"], + ["webfonts"] + ] + } + +refers to the ``closeBox``, ``fonts`` and ``webfonts`` snippets in +declared in the ``HTML`` section.</pre> +</div> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">HTML: { ... }</tt></dt> +<dd><p>This object defines HTML snippets that are common to more than one +message in the <tt class="docutils literal"><span class="pre">Message</span></tt> section above. They can be called in +by using <tt class="docutils literal"><span class="pre">["name"]</span></tt> in an HTML snippet, where <cite>name</cite> refers to +the name of the snippet in the <tt class="docutils literal"><span class="pre">HTML</span></tt> block. The pre-defined +snippets are:</p> +<dl class="describe"> +<dt> +<tt class="descname">closeBox</tt></dt> +<dd><p>The HTML for the close box in the FontWarning message.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">webfonts</tt></dt> +<dd><p>The HTML for a paragraph suggesting an upgrade to a more +modern browser that supports web fonts.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">fonts</tt></dt> +<dd><p>HTML that includes links to the MathJax and STIX font download +pages.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">STIXfonts</tt></dt> +<dd><p>HTML that gives the download link for the STIX fonts only. +(Used in place of <cite>fonts</cite> when the <cite>HTML-CSS</cite> option for +<cite>availableFonts</cite> only includes the <a class="reference internal" href="../glossary.html#term-stix"><em class="xref std std-term">STIX</em></a> fonts.)</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">TeXfonts</tt></dt> +<dd><p>HTML that gives the download link for the MathJax TeX fonts +only. (Used in place of <cite>fonts</cite> when the <cite>HTML-CSS</cite> option +for <cite>availableFonts</cite> only includes the <cite>TeX</cite> fonts.)</p> +</dd></dl> + +<p>You can add your own pre-defined HTML snippets to this object, or +override the ones that are there with your own text.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">removeAfter: 12*1000</tt></dt> +<dd><p>This is the amount of time to show the FontWarning message, in +milliseconds. The default is 12 seconds.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">fadeoutSteps: 10</tt></dt> +<dd><p>This is the number of steps to take while fading out the +FontWarning message. More steps make for a smoother fade-out.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">fadeoutTime: 1.5*1000</tt></dt> +<dd><p>This is the time used to perform the fade-out, in milliseconds. +The default is 1.5 seconds.</p> +</dd></dl> + +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="MathZoom.html" + title="previous chapter">The MathZoom extension</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="../platforms/index.html" + title="next chapter">Using MathJax in popular web platforms</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/options/FontWarnings.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="../platforms/index.html" title="Using MathJax in popular web platforms" + >next</a> |</li> + <li class="right" > + <a href="MathZoom.html" title="The MathZoom extension" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/options/HTML-CSS.html b/docs/html/options/HTML-CSS.html @@ -0,0 +1,244 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The HTML-CSS output processor — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> + <link rel="next" title="The NativeMML output processor" href="NativeMML.html" /> + <link rel="prev" title="The MathML input processor" href="MathML.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="NativeMML.html" title="The NativeMML output processor" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="MathML.html" title="The MathML input processor" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-html-css-output-processor"> +<span id="configure-html-css"></span><h1>The HTML-CSS output processor<a class="headerlink" href="#the-html-css-output-processor" title="Permalink to this headline">¶</a></h1> +<p>The options below control the operation of the HTML-CSS output +processor that is run when you include <tt class="docutils literal"><span class="pre">"output/HTML-CSS"</span></tt> in the +<cite>jax</cite> array of your configuration. They are listed with their default +values. To set any of these options, include a <tt class="docutils literal"><span class="pre">"HTML-CSS"</span></tt> section +in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. Note that, because of the +dash, you need to enclose the name in quotes. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="s2">"HTML-CSS"</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">preferredFont</span><span class="o">:</span> <span class="s2">"STIX"</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>would set the <tt class="docutils literal"><span class="pre">preferredFont</span></tt> option to the <a class="reference internal" href="../glossary.html#term-stix"><em class="xref std std-term">STIX</em></a> fonts.</p> +<dl class="describe"> +<dt> +<tt class="descname">scale: 100</tt></dt> +<dd><p>The scaling factor (as a percentage) of math with respect to the +surrounding text. The <cite>HTML-CSS</cite> output processor tries to match +the en-size of the mathematics with that of the text where it is +placed, but you may want to adjust the results using this scaling +factor. The user can also adjust this value using the contextual +menu item associated with the typeset mathematics.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">availableFonts: ["STIX","TeX"]</tt></dt> +<dd><p>This is a list of the fonts to look for on a user’s computer in +preference to using MathJax’s web-based fonts. These must +correspond to directories available in the +<tt class="docutils literal"><span class="pre">jax/output/HTML-CSS/fonts</span></tt> directory, where MathJax stores data +about the characters available in the fonts. Set this to +<tt class="docutils literal"><span class="pre">["TeX"]</span></tt>, for example, to prevent the use of the <a class="reference internal" href="../glossary.html#term-stix"><em class="xref std std-term">STIX</em></a> +fonts, or set it to an empty list, <cite>[]</cite>, if you want to force +MathJax to use web-based or image fonts.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">preferredFont: "TeX"</tt></dt> +<dd><p>Which font to prefer out of the <tt class="docutils literal"><span class="pre">availableFonts</span></tt> list, when more +than one is available on the user’s computer.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">webFont: "TeX"</tt></dt> +<dd><p>This is the web-based font to use when none of the fonts listed +above are available on the user’s computer. Note that currently +only the <cite>TeX</cite> font is available in a web-based form (they are +stored in the <tt class="docutils literal"><span class="pre">fonts/HTML-CSS</span></tt> folder in the MathJax directory. +Set this to <tt class="docutils literal"><span class="pre">null</span></tt> to disable web fonts.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">imageFont: "TeX"</tt></dt> +<dd><p>This is the font to use for image fallback mode (when none of the +fonts listed above are available and the browser doesn’t support +web-fonts via the <tt class="docutils literal"><span class="pre">@font-face</span></tt> CSS directive). Note that currently +only the TeX font is available as an image font (they are stores +in the <tt class="docutils literal"><span class="pre">fonts/HTML-CSS</span></tt> directory).</p> +<p>Set this to <tt class="docutils literal"><span class="pre">null</span></tt> if you want to prevent the use of image fonts +(e.g., you have deleted or not installed the image fonts on your +server). In this case, only browsers that support web-based fonts +will be able to view your pages without having the fonts installed +on the client computer. The browsers that support web-based fonts +include: IE6 and later, Chrome, Safari3.1 and above, Firefox3.5 +and later, and Opera10 and later. Note that Firefox3.0 is <strong>not</strong> +on this list.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">styles: {}</tt></dt> +<dd><p>This is a list of CSS declarations for styling the HTML-CSS +output. See the definitions in <tt class="docutils literal"><span class="pre">jax/output/HTML-CSS/config.js</span></tt> +for some examples of what are defined by default. See <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS +Style Objects</em></a> for details on how to specify +CSS style in a JavaScript object.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">showMathMenu: true</tt></dt> +<dd><p>This controls whether the MathJax contextual menu will be +available on the mathematics in the page. If true, then +right-clicking (on the PC) or control-clicking (on the Mac) will +produce a MathJax menu that allows you to get the source of the +mathematics in various formats, change the size of the mathematics +relative to the surrounding text, get information about +MathJax, and configure other MathJax settings.</p> +<p>Set this to <tt class="docutils literal"><span class="pre">false</span></tt> to disable the menu. When <tt class="docutils literal"><span class="pre">true</span></tt>, the +<tt class="docutils literal"><span class="pre">MathMenu</span></tt> configuration block determines the operation of the +menu. See <a class="reference internal" href="MathMenu.html#configure-mathmenu"><em>the MathMenu options</em></a> for +more details.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">tooltip: { ... }</tt></dt> +<dd><p>This sets the configuration options for <tt class="docutils literal"><span class="pre"><maction></span></tt> elements +with <tt class="docutils literal"><span class="pre">actiontype="tooltip"</span></tt>. (See also the <tt class="docutils literal"><span class="pre">#MathJax_Tooltip</span></tt> +style setting in <tt class="docutils literal"><span class="pre">jax/output/HTML-CSS/config.js</span></tt>, which can be +overridden using the <tt class="docutils literal"><span class="pre">styles</span></tt> option above.)</p> +<p>The <tt class="docutils literal"><span class="pre">tooltip</span></tt> section can contain the following options:</p> +<dl class="describe"> +<dt> +<tt class="descname">delayPost: 600</tt></dt> +<dd><p>The delay (in milliseconds) before the tooltip is posted after +the mouse is moved over the <tt class="docutils literal"><span class="pre">maction</span></tt> element.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">delayClear: 600</tt></dt> +<dd><p>The delay (in milliseconds) before the tooltop is cleared +after the mouse moves out of the <tt class="docutils literal"><span class="pre">maction</span></tt> element.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">offsetX: 10 and offsetY: 5</tt></dt> +<dd><p>These are the offset from the mouse position (in pixels) +where the tooltip will be placed.</p> +</dd></dl> + +</dd></dl> + +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="MathML.html" + title="previous chapter">The MathML input processor</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="NativeMML.html" + title="next chapter">The NativeMML output processor</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/options/HTML-CSS.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="NativeMML.html" title="The NativeMML output processor" + >next</a> |</li> + <li class="right" > + <a href="MathML.html" title="The MathML input processor" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/options/MMLorHTML.html b/docs/html/options/MMLorHTML.html @@ -0,0 +1,146 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MMLorHTML configuration options — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> + <link rel="next" title="The MathMenu extension" href="MathMenu.html" /> + <link rel="prev" title="The NativeMML output processor" href="NativeMML.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="MathMenu.html" title="The MathMenu extension" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="NativeMML.html" title="The NativeMML output processor" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mmlorhtml-configuration-options"> +<span id="configure-mmlorhtml"></span><h1>The MMLorHTML configuration options<a class="headerlink" href="#the-mmlorhtml-configuration-options" title="Permalink to this headline">¶</a></h1> +<p>The options below control the operation of the MMLorHTML configuration +file that is run when you include <tt class="docutils literal"><span class="pre">"MMLorHTML.js"</span></tt> in the <cite>config</cite> +array of your configuration. They are listed with their default +values. To set any of these options, include a <tt class="docutils literal"><span class="pre">MMLorHTML</span></tt> section +in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">MMLorHTML</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">prefer</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">Opera</span><span class="o">:</span> <span class="s2">"MML"</span> + <span class="p">}</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>would set the <tt class="docutils literal"><span class="pre">prefer</span></tt> option so that Opera browser would prefer +MathML to HTML-CSS output (while leaving the settings for other +browsers unchanged).</p> +<p>Note that if you use the <tt class="docutils literal"><span class="pre">MMLorHTML.js</span></tt> configuration file, you should +<strong>not</strong> specify an output processor in the <cite>jax</cite> array of your +configuration; <cite>MMLorHTML</cite> will fill that in for you.</p> +<dl class="describe"> +<dt> +<tt class="descname">prefer: { MSIE: "MML", Firefox: "MML", Opera: "HTML", other: "HTML" }</tt></dt> +<dd><p>This lets you set the preferred renderer on a browser-by-browser +basis. You set the browser to either <tt class="docutils literal"><span class="pre">"MML"</span></tt> or <tt class="docutils literal"><span class="pre">"HTML"</span></tt> +depending on whether you want to use the <cite>NativeMML</cite> or <cite>HTML-CSS</cite> +output processor. Note that although Opera does process some MathML +natively, its support is not sufficient to handle the more +complicated output generated by MathJax, so its setting is +<tt class="docutils literal"><span class="pre">"HTML"</span></tt> by default.</p> +</dd></dl> + +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="NativeMML.html" + title="previous chapter">The NativeMML output processor</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="MathMenu.html" + title="next chapter">The MathMenu extension</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/options/MMLorHTML.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="MathMenu.html" title="The MathMenu extension" + >next</a> |</li> + <li class="right" > + <a href="NativeMML.html" title="The NativeMML output processor" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/options/MathML.html b/docs/html/options/MathML.html @@ -0,0 +1,135 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathML input processor — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> + <link rel="next" title="The HTML-CSS output processor" href="HTML-CSS.html" /> + <link rel="prev" title="The TeX input processor" href="TeX.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="HTML-CSS.html" title="The HTML-CSS output processor" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="TeX.html" title="The TeX input processor" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathml-input-processor"> +<span id="configure-mathml"></span><h1>The MathML input processor<a class="headerlink" href="#the-mathml-input-processor" title="Permalink to this headline">¶</a></h1> +<p>The options below control the operation of the MathML input processor +that is run when you include <tt class="docutils literal"><span class="pre">"input/MathML"</span></tt> in the <cite>jax</cite> array of +your configuration. They are listed with their default values. To +set any of these options, include a <tt class="docutils literal"><span class="pre">MathML</span></tt> section in your +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">MathML</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">useMathMLspacing</span><span class="o">:</span> <span class="kc">true</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>would set the <tt class="docutils literal"><span class="pre">useMathMLspacing</span></tt> option so that the MathML rules for +spacing would be used (rather than TeX spacing rules).</p> +<dl class="describe"> +<dt> +<tt class="descname">useMathMLspacing: false</tt></dt> +<dd><p>Specifies whether to use TeX spacing or MathML spacing when the +<cite>HTML-CSS</cite> output jax is used.</p> +</dd></dl> + +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="TeX.html" + title="previous chapter">The TeX input processor</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="HTML-CSS.html" + title="next chapter">The HTML-CSS output processor</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/options/MathML.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="HTML-CSS.html" title="The HTML-CSS output processor" + >next</a> |</li> + <li class="right" > + <a href="TeX.html" title="The TeX input processor" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/options/MathMenu.html b/docs/html/options/MathMenu.html @@ -0,0 +1,197 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathMenu extension — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> + <link rel="next" title="The MathZoom extension" href="MathZoom.html" /> + <link rel="prev" title="The MMLorHTML configuration options" href="MMLorHTML.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="MathZoom.html" title="The MathZoom extension" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="MMLorHTML.html" title="The MMLorHTML configuration options" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathmenu-extension"> +<span id="configure-mathmenu"></span><h1>The MathMenu extension<a class="headerlink" href="#the-mathmenu-extension" title="Permalink to this headline">¶</a></h1> +<p>The options below control the operation of the contextual menu that is +available on mathematics that is typeset by MathJax. +They are listed with their default values. To set any of these +options, include a <tt class="docutils literal"><span class="pre">MathMenu</span></tt> section in your +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">MathMenu</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">delay</span><span class="o">:</span> <span class="mi">600</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>would set the <tt class="docutils literal"><span class="pre">delay</span></tt> option to 600 milliseconds.</p> +<dl class="describe"> +<dt> +<tt class="descname">delay: 400</tt></dt> +<dd><p>This is the hover delay for the display (in milliseconds) for +submenus in the contextual menu: when the mouse is over a submenu +label for this long, the menu will appear. (The submenu also will +appear if you click on its label.)</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">helpURL: "http://www.mathjax.org/help/user/"</tt></dt> +<dd><p>This is the URL for the MathJax Help menu item. When the user +selects that item, the browser opens a new window with this URL.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">showRenderer: true</tt></dt> +<dd><p>This controls whether the “Math Renderer” item will be displayed in +the the “Settings” submenu of the mathematics contextual menu. It +allows the user to change between the <cite>HTML-CSS</cite> and <cite>NativeMML</cite> +output processors for the mathematics on the page. Set to +<tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">showContext: false</tt></dt> +<dd><p>This controls whether the “Contextual Menu” item will be displayed +in the the “Settings” submenu of the mathematics contextual menu. +It allows the user to decide whether the MathJax menu or the +browser’s default contextual manu will be shown when the context +menu click occurs over mathematics typeset by MathJax. (The main +reason to allow pass-through to the browser’s menu is to gain +access to the MathPlayer contextual menu when the NativeMML output +processor is used in Internet Explorer with the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer plugin</a>.) Set to +<tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">showFontMenu: false</tt></dt> +<dd><p>This controls whether the “Font Preference” item will be displayed +in the the “Settings” submenu of the mathematics contextual menu. +This submenu lets the user select what font to use in the +mathematics produced by the <cite>HTML-CSS</cite> output processor. Note that +changing the selection in the font menu will cause the page to +reload. Set to <tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">windowSettings: { ... }</tt></dt> +<dd><p>These are the settings for the <tt class="docutils literal"><span class="pre">window.open()</span></tt> call that +creates the <cite>Show Source</cite> window. The initial width and height +will be reset after the source is shown in an attempt to make the +window fit the output better.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">styles: {}</tt></dt> +<dd><p>This is a list of CSS declarations for styling the menu +components. See the definitions in <tt class="docutils literal"><span class="pre">extensions/MathMenu.js</span></tt> for +details of what are defined by default. See <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS Style +Objects</em></a> for details on how to specify CSS +style in a JavaScript object.</p> +</dd></dl> + +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="MMLorHTML.html" + title="previous chapter">The MMLorHTML configuration options</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="MathZoom.html" + title="next chapter">The MathZoom extension</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/options/MathMenu.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="MathZoom.html" title="The MathZoom extension" + >next</a> |</li> + <li class="right" > + <a href="MMLorHTML.html" title="The MMLorHTML configuration options" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/options/MathZoom.html b/docs/html/options/MathZoom.html @@ -0,0 +1,150 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathZoom extension — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> + <link rel="next" title="The FontWarnings extension" href="FontWarnings.html" /> + <link rel="prev" title="The MathMenu extension" href="MathMenu.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="FontWarnings.html" title="The FontWarnings extension" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="MathMenu.html" title="The MathMenu extension" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathzoom-extension"> +<span id="configure-mathzoom"></span><h1>The MathZoom extension<a class="headerlink" href="#the-mathzoom-extension" title="Permalink to this headline">¶</a></h1> +<p>The options below control the operation of the Math-Zoom feature that +allows users to see an enlarged version of the mathematics when they +click or hover over typeset mathematics. They are listed with their +default values. To set any of these options, include a <tt class="docutils literal"><span class="pre">MathZoom</span></tt> +section in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">MathZoom</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">delay</span><span class="o">:</span> <span class="mi">600</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>would set the <tt class="docutils literal"><span class="pre">delay</span></tt> option to 600 milliseconds.</p> +<p>Mathematics is zoomed when the user “triggers” the zoom by an action, +either clicking on the mathematics, double-clicking on it, or holding +the mouse still over it (i.e., “hovering”). Which trigger is used is +set by the user via the math contextual menu (or by the author using +the <tt class="docutils literal"><span class="pre">menuSettings</span></tt> configuration section).</p> +<dl class="describe"> +<dt> +<tt class="descname">delay: 400</tt></dt> +<dd><p>This the time (in milliseconds) that the mouse must be still over a +typeset mathematical formula before the zoomed version is displayed +(when the zoom trigger is set to <cite>Hover</cite>).</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">styles: {}</tt></dt> +<dd><p>This is a list of CSS declarations for styling the zoomed +mathematics. See the definitions in <tt class="docutils literal"><span class="pre">extensions/MathZoom.js</span></tt> +for details of what are defined by default. See <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS Style +Objects</em></a> for details on how to specify CSS +style in a JavaScript object.</p> +</dd></dl> + +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="MathMenu.html" + title="previous chapter">The MathMenu extension</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="FontWarnings.html" + title="next chapter">The FontWarnings extension</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/options/MathZoom.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="FontWarnings.html" title="The FontWarnings extension" + >next</a> |</li> + <li class="right" > + <a href="MathMenu.html" title="The MathMenu extension" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/options/NativeMML.html b/docs/html/options/NativeMML.html @@ -0,0 +1,174 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The NativeMML output processor — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> + <link rel="next" title="The MMLorHTML configuration options" href="MMLorHTML.html" /> + <link rel="prev" title="The HTML-CSS output processor" href="HTML-CSS.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="MMLorHTML.html" title="The MMLorHTML configuration options" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="HTML-CSS.html" title="The HTML-CSS output processor" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-nativemml-output-processor"> +<span id="configure-nativemml"></span><h1>The NativeMML output processor<a class="headerlink" href="#the-nativemml-output-processor" title="Permalink to this headline">¶</a></h1> +<p>The options below control the operation of the NativeMML output +processor that is run when you include <tt class="docutils literal"><span class="pre">"output/NativeMML"</span></tt> in the +<cite>jax</cite> array of your configuration. They are listed with their default +values. To set any of these options, include a <tt class="docutils literal"><span class="pre">NativeMML</span></tt> section +in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">NativeMML</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">scale</span><span class="o">:</span> <span class="mi">105</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>would set the <tt class="docutils literal"><span class="pre">sale</span></tt> option to 105 percent.</p> +<dl class="describe"> +<dt> +<tt class="descname">scale: 100</tt></dt> +<dd><p>The scaling factor (as a percentage) of math with respect to the +surrounding text. Since the <cite>NativeMML</cite> output relies on the +browser’s natiove MathML support, MathJax does not control the +font size used in the mathematics. You may need to set this value +to compensate for the size selected by the browser. The user can +also adjust this value using the contextual menu item associated +with the typeset mathematics.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">showMathMath: true</tt></dt> +<dd><p>This controls whether the MathJax contextual menu will be +available on the mathematics in the page. If true, then +right-clicking (on the PC) or control-clicking (on the Mac) will +produce a MathJax menu that allows you to get the source of the +mathematics in various formats, change the size of the mathematics +relative to the surrounding text, get information about +MathJax, and configure other MathJax settings.</p> +<p>Set this to <tt class="docutils literal"><span class="pre">false</span></tt> to disable the menu. When <tt class="docutils literal"><span class="pre">true</span></tt>, the +<tt class="docutils literal"><span class="pre">MathMenu</span></tt> configuration block determines the operation of the +menu. See <a class="reference internal" href="MathMenu.html#configure-mathmenu"><em>the MathMenu options</em></a> for +more details.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">showMathMenuMSIE: true</tt></dt> +<dd><p>There is a separate menu setting for MSIE since the code to handle +that is a bit delicate; if it turns out to have unexpected +consequences, you can turn it off without turing off other the +menu support in other browsers.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">styles: {}</tt></dt> +<dd><p>This is a list of CSS declarations for styling the HTML-CSS +output. See the definitions in <tt class="docutils literal"><span class="pre">jax/output/NativeMML/config.js</span></tt> +for some examples of what are defined by default. See <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS +Style Objects</em></a> for details on how to specify +CSS style in a JavaScript object.</p> +</dd></dl> + +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="HTML-CSS.html" + title="previous chapter">The HTML-CSS output processor</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="MMLorHTML.html" + title="next chapter">The MMLorHTML configuration options</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/options/NativeMML.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="MMLorHTML.html" title="The MMLorHTML configuration options" + >next</a> |</li> + <li class="right" > + <a href="HTML-CSS.html" title="The HTML-CSS output processor" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/options/TeX.html b/docs/html/options/TeX.html @@ -0,0 +1,178 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The TeX input processor — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> + <link rel="next" title="The MathML input processor" href="MathML.html" /> + <link rel="prev" title="The jsMath2jax Preprocessor" href="jsMath2jax.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="MathML.html" title="The MathML input processor" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="jsMath2jax.html" title="The jsMath2jax Preprocessor" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-tex-input-processor"> +<span id="configure-tex"></span><h1>The TeX input processor<a class="headerlink" href="#the-tex-input-processor" title="Permalink to this headline">¶</a></h1> +<p>The options below control the operation of the TeX input processor +that is run when you include <tt class="docutils literal"><span class="pre">"input/TeX"</span></tt> in the <cite>jax</cite> array of +your configuration. They are listed with their default values. To +set any of these options, include a <tt class="docutils literal"><span class="pre">TeX</span></tt> section in your +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">Macros</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">RR</span><span class="o">:</span> <span class="s1">'{\\bf R}'</span><span class="p">,</span> + <span class="nx">bold</span><span class="o">:</span> <span class="p">[</span><span class="s1">'{\\bf #1}'</span><span class="p">,</span> <span class="mi">1</span><span class="p">]</span> + <span class="p">}</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>would set the <tt class="docutils literal"><span class="pre">Macros</span></tt> configuration option to cause two new macros +to be defined within the TeX input processor.</p> +<dl class="describe"> +<dt> +<tt class="descname">TagSide: "right"</tt></dt> +<dd><p>This specifies the side on which <tt class="docutils literal"><span class="pre">\tag{}</span></tt> macros will place the +tags. Set it to <tt class="docutils literal"><span class="pre">"left"</span></tt> to place the tags on the left-hand side.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">TagIndent: ".8em"</tt></dt> +<dd><p>This is the amount of indentation (from the right or left) for the +tags produced by the <tt class="docutils literal"><span class="pre">\tag{}</span></tt> macro.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">MultLineWidth: "85%"</tt></dt> +<dd><p>The width to use for the <cite>multline</cite> environment that is part of +the <tt class="docutils literal"><span class="pre">AMSmath</span></tt> extension. This width gives room for tags at +either side of the equation, but if you are displaying mathematics +in a small area or a thin column of text, you might need to change +the value to leave sufficient margin for tags.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">Macros: {}</tt></dt> +<dd><p>This lists macros to define before the TeX input processor begins. +These are name:value pairs where the <cite>name</cite> gives the name of the TeX +macro to be defined, and <cite>value</cite> gives the replacement text for the +macro. The <cite>value</cite> canbe an array of the form <cite>[value,n]</cite>, where +<cite>value</cite> is the replacement text and <cite>n</cite> is the number of parameters +for the macro. Note that since the <cite>value</cite> is a javascript string, +backslashes in the replacement text must be doubled to prevent them +from acting as javascript escape characters.</p> +<p>For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">Macros</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">RR</span><span class="o">:</span> <span class="s1">'{\\bf R}'</span><span class="p">,</span> + <span class="nx">bold</span><span class="o">:</span> <span class="p">[</span><span class="s1">'{\\bf #1}'</span><span class="p">,</span> <span class="mi">1</span><span class="p">]</span> +<span class="p">}</span> +</pre></div> +</div> +<p>would ask the TeX processor to define two new macros: <tt class="docutils literal"><span class="pre">\RR</span></tt>, +which produces a bold-face “R”, and <tt class="docutils literal"><span class="pre">\bold{...}</span></tt>, which takes one +parameter and set it in the bold-face font.</p> +</dd></dl> + +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="jsMath2jax.html" + title="previous chapter">The jsMath2jax Preprocessor</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="MathML.html" + title="next chapter">The MathML input processor</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/options/TeX.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="MathML.html" title="The MathML input processor" + >next</a> |</li> + <li class="right" > + <a href="jsMath2jax.html" title="The jsMath2jax Preprocessor" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/options/hub.html b/docs/html/options/hub.html @@ -0,0 +1,345 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The Core Configuration Options — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> + <link rel="next" title="The tex2jax Preprocessor" href="tex2jax.html" /> + <link rel="prev" title="Loading and Configuring MathJax" href="../configuration.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="tex2jax.html" title="The tex2jax Preprocessor" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="../configuration.html" title="Loading and Configuring MathJax" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-core-configuration-options"> +<span id="configure-hub"></span><h1>The Core Configuration Options<a class="headerlink" href="#the-core-configuration-options" title="Permalink to this headline">¶</a></h1> +<p>The options below control the MathJax Hub, and so determine the code +behavior of MathJax. They are given with their default values.</p> +<dl class="describe"> +<dt> +<tt class="descname">jax: ["input/TeX","output/HTML-CSS"]</tt></dt> +<dd><p>A comma-separated list of input and output jax to initialize at +startup. Their main code is loaded only when they are actually +used, so it is not inefficient to include jax that may not +actually be used on the page. These are found in the <tt class="docutils literal"><span class="pre">MathJax/jax</span></tt> +directory.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">extensions: []</tt></dt> +<dd><p>A comma-separated list of extensions to load at startup. The +default directory is <tt class="docutils literal"><span class="pre">MathJax/extensions</span></tt>. The <tt class="docutils literal"><span class="pre">tex2jax</span></tt> and +<tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessors can be listed here, as well as a number +of TeX-specific extensions (see the <a class="reference internal" href="../start.html#tex-and-latex-input"><em>TeX and LaTeX input</em></a> section of the <a class="reference internal" href="../start.html#getting-started"><em>Getting Started</em></a> document for more details). There is also a +<tt class="docutils literal"><span class="pre">FontWarnings</span></tt> extension that you can use to inform your user +that mathematics fonts are available that they can download to +improve their experience of your site.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">config: []</tt></dt> +<dd><p>A comma-separated list of configuration files to load when MathJax +starts up, e.g., to define local macros, etc., and there is a +sample config file named <tt class="docutils literal"><span class="pre">config/local/local.js</span></tt>. The default +directory is the <cite>MathJax/config</cite> directory. The <tt class="docutils literal"><span class="pre">MMLorHTML.js</span></tt> +configuration is the only other predefined configuration file.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">styleSheets: []</tt></dt> +<dd><p>A comma-separated list of CSS stylesheet files to be loaded when +MathJax starts up. The default directory is the <cite>MathJax/config</cite> +directory.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">styles: {}</tt></dt> +<dd><p>CSS <cite>selector: rules;</cite> styles to be defined dynamically at startup +time.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">preJax: null and postJax: null</tt></dt> +<dd><p>Patterns to remove from before and after math script tags. If you +are not using one of the preprocessors, you need to insert +something extra into your HTML file in order to avoid a bug in +Internet Explorer. IE removes spaces from the DOM that it thinks +are redundent, and since a <tt class="docutils literal"><span class="pre"><script></span></tt> tag usually doesn’t add +content to the page, if there is a space before and after a +MathJax <tt class="docutils literal"><span class="pre"><script></span></tt> tag, IE will remove the first space. When +MathJax inserts the typeset mathematics, this means there will be +no space before it and the preceeding text. In order to avoid +this, you should include some “guard characters” before or after +the math SCRIPT tag; define the patterns you want to use below. +Note that these are used as regular expressions, so you will need +to quote special characters. Furthermore, since they are +javascript strings, you must quote javascript special characters +as well. So to obtain a backslash, you must use <tt class="docutils literal"><span class="pre">\\</span></tt> (doubled +for javascript). For example, <tt class="docutils literal"><span class="pre">"\\["</span></tt> represents the pattern +<tt class="docutils literal"><span class="pre">\[</span></tt> in the regular expression. That means that if you want an +actual backslash in your guard characters, you need to use +<tt class="docutils literal"><span class="pre">"\\\\"</span></tt> in order to get <tt class="docutils literal"><span class="pre">\\</span></tt> in the regular expression, and +<tt class="docutils literal"><span class="pre">\</span></tt> in the actual text. If both preJax and postJax are defined, +both must be present in order to be removed.</p> +<p>See also the <tt class="docutils literal"><span class="pre">preRemoveClass</span></tt> comments below.</p> +<p>Examples:</p> +<blockquote> +<div><p><tt class="docutils literal"><span class="pre">preJax:</span> <span class="pre">"\\\\\\\\\"</span></tt> makes a double backslash the preJax text</p> +<p><tt class="docutils literal"><span class="pre">preJax:</span> <span class="pre">"\\[\\[",</span> <span class="pre">postJax:</span> <span class="pre">"\\]\\]"</span></tt> makes it so jax +scripts must be enclosed in double brackets.</p> +</div></blockquote> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">preRemoveClass: "MathJax_Preview"</tt></dt> +<dd><p>The CSS class for a math preview to be removed preceeding a +MathJax SCRIPT tag. If the tag just before the MathJax +<tt class="docutils literal"><span class="pre"><script></span></tt> tag is of this class, its contents are removed when +MathJax processes the <tt class="docutils literal"><span class="pre"><script></span></tt> tag. This allows you to +include a math preview in a form that will be displayed prior to +MathJax performing its typesetting. It also avoids the Internet +Explorer space-removal bug, and can be used in place of <tt class="docutils literal"><span class="pre">preJax</span></tt> +and <tt class="docutils literal"><span class="pre">postJax</span></tt> if that is more convenient.</p> +<p>For example</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><span</span> <span class="na">class=</span><span class="s">"MathJax_Preview"</span><span class="nt">></span>[math]<span class="nt"></span><script </span><span class="na">type=</span><span class="s">"math/tex"</span><span class="nt">></span><span class="p">...</span><span class="nt"></script></span> +</pre></div> +</div> +<p>would display “[math]” in place of the math until MathJax is able +to typeset it.</p> +<p>See also the <tt class="docutils literal"><span class="pre">preJax</span></tt> and <tt class="docutils literal"><span class="pre">postJax</span></tt> comments above.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">showProcessingMessages: true</tt></dt> +<dd><p>This value controls whether the <cite>Processing Math: nn%</cite> message are +displayed in the lower left-hand corner. Set to <tt class="docutils literal"><span class="pre">false</span></tt> to +prevent those messages (though file loading and other messages +will still be shown).</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">messageStyle: "normal"</tt></dt> +<dd><p>This value controls the verbosity of the messages in the lower +left-hand corner. Set it to <tt class="docutils literal"><span class="pre">"none"</span></tt> to eliminate all messages, +or set it to <tt class="docutils literal"><span class="pre">"simple"</span></tt> to show “Loading...” and “Processing...” +rather than showing the full file name or the percentage of the +mathematics processed.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">displayAlign: "center" and displayIndent: "0em"</tt></dt> +<dd><p>These two parameters control the alignment and shifting of +displayed equations. The first can be <tt class="docutils literal"><span class="pre">"left"</span></tt>, <tt class="docutils literal"><span class="pre">"center"</span></tt>, +or <tt class="docutils literal"><span class="pre">"right"</span></tt>, and determines the alignment of displayed +equations. When the alignment is not <tt class="docutils literal"><span class="pre">"center"</span></tt>, the second +determines an indentation from the left or right side for the +displayed equations.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">delayStartupUntil: "none"</tt></dt> +<dd><p>Normally MathJax will perform its starup commands (loading of +configuration, styles, jax, and so on) as soon as it can. If you +expect to be doing additional configuration on the page, however, +you may want to have it wait until the page’s onload hander is +called. If so, set this to <tt class="docutils literal"><span class="pre">"onload"</span></tt>.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">skipStartupTypeset: false</tt></dt> +<dd><p>Normally MathJax will typeset the mathematics on the page as soon +as the page is loaded. If you want to delay that process, in +which case you will need to call <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> +yourself by hand, set this value to <tt class="docutils literal"><span class="pre">true</span></tt>.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">menuSettings: { ... }</tt></dt> +<dd><p>This block contains settings for the mathematics contextual menu +that act as the defaults for the user’s settings in that menu. +The possible values are:</p> +<dl class="describe"> +<dt> +<tt class="descname">zoom: "none"</tt></dt> +<dd><p>This indicates when typeset mathematics should be zoomed. It +can be set to <tt class="docutils literal"><span class="pre">"None"</span></tt>, <tt class="docutils literal"><span class="pre">"Hover"</span></tt>, <tt class="docutils literal"><span class="pre">"Click"</span></tt>, or +<tt class="docutils literal"><span class="pre">"Double-Click"</span></tt> to set the zoom trigger.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">CTRL: false, ALT: false, CMD: false, Shift: false</tt></dt> +<dd><p>These values indicate which keys must be pressed in order for +math zoom to be triggered. For example, if <tt class="docutils literal"><span class="pre">CTRL</span></tt> is set to +<tt class="docutils literal"><span class="pre">true</span></tt> and <tt class="docutils literal"><span class="pre">zoom</span></tt> is <tt class="docutils literal"><span class="pre">"Click"</span></tt>, then math will be zoomed +only when the user control-clicks on mathematics (i.e., clicks +while holding down the <cite>CTRL</cite> key). If more than one is +<tt class="docutils literal"><span class="pre">true</span></tt>, then all the indicated keys must be pressed for the +zoom to occur.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">zscale: "200%"</tt></dt> +<dd><p>This is the zoom scaling factor, and it can be set to any of +the values available in the <cite>Zoom Factor</cite> menu of the +<cite>Settings</cite> submenu of the contextual menu.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">context: "MathJax"</tt></dt> +<dd><p>This controls what contextual menu will be presented when a +right click (on a PC) or CTRL-click (on the Mac) occurs over a +typeset equation. When set to <tt class="docutils literal"><span class="pre">"MathJax"</span></tt>, the MathJax +contextual menu will appear; when set to <tt class="docutils literal"><span class="pre">"Browser"</span></tt>, the +browser’s contextual menu will be used. For example, in +Internet Explorer with the MathPlayer plugin, if this is set +to <tt class="docutils literal"><span class="pre">"Browser"</span></tt>, you will get the MathPlayer contextual menu +rather than the MathJax menu.</p> +</dd></dl> + +<p>There are also settings for <tt class="docutils literal"><span class="pre">format</span></tt>, <tt class="docutils literal"><span class="pre">renderer</span></tt>, and <tt class="docutils literal"><span class="pre">font</span></tt>, +but these are maintained by MathJax and should not be set by the +page author.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">errorSettings: { ... }</tt></dt> +<dd><p>This block contains settings that control how MathJax responds to +unexpected errors while processing mathematical equations. Rather +than simply crash, MathJax can report an error and go on. The +options you can set include:</p> +<dl class="describe"> +<dt> +<tt class="descname">message: ["[Math Processing Error"]]</tt></dt> +<dd><p>This is an HTML snippet that will be inserted at the location +of the mathematics for any formula that causes MathJax to +produce an internal error (i.e., an error in the MathJax code +itself). See the <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>description of HTML snippets</em></a> for details on how to represent HTML code in +this way.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">style: {color:"#CC0000", "font-style":"italic"}</tt></dt> +<dd><p>This is the CSS style description to use for the error +messages produced by internal MathJax errors. See the section +on <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS style objects</em></a> for details on +how these are specified in JavaScript.</p> +</dd></dl> + +</dd></dl> + +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="../configuration.html" + title="previous chapter">Loading and Configuring MathJax</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="tex2jax.html" + title="next chapter">The tex2jax Preprocessor</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/options/hub.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="tex2jax.html" title="The tex2jax Preprocessor" + >next</a> |</li> + <li class="right" > + <a href="../configuration.html" title="Loading and Configuring MathJax" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/options/jsMath2jax.html b/docs/html/options/jsMath2jax.html @@ -0,0 +1,157 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The jsMath2jax Preprocessor — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> + <link rel="next" title="The TeX input processor" href="TeX.html" /> + <link rel="prev" title="The mml2jax Preprocessor" href="mml2jax.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="TeX.html" title="The TeX input processor" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="mml2jax.html" title="The mml2jax Preprocessor" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-jsmath2jax-preprocessor"> +<span id="configure-jsmath2jax"></span><h1>The jsMath2jax Preprocessor<a class="headerlink" href="#the-jsmath2jax-preprocessor" title="Permalink to this headline">¶</a></h1> +<p>The options below control the operation of the <cite>jsMath2jax</cite> +preprocessor that is run when you include <tt class="docutils literal"><span class="pre">"jsMath2jax.js"</span></tt> in the +<cite>extensions</cite> array of your configuration. They are listed with their +default values. To set any of these options, include a <tt class="docutils literal"><span class="pre">jsMath2jax</span></tt> +section in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">jsMath2jax</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">preview</span><span class="o">:</span> <span class="s2">"none"</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>would set the <tt class="docutils literal"><span class="pre">preview</span></tt> parameter to <tt class="docutils literal"><span class="pre">"none"</span></tt>.</p> +<dl class="describe"> +<dt> +<tt class="descname">element: null</tt></dt> +<dd><p>The id name of the element that should be processed by <cite>jsMath2jax</cite>. +The default is the whole document.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">preview: "TeX"</tt></dt> +<dd><p>This controls whether <cite>jsMath2jax</cite> inserts <tt class="docutils literal"><span class="pre">MathJax_Preview</span></tt> spans +to make a preview available, and what preview to use, when it +locates in-line or display mathematics in the page. The default +is <tt class="docutils literal"><span class="pre">"TeX"</span></tt>, which means use the TeX code as the preview (which +will be visible until it is processed by MathJax). Set to +<tt class="docutils literal"><span class="pre">"none"</span></tt> to prevent previews from being inserted (the math +will simply disappear until it is typeset). Set to an array +containing the description of an HTML snippet in order to use the +same preview for all equations on the page.</p> +<p>Examples:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">preview</span><span class="o">:</span> <span class="p">[</span><span class="s2">"[math]"</span><span class="p">],</span> <span class="c1">// insert the text "[math]" as the preview</span> +</pre></div> +</div> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">preview</span><span class="o">:</span> <span class="p">[[</span><span class="s2">"img"</span><span class="p">,{</span><span class="nx">src</span><span class="o">:</span> <span class="s2">"/images/mypic.jpg"</span><span class="p">}]],</span> <span class="c1">// insert an image as the preview</span> +</pre></div> +</div> +<p>See the <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>description of HTML snippets</em></a> for +details on how to represent HTML code in this way.</p> +</dd></dl> + +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="mml2jax.html" + title="previous chapter">The mml2jax Preprocessor</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="TeX.html" + title="next chapter">The TeX input processor</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/options/jsMath2jax.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="TeX.html" title="The TeX input processor" + >next</a> |</li> + <li class="right" > + <a href="mml2jax.html" title="The mml2jax Preprocessor" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/options/mml2jax.html b/docs/html/options/mml2jax.html @@ -0,0 +1,157 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The mml2jax Preprocessor — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> + <link rel="next" title="The jsMath2jax Preprocessor" href="jsMath2jax.html" /> + <link rel="prev" title="The tex2jax Preprocessor" href="tex2jax.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="jsMath2jax.html" title="The jsMath2jax Preprocessor" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="tex2jax.html" title="The tex2jax Preprocessor" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mml2jax-preprocessor"> +<span id="configure-mml2jax"></span><h1>The mml2jax Preprocessor<a class="headerlink" href="#the-mml2jax-preprocessor" title="Permalink to this headline">¶</a></h1> +<p>The options below control the operation of the <cite>mml2jax</cite> preprocessor +that is run when you include <tt class="docutils literal"><span class="pre">"mml2jax.js"</span></tt> in the <cite>extensions</cite> array +of your configuration. They are listed with their default values. To +set any of these options, include a <tt class="docutils literal"><span class="pre">mml2jax</span></tt> section in your +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">mml2jax</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">preview</span><span class="o">:</span> <span class="s2">"none"</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>would set the <tt class="docutils literal"><span class="pre">preview</span></tt> parameter to <tt class="docutils literal"><span class="pre">"none"</span></tt>.</p> +<dl class="describe"> +<dt> +<tt class="descname">element: null</tt></dt> +<dd><p>The id name of the element that should be processed by <cite>mml2jax</cite>. +The default is the whole document.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">preview: "alttext"</tt></dt> +<dd><p>This controls whether <cite>mml2jax</cite> inserts <tt class="docutils literal"><span class="pre">MathJax_Preview</span></tt> spans +to make a preview available, and what preview to use, when it +locates mathematics on the page. The default is <tt class="docutils literal"><span class="pre">"alttext"</span></tt>, +which means use the <tt class="docutils literal"><span class="pre"><math></span></tt> tag’s <tt class="docutils literal"><span class="pre">alttext</span></tt> attribute as the +preview (visible until it is processed by MathJax), if the tag has +one. Set it to <tt class="docutils literal"><span class="pre">"none"</span></tt> to prevent the previews from being +inserted (the math will simply disappear until it is typeset). +Set it to an array containing the description of an HTML snippet +in order to use the same preview for all equations on the page.</p> +<p>Examples:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">preview</span><span class="o">:</span> <span class="p">[</span><span class="s2">"[math]"</span><span class="p">],</span> <span class="c1">// insert the text "[math]" as the preview</span> +</pre></div> +</div> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">preview</span><span class="o">:</span> <span class="p">[[</span><span class="s2">"img"</span><span class="p">,{</span><span class="nx">src</span><span class="o">:</span> <span class="s2">"/images/mypic.jpg"</span><span class="p">}]],</span> <span class="c1">// insert an image as the preview</span> +</pre></div> +</div> +<p>See the <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>description of HTML snippets</em></a> for +details on how to represent HTML code in this way.</p> +</dd></dl> + +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="tex2jax.html" + title="previous chapter">The tex2jax Preprocessor</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="jsMath2jax.html" + title="next chapter">The jsMath2jax Preprocessor</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/options/mml2jax.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="jsMath2jax.html" title="The jsMath2jax Preprocessor" + >next</a> |</li> + <li class="right" > + <a href="tex2jax.html" title="The tex2jax Preprocessor" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/options/tex2jax.html b/docs/html/options/tex2jax.html @@ -0,0 +1,252 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The tex2jax Preprocessor — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" /> + <link rel="next" title="The mml2jax Preprocessor" href="mml2jax.html" /> + <link rel="prev" title="The Core Configuration Options" href="hub.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="mml2jax.html" title="The mml2jax Preprocessor" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="hub.html" title="The Core Configuration Options" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-tex2jax-preprocessor"> +<span id="configure-tex2jax"></span><h1>The tex2jax Preprocessor<a class="headerlink" href="#the-tex2jax-preprocessor" title="Permalink to this headline">¶</a></h1> +<p>The options below control the operation of the <cite>tex2jax</cite> preprocessor +that is run when you include <tt class="docutils literal"><span class="pre">"tex2jax.js"</span></tt> in the <cite>extensions</cite> array +of your configuration. They are listed with their default values. To +set any of these options, include a <tt class="docutils literal"><span class="pre">tex2jax</span></tt> section in your +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s1">'\\('</span><span class="p">,</span><span class="s1">'\\)'</span><span class="p">]</span> <span class="p">]</span> + <span class="p">}</span> +<span class="p">});</span> +</pre></div> +</div> +<p>would set the <tt class="docutils literal"><span class="pre">inlineMath</span></tt> delimiters for the <cite>tex2jax</cite> +preprocessor.</p> +<dl class="describe"> +<dt> +<tt class="descname">element: null</tt></dt> +<dd><p>The id name of the element that should be processed by <cite>tex2jax</cite>. +The default is the whole document.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">inlineMath: [['\(','\)']]</tt></dt> +<dd><p>Array of pairs of strings that are to be used as in-line math +delimters. The first in each pair is the initial delimiter and +the second is the terminal delimiter. You can have as many pairs +as you want. For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s1">'\\('</span><span class="p">,</span><span class="s1">'\\)'</span><span class="p">]</span> <span class="p">]</span> +</pre></div> +</div> +<p>would cause <cite>tex2jax</cite> to look for <tt class="docutils literal"><span class="pre">$...$</span></tt> and <tt class="docutils literal"><span class="pre">\(...\)</span></tt> as +delimiters for inline mathematics. (Note that the single dollar +signs are not enabled by default because they are used too +frequently in normal text, so if you want to use them for math +delimiters, you must specify them explicitly.)</p> +<p>Note that the delimiters can’t look like HTML tags (i.e., can’t +include the less-than sign), as these would be turned into tags by +the browser before MathJax has the chance to run. You can only +include text, not tags, as your math delimiters.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">displayMath: [ ['$$','$$'], ['\[','\]'] ]</tt></dt> +<dd><p>Array of pairs of strings that are to be used as delimters for +displayed equations. The first in each pair is the initial +delimiter and the second is the terminal delimiter. You can have +as many pairs as you want.</p> +<p>Note that the delimiters can’t look like HTML tags (i.e., can’t +include the less-than sign), as these would be turned into tags by +the browser before MathJax has the chance to run. You can only +include text, not tags, as your math delimiters.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">processEscapes: false</tt></dt> +<dd><p>When set to <tt class="docutils literal"><span class="pre">true</span></tt>, you may use <tt class="docutils literal"><span class="pre">\$</span></tt> to represent a literal +dollar sign, rather than using it as a math delimiter. When +<tt class="docutils literal"><span class="pre">false</span></tt>, <tt class="docutils literal"><span class="pre">\$</span></tt> will not be altered, and the dollar sign may be +considered part of a math delimiter. Typically this is set to +<tt class="docutils literal"><span class="pre">true</span></tt> if you enable the <tt class="docutils literal"><span class="pre">$</span> <span class="pre">...</span> <span class="pre">$</span></tt> in-line delimiters, so you +can type <tt class="docutils literal"><span class="pre">\$</span></tt> and <cite>tex2jax</cite> will convert it to a regular dollar +sign in the rendered document.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">processEnvironments: true</tt></dt> +<dd><p>When <tt class="docutils literal"><span class="pre">true</span></tt>, <cite>tex2jax</cite> looks not only for the in-line and +display math delimters, but also for LaTeX environments +(<tt class="docutils literal"><span class="pre">\begin{something}...\end{something}</span></tt>) and marks them for +processing by MathJax. When <tt class="docutils literal"><span class="pre">false</span></tt>, LaTeX environments will +not be processed outside of math mode.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">preview: "TeX"</tt></dt> +<dd><p>This controls whether <cite>tex2jax</cite> inserts <tt class="docutils literal"><span class="pre">MathJax_Preview</span></tt> spans +to make a preview available, and what preview to use, when it +locates in-line or display mathematics in the page. The default +is <tt class="docutils literal"><span class="pre">"TeX"</span></tt>, which means use the TeX code as the preview (which +will be visible until it is processed by MathJax). Set to +<tt class="docutils literal"><span class="pre">"none"</span></tt> to prevent previews from being inserted (the math +will simply disappear until it is typeset). Set to an array +containing the description of an HTML snippet in order to use the +same preview for all equations on the page.</p> +<p>Examples:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">preview</span><span class="o">:</span> <span class="p">[</span><span class="s2">"[math]"</span><span class="p">],</span> <span class="c1">// insert the text "[math]" as the preview</span> +</pre></div> +</div> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">preview</span><span class="o">:</span> <span class="p">[[</span><span class="s2">"img"</span><span class="p">,{</span><span class="nx">src</span><span class="o">:</span> <span class="s2">"/images/mypic.jpg"</span><span class="p">}]],</span> <span class="c1">// insert an image as the preview</span> +</pre></div> +</div> +<p>See the <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>description of HTML snippets</em></a> for +details on how to represent HTML code in this way.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">skipTags: ["script","noscript","style","textarea","pre","code"]</tt></dt> +<dd><p>This array lists the names of the tags whose contents should not +be processed by <cite>tex2jax</cite> (other than to look for ignore/process +classes as listed below). You can add to (or remove from) this +list to prevent MathJax from processing mathematics in specific +contexts.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">ignoreClass: "tex2jax_ignore"</tt></dt> +<dd><p>This is the class name used to mark elements whose contents should +not be processed by tex2jax (other than to look for the +<tt class="docutils literal"><span class="pre">processClass</span></tt> pattern below). Note that this is a regular +expression, and so you need to be sure to quote any <cite>regexp</cite> +special characters. The pattern is automatically preceeded by +<tt class="docutils literal"><span class="pre">'(^|</span> <span class="pre">)('</span></tt> and followed by <tt class="docutils literal"><span class="pre">')(</span> <span class="pre">|$)'</span></tt>, so your pattern will +have to match full words in the class name. Assigning an element +this class name will prevent <cite>tex2jax</cite> from processing its +contents.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">processClass: "tex2jax_process"</tt></dt> +<dd><p>This is the class name used to mark elements whose contents +<em>should</em> be processed by <cite>tex2jax</cite>. This is used to turn on +processing within tags that have been marked as ignored or skipped +above. Note that this is a regular expression, and so you need to +be sure to quote any <cite>regexp</cite> special characters. The pattern is +automatically preceeded by <tt class="docutils literal"><span class="pre">'(^|</span> <span class="pre">)('</span></tt> and followed by <tt class="docutils literal"><span class="pre">')(</span> +<span class="pre">|$)'</span></tt>, so your pattern will have to match full words in the class +name. Use this to restart processing within an element that has +been marked as ignored above.</p> +</dd></dl> + +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="hub.html" + title="previous chapter">The Core Configuration Options</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="mml2jax.html" + title="next chapter">The mml2jax Preprocessor</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/options/tex2jax.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="mml2jax.html" title="The mml2jax Preprocessor" + >next</a> |</li> + <li class="right" > + <a href="hub.html" title="The Core Configuration Options" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/output.html b/docs/html/output.html @@ -0,0 +1,221 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>MathJax Output Formats — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="The MathJax Community" href="community.html" /> + <link rel="prev" title="MathJax MathML Support" href="mathml.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="community.html" title="The MathJax Community" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="mathml.html" title="MathJax MathML Support" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="mathjax-output-formats"> +<span id="output-formats"></span><h1>MathJax Output Formats<a class="headerlink" href="#mathjax-output-formats" title="Permalink to this headline">¶</a></h1> +<p>Currently, MathJax can render math in two ways:</p> +<ul class="simple"> +<li>Using HTML-with-CSS to lay out the mathematics, or</li> +<li>Using a browser’s native MathML support.</li> +</ul> +<p>These are implemented by the <cite>HTML-CSS</cite> and <cite>NativeMML</cite> output +processors. You select which one you want to use by including either +<tt class="docutils literal"><span class="pre">"output/HTML-CSS"</span></tt> or <tt class="docutils literal"><span class="pre">"output/NativeMML"</span></tt> in the <cite>jax</cite> array of +your MathJax configuration. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">]</span> +</pre></div> +</div> +<p>would specify TeX input and HTML-with-CSS output for the mathematics +in your document.</p> +<p>The HTML-CSS output processor produces high-quality output in all +major browsers, with results that are consistent across browsers and +operating systems. This is MathJax’s primary output mode. It’s major +advantage is its quality and consistency; it’s drawback is that it is +slower that the NativeMML mode at rendering the mathematics. (The +HTML-CSS processor has not yet been optimized for speed, so you can +expect some improvement in the future. Note that IE8 in “IE8 +standards mode” is an order of magnitude slower than any other browser +when processing math through the HTML-CSS output processor; see +<a class="reference internal" href="#html-css-with-ie8"><em>HTML-CSS with IE8</em></a> below for some strategies +to deal with this.)</p> +<p>The NativeMML output processor uses the browser’s internal MathML support (if +any) to render the mathematics. Currently, Firefox has native support +for MathML, and IE has the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer plugin</a> for rendering +MathML. Opera has some built-in support for MathML that works well +with simple equations, but fails with more complex formulas, so we +don’t recommend using the NativeMML output processor with Opera. Safari, +Chrome, Konqueror, and most other browsers don’t support MathML +natively.</p> +<p>The advantage of the NativeMML output Processor is its speed, since +native MathML support is much faster than using complicated HTML and +CSS to lay out mathematics via an interpreted language like JavaScript +(as the HTML-CSS output processor does). The disadvantage is that you +are dependent on the browser’s MathML implementation for your +rendering, and these vary in quality of output and completeness of +implementation. MathJax may rely on features that are not available +in some renderers (for example, Firefox’s MathML support does not +implement some of the named widths, such as +<tt class="docutils literal"><span class="pre">negativethinmathspace</span></tt>). The results using the NativeMML output +processor may have spacing or other rendering problems that are +outside of MathJax’s control.</p> +<div class="section" id="automatic-selection-of-the-output-processor"> +<h2>Automatic Selection of the Output Processor<a class="headerlink" href="#automatic-selection-of-the-output-processor" title="Permalink to this headline">¶</a></h2> +<p>Since not all browsers support MathML natively, it would be unwise to +choose the NativeMML output processor unless you are sure of your +audience’s browser capabilities. MathJax can help with that, however, +since there is a special configuration file that will choose between +NativeMML and HTML-CSS depending on the browser in use. To invoke it, +add <tt class="docutils literal"><span class="pre">"MMLorHTML.js"</span></tt> to your configurations <cite>config</cite> array, and <strong>do +not</strong> include an output processor in your <cite>jax</cite> array; MathJax will +fill that in for you based on the abilities of your user’s browser.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">"MMLorHTML.js"</span><span class="p">],</span> +<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">]</span> +</pre></div> +</div> +<p>You can customize which choice to make on a browser-by-browser basis +or a global basis. See the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file or the +<a class="reference internal" href="configuration.html#configuration"><em>Configuring MathJax</em></a> section for futher +details.</p> +<p>MathJax produces MathML that models the underlying mathematics as best +it can, rather than using complicated hacks to improve output for a +particular MathML implementation. When you make the choice to use the +NativeMML output processor, you are making a trade-off: gaining speed +at the expense of quality and reliability, a decision that should not +be taken lightly. Note, however, that a user can employ the MathJax +contectual menu to select the other other renderer if he or she +wishes.</p> +</div> +<div class="section" id="html-css-with-ie8"> +<span id="id1"></span><h2>HTML-CSS with IE8<a class="headerlink" href="#html-css-with-ie8" title="Permalink to this headline">¶</a></h2> +<p>Internet Explorer 8 has at least eight different rendering modes in +which can operate, and that are triggered by the <cite>DOCTYPE</cite> of the +document being viewed. Its “quirks” mode is its fastest mode, and its +“IE8 standards” mode is its slowest. This is the mode triggered by +strict HTML document types, and since most modern content management +systems now include a <cite>DOCTYPE</cite> that activates “standards” mode, IE8 +will operate in its slowest manner. This is particularly apparent +when MathJax is used, since IE8 in standards mode runs 20 to 30 times +slower than it does in its IE7 emulation mode, and 60 times slower +than in quirks mode.</p> +<p>Most users find this speed reduction unacceptable when there is much +mathematics on the page. To overcome this problem, you may wish to +tell IE8 to use its IE7 emulation mode rather than its IE8 standards +mode. You can accomplish this by including the line</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><meta</span> <span class="na">http-equiv=</span><span class="s">"X-UA-Compatible"</span> <span class="na">content=</span><span class="s">"IE=EmulateIE7"</span><span class="nt">></span> +</pre></div> +</div> +<p>at the top of the <tt class="docutils literal"><span class="pre"><head></span></tt> section of your HTML documents. This +lets you keep the strict <cite>DOCTYPE</cite> for validation purposes, while +still managing to get reasonable perforance from Internet Explorer +8. Note that this line must come at the beginning of the <tt class="docutils literal"><span class="pre"><head></span></tt>, +before any stylesheets or other content are loaded.</p> +<p>Altertnatively, you can use the <cite>MMLorHTML</cite> configuration file +described above to select NativeMML output when possible, and request +that your users install the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer plugin</a>, which will render +the mathematics much more quickly.</p> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">MathJax Output Formats</a><ul> +<li><a class="reference internal" href="#automatic-selection-of-the-output-processor">Automatic Selection of the Output Processor</a></li> +<li><a class="reference internal" href="#html-css-with-ie8">HTML-CSS with IE8</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="mathml.html" + title="previous chapter">MathJax MathML Support</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="community.html" + title="next chapter">The MathJax Community</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/output.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="community.html" title="The MathJax Community" + >next</a> |</li> + <li class="right" > + <a href="mathml.html" title="MathJax MathML Support" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/platforms/index.html b/docs/html/platforms/index.html @@ -0,0 +1,171 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Using MathJax in popular web platforms — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="next" title="Installing MathJax in WordPress" href="wordpress.html" /> + <link rel="prev" title="The FontWarnings extension" href="../options/FontWarnings.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="wordpress.html" title="Installing MathJax in WordPress" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="../options/FontWarnings.html" title="The FontWarnings extension" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="using-mathjax-in-popular-web-platforms"> +<span id="platforms"></span><h1>Using MathJax in popular web platforms<a class="headerlink" href="#using-mathjax-in-popular-web-platforms" title="Permalink to this headline">¶</a></h1> +<p>Most web-based content-management systems include a theme or template +layer that determines how the pages look, and that loads information +common to all pages. Such theme files provide one popular way to +include MathJax in your web templates in the absense of +MathJax-specific plugins for the system you are using. To take +advantage of this approach, you will need access to your theme files, +which probably means you need to be an administrator for the site; if +you are not, you may need to have an administrator do these steps for +you.</p> +<p>To enable MathJax in your web platform, add the line:</p> +<div class="highlight-python"><pre><script type="text/javascript" src="path-to-MathJax/MathJax.js"></script></pre> +</div> +<p>(where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is the web-address of the main MathJax +directory for your server) either just before the <tt class="docutils literal"><span class="pre"></head></span></tt> tag in +your theme file, or at the end of the file if it contains no +<tt class="docutils literal"><span class="pre"></head></span></tt>.</p> +<p>The theme files for various popular platforms are:</p> +<blockquote> +<div><dl class="docutils"> +<dt><a class="reference external" href="http://wordpress.org/">WordPress</a></dt> +<dd><tt class="docutils literal"><span class="pre">wp-content/themes/[current_theme]/header.php</span></tt></dd> +<dt><a class="reference external" href="http://www.movabletype.org/">Movable Type</a></dt> +<dd><tt class="docutils literal"><span class="pre">[current_theme_templates]/html_head.mhtml</span></tt></dd> +<dt><a class="reference external" href="http://drupal.org/">Drupal</a></dt> +<dd><tt class="docutils literal"><span class="pre">themes/[current_theme]/page.tpl.php</span></tt></dd> +<dt><a class="reference external" href="http://www.joomla.org/">Joomla</a></dt> +<dd><tt class="docutils literal"><span class="pre">templates/[current_theme]/index.php</span></tt></dd> +<dt><a class="reference external" href="http://www.mediawiki.org/">MediaWiki</a></dt> +<dd><tt class="docutils literal"><span class="pre">skins/[current_skin].php</span></tt></dd> +<dt><a class="reference external" href="http://www.tiddlywiki.com/">TiddlyWiki</a></dt> +<dd><tt class="docutils literal"><span class="pre">*.php</span></tt> (Whatever you call your TiddlyWiki php file)</dd> +<dt><a class="reference external" href="http://moodle.org/">Moodle</a></dt> +<dd><tt class="docutils literal"><span class="pre">theme/[current_theme]/header.html</span></tt></dd> +</dl> +</div></blockquote> +<p>Keep in mind that this will enable MathJax for your current +theme/template only. If you change themes or update your theme, you +will have to repeat these steps.</p> +<div class="section" id="insructions-for-specific-platforms"> +<h2>Insructions for Specific Platforms<a class="headerlink" href="#insructions-for-specific-platforms" title="Permalink to this headline">¶</a></h2> +<p>Some programs, such as WordPress and Moveable Type, allow you to edit +template files from inside their administrator interfaces. Specific +instructions for these are given via the links below.</p> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="wordpress.html">Wordpress</a></li> +<li class="toctree-l1"><a class="reference internal" href="movable-type.html">Movable Type</a></li> +</ul> +</div> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">Using MathJax in popular web platforms</a><ul> +<li><a class="reference internal" href="#insructions-for-specific-platforms">Insructions for Specific Platforms</a><ul> +</ul> +</li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="../options/FontWarnings.html" + title="previous chapter">The FontWarnings extension</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="wordpress.html" + title="next chapter">Installing MathJax in WordPress</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/platforms/index.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="wordpress.html" title="Installing MathJax in WordPress" + >next</a> |</li> + <li class="right" > + <a href="../options/FontWarnings.html" title="The FontWarnings extension" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/platforms/movable-type.html b/docs/html/platforms/movable-type.html @@ -0,0 +1,148 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Using MathJax in Movable Type — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="Using MathJax in popular web platforms" href="index.html" /> + <link rel="next" title="MathJax TeX and LaTeX Support" href="../tex.html" /> + <link rel="prev" title="Installing MathJax in WordPress" href="wordpress.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="../tex.html" title="MathJax TeX and LaTeX Support" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="wordpress.html" title="Installing MathJax in WordPress" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">Using MathJax in popular web platforms</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="using-mathjax-in-movable-type"> +<span id="platform-movable-type"></span><h1>Using MathJax in Movable Type<a class="headerlink" href="#using-mathjax-in-movable-type" title="Permalink to this headline">¶</a></h1> +<p>These instructions assume you already have placed the MathJax files on +your server (see <a class="reference internal" href="../installation.html#installation"><em>Installing and Testing MathJax</em></a>).</p> +<ol class="arabic"> +<li><p class="first">Open Moveable Type Admin interface for the site on which you want to enable +MathJax.</p> +</li> +<li><p class="first">In the dashboard menu on the left, open up the Design menu. This +should show you the templates you are currently using on the site.</p> +<blockquote> +<div><img alt="../_images/mt_menu.png" src="../_images/mt_menu.png" /> +</div></blockquote> +</li> +<li><p class="first">Scroll down to the Template Modules section in the template list +and open the <cite>HTML Head</cite> template.</p> +<blockquote> +<div><img alt="../_images/mt_templates.png" src="../_images/mt_templates.png" /> +</div></blockquote> +</li> +<li><p class="first">At the end of the file, insert</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span> +</pre></div> +</div> +<p>where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is replaced by the web-address of the +main MathJax dorectory on your server.</p> +<blockquote> +<div><img alt="../_images/mt_head.png" src="../_images/mt_head.png" /> +</div></blockquote> +</li> +<li><p class="first">Save the file. This should enable MathJax, so you should be able +to start adding mathematical content to your pages. Use the +<tt class="docutils literal"><span class="pre">config/MathJas.js</span></tt> file in the MathJax directory to configure +MathJax to your needs (see <a class="reference internal" href="../configuration.html#configuration"><em>Configuring MathJax</em></a> for details).</p> +</li> +</ol> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="wordpress.html" + title="previous chapter">Installing MathJax in WordPress</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="../tex.html" + title="next chapter">MathJax TeX and LaTeX Support</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/platforms/movable-type.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="../tex.html" title="MathJax TeX and LaTeX Support" + >next</a> |</li> + <li class="right" > + <a href="wordpress.html" title="Installing MathJax in WordPress" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >Using MathJax in popular web platforms</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/platforms/wordpress.html b/docs/html/platforms/wordpress.html @@ -0,0 +1,149 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Installing MathJax in WordPress — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="../_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '../', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + <script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="../index.html" /> + <link rel="up" title="Using MathJax in popular web platforms" href="index.html" /> + <link rel="next" title="Using MathJax in Movable Type" href="movable-type.html" /> + <link rel="prev" title="Using MathJax in popular web platforms" href="index.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="movable-type.html" title="Using MathJax in Movable Type" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="index.html" title="Using MathJax in popular web platforms" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" accesskey="U">Using MathJax in popular web platforms</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="installing-mathjax-in-wordpress"> +<span id="platform-wordpress"></span><h1>Installing MathJax in WordPress<a class="headerlink" href="#installing-mathjax-in-wordpress" title="Permalink to this headline">¶</a></h1> +<p>These instructions assume you already have placed the MathJax files on +your server (see <a class="reference internal" href="../installation.html#installation"><em>Installing MathJax</em></a>).</p> +<ol class="arabic"> +<li><p class="first">Open the WordPress admin interface.</p> +</li> +<li><p class="first">In the administration menu on the left, open up the <cite>Appearance</cite> +menu and click on the <cite>Editor</cite> submenu option.</p> +<blockquote> +<div><img alt="../_images/wp_menu.png" src="../_images/wp_menu.png" /> +</div></blockquote> +<p>When you click on the editor option, WordPress should open up the +first stylesheet in the current theme.</p> +</li> +<li><p class="first">In the template list on the right side of the page, click on the +header file (it should be <tt class="docutils literal"><span class="pre">header.php</span></tt>).</p> +<blockquote> +<div><img alt="../_images/wp_templates.png" src="../_images/wp_templates.png" /> +</div></blockquote> +<p>This part depends slightly on how your current theme is written. +In the <tt class="docutils literal"><span class="pre">header.php</span></tt> file, look for the end-of-head tag, +<tt class="docutils literal"><span class="pre"></head></span></tt>. If you find it, insert</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span> +</pre></div> +</div> +<p>just before that. Otherwise, insert the same code at the very +bottom of the file. Here, <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> should be replaced +by the web-address of the main MathJax directory on your server, +e.g., <tt class="docutils literal"><span class="pre">src="/mathjax/MathJax.js"</span></tt>.</p> +</li> +<li><p class="first">Save the file. This should enable MathJax, so you should be able to +start adding mathematical content to your pages. Use the +<tt class="docutils literal"><span class="pre">config/MathJas.js</span></tt> file in the MathJax directory to configure +MathJax to your needs (see <a class="reference internal" href="../configuration.html#configuration"><em>Configuring MathJax</em></a> for details).</p> +</li> +</ol> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="index.html" + title="previous chapter">Using MathJax in popular web platforms</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="movable-type.html" + title="next chapter">Using MathJax in Movable Type</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/platforms/wordpress.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="../search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="../genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="movable-type.html" title="Using MathJax in Movable Type" + >next</a> |</li> + <li class="right" > + <a href="index.html" title="Using MathJax in popular web platforms" + >previous</a> |</li> + <li><a href="../index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="index.html" >Using MathJax in popular web platforms</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/queues.html b/docs/html/queues.html @@ -0,0 +1,337 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Using Queues — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" /> + <link rel="next" title="Using Signals" href="signals.html" /> + <link rel="prev" title="Using Callbacks" href="callbacks.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="signals.html" title="Using Signals" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="callbacks.html" title="Using Callbacks" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="synchronize.html" accesskey="U">Synchronizing your code with MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="using-queues"> +<span id="id1"></span><h1>Using Queues<a class="headerlink" href="#using-queues" title="Permalink to this headline">¶</a></h1> +<p>The <cite>callback queue</cite> is one of MathJax’s main tools for synchronizing +its actions, both internally, and with external programs, like +javascript code that you may write as part of dynamic web pages. +Because many actions in MathJax (like loading files) operate +asynchornously, MathJax needs a way to coordinate those actions so +that they occur in the right order. The +<cite>MathJax.Callback.Queue</cite> object provides that mechanism.</p> +<p>A <cite>callback queue</cite> is a list of commands that will be performed one at +a time, in order. If the return value of one of the commands is a +<cite>Callback</cite> object, processing is suspended until that callback is +called, and then processing of the commands is resumed. In this way, +if a command starts an asynchronous operation like loading a file, it +can return the callback for that file-load operation and the queue +will wait until the file has loaded before continuing. Thus a queue +can be used to guarantee that commands don’t get performed until other +ones are known to be finished, even if those commands usually operate +asynchronously.</p> +<div class="section" id="constructing-queues"> +<h2>Constructing Queues<a class="headerlink" href="#constructing-queues" title="Permalink to this headline">¶</a></h2> +<p>A queue is created via the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback.Queue()</span></tt> command, +which returns a <cite>MathJax.Callback.Queue</cite> object. The queue +itself consists of a series of commands given as callback +specifications (see <a class="reference internal" href="callbacks.html#using-callbacks"><em>Using Callbacks</em></a> for +details on callbacks), which allow you to provide functions (together +with their arguments) to be executed. You can provide the collection +of callback specifications when the queue is created by passing them +as arguments to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback.Queue()</span></tt>, or you can create an +empty queue to which commands are added later. Once a +<cite>MathJax.Callback.Queue</cite> object is created, you can push +additional callbacks on the end of the queue; if the queue is empty, +the command will be performed immediately, while if the queue is +waiting for another command to complete, the new command will be +queued for later processing.</p> +<p>For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">f</span><span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="nx">x</span><span class="p">)}</span> +<span class="kd">var</span> <span class="nx">queue</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="nx">f</span><span class="p">,</span> <span class="mi">15</span><span class="p">],</span> <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">10</span><span class="p">],</span> <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">5</span><span class="p">]);</span> +<span class="nx">queue</span><span class="p">.</span><span class="nx">Push</span><span class="p">([</span><span class="nx">f</span><span class="p">,</span> <span class="mi">0</span><span class="p">]);</span> +</pre></div> +</div> +<p>would create a queue containing three commands, each calling the +function <tt class="docutils literal"><span class="pre">f</span></tt> with a different input, that are performed in order. A +fourth command is then added to the queue, to be performed after the +other three. In this case, the result will be four alerts, the first +with the number 15, the second with 10, the third with 5 and the +fourth with 0. Of course <tt class="docutils literal"><span class="pre">f</span></tt> is not a function that operates +asynchronously, so it would have been easier to just call <tt class="docutils literal"><span class="pre">f</span></tt> four +times directly. The power of the queue comes from calling commands +that could operate asynchronously. For example:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">f</span><span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="nx">x</span><span class="p">)}</span> +<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">.</span><span class="nx">Queue</span><span class="p">(</span> + <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> + <span class="p">[</span><span class="s2">"Require"</span><span class="p">,</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">,</span> <span class="s2">"[MathJax]/extensions/AMSmath.js"</span><span class="p">],</span> + <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">2</span><span class="p">]</span> +<span class="p">);</span> +</pre></div> +</div> +<p>Here, the command <tt class="docutils literal"><span class="pre">MathJax.Ajax.require("extensions/AMSmath.js")</span></tt> is +queued between two calls to <tt class="docutils literal"><span class="pre">f</span></tt>. The first call to <tt class="docutils literal"><span class="pre">f(1)</span></tt> will be +made immediately, then the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> statement will +be performed. Since the <tt class="docutils literal"><span class="pre">Require</span></tt> method loads a file, it operates +asynchronously, and its return value is a <cite>MathJax.Callback</cite> +object that will be called when the file is loaded. The call to +<tt class="docutils literal"><span class="pre">f(2)</span></tt> will not be made until that callback is performed, +effectively synchronizing the second call to <tt class="docutils literal"><span class="pre">f</span></tt> with the completion +of the file loading. This is equivalent to</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">f</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> +<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/extensions/AMSmath.js"</span><span class="p">,</span> <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">2</span><span class="p">]);</span> +</pre></div> +</div> +<p>since the <tt class="docutils literal"><span class="pre">Require()</span></tt> command allows you to specify a (single) +callback to be performed on the completion of the file load. Note, +however, that the queue could be used to synchronize several file +loads along with multiple function calls, so is more flexible.</p> +<p>For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">.</span><span class="nx">Queue</span><span class="p">(</span> + <span class="p">[</span><span class="s2">"Require"</span><span class="p">,</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">,</span> <span class="s2">"[MathJax]/extensions/AMSmath.js"</span><span class="p">],</span> + <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> + <span class="p">[</span><span class="s2">"Require"</span><span class="p">,</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">,</span> <span class="s2">"[MathJax]/config/local/AMSmathAdditions.js"</span><span class="p">],</span> + <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">2</span><span class="p">]</span> +<span class="p">);</span> +</pre></div> +</div> +<p>would load the AMSmath extension, then call <tt class="docutils literal"><span class="pre">f(1)</span></tt> then load the +local AMSmath modifications, and then call <tt class="docutils literal"><span class="pre">f(2)</span></tt>, with each action +waiting for the previous one to complete before being performed +itself.</p> +</div> +<div class="section" id="callbacks-versus-callback-specifications"> +<h2>Callbacks versus Callback Specifications<a class="headerlink" href="#callbacks-versus-callback-specifications" title="Permalink to this headline">¶</a></h2> +<p>If one of the callback specifications is an actual callback object +itself, then the queue will wait for that action to be performed +before proceeding. For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">.</span><span class="nx">Queue</span><span class="p">(</span> + <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> + <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/extensions/AMSmath.js"</span><span class="p">),</span> + <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span> +<span class="p">);</span> +</pre></div> +</div> +<p>starts the loading of the AMSmath extension before the queue is +created, and then creates the queue containing the call to <tt class="docutils literal"><span class="pre">f</span></tt>, the +callback for the file load, and the second call to <tt class="docutils literal"><span class="pre">f</span></tt>. The queue +performs <tt class="docutils literal"><span class="pre">f(1)</span></tt>, waits for the file load callback to be called, and +then calls <tt class="docutils literal"><span class="pre">f(2)</span></tt>. The difference between this and the second +example above is that, in this example the file load is started before +the queue is even created, so the file is potentially loaded and +executed before the call to <tt class="docutils literal"><span class="pre">f(1)</span></tt>, while in the example above, the +file load is guaranteed not to begin until after <tt class="docutils literal"><span class="pre">f(1)</span></tt> is executed.</p> +<p>As a further example, consider</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">.</span><span class="nx">Queue</span><span class="p">(</span> + <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/extensions/AMSmath.js"</span><span class="p">),</span> + <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">1</span><span class="p">],</span> + <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"[MathJax]/config/local/AMSmathAdditions.js"</span><span class="p">),</span> + <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="mi">2</span><span class="p">]</span> +<span class="p">);</span> +</pre></div> +</div> +<p>in comparison to the example above that uses <tt class="docutils literal"><span class="pre">["Require",</span> +<span class="pre">MathJax.Ajax,</span> <span class="pre">"[MathJax]/extensions/AMSmath.js"]</span></tt> and <tt class="docutils literal"><span class="pre">["Require",</span> +<span class="pre">MathJax.Ajax,</span> <span class="pre">"[MathJax]/config/local/AMSmathAdditions.js"]</span></tt> instead. In that +example, <tt class="docutils literal"><span class="pre">AMSmath.js</span></tt> is loaded, then <tt class="docutils literal"><span class="pre">f(1)</span></tt> is called, then the +local additions are loaded, then <tt class="docutils literal"><span class="pre">f(2)</span></tt> is called.</p> +<p>Here, however, both file loads are started before the queue is +created, and are operating in parallel (rather than sequentially as in +the earlier example). It is possible for the loading of the local +additions to complete before the AMSmath extension is loaded in this +case, which was guaranteed <strong>not</strong> to happen in the other example. +Note, however, that <tt class="docutils literal"><span class="pre">f(1)</span></tt> is guaranteed not to be performed until +after the AMSmath extensions load, and <tt class="docutils literal"><span class="pre">f(2)</span></tt> will not occur until +after both files are loaded.</p> +<p>In this way, it is possible to start asynchronous loading of several +files simultaneously, and wait until all of them are loaded (in +whatever order) to perform some command. For instance,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">.</span><span class="nx">Queue</span><span class="p">(</span> + <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"file1.js"</span><span class="p">),</span> + <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"file2.js"</span><span class="p">),</span> + <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"file3.js"</span><span class="p">),</span> + <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"file4.js"</span><span class="p">),</span> + <span class="p">[</span><span class="nx">f</span><span class="p">,</span> <span class="s2">"all done"</span><span class="p">]</span> +<span class="p">);</span> +</pre></div> +</div> +<p>starts four files loading all at once, and waits for all four to +complete before calling <tt class="docutils literal"><span class="pre">f("all</span> <span class="pre">done")</span></tt>. The order in which they +complete is immaterial, and they all are being requested +simultaneously.</p> +</div> +<div class="section" id="the-mathjax-processing-queue"> +<h2>The MathJax Processing Queue<a class="headerlink" href="#the-mathjax-processing-queue" title="Permalink to this headline">¶</a></h2> +<p>MathJax uses a queue stored as <tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt> to regulate its +own actions so that they operate in the right order even when some +of them include asynchronous operations. You can take advantage of +that queue when you make calls to MathJax methods that need to be +synchronized with the other actions taken by MathJax. It may not +always be apparent, however, which methods fall into that category.</p> +<p>The main source of asynchronous actions in MathJax is the loading of +external files, so any action that may cause a file to be loaded may +act asynchronously. Many important actions do so, including some that +you might not expect; e.g., typesetting mathematics can cause files to +be loaded. This is because some TeX commands, for example, are rare +enough that they are not included in the core TeX input processor, but +instead are defined in extensions that are loaded automatically when +needed. The typesetting of an expression containing one of these TeX +commands can cause the typesetting process to be suspended while the +file is loaded, and then restarted when the extension has become +evailable.</p> +<p>As a result, any call to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> (or +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Process()</span></tt>, or <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Update()</span></tt>, etc.) +could return long before the mathematics is actually typeset, and the +rest of your code may run before the mathematics is available. If you +have code that relys on the mathematics being visible on screen, you +will need to break that out into a separate operation that is +synchronized with the typesetting via the MathJax queue.</p> +<p>Furthermore, your own typesetting calls may need to wait for file loading +to occur that is already underway, so even if you don’t need to access +the mathematics after it is typeset, you may still need to queue the +typeset command in order to make sure it is properly synchronized with +<em>previous</em> typeset calls. For instance, if an earlier call +started loading an extension and you start another typeset call before +that extension is fully loaded, MathJax’s internal state may be in +flux, and it may not be prepared to handle another typeset operation +yet. This is even more important if you are using other libraries +that may call MathJax, in which case your code may not be aware of the +state that MathJax is in.</p> +<p>For these reasons, it is always best to perform typesetting operations +through the MathJax queue, and the same goes for any other action +that could cause files to load. A good rule of thumb is that, if a +MathJax function includes a callback argument, that function may operate +asynchronously; you should use the MathJax queue to perform it and +any actions that rely on its results.</p> +<p>To place an action in the MathJax queue, use the +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Queue()</span></tt> command. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Typeset"</span><span class="p">,</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">,</span><span class="s2">"MathDiv"</span><span class="p">]);</span> +</pre></div> +</div> +<p>would queue the command <tt class="docutils literal"><span class="pre">MathJax.Hub.Typeset("MathDiv")</span></tt>, causing +the contents of the DOM element with <cite>id</cite> equal to <tt class="docutils literal"><span class="pre">MathDiv</span></tt> to be +typeset.</p> +<p>One of the uses of the MathJax queue is to allow you to synchronize an +action with the startup process for MathJax. If you want to have a +function performed after MathJax has become completely set up (and +performed its initial typesetting of the page), you can push it onto +the <tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt> so that it won’t be performed until MathJax +finishes everything it has queued when it was loaded. For example,</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span> +<span class="nt"><script></span> + <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> + <span class="c1">// ... your startup commands here ...</span> + <span class="p">});</span> +<span class="nt"></script></span> +</pre></div> +</div> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">Using Queues</a><ul> +<li><a class="reference internal" href="#constructing-queues">Constructing Queues</a></li> +<li><a class="reference internal" href="#callbacks-versus-callback-specifications">Callbacks versus Callback Specifications</a></li> +<li><a class="reference internal" href="#the-mathjax-processing-queue">The MathJax Processing Queue</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="callbacks.html" + title="previous chapter">Using Callbacks</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="signals.html" + title="next chapter">Using Signals</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/queues.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="signals.html" title="Using Signals" + >next</a> |</li> + <li class="right" > + <a href="callbacks.html" title="Using Callbacks" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="synchronize.html" >Synchronizing your code with MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/search.html b/docs/html/search.html @@ -0,0 +1,98 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Search — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="_static/searchtools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <script type="text/javascript"> + jQuery(function() { Search.loadIndex("searchindex.js"); }); + </script> + + + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <h1 id="search-documentation">Search</h1> + <div id="fallback" class="admonition warning"> + <script type="text/javascript">$('#fallback').hide();</script> + <p> + Please activate JavaScript to enable the search + functionality. + </p> + </div> + <p> + From here you can search these documents. Enter your search + words into the box below and click "search". Note that the search + function will automatically search for all of the words. Pages + containing fewer words won't appear in the result list. + </p> + <form action="" method="get"> + <input type="text" name="q" value="" /> + <input type="submit" value="search" /> + <span id="search-progress" style="padding-left: 10px"></span> + </form> + + <div id="search-results"> + + </div> + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/searchindex.js b/docs/html/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({objects:{"":{Load:[0,0,1],getAllJax:[32,0,1],Log:[14,0,1],Subclass:[33,0,1],Delay:[23,0,1],Init:[33,0,1],Interest:[35,0,1],Translate:[34,0,1],Config:[32,0,1],addElement:[9,0,1],Styles:[0,0,1],ExecuteHook:[35,0,1],loadTimeout:[0,0,1],Resume:[13,0,1],Update:[32,0,1],loadComplete:[0,0,1],loadHook:[0,0,1],formatError:[32,0,1],call:[13,0,1],getJaxByInputType:[32,0,1],PreProcess:[32,0,1],fileURL:[0,0,1],has:[33,0,1],Signal:[23,0,1],Insert:[32,0,1],addText:[9,0,1],TextNode:[9,0,1],Augment:[33,0,1],loadError:[0,0,1],Clear:[14,0,1],Register:[34,0,1],noTranslate:[34,0,1],Typeset:[32,0,1],Queue:[23,0,1],NoInterest:[35,0,1],Set:[14,0,1],getJaxByType:[32,0,1],Push:[13,0,1],Element:[9,0,1],Post:[35,0,1],wait:[13,0,1],reset:[23,0,1],Suspend:[13,0,1],executeHooks:[23,0,1],Process:[32,0,1],Text:[45,0,1],Reprocess:[32,0,1],Startup:[34,0,1],SourceElement:[45,0,1],getJaxFor:[32,0,1],can:[33,0,1],MessageHook:[35,0,1],isJax:[32,0,1],isa:[33,0,1],Require:[0,0,1]}},terms:{lvertneqq:25,reprocess:[32,45,43],mathjax_msie_fram:14,four:[16,41,30],prefix:[9,16,11],asymp:25,blacktriangledown:25,webfont:[5,37,16],whose:[4,26,32,20,43],biggr:25,under:36,preprocess:[47,32,24,43],slowest:46,gimel:25,everi:[15,32],mskip:25,arcco:25,dotplu:25,affect:[45,32,30,11],isforefox:32,bbfont:25,eqnarrai:25,cmd:18,bigodot:25,ominu:25,red:[25,16,11,40],nparallel:25,properti:[9,0,27,33,23,35,13,26,34,45,8,32,20],direct:[5,36,37,30],consequ:17,second:[0,36,30,23,26,41,44,4,5,40,18,15,8,20,49],ngeq:25,even:[0,36,23,35,13,41,2,25,15,26,40,11,44,19,47,32,43],hide:43,prejax:[47,18],neg:25,multlinewidth:21,yoursit:2,"new":[9,35,11,30,23,43,33,41,24,3,14,15,44,21,42,45,19,8,32,20,47],mhtml:1,told:44,limsup:25,elimin:18,abov:[9,25,37,23,16,41,2,43,4,5,18,26,46,30,33],lessapprox:25,blacktriangleright:25,here:[9,35,27,23,26,41,2,43,15,16,34,18,6,32,45],met:24,lneqq:25,path:[0,1,16,6,31,11],noundefin:[25,16,11,2],interpret:[25,46,30],nrightarrow:25,forum:[16,3],bowti:25,rceil:25,backprim:25,uproot:25,circleddash:25,mathstrut:25,unix:30,brower:25,thinmathspac:36,highli:19,describ:[9,30,23,16,39,49,24,43,25,5,40,26,46,47,32],would:[25,5,7,9,32,13,16,40,18,45,21,22,23,26,29,46,30,11,33,4,37,38,41,42,43,17,47,48,49],bleed:30,vartriangl:25,ltime:25,varlambda:25,call:[0,1,2,4,5,7,32,13,14,15,17,18,20,21,22,23,25,26,29,30,8,11,33,34,35,37,38,39,45,41,42,43,44,47,48],recommend:[46,47,30],diretori:30,preview:[4,38,47,22,18],type:[0,1,2,4,6,8,9,32,15,16,34,18,45,31,11,36,20,41,43,44,46,47],until:[0,22,35,41,24,4,26,18,15,38,11],notin:25,displaymath:[4,11],notic:[25,11],warn:[0,5],eqslantless:25,hold:[0,40,18,29,47,32],unpack:[16,30],must:[0,36,37,5,39,13,25,14,4,16,46,21,18,29,44,30,11,35,49],fbox:25,join:[15,25],room:21,setup:[19,16,36,11],work:[9,10,36,30,26,25,2,3,43,15,16,28,44,19,46,11,33],cc0000:[49,18],tag_nam:30,root:[25,0,24],overrid:[33,5,8,34,20],mathmenu:[49,17,37,42,11],give:[35,16,40,49,2,15,5,21,11],indic:[0,11,26,13,25,24,15,16,35,34,18,45,8,32,20,47],impair:19,want:[48,15,37,23,26,12,33,41,3,14,4,16,25,18,43,46,30,31,11,20],setminu:25,end:[0,36,1,41,24,3,25,4,6,15,31],quot:[4,37,18],hom:25,heartsuit:25,how:[0,1,2,3,25,5,6,13,14,16,40,18,22,23,35,38,29,30,32,4,37,42,44,17,47],sever:[0,30,41,43,26,47,11,20],answer:[3,43],verifi:[16,30,3],config:[24,4,5,6,7,31,11,14,15,16,21,18,20,22,2,25,26,28,29,8,32,34,17,37,38,41,42,43,46,48,49],updat:[30,1,41,43,32,45],showrender:42,lai:[46,47],diagdown:25,after:[0,37,23,26,13,41,2,42,14,15,16,34,18,43,44,30,47,11,35],befor:[0,1,3,4,6,13,14,15,21,18,23,25,26,29,30,32,33,34,35,36,37,39,40,41,43,44,46,47],wrong:36,startuphook:[15,32],parallel:[25,41],averag:47,alignedat:25,attempt:[0,36,42],third:[41,36],leftarrow:25,receiv:[35,44,15,26,34,33],greasekit:2,maintain:[15,26,18,3,44],environ:[25,3,4,16,21,11],enter:[25,47,36,43],textnod:9,order:[35,22,30,16,39,13,41,14,4,5,18,26,46,38,32,33,47],oper:[0,4,5,7,13,14,15,16,17,19,21,22,38,29,30,34,35,27,37,26,39,41,42,43,46,48],parentnod:2,over:[9,0,37,42,43,25,16,18,29,47],fall:[5,41,30,16],becaus:[15,36,37,26,41,2,25,14,4,16,40,43,30,47,11,35],boxtim:25,textrm:25,appar:[46,41],afil:26,flexibl:[41,40],vari:46,smallint:25,fit:[15,42],fix:30,preferredfont:37,better:[16,11,42],boxminu:25,complex:[46,40],fade:5,persist:3,comprehens:39,easier:[35,36,30,41,25,33],moveleft:25,them:[9,0,36,30,16,13,41,25,4,5,21,11,26,15,47,32,35,49],thei:[0,2,3,4,5,7,32,12,13,15,16,17,18,21,22,24,25,26,29,30,11,34,35,36,37,38,39,40,41,42,43,44,47,48,49],precapprox:25,safe:[9,2,43],"break":[25,44,41,36],mtext:[25,16],wedg:25,widetild:25,choic:[46,32,11],dbinom:25,leftharpoondown:25,timeout:[0,23],each:[15,11,30,23,35,41,24,43,4,16,44,47,32],debug:14,side:[21,14,18,6],mean:[15,22,1,35,12,25,2,43,4,26,18,44,19,38,11],leqq:25,createel:2,resum:[13,41],leqalignno:25,mathopen:25,looparrowleft:25,goe:[25,44,41],iint:25,newli:[9,15,33],content:[9,47,36,1,39,24,41,2,43,4,16,40,18,6,46,31,32,33,8],reader:19,forth:27,impract:30,multilin:25,situat:11,free:[45,3],standard:[25,39,49,15,16,19,46,47,11],lneq:25,angl:25,moment:[16,30],unabl:5,pulicis:35,isa:33,subtl:43,onto:[39,16,41,32,43],mathbb:25,rang:47,mathbf:25,render:[36,24,42,4,18,19,46,47,11,48,28],yourcolleg:30,restrict:[25,30],hook:[15,0,23,35],instruct:[1,2,16,40,6,31],alreadi:[0,23,25,41,2,3,14,15,26,6,44,31,43,33],primari:46,tooltop:37,top:[27,30,25,16,46,11],underlin:25,master:44,too:[4,16,2],similarli:[0,32],john:26,listen:[15,35,32,23],thickapprox:25,namespac:[16,11,2,23,43],tool:[41,30],tagind:21,gtrless:25,somewhat:44,technic:39,past:[15,19,44,35],filesmatch:30,provid:[9,0,36,23,1,35,13,41,25,14,15,26,40,11,44,19,47,32,33,43],eqalignno:25,tree:40,iota:25,project:[39,3],matter:[15,28],minut:30,mathtt:25,ldotp:25,modern:[19,5,11,46,10],mind:[25,1],manner:46,increment:13,seem:[26,36],rightrightarrow:25,ldot:25,ngeqq:25,latter:[15,40,47,11],curvearrowleft:25,though:[23,2,25,44,40,18,47],object:[0,24,5,9,10,32,12,13,14,15,17,18,20,23,26,29,8,11,33,34,35,27,37,39,40,41,42,43,44,45,47,49],regular:[4,18],letter:[16,30],grave:25,don:[36,26,41,2,43,15,5,46,32],dom:[9,45,41,43,15,44,34,18,32,20],doe:[25,36,23,45,2,15,26,17,48,11,19,46,8,32,20,47],bracket:[40,18],tfrac:25,unchang:[48,43],sum:[25,23],dot:25,delaystartupuntil:[24,18],random:[16,30],lnapprox:25,syntax:[25,33],mediawiki:1,isopera:32,shownam:26,asynchon:43,involv:[16,11,3,44],consolid:19,layout:45,firstnam:26,mathchoic:25,ismsi:[32,24],menu:[36,37,24,42,17,18,29,6,46,31,45,47],explain:[16,11,44],configur:[24,4,5,6,7,8,10,11,15,16,21,18,19,20,22,2,26,28,29,30,31,32,34,17,36,37,38,40,25,46,47,48],apach:30,configut:40,theme:[1,6],rich:19,folder:[16,37,30],infti:[25,47],mho:25,report:[36,18,3],circeq:25,subseteq:25,fadeouttim:5,bar:[25,33,23],patch:30,reload:42,replacechild:2,neq:25,respond:[35,18,3],dashrightarrow:25,scriptscriptstyl:25,precneqq:25,result:[36,37,23,26,45,41,43,25,16,46,8,32,20,47],respons:[16,8,11,23,35],fail:[0,11,46,34,26],themselv:[40,32,24,27],best:[0,41,11,47,46],awar:[25,0,41,36],starup:18,varinjlim:25,wikipedia:[39,2],circledcirc:25,gneqq:25,approach:[26,47,11,1,43],attribut:[9,49,25,38,40,47],never:[30,2],extend:[19,47],synchon:15,extens:[0,24,25,5,32,15,16,21,18,22,2,38,28,29,11,34,4,27,39,41,42,43,49],preprocessor:[25,22,38,24,27,4,16,36,18,11,47,32,43,28],intop:25,cot:25,cow:33,howev:[30,41,2,3,43,25,26,18,46,47,11,33,49],against:35,browser:[24,25,5,10,32,16,17,18,19,45,2,27,28,30,11,4,36,37,39,42,44,46,47,48],com:30,varpsi:25,pre:[4,5,36,30],foral:25,foobar:33,sai:[13,2,23],innerhtml:[2,43],height:[25,42],wider:3,assum:[16,31,43,6],speak:[12,47],chrome:[37,32,2,46],three:[36,30,23,26,40,41,5,34,44,47],been:[0,30,23,26,13,41,2,3,14,4,16,46,34,28,43,15,44,11,35],trigger:[46,18,29],interest:[15,35,39,3,44],basic:10,tini:25,quickli:[19,46,3],underrightarrow:25,regul:41,xxx:25,ani:[0,2,3,4,5,7,32,13,14,15,16,17,18,45,21,22,23,25,26,29,30,11,33,35,36,37,38,41,42,43,44,46,48],emploi:[39,46],hskip:25,tanh:25,servic:[16,11,30],showcontext:42,diamondsuit:25,dashboard:31,suffici:[25,21,48],succeq:25,canb:21,lightli:46,nexist:25,tabl:36,cong:25,disappear:[4,38,22],amout:14,incorrectli:30,perform:[35,11,23,26,39,13,41,24,3,27,15,5,34,18,43,44,32,45],suggest:[5,3],make:[0,3,25,5,32,12,13,15,16,18,19,22,38,11,33,4,36,30,41,42,43,44,46,47,49],drawback:46,split:25,lrcorner:25,unsafewindow:2,complet:[0,30,23,26,39,13,41,43,15,16,34,44,46,32,35,45],longmapsto:25,hand:[27,14,21,18,47,36,28],fairli:40,rais:25,mkern:25,ignorepast:35,unlhd:25,techniqu:2,redefin:[5,34],kept:15,thu:[23,41,15,26,11,45],inherit:[12,33,8,20,45],client:37,thi:[0,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,21,18,20,22,23,35,24,25,26,27,28,29,30,31,32,33,34,17,36,37,38,40,41,42,43,44,45,46,47,48,49],idotsint:25,programm:33,everyth:[25,41,32],settimeout:[26,23],left:[36,27,24,14,25,44,21,18,6,31,11],processclass:4,identifi:[9,16,47,11,35],just:[35,36,23,1,26,41,25,16,18,6,19,47,11,49],yen:25,mathbin:25,coprod:25,yet:[36,13,41,43,15,44,46],languag:[39,16,47,46,44],noscript:4,onload:[24,27,2,18,26],errorset:18,ell:25,had:[15,16],myconfig:[15,26],els:[26,2,43],save:[31,49,6],hat:25,jsmath:[10,47,28],"3px":49,applic:[19,16,24],loadtimeout:0,quirk:46,preserv:26,negativethinmathspac:46,background:[25,49],sqsubset:25,specif:[0,27,23,1,35,39,13,41,43,4,26,34,18,47,32,45],arbitrari:25,zoom:[36,18,29],leftrightarrow:25,underli:46,www:[16,11,2,30,42],right:[36,37,39,13,41,2,14,25,17,18,6,30,47,11,21],old:15,simbl:2,deal:46,autobold:[25,11],surd:25,percentag:[17,37,18],donald:39,successfulli:[0,26],interc:25,dddot:25,bottom:6,subclass:[35,27,20,34,45,8,33],circ:25,exectur:35,overcom:[44,46],condit:[0,24],getjaxfor:[15,32,20],core:[11,41,24,25,18,47,32],plu:[35,24],bold:[25,40,21,11],mathrel:25,colleg:30,repositori:30,post:[35,37,24,3,14,15,44,34],"super":33,llless:25,obj:9,nwarrow:25,slightli:[25,6],surround:[17,37],unfortun:30,current_theme_templ:1,joomla:1,span:[22,4,38,40,18,47,28],downharpoonright:25,produc:[35,37,23,16,45,25,42,43,15,5,17,18,26,19,46,47,11,20,21],encod:25,contectu:46,rightsquigarrow:25,down:[31,18],shortparallel:25,wrap:33,often:[16,47,49],git:[16,30],wai:[15,22,30,23,1,26,41,2,14,4,16,35,34,18,43,38,46,8,11,20,47],checkmark:25,transform:47,ngtr:25,avail:[0,22,37,5,45,41,42,46,4,16,17,18,11,15,19,30,38,36,33,47],width:[25,46,21,36,42],reli:[0,41,2,43,26,17,46,11],wordpress:[1,6],editor:6,rightthreetim:25,head:[1,2,43,16,6,46,31,11],form:[36,37,39,21,18,47],offer:3,forc:[11,37],epsilon:25,hear:[15,35],downdownarrow:25,"true":[35,11,37,23,25,24,42,27,4,17,18,7,32,33],vcenter:25,reset:[42,23],absens:1,displayalign:18,intern:[0,36,35,39,13,41,25,18,46,8,32,20,47],tell:[16,46,2,30,43],moveright:25,nnn:30,featur:[36,30,3,15,26,29,46,33],rfloor:25,sale:17,exist:[25,30,33,23],ddot:25,backsim:25,triangleq:25,check:[0,30,35,25,26,33,16],when:[0,24,4,5,6,7,11,12,13,14,15,16,17,18,19,20,21,22,23,25,26,27,28,29,30,8,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],abovewithdelim:25,role:47,test:[9,10,36,30,44,2,43,15,16,31,32,33],tie:[24,23],smallsmil:25,node:9,intend:33,consit:25,munderov:47,gvertneqq:25,consid:[0,11,41,3,25,4,47,32,45],omega:25,outdat:3,faster:[46,11],furthermor:[41,18],tex2jax_ignor:4,ignor:[4,35],time:[0,2,3,25,5,9,32,14,15,16,34,18,23,26,29,11,35,30,41,43,46,47],push:[23,39,13,41,24,43,26,32],mathrm:25,doteq:25,emulateie7:46,skip:4,global:[12,46,27,23,43],skin:1,displayind:18,millisecond:[0,37,23,42,14,5,29,32],decid:[11,42],depend:[23,43,26,6,46,11,48],newenviron:25,readabl:39,nearrow:25,varpi:25,certainli:[11,30],vee:25,decis:46,leftarrowtail:25,succnsim:25,sourc:[10,36,37,41,2,42,15,17,19,30,47,32,45],string:[0,23,35,40,25,14,4,21,18,15,32,45,49],curlyve:25,word:[4,47],centerdot:25,dim:25,foo:[33,23],administr:[1,6],level:[16,11,30,27],did:26,item:[37,40,42,25,26,17],cooki:[9,24],div:[9,25,47,28,43],prevent:[25,22,37,38,42,4,16,21,18],slower:46,compens:17,sign:[25,43,4,16,47,11],cost:[16,11,33],pmb:25,rightarrowtail:25,histori:[15,35,24,39],xandi:33,dotsi:25,dotsm:25,appear:[25,27,30,26,42,14,15,16,18,43,6,11,45],dotso:25,repli:15,dotsc:25,dotsb:25,current:[0,37,1,35,45,46,6,30,31,33],backepsilon:25,ampersand:25,inlinemath:[4,16,11,43],defici:36,amalg:25,mathsiz:25,gener:[26,48,24,5,47,32,45],mfrac:[16,47],modif:41,address:[16,31,30,1,6],along:[39,41,14,15,8,20],wait:[0,30,23,35,39,13,41,2,43,15,26,24,18,44,32],box:[25,0,5],html_head:1,bracevert:25,shift:18,bot:25,queue:[35,27,23,44,12,13,41,24,43,26,39,32],overriden:32,digamma:25,varlimsup:25,macintosh:32,semant:33,succsim:25,extra:[15,25,47,18],circumv:30,modul:[0,31,27],prefer:[16,48,37,30,42],iepro7:2,veebar:25,visibl:[4,38,41,22,43],marker:25,myid:49,arrowvert:25,memori:[44,45],bigr:25,visit:16,todai:39,subvers:[16,30],stylesheet:[0,27,23,35,13,24,43,44,18,6,46],handler:[0,27,39,2,24,43,44,47],current_skin:1,bigl:25,bigm:25,eqcirc:25,checkout:30,bigg:25,inputjax:[27,12,45,24,34,8,33],capit:12,sitaut:43,bigtriangleup:25,enhanc:47,visual:19,prototyp:33,hphantom:25,easiest:[30,23,26,15,16,11],graphic:30,prepar:[41,11],cap:25,uniqu:49,pmatrix:25,whatev:[25,1,20,41,43,15,33],cal:25,purpos:[26,47,46],getjaxbytyp:32,downharpoonleft:25,subseteqq:25,varprojlim:25,backslash:[25,21,18],topic:[12,10,11],sharp:25,occur:[0,36,23,35,13,41,2,42,14,15,26,34,18,11,44,32,43],eqsim:25,nuber:14,pink:25,alwai:[25,26,41,23],multipl:[25,41],trianglelefteq:25,write:[19,16,41,43,35],fourth:41,mathsf:25,tild:25,xhtml:[16,36,11],map:47,max:25,clone:30,spot:25,mac:[17,32,37,18],udpat:30,mai:[0,1,2,3,4,5,32,12,15,16,17,18,20,25,26,30,11,33,34,35,36,37,45,41,43,44,46,47],data:[9,0,27,37,23,33,15,26,34,45,30,8,32,20],goal:19,vartheta:25,preceq:25,uparrow:25,geramond:25,inform:[0,37,1,35,39,14,15,26,17,18,47,11],"switch":[47,28],looparrowright:25,combin:0,gamma:25,lnsim:25,approx:25,showmathmath:17,lsh:25,tex2math:[16,28],still:[35,36,23,39,41,15,16,18,29,46],pointer:33,ttf:30,dynam:[0,27,10,41,2,43,16,18,44,19,47,11],entiti:[25,36],amssymbol:[25,16,11,2],group:[0,36,3],monitor:3,polici:30,bigstar:25,platform:[19,10,1,16],window:[27,23,5,2,42,14,26,43,32],"05em":25,main:[47,11,30,1,12,33,41,49,42,25,16,27,18,6,31,32,20,8],mathexampl:43,non:[9,0,47,16,13],msam10:16,myinputjax:34,initi:[0,27,44,41,24,42,25,4,16,34,18,15,47,32,45],safari:[46,32,2],half:26,now:[39,16,11,30,46],discuss:[9,30,2,3],nor:[5,40],term:14,name:[0,24,4,5,9,32,15,16,21,18,20,22,23,2,26,30,8,11,33,34,35,36,37,38,40,25,45,46,49],opera:[46,32,2,48],boxdot:25,separ:[36,30,41,14,15,16,17,18,11,49],messagestyl:[5,18],sideset:25,januari:[],confid:19,varpropto:25,vec:25,compil:26,domain:30,replac:[0,36,2,43,16,21,11,6,31,32,33,47],individu:[11,45,43],continu:[15,0,41,44,25],happen:[36,30,13,41,25,44,47],shown:[25,40,18,42,43],accomplish:[30,2,46],space:[43,25,18,46,7,11,47],internet:[0,2,42,14,25,26,18,46,47,11],formula:[43,18,29,19,46,47,11],correct:[26,2,30],simeq:25,earlier:41,ntriangleleft:25,ajax:[0,27,12,41,24,15,26,34,32],mime:[11,45,16,36,8,32,20,34],underleftarrow:25,org:[16,11,2,42],ord:25,care:[25,11,2],ntrianglelefteq:25,couldn:26,x00b1:16,synchron:[0,23,10,39,13,41,2,43,26,24,44,32,35],mscarri:36,thing:[25,16,40,43],place:[0,37,16,41,3,25,15,5,35,21,18,43,6,31,11,33],mathop:25,unwis:46,ture:17,think:[25,18,43],frequent:[4,15],first:[15,36,23,26,41,2,44,25,4,16,35,40,18,43,6,8,11,20,47],origin:[33,35,30,13,25,2,43,15,16,45,8,11,20],lfloor:25,suspend:[15,13,41,35],directli:[41,2,43,25,26,47],onc:[0,30,23,35,41,24,43,25,16,28],arrai:[2,4,5,7,32,13,15,16,34,20,21,22,23,24,26,28,46,8,11,35,37,38,40,25,17,47,48],yourself:[25,13,2,18,26],submit:3,open:[10,36,30,42,16,6,19,31],predefin:18,size:[25,49,17,37,43],given:[9,0,33,23,1,35,13,41,40,25,14,15,26,34,18,45,47,32,20,49],ifmodul:30,evail:41,leftrightharpoon:25,circl:25,whith:36,white:49,conveni:[16,11,33,18],hub:[24,4,5,7,32,12,14,15,17,18,20,21,22,2,26,29,11,34,27,37,38,45,41,42,43,47,48],especi:47,programat:47,copi:[36,30,2,3,16,11,19,32],specifi:[25,5,7,9,13,15,16,40,18,21,23,35,26,29,46,11,4,37,41,42,44,17,47,48,49],lhd:25,enclos:[49,47,37,18],quad:25,than:[0,4,5,7,32,13,15,16,34,18,19,20,23,25,30,8,11,33,35,36,37,39,41,43,44,46,47,49],serv:[16,11],wide:[19,47,30],underbrac:25,were:[15,45,43],posit:[13,37],seri:[41,40],preccurlyeq:25,delic:17,lnot:25,doublecup:25,nleftrightarrow:25,argument:[35,23,41,26,11,33],dash:[49,37],properli:[0,36,30,5,45,41,2,43,26,32,33],engin:[19,10],squar:[25,40],npreceq:25,note:[0,2,25,5,32,16,40,18,45,21,35,26,30,11,4,37,41,42,43,46,47,48,49],x2260:16,take:[0,23,1,5,41,24,3,43,25,16,21,26,44,11],noth:[26,23],channel:[15,39],updownarrow:25,begin:[15,43,41,24,25,4,21,46,47,11],sure:[35,30,43,41,2,3,25,4,16,46,11],windowset:42,normal:[25,23,49,2,4,18,47],track:[47,3],beta:[25,16],pair:[9,0,11,23,40,49,4,21,15,8,32,20],fileurl:0,beth:25,latex:[10,39,25,4,16,18,19,47,11],textarea:4,later:[35,36,37,23,13,41,25,26,32],drive:30,typeset:[0,24,4,14,15,17,18,19,45,22,2,26,29,32,27,37,38,39,41,42,43,44,47],badg:3,subarrai:25,sigma:25,mathfrak:25,showmathmenu:37,show:[30,42,5,3,43,25,26,40,18,31,11,16],autoreset:23,approxeq:25,unprocess:[32,45,43],permiss:[16,30],hack:46,corner:[27,18,14],xml:[19,39],insruct:1,onli:[0,1,2,3,25,5,32,16,40,18,19,45,35,26,30,11,4,36,37,39,49,43],explicitli:[25,26,4,16,11,33],activ:[36,23,39,3,43,44,46,47],state:41,inlinedelimit:25,otim:25,black:25,geq:25,mypic:[4,38,22,40],nearli:[25,11],variou:[35,37,1,12,49,15,5,17,8,11,47],get:[9,10,36,37,23,26,41,2,14,25,16,35,17,18,46,30,43,33],cannot:25,ncong:25,downarrow:25,requir:[0,23,41,2,25,15,26,34,19,47,32,20],prime:25,lceil:25,mathpunct:25,enspac:25,intermitt:[27,14],shortmid:25,retypeset:43,where:[0,1,24,3,25,5,8,9,32,14,15,16,21,20,23,26,30,31,11,27,37,45,49,43,44,47],wiki:[16,47,2],lozeng:25,obejct:13,ismac:[32,24],concern:[47,32],detect:23,longleftrightarrow:25,enumer:25,label:[25,11,42],enough:[41,40],between:[25,23,26,41,42,15,16,46,47,32,45],maltes:25,"import":[12,0,41,44,15],across:[39,46],parent:[9,33],vdot:25,screen:[0,41,43,19,14,20],negmedspac:25,come:[36,30,41,2,26,46,47,11],leftleftarrow:25,img:[22,49,2,4,38,40],timout:0,pertain:16,audienc:46,overbrac:25,mani:[25,11,44,41,4,26,32,49],color:[25,49,40,18],operatornam:25,period:[0,27,30],colon:[25,49],cancel:23,pod:25,bigcirc:25,msrow:36,needlessli:26,skew:25,mark:[25,36,49,4,16,28,47,11],succapprox:25,upharpoonleft:25,arcsin:25,resolut:19,mathplay:[46,11,2,18,42],breve:25,texfont:5,blacktriangl:25,those:[35,36,30,23,26,13,41,40,49,25,15,5,34,18,43,45,19,8,32,20,47],manu:42,"case":[25,37,23,26,33,41,2,43,15,16,40,18,45,30,47,11,20,49],kappa:25,oldstyl:25,addtext:9,invok:46,margin:21,tbinom:25,advantag:[46,41,1],barwedg:25,leadsto:25,mlongdiv:36,worri:[15,47],destin:32,updatemath:43,bigwedg:25,develop:[39,36,30,3],author:[14,34,18,29,19,47],media:[49,30],postjax:[47,18],same:[15,22,30,35,41,44,25,4,38,6,11,20],html:[1,24,4,5,7,9,10,32,12,15,16,17,18,20,22,2,38,27,30,31,11,25,36,37,39,40,49,42,43,44,46,47,48],pad:[9,49],knuth:39,mathvari:47,document:[0,22,39,10,12,25,2,43,4,16,36,18,11,19,46,38,32,20,47,28],exhaust:11,finish:[39,44,41,2,43],vvdash:25,nest:[36,27],availablefont:[5,11,37],longleftarrow:25,capabl:[12,19,11,46],formaterror:32,improv:[46,18,3],extern:[0,27,44,41,15,26,32],submenu:[18,42,6],appropri:[25,15,16,28,8,47],macro:[25,16,21,18,11],markup:[39,0,25,36,47],leftharpoonup:25,overwithdelim:25,without:[0,36,37,25,15,26,17,47],model:[10,27,30,12,24,25,46,47,33],altertn:46,bigotim:25,stixfont:5,mml2jax:[36,38,2,16,18,47,11],loaderror:0,rest:[0,36,41,43,16,19,47],speed:[46,47,11],versu:41,mathzoom:[49,11,29],nleqq:25,except:[16,11,44],littl:[0,35],blog:[16,47],earli:11,hover:[42,18,29],around:[25,11],read:[15,16,36,30,40],outermost:40,boldsymbol:[25,11],messsag:14,getjaxbyinputtyp:32,moo:33,world:[19,26],lasterror:32,mod:25,sum_:47,cdot:25,integ:32,server:[37,1,2,16,6,30,31,11],either:[0,30,1,35,12,40,49,2,15,16,21,29,46,32,48],output:[2,25,7,10,32,15,16,17,18,45,27,11,33,34,36,37,39,20,49,42,43,46,47,48],manag:[9,27,30,1,26,39,24,14,16,46,47],lesssim:25,searrow:25,sqcup:25,constitut:12,alttext:38,definit:[0,37,49,42,17,29,19],shoveright:25,inputid:45,dashleftarrow:25,mathcal:25,variuou:15,complic:[40,36,48,46],refer:[10,30,16,45,2,43,15,5,35,34,26,44,32,33],power:[41,3],inspect:32,broken:47,thinspac:25,fulli:[41,36],regexp:4,"throw":[34,2],trianglerighteq:25,assocait:43,underwai:41,ddddot:25,act:[25,26,39,41,15,16,21,18,47,11],industri:39,processor:[47,36,37,39,41,24,42,25,16,17,49,46,7,11,48,21],hookrightarrow:25,nobreakspac:25,routin:[9,0,44,26,34,8,32,20],effici:[11,33,43],elementari:36,lessdot:25,triangledown:25,bbb:25,rightharpoondown:25,mathbackground:25,your:[0,1,2,3,4,5,6,7,10,11,16,21,18,19,22,25,26,28,29,30,31,32,17,36,37,38,39,40,41,42,43,44,46,48],sqsupseteq:25,log:[25,16,30,14],area:[21,14],fontwarn:[5,11,18],lor:25,strict:[46,30],interfac:[30,1,16,6,19,31],lot:[15,30],lambda:25,buggi:25,categor:11,longer:[35,30,14],pull:30,mathml:[10,36,39,45,2,47,25,16,17,48,19,46,7,11,20,8],bullet:25,possibl:[0,36,30,23,5,41,14,16,18,26,46,47,11,33,49],"default":[0,24,25,5,7,32,14,16,34,18,20,21,22,23,38,29,30,8,11,4,37,42,17,47,48],processescap:[4,11],buildrel:25,sepecifi:30,notag:25,embed:36,expect:[25,46,41,11,18],creat:[0,24,3,9,14,15,34,20,23,26,8,33,35,27,30,39,45,41,42,44,47,49],certain:[15,35,44],leftrightsquigarrow:25,risingdotseq:25,varliminf:25,file:[0,1,2,25,5,6,8,32,13,14,15,16,34,18,20,23,24,26,28,31,11,35,30,39,40,41,44,45,46,47,48,49],outputjax:[27,12,45,24,34,20],fill:[46,48],again:[0,11,45,43,25,8,32,20],iiiint:25,googl:3,pmod:25,reduct:46,valid:[26,46],you:[1,2,3,4,5,6,7,11,12,13,14,15,16,21,18,19,20,22,23,24,25,26,28,30,31,32,33,34,17,36,37,38,40,41,42,43,44,46,47,48,49],trash:45,sequenc:[10,30,13,25,24,15,44],symbol:[25,16],dashv:25,briefli:16,menuset:[18,29],reduc:25,mathcolor:25,lbrace:25,directori:[0,37,1,44,39,45,24,15,16,34,18,6,30,31,11,20,8],descript:[22,38,2,4,5,27,18],lbrack:25,scroll:31,calle:33,potenti:41,escap:[21,11],dst:32,negthickspac:25,represent:47,all:[0,1,2,4,5,10,32,14,15,16,34,18,19,22,23,25,26,36,11,33,35,27,30,38,39,41,44,46,47],consider:[16,11],illustr:43,dollar:[4,16,25,11,43],abil:[46,47,30],follow:[15,37,23,26,12,40,25,24,43,4,16,34,30,47,11,33,49],alt:[2,18],disk:[11,30],children:36,scr:25,articl:39,init:33,program:[27,1,44,12,45,41,24,16,19,47,33],smile:25,cgi:0,liter:4,multlin:[25,21],vert:25,far:[0,35,14],varrho:25,prooblem:25,"1px":[9,25,49],verb:25,mechan:[35,23,13,41,24,15,44,33],loadcomplet:[0,32,34],veri:6,strang:36,list:[24,25,5,6,7,31,32,15,21,18,20,22,23,38,29,8,11,4,37,45,41,42,43,17,47,48],emul:46,adjust:[37,16,17,2,43],displaylin:25,small:[25,47,21,14],preceed:[4,18],getalljax:[32,43],lll:25,tex:[2,4,5,7,10,32,15,16,21,18,19,22,27,28,30,8,11,34,25,36,37,39,41,43,46,47],zero:13,design:[19,31,36,2,3],pass:[0,11,23,35,13,41,24,42,15,26,47,32,33],overlin:25,further:[13,41,47],what:[10,22,37,23,38,25,36,11,3,43,4,5,17,18,29,19,30,47,32,42],sub:27,section:[2,25,5,7,32,16,21,18,22,26,28,29,46,31,11,4,36,37,38,42,17,48],ast:25,abl:[37,23,16,2,43,15,5,18,6,19,30,31,11],delet:37,version:[10,27,30,24,2,3,43,16,34,29,45,8,32,20],sup:25,method:[9,0,11,33,23,35,13,41,2,14,15,26,34,43,44,8,32,20,45],hasn:[0,34,14],full:[0,12,4,26,18,19],exectu:23,variat:11,geqslant:25,modular:[19,36],ggg:25,ineffici:[33,18],modifi:[10,43,15,34,32,20],valu:[0,24,4,5,7,9,32,13,15,17,18,21,22,23,38,29,11,33,36,37,26,40,41,42,43,47,48,49],search:[19,10,32,3],sender:15,prior:18,amount:[5,21,23],action:[0,2,25,32,13,14,15,34,20,23,24,26,29,8,11,35,27,39,41,43,44,47],mathjax_wikipedia:2,magnitud:46,llap:25,via:[0,36,37,23,1,16,45,41,2,14,15,5,29,46,30,47,11,33],shorthand:43,filenam:26,href:40,inappropri:15,emptyset:25,famili:[25,0,49],decrement:13,select:[36,30,42,17,46,32],proceed:[41,40],x41:25,distinct:[12,11],mathja:[31,6],regist:[0,35,39,24,15,44,34,8,32,20,47],two:[25,44,40,41,15,16,21,18,46,11,49],asn:47,taken:[15,25,41,46,43],imath:25,ispc:[32,24],more:[5,32,13,16,40,18,19,23,26,30,8,11,33,35,37,39,41,17,43,44,46,47,48,49],flat:25,diamond:25,desir:[33,2,30],henc:30,ital:[0,18],aleph:25,particular:[9,0,30,23,26,39,13,49,25,16,35,44,46,47,32,33],known:41,upsilon:25,mathml3:36,cach:15,showmathmenumsi:17,none:[35,22,37,23,38,4,26,18,47],eta:25,mmlorhtml:[46,48,11,2,18],det:25,dev:3,widehat:25,remain:39,paragraph:[25,5,47,43],caveat:30,def:[25,33],deg:25,scan:32,myspan:40,registr:34,share:[16,11,30,3],templat:[31,1,6],succneqq:25,minimum:32,explor:[0,2,42,14,25,26,18,46,47,11],phrase:16,mathinput:43,huge:25,cours:[41,36],newlin:[25,14],awkward:33,secur:[30,2],rather:[0,25,5,7,13,15,16,34,18,19,20,23,8,11,33,4,36,30,41,43,44,46,47,49],anoth:[35,30,43,13,41,14,15,44,8,11,47],comfort:30,csc:25,snippet:[9,10,22,38,3,4,5,40,18,32],ddagger:25,stix:[37,39,25,5,47,11],simpl:[46,40,18],css:[0,2,25,5,7,10,32,16,17,18,45,27,29,30,11,36,37,39,20,49,42,43,46,47,48],isn:15,resourc:[16,11],referenc:5,variant:39,reflect:[24,43],vdash:25,mstack:36,impliedbi:25,associ:[47,37,23,45,26,17,30,8,32,20,34],curlywedg:25,mytim:26,github:30,ambigu:12,caus:[0,36,30,26,45,41,25,14,4,16,27,21,18,43,15,47,32,35,42],callback:[0,27,23,35,12,13,41,24,43,15,26,39,44,8,32,20,45],firefox3:37,merror:49,unrhd:25,help:[30,42,16,3,46,11],soon:[11,2,18,43],trade:46,through:[35,36,30,41,42,25,15,44,46,47,11,33],hierarchi:[11,30],paramet:[9,0,22,33,23,26,13,14,16,35,21,18,11,38,8,32,20,34,43,45],style:[9,0,37,10,39,40,25,24,42,14,4,5,17,18,29,49,47,32,45,16],arial:25,x221a:36,processupdatetim:32,x221e:47,late:[39,2],isreadi:[27,24],pend:13,amsmathaddit:41,processenviron:4,might:[0,36,30,26,41,3,15,16,21,47,11],alter:[4,43],good:[41,2,3],"return":[9,0,36,33,23,35,13,41,14,15,26,34,43,44,8,32,20,45],textstyl:25,hslash:25,getelementbyid:43,rlap:25,mathscr:25,noerror:[25,16,11,2],bigcup:25,easili:[19,16,47],iff:25,x2212:[16,47],found:[0,8,18,3,26],unicod:[25,5,36],x2211:47,button:30,subsystem:24,originaltext:45,weight:[40,33],hard:[11,30,3],realli:26,nless:25,connect:[26,47],beyond:3,orient:[12,33,27,24],nleq:25,shortcom:44,skiptag:4,asynchorn:[41,43],print:[19,49,30],occurr:44,msie:[17,32,48],foreground:49,safari3:37,advanc:[12,10,19,11],offsetx:37,mml:[48,47,27,45],reason:[0,36,26,41,2,42,14,25,16,34,11,46,32],base:[27,37,1,44,12,2,24,46,5,34,45,19,30,33],typeet:43,put:[0,30,44,2,25,16,11],mathr:25,offseti:37,basi:[46,48],succnapprox:25,drupal:1,msbm10:16,showprocessingmessag:[11,18],perhap:26,bumpeq:25,elementjax:[12,45,34,24,27],stixgener:25,getelementsbytagnam:2,assign:[4,26],major:[19,46,11,2],dont:47,boxplu:25,feel:3,exchang:39,lastnam:26,number:[0,27,30,23,5,40,41,14,16,21,18,26,45,8,32,20,34],fadeoutstep:5,done:[13,41,11,47],construct:[41,47],blank:[35,23,43],stabl:30,miss:[25,23],differ:[25,11,30,23,26,41,43,15,16,44,46,47,32,33],script:[0,11,30,1,24,41,2,43,4,16,47,34,18,6,15,31,32,20,8,45],interact:[19,16,47,45],smoother:5,least:[46,47,32],statement:[41,23],illeg:40,mbox:25,store:[9,35,27,37,23,45,41,43,26,8,32,20,47],option:[25,5,6,7,32,16,40,18,21,22,38,28,29,11,33,34,4,37,42,17,47,48],nleftarrow:25,triangleleft:25,ntrianglerighteq:25,selector:[49,18,14],tex2jax_process:4,part:[15,36,30,23,44,41,2,25,4,16,21,6,19,47,33],pars:25,binom:25,cosh:25,kind:47,whenev:[35,36,30],remot:30,remov:[35,43,45,14,4,18,47,32,20],dtd:[16,11],bridg:45,arrang:23,ffff88:49,comput:[30,32,37],nleqslant:25,packag:[39,30,28],expir:9,"null":[9,0,22,37,23,35,33,2,14,4,5,27,34,18,43,38,8,32,20,45],built:[10,2,46],equival:[9,23,41,43,26,40],lim:25,self:36,also:[2,3,25,9,12,14,15,16,17,18,45,23,26,30,11,33,4,36,37,39,42,43,44,47],brack:25,brace:25,index:[16,30,1],addel:9,react:35,most:[27,30,1,23,39,2,49,24,15,34,46,11,33],plan:16,rho:25,alpha:25,rhd:25,vardelta:25,clear:[35,37,23,24,14,15],tpl:1,exp:25,usual:[23,26,41,25,5,34,18,47],leftroot:25,nshortparallel:25,carefulli:[40,43],finv:25,particularli:[46,30],rightleftarrow:25,font:[0,37,5,39,40,49,42,14,25,16,17,18,43,44,19,30,47,11,21],find:[3,43,5,28,6,46,47,32],preremoveclass:18,execut:[0,23,13,41,24,15,26,47],pretti:30,solut:[16,47,30,3],delayedx:23,"public":30,queu:[13,41,23,35],factor:[17,37,18],tagsid:[21,11],precnsim:25,express:[4,15,41,18,35],strut:25,nativ:[36,12,2,19,46,47,11,48],greasemonkei:[11,2],notransl:34,restart:[4,13,41],ie8:46,ie7:46,acut:25,vmatrix:25,common:[36,1,39,40,25,5,34,11,32],set:[0,24,4,5,7,9,32,14,15,16,17,18,45,21,22,23,2,25,26,28,29,30,11,33,35,27,37,38,39,40,41,42,43,44,47,48,49],overrightarrow:25,startup:[10,27,24,41,2,43,15,34,18,32],see:[0,3,4,5,6,8,32,13,15,16,17,18,22,23,25,26,28,29,30,31,11,35,36,37,38,39,41,42,43,44,46,47,49],sec:25,arg:25,close:[5,36,11,3],langl:25,someth:[30,3,43,4,16,18],particip:3,won:[41,30],subscript:25,experi:[30,18],attibut:49,numer:[32,36],complement:25,javascript:[0,1,2,5,6,10,12,15,16,17,18,19,45,21,23,26,29,31,11,33,27,37,39,40,41,42,44,46,47,49],mailbox:[15,39],bmatrix:25,distinguish:8,longrightarrow:25,classnam:2,popul:24,closur:[26,23,43],last:[0,11,30,23,13,49,25,32],delimit:[4,16,25,11,47],hyperlink:47,event:[39,2,43,15,44,47],nvdash:25,context:[4,42,18,23],overset:25,hbar:25,whole:[22,44,43,4,38,32],load:[0,1,2,25,10,32,13,14,15,16,34,18,19,20,23,24,26,28,8,11,35,27,30,39,41,43,44,46,47],markdown:47,simpli:[25,22,30,23,38,13,43,4,26,34,18,11,19,8,32,20,28],point:[25,13,16],instanti:33,schedul:26,usemathmlspac:7,header:[30,1,6],suppli:[32,45,23],bigve:25,mistak:40,zeta:25,gneq:25,atopwithdelim:25,empti:[27,37,23,41,24,47],dur:32,strategi:46,invis:30,fire:[24,2,26],imag:[22,37,38,2,4,5,40,19,30],descib:16,coordin:[13,41,47],understand:47,urcorn:25,sqcap:25,blacksquar:25,look:[9,35,36,37,23,1,43,25,3,14,4,16,11,6,30,47,32,49],solid:[9,25,49],pitchfork:25,lvert:25,"while":[9,0,36,30,16,48,41,2,25,15,5,34,18,44,46,47,11,35],blacktriangleleft:25,nprec:25,behavior:18,circlearrowright:25,bookmarklet:11,everyon:15,loop:45,subsect:34,measuredangl:25,readi:[15,34,24,27],jpg:[4,38,22,40],biguplu:25,itself:[35,36,30,23,13,41,24,25,15,27,18,11,45,47,32,33,49],overleftarrow:25,rightarrow:25,xleftarrow:25,redisplai:14,unexpectedli:16,conflict:47,upuparrow:25,optim:46,domin:39,alert:[15,26,41,23],jsmath2jax:[22,28,11],hander:18,temporari:34,user:[25,36,37,23,43,2,3,14,15,5,17,18,29,46,19,30,47,11,42,28],robust:[15,39],typic:[4,25,30],recent:[19,2],lower:[25,27,24,18,14],task:25,entri:[39,13,49],searchabl:19,person:26,textit:25,expens:46,normals:25,scriptsiz:25,fallingdotseq:25,explan:[16,11],rvert:25,obscur:14,mathinn:25,amp:25,regardless:43,cup:25,blacklozeng:25,ffeeee:25,notifi:15,input:[2,25,7,32,15,16,21,18,45,27,28,8,11,33,34,36,39,20,41,43,46,47],unlik:[19,34],subsequ:25,oslash:25,trueli:43,march:10,format:[10,36,37,39,40,25,16,17,18,45,19,46,8,11,20,47],big:[25,11,30],moodl:1,tomathml:45,game:25,insert:[22,23,2,4,38,34,18,11,6,31,32,20,47],bit:[17,33],diagup:25,semi:49,varkappa:25,signal:[35,27,23,44,12,24,15,26,34,39,32],altough:26,collect:[26,41,45,49,23],"boolean":32,popular:[16,28,1],swarrow:25,stackrel:25,lastest:3,creation:[8,24],some:[1,25,5,32,12,13,15,16,17,18,19,20,23,26,30,8,11,33,34,36,37,45,41,43,46,47,48],back:[5,30,45],emph:25,sampl:[30,44,49,15,16,18],instal:[10,37,16,46,25,5,6,19,30,31,11],scale:[19,17,37,18],delimt:4,mathemat:[0,2,4,5,6,31,32,15,16,17,18,19,20,21,22,38,28,29,30,8,11,34,25,36,37,39,45,41,42,43,46,47],larg:[25,0],slash:11,prod:25,reproduc:43,sqsubseteq:25,tex2jax:[25,36,2,43,4,16,27,18,47,11],machin:[39,30],garamond:25,previou:[26,41,35,23,14],run:[0,2,4,5,7,32,13,15,16,17,21,22,23,24,38,30,11,35,36,37,26,41,43,44,46,47,48],doteqdot:25,odot:25,step:[5,47,1,16],hookleftarrow:25,impor:30,impos:30,ngeqslant:25,materi:43,rangl:25,succcurlyeq:25,block:[37,16,5,17,18,47,11,34],file3:41,file2:41,file1:41,file4:41,bmod:25,within:[0,36,30,23,5,12,25,24,11,43,4,16,21,28,26,44,47,32,33],prec:25,notat:[19,16,25,47,39],isjax:32,announc:44,triangl:25,question:[16,34,3],"long":[25,41,42],custom:[14,25,16,19,46,11],perp:25,includ:[0,1,24,4,5,7,11,12,15,16,17,18,19,21,22,23,2,26,27,28,29,30,8,32,34,25,36,37,38,40,41,42,43,46,47,48,49],suit:[5,36,16],nativemml:[36,48,42,17,46,47,11,20],overleftrightarrow:25,ulcorn:25,doctyp:[46,36],poster:35,atop:25,loadhook:[0,32,26],serif:[25,0,49],link:[30,1,16,12,5,44,11],translat:[8,34,20,47],delta:25,line:[25,22,30,1,2,24,4,16,36,46,47,11],consist:[25,40,41,36,46],rmoustach:25,qquad:25,divideontim:25,geqq:25,similar:[44,23],enlarg:29,constant:15,doesn:[25,37,23,45,2,15,18,30,33],repres:[9,22,16,49,14,4,5,40,18,19,38,20,47],mathdiv:[9,26,41,43],opera10:37,guarante:[0,41,43,13],constortium:19,phantom:25,bigoplu:25,iiint:25,titl:[16,43],sequenti:[44,41],invalid:[25,40],llcorner:25,toaudibl:45,declar:[36,37,49,42,5,17,29],shoveleft:25,xrightarrow:25,department:30,supseteq:25,delayclear:37,msup:[16,47],slice:23,eval:23,newcommand:25,svn:[16,30],rightharpoonup:25,land:25,mimetyp:[45,8,34,20],svg:47,supseteqq:25,depth:25,hello:26,code:[0,2,3,4,6,9,10,32,13,15,16,17,18,22,23,24,25,26,11,35,27,38,39,40,41,43,44,49],partial:25,edg:30,queri:47,tiddlywiki:1,edu:[30,2],privat:[44,34,30],elsewher:43,send:[15,35],becam:39,sens:47,sent:[15,35,32,39],actiontyp:37,unzip:30,gnsim:25,xxxxxxxx:[16,30],mous:[47,37,42,29],tri:[25,0,37,30],ischrom:32,mathit:25,forefox:[30,2],"try":[33,3,15,16,34,8,20],userscript:2,maction:37,pleas:[16,11,40,3],impli:[25,36],smaller:0,fortun:15,natur:[19,16,25,30,47],varupsilon:25,download:[0,30,5,16,18,47],fullnam:26,hspace:25,click:[30,42,17,18,29,6,37,47],append:9,compat:[39,46],appendchild:[9,2],turn:[9,35,36,23,4,17],compar:11,access:[35,30,1,26,45,41,42,25,16,19,33],mathjax:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],can:[0,2,3,4,5,9,11,13,14,15,16,17,18,19,20,23,24,25,26,27,28,30,8,32,33,34,35,36,37,39,41,43,44,46,47,49],vargamma:25,varsigma:25,leq:25,let:[36,30,2,42,16,40,46,32,48],sinh:25,becom:[36,30,23,41,3,15,33],sinc:[0,36,23,35,13,41,49,25,15,16,17,18,11,44,46,47,32,33,21,43],tex4ht:47,rtime:25,convert:[10,36,23,25,2,4,28,19,47,20],convers:25,larger:47,technolog:[19,3],zscale:18,circledast:25,chang:[11,37,1,43,2,42,14,17,30,47,32,45,21],chanc:[4,15,35],firefox:[11,30,2,46,32,48],rgroup:25,appli:[25,33],iskonqueror:32,lessgtr:25,api:[12,10,19,16],smallmatrix:25,from:[0,1,24,4,10,32,15,16,21,18,20,22,2,25,26,28,30,8,11,33,34,35,27,37,38,45,41,42,43,46,47],zip:[16,30],commun:[15,10,3,16],chi:25,doubl:[21,18,29],upgrad:[5,30,3],varphi:25,next:[25,44,45,43],implic:30,few:[25,16,30,28],msqrt:[16,47],src:[22,1,38,41,2,43,4,16,40,11,6,31,32],doublebarwedg:25,projlim:25,"4ac":16,rare:41,versionatleast:32,alik:2,retriev:9,augment:[33,8,34,20],aperson:26,thin:21,sqsupset:25,control:[25,22,37,16,49,11,42,46,4,5,17,18,29,38,30,7,32,48,21],tau:25,lesseqgtr:25,tar:30,process:[0,2,4,9,10,32,13,14,15,16,34,18,20,22,24,38,28,8,11,25,36,26,45,41,43,46,47,48],dfrac:25,newmath:43,high:[19,46,47],tag:[1,24,25,6,32,15,16,40,18,45,21,2,38,28,8,11,4,36,30,20,43,47],tan:25,prece:26,delai:[0,37,23,35,42,14,15,18,29,30],gcd:25,pure:36,getelementsbytagnamen:2,subdirectori:[30,8,20,45],instead:[25,30,16,13,41,43,15,26,47],class4:33,class2:33,sin:25,sim:25,class1:33,simplesup:33,frac:25,overridden:[37,20,34,45,8,33],mspace:[25,36],anothermethod:33,frak:25,redund:[33,18],essenti:[25,47,33],light:[25,33],correspond:[32,37],element:[24,25,5,9,15,16,40,20,22,35,38,36,8,32,33,4,27,37,45,41,43,44,47,49],issu:[0,36,3,14,16,47,11],unaccept:46,allow:[35,36,37,1,26,39,40,41,2,25,14,15,16,17,18,29,49,19,30,33,42],fallback:[30,37],mjx:9,fastest:46,nonumb:25,move:[30,37],nsucc:25,comma:[25,49,11,2,18],dagger:25,mathjax_tooltip:37,movabl:[31,1],coth:25,varxi:25,therefor:25,pixel:37,multimap:25,crash:18,greater:25,handl:[0,36,25,39,41,2,27,15,5,17,44,32,48,34],innermost:40,dai:9,successor:28,gggtr:25,sourceel:[15,45,20,43],anyth:[15,11,3],edit:[16,11,1],smallfrown:25,mode:[25,37,4,16,46,47],varomega:25,"2em":25,genfrac:25,subset:25,reprocessor:36,consum:14,nointerest:35,meta:46,"static":33,our:[30,3],meth:0,ie6:37,special:[25,36,26,49,4,16,18,11,44,19,46,47,32],out:[0,37,41,15,5,17,46,30,47],variabl:[27,23,12,2,24,43,25,26,33],lesseqqgtr:25,matrix:25,categori:41,rel:[0,17,37],moveabl:[31,1],circlearrowleft:25,ref:32,math:[24,4,9,10,32,14,15,16,17,18,19,22,2,38,28,29,30,8,11,34,25,36,37,39,42,43,44,46,47],negthinspac:25,nsucceq:25,insid:1,workflow:36,manipul:43,eqslantgtr:25,releas:[16,2,30],afterward:26,indent:[21,18],could:[0,36,26,12,41,3,43,15,16,47,32,45],ask:[47,21,3,43],succ:25,keep:[30,1,39,43,25,16,46,47],gtreqqless:25,length:[2,23],outsid:[4,46,11],"0em":18,scriptstyl:25,softwar:[19,16,47],rbrace:25,rbrack:25,qualiti:[19,46,47],spadesuit:25,date:[16,30],uplu:25,clubsuit:25,bigsqcup:25,start:[0,30,23,10,40,41,24,44,25,15,16,34,18,6,31,35,47],unknown:36,system:[30,1,16,3,25,5,19,46],messag:[0,11,30,39,16,12,25,24,14,15,5,27,34,18,44,32,35],attach:[15,35,44],termin:4,"final":[26,25,16,40,19,47,11],rsh:25,supset:25,"1em":36,gtreqless:25,blind:47,gtrdot:25,structur:[0,11,23,39,43,15,26,27,32],charact:[25,36,37,49,4,5,21,18,47],htaccess:30,seriou:47,biggl:25,biggm:25,rrightarrow:25,unkown:32,have:[0,1,2,3,4,5,6,32,15,16,17,18,45,23,25,26,30,31,11,33,34,35,36,37,41,43,44,46,47],disadvantag:46,need:[0,1,2,3,4,5,6,8,11,13,14,15,16,17,18,19,20,21,23,24,26,30,31,32,33,34,25,36,37,39,45,41,43,44,47,49],nsim:25,border:[9,25,49],min:25,mid:25,which:[1,24,4,8,32,14,15,16,21,18,20,22,23,2,25,26,27,28,29,30,31,11,33,34,35,36,37,38,40,41,43,45,46,47,49],hbox:25,mit:25,singl:[0,27,23,44,12,41,43,4,16,19,11,49],declaremathoper:25,mathjax_preview:[22,49,4,38,18,47],x22d6:25,unless:[16,11,23,46],who:[15,35,3],eight:46,leftthreetim:25,comparison:[41,32],"class":[33,35,27,23,12,13,25,4,34,18,45,8,20,47,28],underset:25,url:[0,30,2,42,16,11],gather:25,request:[0,35,41,25,15,26,46],face:[30,3,5,21,37,11],inde:[11,2],nmid:25,determin:[11,37,1,24,25,17,18,32],flux:41,fact:[35,34],backsimeq:25,mathjax_messag:14,text:[1,2,25,5,6,9,14,15,16,40,18,19,45,21,22,26,31,11,4,37,38,41,43,17,47],verbos:[39,26,18],perfom:44,perfor:46,bring:47,woth:36,curlyeqsucc:25,lgroup:25,locat:[0,22,30,16,24,2,43,4,5,18,11,15,38,32,20,47,28],jax:[24,7,32,12,15,16,34,18,45,21,2,28,8,11,33,17,27,37,39,20,49,43,46,47,48],vartriangleright:25,forev:2,should:[2,4,6,8,32,13,16,40,18,20,22,23,25,38,28,31,11,34,35,36,30,26,41,43,46,48,49],imagefont:[5,37],vartriangleleft:25,suppos:[26,43],"5px":9,triangleright:25,local:[30,23,16,41,2,43,5,18,11],hope:5,precsim:25,liminf:25,fontwarns:49,ignoreclass:4,leqslant:25,smash:25,enabl:[25,1,4,16,6,31],organ:47,frown:25,stuff:32,she:46,contain:[0,1,2,4,5,9,12,13,14,15,16,34,18,45,22,23,25,26,30,32,35,27,37,38,41,43,47,49],view:[36,37,12,2,16,28,46,19,30],altern:[0,25,26,47,11,33],coooki:9,temporarili:14,substack:25,issafari:32,mathord:25,statu:[0,30,26],error:[0,36,2,3,25,16,34,18,11,32],jmath:25,pattern:[4,18],thumb:41,gtrsim:25,written:[16,6],quickest:16,theta:25,neither:[5,11,40],equiv:[25,46],omicron:25,nshortmid:25,kei:[9,0,23,35,13,15,18,32],job:11,entir:[32,43],closebox:5,ker:25,addit:[0,36,23,16,13,41,25,15,5,18,26,45,8,32,20,49,43],skipstartuptypeset:18,plugin:[1,42,18,19,46,47,11],admin:[31,6],nabla:25,equal:[41,32,33],gnapprox:25,etc:[25,41,18,43],instanc:[9,33,41,34,32,45],equat:[25,22,30,43,4,38,21,18,19,46,47,11,45],futher:46,class3:33,eth:25,limiti:30,lmoustach:25,onchang:43,comment:[16,49,11,18],varnoth:25,dorectori:31,arriv:[15,44],solv:2,arguement:26,respect:[17,37,23],quit:43,showfontmenu:42,"55em":25,quotat:49,compos:36,compon:[0,36,35,12,33,49,24,42,15,44,27,11,19,8,32,20,47],accept:[26,23,43],treat:16,immedi:[0,13,41,24,43,15],smallsetminu:25,both:[0,36,16,39,41,26,18,11,32,33],alignat:25,otf:30,psi:25,togeth:[41,32,36,23],injlim:25,present:[5,36,18,3,35],twoheadrightarrow:25,multi:25,iscallback:23,plain:25,align:[25,36,18],contextu:[36,37,42,17,18,29,47,45],studentdisplai:43,defin:[11,37,29,16,24,41,2,42,25,5,17,18,26,49,32,33,21],glossari:[39,10],layer:1,almost:25,curvearrowright:25,site:[30,1,16,18,19,31,11],archiv:[16,30],revis:30,halt:44,welcom:3,displaystyl:[25,43],parti:15,cross:30,sqrt:[25,16,47],getx:33,extensiondir:34,oint:25,easi:[30,28],difficult:[26,36,44],phi:25,http:[16,2,30,42,46],lleftarrow:25,"8em":[25,21],effect:[13,41,2],mrow:[16,47,36],student:43,php:[1,6],trake:3,executehook:[35,23],off:[25,44,17,46],center:[25,18],well:[30,23,26,49,3,43,15,16,34,18,44,46],exampl:[0,2,3,4,5,7,9,11,13,15,16,17,18,20,21,22,23,25,26,27,29,30,8,32,33,35,36,37,38,40,41,42,43,44,45,46,47,48,49],command:[36,30,23,39,13,41,24,43,25,18,32],choos:[25,46],undefin:[25,16,11,23,26],setx:33,latest:30,curlyeqprec:25,paus:30,less:[4,25,47,32,30],natiov:17,obtain:[30,43,16,18,47,20],mistaken:47,mathclos:25,mathoutput:43,simultan:41,web:[10,37,1,16,24,41,2,44,25,15,5,28,43,6,19,30,31,11,35,47,45],current_them:1,smith:26,textbf:25,cdotp:25,add:[33,25,1,16,13,49,2,4,5,18,45,46,20],book:39,match:[4,35,37],ctrl:18,webpag:28,ntriangleright:25,know:[35,26,2,15,16,8,20,47],cfrac:25,press:18,loader:[8,20],recurs:32,konqueror:[46,32],nofont:5,like:[2,25,13,14,15,16,19,23,35,26,28,8,11,4,36,30,39,41,43,44,46,47,49],lost:26,messagehook:[15,35,32],necessari:[19,32,45],page:[1,24,4,5,6,9,10,11,12,14,15,16,17,18,19,45,22,2,25,26,28,30,31,32,35,36,37,38,41,42,43,44,46,47],captur:39,linux:32,"export":45,superclass:33,proper:[35,32],home:0,librari:[12,41,27,30],glyph:[39,25],kern:25,leak:45,avoid:[25,40,47,36,18],tooltip:37,leav:[9,21,48,43],doublecap:25,twoheadleftarrow:25,daleth:25,upharpoonright:25,journal:39,usag:10,sphericalangl:25,although:[12,16,11,48,35],offset:37,panel:25,varepsilon:25,about:[35,11,37,23,16,25,3,43,15,5,17,28,26,44,30,47,32],actual:[9,0,36,23,43,13,41,25,15,26,18,11,8,32,20],column:21,mod_head:30,mapsto:25,constructor:33,fals:[35,11,37,25,2,42,4,17,18,7,32,33],disabl:[17,37],eqalign:25,own:[30,16,12,41,2,3,25,5,44,8,11,20,47],amsmath:[41,2,25,16,21,11],circledr:25,delaypost:37,automat:[25,13,41,14,4,16,34,46,47,11,33],bigtriangledown:25,guard:18,vphantom:25,merg:[9,32],dcocument:32,transfer:[16,30],support:[10,36,37,16,24,2,3,27,25,5,17,19,46,47,11,48],much:[15,39,46,44],bigcap:25,tracker:[16,3],arg1:26,"var":[9,23,41,2,43,15,26,33],arg2:26,"function":[33,0,23,35,39,13,41,2,25,15,26,24,43,44,8,32,20,47],propto:25,unexpect:[17,18],precnapprox:25,studentansw:43,bodi:[0,43,16,8,11,20],gain:[46,42],inlin:[4,16,11],bug:[30,3,14,16,18,47],made:[45,41,3,44,8,11,20,47],bbbk:25,whether:[25,22,37,38,2,42,43,4,26,17,18,7,32,48],wish:[49,2,3,25,26,46,32],displai:[9,15,22,30,10,45,25,11,42,14,4,5,21,18,29,19,47,36,20,16,43],troubl:16,underleftrightarrow:25,asynchron:[0,27,23,35,39,13,41,15,26,44,32],gtrapprox:25,below:[1,2,25,5,7,9,16,40,18,20,21,22,38,29,46,30,8,32,34,4,37,45,42,44,17,47,48],limit:[25,0,36],otherwis:[0,32,23,14,25,27,6,11,33],problem:[30,26,2,3,25,16,46,47],x03c0:47,"int":[9,26,25],dure:[15,32,45,34,23],implement:[9,0,36,12,25,15,26,34,46,47,33],nolimit:25,inf:25,rightleftharpoon:25,probabl:[30,1,26,15,16,11],oplu:25,helpurl:42,immateri:41,percent:17,detail:[0,4,5,6,10,32,13,15,16,17,18,22,23,25,38,28,29,30,31,11,35,36,37,41,42,43,44,46,47],arctan:25,other:[24,25,32,13,15,16,17,18,19,45,23,35,26,28,30,11,33,34,4,36,37,39,41,43,44,46,47,48],futur:[15,0,46,3,44],varieti:47,downlaod:19,removeaft:5,repeat:[30,1],star:25,thicksim:25,msgroup:36,scientif:39,reliabl:[46,2],rule:[25,5,41,7,18],mathjax_mathml:2,portion:43,eot:30},objtypes:{"0":"py:method"},titles:["The MathJax.Ajax Object","Using MathJax in popular web platforms","Loading MathJax Dynamically","The MathJax Community","The tex2jax Preprocessor","The FontWarnings extension","Installing MathJax in WordPress","The MathML input processor","The MathJax.InputJax Class","The MathJax.HTML Object","MathJax Documentation","Loading and Configuring MathJax","The MathJax API","The MathJax.Callback.Queue Class","The MathJax.Message Object","Using Signals","Getting Started","The NativeMML output processor","The Core Configuration Options","What is MathJax?","The MathJax.OutputJax Class","The TeX input processor","The jsMath2jax Preprocessor","The MathJax.Callback Class","The MathJax Startup Sequence","MathJax TeX and LaTeX Support","Using Callbacks","The MathJax variable","Converting to MathJax from jsMath","The MathZoom extension","Installing and Testing MathJax","Using MathJax in Movable Type","The MathJax.Hub Object","The MathJax Object-Oriented Programming Model","The Base Jax Class","The MathJax.Callback.Signal Class","MathJax MathML Support","The HTML-CSS output processor","The mml2jax Preprocessor","Glossary","Describing HTML snippets","Using Queues","The MathMenu extension","Modifying Math on the Page","Synchronizing your code with MathJax","The MathJax.ElementJax Class","MathJax Output Formats","The MathJax Processing Model","The MMLorHTML configuration options","CSS Style Objects"],objnames:{"0":"Python method"},filenames:["api/ajax","platforms/index","dynamic","community","options/tex2jax","options/FontWarnings","platforms/wordpress","options/MathML","api/inputjax","api/html","index","configuration","api/index","api/queue","api/message","signals","start","options/NativeMML","options/hub","mathjax","api/outputjax","options/TeX","options/jsMath2jax","api/callback","startup","tex","callbacks","api/variable","jsMath","options/MathZoom","installation","platforms/movable-type","api/hub","api/object","api/jax","api/signal","mathml","options/HTML-CSS","options/mml2jax","glossary","HTML-snippets","queues","options/MathMenu","typeset","synchronize","api/elementjax","output","model","options/MMLorHTML","CSS-styles"]}) +\ No newline at end of file diff --git a/docs/html/signals.html b/docs/html/signals.html @@ -0,0 +1,260 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Using Signals — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" /> + <link rel="next" title="Loading MathJax Dynamically" href="dynamic.html" /> + <link rel="prev" title="Using Queues" href="queues.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="dynamic.html" title="Loading MathJax Dynamically" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="queues.html" title="Using Queues" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="synchronize.html" accesskey="U">Synchronizing your code with MathJax</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="using-signals"> +<span id="id1"></span><h1>Using Signals<a class="headerlink" href="#using-signals" title="Permalink to this headline">¶</a></h1> +<p>Because much of MathJax operates asynchronously, it is important for +MathJax to be able to indicated to other components operating on the +page that certain actions have been taken. For example, as MathJax is +starting up, it loads external files such as its configuration files +and the various input and output <a class="reference internal" href="glossary.html#term-jax"><em class="xref std std-term">jax</em></a> that are used on the +page. This means that MathJax may not be ready to run until well +after the <tt class="docutils literal"><span class="pre"><script></span></tt> tag that loads <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> has executed. If +another component on the page needs to call MathJax to process some +mathematics, it will need to know when MathJax is ready to do that. +Thus MathJax needs a way to signal other components that it is +initialized and ready to process mathematics. Other events that might +need to be signaled include the appearance of newly processed +mathematics on the web page, the loading of a new extension, and so +on.</p> +<p>The mechanism provided by MathJax for handling this type of +communication is the <a class="reference internal" href="glossary.html#term-callback-signal"><em class="xref std std-term">Callback Signal</em></a>. The <cite>Callback Signal</cite> +object provides a standardized mechanism for sending and receiving +messages between MathJax and other code on the page. A signal acts +like a mailbox where MathJax places messages for others to read. +Those interested in seeing the messages can register an interest in +receiving a given signal, and when MathJax posts a message on that +signal, all the interested parties will be notified. No new posts to +the signal will be allowed until everyone who is listening to the +signal has had a chance to receive the first one. If a signal causes +a listener to begin an asynchronous operation (such as loading a +file), the listener can indicate that its reply to the signal is going +to be delayed, and MathJax will wait until the asynchronous action is +complete before allowing additional messages to be posted to this +signal. In this way, posting a signal may itself be an asynchronous +action.</p> +<p>The posts to a signal are cached so that if a new listener expresses +an interest in the signal, it will receive all the past posts as well +as any future ones. For example, if a component on the page needs to +know when MathJax is set up, it can express an interest in the startup +signal’s <tt class="docutils literal"><span class="pre">End</span></tt> message. If MathJax is not yet set up, the component +will be signaled when MathJax is ready to begin, but if MathJax is +already set up, the component will receive the <tt class="docutils literal"><span class="pre">End</span></tt> message +immediately, since that message was cached and is available to any new +listeners. In this way, signals can be used to pass messages without +worrying about the timing of when the signaler and listener are ready +to send or receive signals: a listener will receive messages even if +it starts listening after they were sent.</p> +<p>One way that MathJax makes use of this feature is in configuring its +various extensions. The extension may not be loaded when the user’s +configuration code runs, so the configuration code can’t modify the +extension because it isn’t there yet. Fortunately, most extensions +signal when they are loaded and initialized via an <tt class="docutils literal"><span class="pre">Extension</span> <span class="pre">[name]</span> <span class="pre">Ready</span></tt> message, +so the configuration code can implement a listener for that message, and +have the listener perform the configuration when the message arrives. +But even if the extension <em>has</em> already been loaded, this will still +work, because the listener will receive the ready signal even if it +has already been posted. In this way, listening for signals is a +robust method of synchonizing code components no matter when they are +loaded and run.</p> +<p>In some cases, it may be inappropriate for a new listener to receive +past messages that were sent to a signal object. There are two ways to +handle this: first, a new listener can indicate that it doesn’t want +to hear old messages when it attaches itself to a signal object. The +sender can also indicate that past messages are not appropriate for +new listeners. It does this by clearing the message history so that +new listeners have no old posts to hear.</p> +<p>The actual message passed along by the signal can be anything, but is +frequently a string constant indicating the message value. It could +also be a JavaScript array containing data, or an object containing +<cite>key:value</cite> pairs. All the listeners receive the data as part of the +message, and can act on it in whatever ways they see fit.</p> +<div class="section" id="creating-a-listener"> +<h2>Creating a Listener<a class="headerlink" href="#creating-a-listener" title="Permalink to this headline">¶</a></h2> +<p>MathJax maintains two separate signal channels: the <cite>startup signal</cite> +and the <cite>processing signal</cite> (or the <cite>hub signal</cite>). The startup signal +is where the messages about different components starting up and +becoming ready appear. The processing signal is where the messages +are sent about processing mathematics, like the <tt class="docutils literal"><span class="pre">New</span> <span class="pre">Math</span></tt> messages +for when newly typeset mathematics appears on the page. The latter is +cleared when a new processing pass is started (so messages from past +processing runs are not kept).</p> +<p>The easiest way to create a listener is to use either +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Register.StartupHook()</span></tt> or +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Register.MessageHook()</span></tt>. The first sets a listener +on the startup signal, and the latter on the hub processing signal. +You specify the message you want to listen for, and a callback to be +called when it arrives. For example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Register</span><span class="p">.</span><span class="nx">StartupHook</span><span class="p">(</span><span class="s2">"TeX Jax Ready "</span><span class="p">,</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> + <span class="nx">alert</span><span class="p">(</span><span class="s2">"The TeX input jax is loaded and ready!"</span><span class="p">);</span> +<span class="p">});</span> +</pre></div> +</div> +<p>See the <a class="reference internal" href="startup.html#startup-sequence"><em>MathJax Startup Sequence</em></a> page for +details of the messages sent during startup. See also the +<tt class="docutils literal"><span class="pre">test/sample-signals.html</span></tt> file (and its source) for examples of +using signals. This example lists all the signals that occur while +MathJax is processing that page, so it gives useful information about +the details of the signals produced by variuous components.</p> +<p>In this example, the listener starts loading an extra configuration +file (from the same directory as the web page). Since it returns +the callback from that request, the signal processing will wait until +that file is completely loaded before it continues; that is, the +configuration process is suspended until the extra configuration file +has loaded.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Register</span><span class="p">.</span><span class="nx">StartupHook</span><span class="p">(</span><span class="s2">"Begin Config"</span><span class="p">,</span> + <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span><span class="k">return</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"myConfig.js"</span><span class="p">)}</span> +<span class="p">);</span> +</pre></div> +</div> +<p>Here is an example that produces an alert each time new mathematics +is typeset on the page. The message includes the DOM <cite>id</cite> of the +element on the page that contains the newly typeset mathematics as its +second element, so this listener locates the <tt class="docutils literal"><span class="pre"><script></span></tt> tag +for the math, and displays the original source mathematics for it.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Register</span><span class="p">.</span><span class="nx">MessageHook</span><span class="p">(</span><span class="s2">"New Math"</span><span class="p">,</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">message</span><span class="p">)</span> <span class="p">{</span> + <span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">getJaxFor</span><span class="p">(</span><span class="nx">message</span><span class="p">[</span><span class="mi">1</span><span class="p">]).</span><span class="nx">SourceElement</span><span class="p">();</span> + <span class="nx">alert</span><span class="p">(</span><span class="nx">message</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">" "</span><span class="p">)</span><span class="o">+</span><span class="s2">": '"</span><span class="o">+</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span><span class="o">+</span><span class="s2">"'"</span><span class="p">);</span> +<span class="p">})</span> +</pre></div> +</div> +</div> +<div class="section" id="listening-for-all-messages"> +<h2>Listening for All Messages<a class="headerlink" href="#listening-for-all-messages" title="Permalink to this headline">¶</a></h2> +<p>If you want to process <em>every</em> message that passes through a signal +channel, you can do that by registering an interest in the signal +rather than registering a message hook. You do this by calling the +signal’s <a class="reference internal" href="api/signal.html#Interest" title="Interest"><tt class="xref py py-meth docutils literal"><span class="pre">Interest()</span></tt></a> method, as in the following example.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Startup</span><span class="p">.</span><span class="nx">signal</span><span class="p">.</span><span class="nx">Interest</span><span class="p">(</span> + <span class="kd">function</span> <span class="p">(</span><span class="nx">message</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"Startup: "</span><span class="o">+</span><span class="nx">message</span><span class="p">)}</span> +<span class="p">);</span> +<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">signal</span><span class="p">.</span><span class="nx">Interest</span><span class="p">(</span> + <span class="kd">function</span> <span class="p">(</span><span class="nx">message</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"Hub: "</span><span class="o">+</span><span class="nx">message</span><span class="p">)}</span> +<span class="p">);</span> +</pre></div> +</div> +<p>This will cause an alert for every signal that MathJax produces. You +probably don’t want to try this out, since it will produce a <em>lot</em> of +them; instead, use the <tt class="docutils literal"><span class="pre">test/sample-signals.html</span></tt> file, which +displays them in the web page.</p> +<p>See the <a class="reference internal" href="api/signal.html#api-signal"><em>Signal Object</em></a> reference page for details on the +structure and methods of the signal object.</p> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">Using Signals</a><ul> +<li><a class="reference internal" href="#creating-a-listener">Creating a Listener</a></li> +<li><a class="reference internal" href="#listening-for-all-messages">Listening for All Messages</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="queues.html" + title="previous chapter">Using Queues</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="dynamic.html" + title="next chapter">Loading MathJax Dynamically</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/signals.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="dynamic.html" title="Loading MathJax Dynamically" + >next</a> |</li> + <li class="right" > + <a href="queues.html" title="Using Queues" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + <li><a href="synchronize.html" >Synchronizing your code with MathJax</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/start.html b/docs/html/start.html @@ -0,0 +1,382 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Getting Started — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="Installing and Testing MathJax" href="installation.html" /> + <link rel="prev" title="What is MathJax?" href="mathjax.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="installation.html" title="Installing and Testing MathJax" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="mathjax.html" title="What is MathJax?" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="getting-started"> +<span id="id1"></span><h1>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline">¶</a></h1> +<p>MathJax allows you to include mathematics in your web pages, either +using TeX and LaTeX notation, or as MathML. To use MathJax, you will +need to do the following things:</p> +<ol class="arabic simple"> +<li>Obtain a copy of MathJax and make it available on your server.</li> +<li>Configure MathJax to suit the needs of your site.</li> +<li>Link MathJax into the web pages that are to include mathematics.</li> +<li>Put mathematics into your web pages so that MathJax can display +it.</li> +</ol> +<p>Each of these steps is described briefly below, with links to more +detailed explanations. This page gives the quickest and easiest ways +to get MathJax up and running on your web site, but you may want to +read the details in order to customize the setup for your pages.</p> +<div class="section" id="obtaining-and-installing-mathjax"> +<h2>Obtaining and Installing MathJax<a class="headerlink" href="#obtaining-and-installing-mathjax" title="Permalink to this headline">¶</a></h2> +<p>The easiest way to set up MathJax is to obtain the v1.1 archive from +the <a class="reference external" href="http://www.mathjax.org/download/">MathJax download page</a> (you +should obtain a file names something like +<tt class="docutils literal"><span class="pre">mathjax-MathJax-v1.0-X-XXXXXXXX.zip</span></tt>, where the X’s are +random-looking letters and numbers). This archive includes both the +MathJax code and the MathJax webfonts, so it is the only file you +need. (This is different from the beta releases, which had the fonts +separate from the rest of the code).</p> +<p>Unpack the archive and place the resulting MathJax folder onto your +web server at a convenient location where you can include it into your +web pages. For example, making <tt class="docutils literal"><span class="pre">MathJax</span></tt> a top-level directory on +your server would be one natural way to do this. That would let you +refer to the main MathJax file via the URL <tt class="docutils literal"><span class="pre">/MathJax/MathJax.js</span></tt> +from within any page on your server.</p> +<p>Note: While this is the easiest way to set up MathJax initially, there +is a better way to do it if you want to be able to keep your copy of +MathJax up-to-date easily. That uses the <a class="reference external" href="http://git-scm.com/">Git</a> +version control system, and is described in the <a class="reference internal" href="installation.html#getting-mathjax-git"><em>Installing +MathJax</em></a> document. If you prefer using +<a class="reference external" href="http://subversion.apache.org/">Subversion</a>, you can also use that +to get a copy of MathJax (see <a class="reference internal" href="installation.html#getting-mathjax-svn"><em>Installing MathJax via SVN</em></a>).</p> +<p>Once you have MathJax set up on your server, you can test it using the +files in the <tt class="docutils literal"><span class="pre">MathJax/test</span></tt> directory. Load them in your browser +using its web address rather than opening them locally (i.e., use an +<tt class="docutils literal"><span class="pre">http://</span></tt> URL rather than a <tt class="docutils literal"><span class="pre">file://</span></tt> URL). When you view the +<tt class="docutils literal"><span class="pre">index.html</span></tt> file, after a few moments you should see a message that +MathJax appears to be working. If not, check that the files have been +transferred to the server completely and that the permissions allow +the server to access the files and folders that are part of the +MathJax directory. (Be sure to verify the MathJax folder’s permissions +as well.) Check the server log files for any errors that pertain to +the MathJax installation; this may help locate problems in the +permission or locations of files.</p> +</div> +<div class="section" id="configuring-mathjax"> +<h2>Configuring MathJax<a class="headerlink" href="#configuring-mathjax" title="Permalink to this headline">¶</a></h2> +<p>When you include MathJax into your web pages as described below, it +will load the file <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> (i.e., the file named +<tt class="docutils literal"><span class="pre">MathJax.js</span></tt> in the <tt class="docutils literal"><span class="pre">config</span></tt> folder of the main <tt class="docutils literal"><span class="pre">MathJax</span></tt> +folder). This file contains the configuration parameters that +control how MathJax operates. There are comments in it that +explain each of the parameters, and you can edit the file to suit +your needs.</p> +<p>The default settings are appropriate for pages that use TeX as the +input language, but you might still want to adjust some settings; for +example, you might want to include some additional extensions such as +the <tt class="docutils literal"><span class="pre">AMSmath</span></tt> and <tt class="docutils literal"><span class="pre">AMSsymbols</span></tt> extensions. The comments in the +file should help you do this, but more detailed instructions are +included in the <a class="reference internal" href="configuration.html#configuration"><em>Configuring MathJax</em></a> document. +There are also ways to configure MathJax other than by using the +<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file; these are descibed on that page as well.</p> +</div> +<div class="section" id="linking-mathjax-into-a-web-page"> +<h2>Linking MathJax into a web page<a class="headerlink" href="#linking-mathjax-into-a-web-page" title="Permalink to this headline">¶</a></h2> +<p>You can include MathJax in your web page by putting</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span> +</pre></div> +</div> +<p>in your document’s <tt class="docutils literal"><span class="pre"><head></span></tt> block. Here, <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> should +be replaced by the URL for the main MathJax directory, so if you have +put the <tt class="docutils literal"><span class="pre">MathJax</span></tt> directory at the top level of you server’s web +site, you could use</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span> +</pre></div> +</div> +<p>to load MathJax in your page. For example, your page could look like</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span> + <span class="nt"><head></span> + ... + <span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span> + <span class="nt"></head></span> + <span class="nt"><body></span> + ... + <span class="nt"></body></span> +<span class="nt"></html></span> +</pre></div> +</div> +<p>Although it is possible to load MathJax from a site other than your +own web server, there are issues involved in doing so that you need to +take into consideration. See the <a class="reference internal" href="installation.html#cross-domain-linking"><em>Notes About Shared Servers</em></a> for more details. Please do <strong>not</strong> link to +the copy of MathJax at <tt class="docutils literal"><span class="pre">www.mathjax.org</span></tt>, as we do not have the +resources to act as a web service for all the sites on the web that +would like to display mathematics. If you are able to run MathJax +from your own server, please do so (this will probably give you better +response time in any case).</p> +</div> +<div class="section" id="putting-mathematics-in-a-web-page"> +<h2>Putting mathematics in a web page<a class="headerlink" href="#putting-mathematics-in-a-web-page" title="Permalink to this headline">¶</a></h2> +<p>To put mathematics in your web page, you can use either TeX and LaTeX +notation, or MathML notation (or both); the configuration file tells +MathJax which you want to use, and how you plan to indicate the +mathematics when you are using TeX notation. The following sections +tell you how to use each of these formats.</p> +<div class="section" id="tex-and-latex-input"> +<span id="id2"></span><h3>TeX and LaTeX input<a class="headerlink" href="#tex-and-latex-input" title="Permalink to this headline">¶</a></h3> +<p>To process mathematics that is written in <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a> or <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a> +format, include <tt class="docutils literal"><span class="pre">"input/TeX"</span></tt> in your configuration’s <cite>jax</cite> array, +and add <tt class="docutils literal"><span class="pre">"tex2jax.js"</span></tt> to the <cite>extensions</cite> array so that MathJax +will look for TeX-style math delimiters to identify the mathematics on +the page.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2math.js"</span><span class="p">],</span> +<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</span><span class="p">]</span> +</pre></div> +</div> +<p>Note that the default math delimiters are <tt class="docutils literal"><span class="pre">$$...$$</span></tt> and <tt class="docutils literal"><span class="pre">\[...\]</span></tt> +for displayed mathematics, and <tt class="docutils literal"><span class="pre">\(...\)</span></tt> for in-line mathematics. +In particular, the <tt class="docutils literal"><span class="pre">$...$</span></tt> in-line delimiters are <strong>not</strong> used by +default. That is because dollar signs appear too often in +non-mathematical settings, which could cause some text to be treated +as mathematics unexpectedly. For example, with single-dollar +delimiters, ”... the cost is $2.50 for the first one, and $2.00 for +each additional one ...” would cause the phrase “2.50 for the first +one, and” to be treated as mathematics since it falls between dollar +signs. For this reason, if you want to use single-dollars for in-line +math mode, you must enable that explicitly in your configuration:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span><span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s1">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s1">'\\('</span><span class="p">,</span><span class="s1">'\\)'</span><span class="p">]]}</span> +</pre></div> +</div> +<p>See the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file, or the <a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration +options</em></a> page, for additional configuration +parameters that you can specify for the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor.</p> +<p>Here is a complete sample page containing TeX mathematics (which +assumes that <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> is configured as described above):</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span> +<span class="nt"><head></span> +<span class="nt"><title></span>MathJax TeX Test Page<span class="nt"></title></span> +<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span> +<span class="nt"></head></span> +<span class="nt"><body></span> +When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are +$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ +<span class="nt"></body></span> +<span class="nt"></html></span> +</pre></div> +</div> +<p>There are a number of extensions for the TeX input processor that you +might want to add to the <cite>extensions</cite> array. These include:</p> +<ul class="simple"> +<li><cite>TeX/AMSmath.js</cite>, which defines the AMS math environments and +macros,</li> +<li><cite>TeX/AMSsymbols.js</cite>, which defines the macros for the symbols in +the msam10 and msbm10 fonts,</li> +<li><cite>TeX/noErrors.js</cite>, which shows the original TeX code rather than +an error message when there is a problem processing the TeX, and</li> +<li><cite>TeX/noUndefined.js</cite>, which prevents undefined macros from +producing an error message, and instead shows the macro name in red.</li> +</ul> +<p>For example,</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2math.js"</span><span class="p">,</span><span class="s2">"TeX/noErrors.js"</span><span class="p">,</span><span class="s2">"TeX/noUndefined.js"</span><span class="p">,</span> + <span class="s2">"TeX/AMSmath.js"</span><span class="p">,</span><span class="s2">"TeX/AMSsymbols.js"</span><span class="p">]</span> +</pre></div> +</div> +<p>loads all four extensions, in addition to the <tt class="docutils literal"><span class="pre">tex2math</span></tt> +preprocessor.</p> +</div> +<div class="section" id="mathml-input"> +<h3>MathML input<a class="headerlink" href="#mathml-input" title="Permalink to this headline">¶</a></h3> +<p>To process mathematics written in <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a>, include +<tt class="docutils literal"><span class="pre">"input/MathML"</span></tt> in your configuration’s <cite>jax</cite> array, and add +<tt class="docutils literal"><span class="pre">"mml2jax.js"</span></tt> to the <cite>extensions</cite> array so that MathJax will +locate the <tt class="docutils literal"><span class="pre"><math></span></tt> elements in the page automatically.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"mml2jax.js"</span><span class="p">],</span> +<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/MathML"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</span><span class="p">]</span> +</pre></div> +</div> +<p>With this configuration, you would mark your mathematics using +standard <tt class="docutils literal"><span class="pre"><math></span></tt> tags, where <tt class="docutils literal"><span class="pre"><math</span> <span class="pre">display="block"></span></tt> represents +displayed mathematics and <tt class="docutils literal"><span class="pre"><math</span> <span class="pre">display="inline"></span></tt> or just +<tt class="docutils literal"><span class="pre"><math></span></tt> represents in-line mathematics.</p> +<p>Note that this will work in HTML files, not just XHTML files (MathJax +works with both), and that the web page need not be served with any +special MIME-type. Also note that, unless you are using XHTML rather +than HTML, you should not include a namespace prefix for your +<tt class="docutils literal"><span class="pre"><math></span></tt> tags; for example, you should not use <tt class="docutils literal"><span class="pre"><m:math></span></tt> except +in a file where you have tied the <tt class="docutils literal"><span class="pre">m</span></tt> namespace to the MathML DTD.</p> +<p>Here is a complete sample page containing MathML mathematics (which +assumes that <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> is configured as described above):</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span> +<span class="nt"><head></span> +<span class="nt"><title></span>MathJax MathML Test Page<span class="nt"></title></span> +<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span> +<span class="nt"></head></span> +<span class="nt"><body></span> + +When <span class="nt"><math><mi></span>a<span class="nt"></mi><mo></span><span class="ni">&#x2260;</span><span class="nt"></mo><mn></span>0<span class="nt"></mn></math></span>, +there are two solutions to <span class="nt"><math></span> + <span class="nt"><mi></span>a<span class="nt"></mi><msup><mi></span>x<span class="nt"></mi><mn></span>2<span class="nt"></mn></msup></span> + <span class="nt"><mo></span>+<span class="nt"></mo></span> <span class="nt"><mi></span>b<span class="nt"></mi><mi></span>x<span class="nt"></mi></span> + <span class="nt"><mo></span>+<span class="nt"></mo></span> <span class="nt"><mi></span>c<span class="nt"></mi></span> <span class="nt"><mo></span>=<span class="nt"></mo></span> <span class="nt"><mn></span>0<span class="nt"></mn></span> +<span class="nt"></math></span> and they are +<span class="nt"><math</span> <span class="na">mode=</span><span class="s">"display"</span><span class="nt">></span> + <span class="nt"><mi></span>x<span class="nt"></mi></span> <span class="nt"><mo></span>=<span class="nt"></mo></span> + <span class="nt"><mrow></span> + <span class="nt"><mfrac></span> + <span class="nt"><mrow></span> + <span class="nt"><mo></span><span class="ni">&#x2212;</span><span class="nt"></mo></span> + <span class="nt"><mi></span>b<span class="nt"></mi></span> + <span class="nt"><mo></span><span class="ni">&#x00B1;</span><span class="nt"></mo></span> + <span class="nt"><msqrt></span> + <span class="nt"><msup><mi></span>b<span class="nt"></mi><mn></span>2<span class="nt"></mn></msup></span> + <span class="nt"><mo></span><span class="ni">&#x2212;</span><span class="nt"></mo></span> + <span class="nt"><mn></span>4<span class="nt"></mn><mi></span>a<span class="nt"></mi><mi></span>c<span class="nt"></mi></span> + <span class="nt"></msqrt></span> + <span class="nt"></mrow></span> + <span class="nt"><mrow></span> <span class="nt"><mn></span>2<span class="nt"></mn><mi></span>a<span class="nt"></mi></span> <span class="nt"></mrow></span> + <span class="nt"></mfrac></span> + <span class="nt"></mrow></span> + <span class="nt"><mtext></span>.<span class="nt"></mtext></span> +<span class="nt"></math></span> + +<span class="nt"></body></span> +<span class="nt"></html></span> +</pre></div> +</div> +<p>The <tt class="docutils literal"><span class="pre">mml2jax</span></tt> has only a few configuration options; see the +<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file or the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration options</em></a> page for more details.</p> +</div> +</div> +<div class="section" id="where-to-go-from-here"> +<h2>Where to go from here?<a class="headerlink" href="#where-to-go-from-here" title="Permalink to this headline">¶</a></h2> +<p>If you have followed the instructions above, you should now have +MathJax installed and configured on your web server, and you should be +able to use it to write web pages that include mathematics. At this +point, you can start making pages that contain mathematical content!</p> +<p>You could also read more about the details of how to <a class="reference internal" href="configuration.html#configuration"><em>customize +MathJax</em></a>.</p> +<p>If you are trying to use MathJax in blog or wiki software or in some +other content-management system, you might want to read about <a class="reference internal" href="platforms/index.html#platforms"><em>using +MathJax in popular platforms</em></a>.</p> +<p>If you are working on dynamic pages that include mathematics, you +might want to read about the <a class="reference internal" href="api/index.html#mathjax-api"><em>MathJax Application Programming +Interface</em></a> (its API), so you know how to include +mathematics in your interactive pages.</p> +<p>If you are having trouble getting MathJax to work, you can read more +about <a class="reference internal" href="installation.html#installation"><em>installing MathJax</em></a>, or <a class="reference internal" href="configuration.html#loading"><em>loading and +configuring MathJax</em></a>.</p> +<p>Finally, if you have questions or comments, or want to help support +MathJax, you could visit the <a class="reference internal" href="community.html#community-forums"><em>MathJax community forums</em></a> or the <a class="reference internal" href="community.html#community-tracker"><em>MathJax bug tracker</em></a>.</p> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">Getting Started</a><ul> +<li><a class="reference internal" href="#obtaining-and-installing-mathjax">Obtaining and Installing MathJax</a></li> +<li><a class="reference internal" href="#configuring-mathjax">Configuring MathJax</a></li> +<li><a class="reference internal" href="#linking-mathjax-into-a-web-page">Linking MathJax into a web page</a></li> +<li><a class="reference internal" href="#putting-mathematics-in-a-web-page">Putting mathematics in a web page</a><ul> +<li><a class="reference internal" href="#tex-and-latex-input">TeX and LaTeX input</a></li> +<li><a class="reference internal" href="#mathml-input">MathML input</a></li> +</ul> +</li> +<li><a class="reference internal" href="#where-to-go-from-here">Where to go from here?</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="mathjax.html" + title="previous chapter">What is MathJax?</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="installation.html" + title="next chapter">Installing and Testing MathJax</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/start.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="installation.html" title="Installing and Testing MathJax" + >next</a> |</li> + <li class="right" > + <a href="mathjax.html" title="What is MathJax?" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/startup.html b/docs/html/startup.html @@ -0,0 +1,242 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>The MathJax Startup Sequence — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="Synchronizing your code with MathJax" href="synchronize.html" /> + <link rel="prev" title="The MathJax Processing Model" href="model.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="synchronize.html" title="Synchronizing your code with MathJax" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="model.html" title="The MathJax Processing Model" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="the-mathjax-startup-sequence"> +<span id="startup-sequence"></span><h1>The MathJax Startup Sequence<a class="headerlink" href="#the-mathjax-startup-sequence" title="Permalink to this headline">¶</a></h1> +<p>When you load <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> into a web page, it configures itself and +immediately begins loading the components it needs. As MathJax starts +up, it uses its <a class="reference internal" href="synchronize.html#synchronization"><em>signaling mechanism</em></a> +to indicate the actions that it is taking so that MathJax extensions +can tie into the initialization process, and so other applications +within the page can synchronize their actions with MathJax.</p> +<p>The startup process performs the following actions:</p> +<ul class="simple"> +<li>It creates the <tt class="docutils literal"><span class="pre">MathJax</span></tt> variable, and defines the following +subsystems:<ul> +<li><tt class="docutils literal"><span class="pre">MathJax.Object</span></tt> (object-oriented programming model)</li> +<li><tt class="docutils literal"><span class="pre">MathJax.Callback</span></tt> (callbacks, signals, and queues)</li> +<li><tt class="docutils literal"><span class="pre">MathJax.Ajax</span></tt> (file-loading and style-creation code)</li> +<li><tt class="docutils literal"><span class="pre">MathJax.HTML</span></tt> (support code for creating HTML elements)</li> +<li><tt class="docutils literal"><span class="pre">MathJax.Message</span></tt> (manages the menu line in the lower left)</li> +<li><tt class="docutils literal"><span class="pre">MathJax.Hub</span></tt> (the core MathJax functions)</li> +</ul> +</li> +</ul> +<ul class="simple"> +<li>It then creates the base <tt class="docutils literal"><span class="pre">MathJax.InputJax</span></tt>, +<tt class="docutils literal"><span class="pre">MathJax.OutputJax</span></tt>, and <tt class="docutils literal"><span class="pre">MathJax.ElementJax</span></tt> objects.</li> +</ul> +<ul class="simple"> +<li>MathJax sets up the default configuration, and creates the +signal objects used for the startup and hub actions.</li> +</ul> +<ul class="simple"> +<li>MathJax locates the <tt class="docutils literal"><span class="pre"><script></span></tt> tag that loaded the <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> +file, and sets the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.root</span></tt> value to reflect the +location of the MathJax root directory.</li> +</ul> +<ul class="simple"> +<li>MathJax determines the browser being used and its version. It sets +up the <tt class="docutils literal"><span class="pre">MathJax.Hub.Browser</span></tt> object, which includes the browser +name and version, plus <tt class="docutils literal"><span class="pre">isMac</span></tt>, <tt class="docutils literal"><span class="pre">isPC</span></tt>, <tt class="docutils literal"><span class="pre">isMSIE</span></tt>, and so on.</li> +</ul> +<ul class="simple"> +<li>MathJax set up the <tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt> command queue, and +populates it with the commands MathJax runs at startup. This +includes creating the <tt class="docutils literal"><span class="pre">MathJax.Hub.Startup.onload</span></tt> onload +handler that is used to synchronize MathJax’s action with the +loading of the page.</li> +</ul> +<p>Once the <tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt> is created, the following actions are +pushed into the queue:</p> +<ol class="arabic simple"> +<li>Post the <tt class="docutils literal"><span class="pre">Begin</span></tt> startup signal</li> +</ol> +<ol class="arabic simple" start="2"> +<li>Perform the configuration actions:<ul> +<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Config</span></tt> startup signal</li> +<li>Execute the content of the <tt class="docutils literal"><span class="pre"><script></span></tt> that loaded MathJax, +or load the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file if the <tt class="docutils literal"><span class="pre"><script></span></tt> +is empty</li> +<li>If the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.delayStartupUntil</span></tt> value is set, +wait until its condition is met</li> +<li>load the files listed in the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.config</span></tt> array</li> +<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Config</span></tt> startup signal</li> +</ul> +</li> +</ol> +<ol class="arabic simple" start="3"> +<li>Load the cookie values:<ul> +<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Cookie</span></tt> startup signal</li> +<li>Load the menu cookie values</li> +<li>Use the cookie to set the renderer, if it is set</li> +<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Cookie</span></tt> startup signal</li> +</ul> +</li> +</ol> +<ol class="arabic simple" start="4"> +<li>Define the MathJax styles:<ul> +<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Styles</span></tt> startup signal</li> +<li>Load the stylesheet files from the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.stylesheets</span></tt> array</li> +<li>Define the stylesheet described in <tt class="docutils literal"><span class="pre">MathJax.Hub.config.styles</span></tt></li> +<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Styles</span></tt> startup signal</li> +</ul> +</li> +</ol> +<ol class="arabic simple" start="5"> +<li>Load the jax configuration files:<ul> +<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Jax</span></tt> startup signal</li> +<li>Load the jax config files from the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.jax</span></tt> array<ul> +<li>The jax will register themselves when they are loaded</li> +</ul> +</li> +<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Jax</span></tt> startup signal</li> +</ul> +</li> +</ol> +<ol class="arabic simple" start="6"> +<li>Load the extension files:<ul> +<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Extension</span></tt> startup signal</li> +<li>Load the files from the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.extensions</span></tt> array<ul> +<li>Most extensions will post a <tt class="docutils literal"><span class="pre">Extension</span> <span class="pre">[name]</span> <span class="pre">Ready</span></tt> +startup message when they are loaded (where <tt class="docutils literal"><span class="pre">[name]</span></tt> is +the name of the extension)</li> +</ul> +</li> +<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Extension</span></tt> startup signal</li> +</ul> +</li> +</ol> +<ol class="arabic simple" start="7"> +<li>Wait for the onload handler to fire</li> +</ol> +<ol class="arabic simple" start="8"> +<li>Set <tt class="docutils literal"><span class="pre">MathJax.isReady</span></tt> to <tt class="docutils literal"><span class="pre">true</span></tt></li> +</ol> +<ol class="arabic simple" start="9"> +<li>Perform the typesetting pass (preprocessors and processors)<ul> +<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Typeset</span></tt> startup signal</li> +<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">PreProcess</span></tt> hub signal</li> +<li>Run the registered preprocessors</li> +<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">PreProcess</span></tt> hub signal</li> +<li>Clear the hub signal history</li> +<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Process</span></tt> hub signal</li> +<li>Process the math script elements on the page<ul> +<li>Each new math element generates a <tt class="docutils literal"><span class="pre">New</span> <span class="pre">Math</span></tt> hub signal +with the math element’s ID</li> +</ul> +</li> +<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Process</span></tt> hub signal</li> +<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Typeset</span></tt> startup signal</li> +</ul> +</li> +</ol> +<ol class="arabic simple" start="10"> +<li>Post the <tt class="docutils literal"><span class="pre">End</span></tt> startup signal</li> +</ol> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="model.html" + title="previous chapter">The MathJax Processing Model</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="synchronize.html" + title="next chapter">Synchronizing your code with MathJax</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/startup.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="synchronize.html" title="Synchronizing your code with MathJax" + >next</a> |</li> + <li class="right" > + <a href="model.html" title="The MathJax Processing Model" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/synchronize.html b/docs/html/synchronize.html @@ -0,0 +1,164 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Synchronizing your code with MathJax — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="Using Callbacks" href="callbacks.html" /> + <link rel="prev" title="The MathJax Startup Sequence" href="startup.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="callbacks.html" title="Using Callbacks" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="startup.html" title="The MathJax Startup Sequence" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="synchronizing-your-code-with-mathjax"> +<span id="synchronization"></span><h1>Synchronizing your code with MathJax<a class="headerlink" href="#synchronizing-your-code-with-mathjax" title="Permalink to this headline">¶</a></h1> +<p>MathJax performs much of its activity asynchronously, meaning that +the calls that you make to initiate these actions will return before +the actions are completed, and your code will continue to run even +though the actions have not been finished (and may not even be started +yet). Actions such as loading files, loading web-based fonts, and +creating stylesheets all happen asynchronously within the browser, and +since JavaScript has no method of halting a program while waiting for +an action to complete, synchronizing your code with these types of +actions is made much more difficult. MathJax used three mechanisms to +overcome this language shortcoming: callbacks, queues, and signals.</p> +<p><strong>Callbacks</strong> are functions that are called when an action is +completed, so that your code can continue where it left off when the +action was initiated. Rather than have a single routine that +initiates an action, waits for it to complete, and then goes on, you +break the function into two parts: a first part that sets up and +initiates the action, and a second that runs after the action is +finished. Callbacks are similar to event handlers that you attach to +DOM elements, and are called when an certain action occurs. See the +<a class="reference internal" href="api/callback.html#api-callback"><em>Callback Object</em></a> reference page for details of +how to specify a callback.</p> +<p><strong>Queues</strong> are MathJax’s means of synchronizing actions that must be +performed sequentially, even when they involve asynchronous events +like loading files or dynamically creating stylesheets. The actions +that you put in the queue are <cite>Callback</cite> objects that will be perfomed +in sequence, with MathJax handling the linking of one action to the +next. MathJax maintains a master queue that you can use to +synchronize with MathJax, but you can also create your own private +queues for actions that need to be synchronized with each other, but +not to MathJax as a whole. See the <a class="reference internal" href="api/queue.html#api-queue"><em>Queue Object</em></a> +reference page for more details.</p> +<p><strong>Signals</strong> are another means of synchronizing your own code with +MathJax. Many of the important actions that MathJax takes (like +typesetting new math on the page, or loading an external component) +are “announced” by posting a message to a special object called a +<cite>Signal</cite>. Your code can register an interest in receiving one or more +of these signals by providing a callback to be called when the signal +is posted. When the signal arrives, MathJax will call your code. +This works somewhat like an event handler, except that many different +types of events can go through the same signal, and the signals have a +“memory”, meaning that if you register an interest in a particular +type of signal and that signal has already occurred, you will be told +about the past occurrances as well as any future ones. See the +<a class="reference internal" href="api/signal.html#api-signal"><em>Signal Object</em></a> reference page for more details. +See also the <tt class="docutils literal"><span class="pre">test/sample-signals.html</span></tt> file in the MathJax <tt class="docutils literal"><span class="pre">test</span></tt> +directory for a working example of using signals.</p> +<p>Each of these is explained in more detail in the links below:</p> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="callbacks.html">Using Callbacks</a></li> +<li class="toctree-l1"><a class="reference internal" href="queues.html">Using Queues</a></li> +<li class="toctree-l1"><a class="reference internal" href="signals.html">Using Signals</a></li> +</ul> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h4>Previous topic</h4> + <p class="topless"><a href="startup.html" + title="previous chapter">The MathJax Startup Sequence</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="callbacks.html" + title="next chapter">Using Callbacks</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/synchronize.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="callbacks.html" title="Using Callbacks" + >next</a> |</li> + <li class="right" > + <a href="startup.html" title="The MathJax Startup Sequence" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/tex.html b/docs/html/tex.html @@ -0,0 +1,1155 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>MathJax TeX and LaTeX Support — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="MathJax MathML Support" href="mathml.html" /> + <link rel="prev" title="Using MathJax in Movable Type" href="platforms/movable-type.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="mathml.html" title="MathJax MathML Support" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="platforms/movable-type.html" title="Using MathJax in Movable Type" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="mathjax-tex-and-latex-support"> +<span id="tex-support"></span><h1>MathJax TeX and LaTeX Support<a class="headerlink" href="#mathjax-tex-and-latex-support" title="Permalink to this headline">¶</a></h1> +<p>The support for TeX and LaTeX in MathJax consists of two parts: the +<cite>tex2jax</cite> preprocessor, and the TeX input processor. The first of +these looks for mathematics within your web page (indicated by math +delimiters like <tt class="docutils literal"><span class="pre">$$...$$</span></tt>) and marks the mathematics for later +processing by MathJax. The TeX input processor is what converts the +TeX notation into MathJax’s internal format, where one of MathJax’s +output processors then displays it in the web page.</p> +<p>The <cite>tex2jax</cite> preprocessor can be configured to look for whatever +markers you want to use for your math delimiters. See the +<a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration options</em></a> section for +details on how to customize the action of <cite>tex2jax</cite>.</p> +<p>The TeX input processor handles conversion of your mathematical +notation into MathJax’s internal format (which is essentially MathML), +and so acts as a TeX to MathML converter. The TeX input processor has +few configuration options (see the <a class="reference internal" href="options/TeX.html#configure-tex"><em>TeX options</em></a> section for details), but it can also be customized +through the use of extensions that define additional functionality +(see the <a class="reference internal" href="#tex-extensions"><em>TeX and LaTeX extensions</em></a> below).</p> +<p>Note that the TeX input processor implements <strong>only</strong> the math-mode +macros of TeX and LaTeX, not the text-mode macros. MathJax expects +that you will use standard HTML tags to handle formatting the text of +your page; it only handles the mathematics. So, for example, MathJax +does not implement <tt class="docutils literal"><span class="pre">\emph</span></tt> or +<tt class="docutils literal"><span class="pre">\begin{enumerate}...\end{enumerate}</span></tt> or other text-mode macros or +environments. You must use HTML to handle such formatting tasks. If +you need a LaTeX-to-HTML converter, you should consider <a class="reference external" href="http://www.google.com/search?q=latex+to+html+converter">other options</a>.</p> +<div class="section" id="tex-and-latex-in-html-documents"> +<h2>TeX and LaTeX in HTML documents<a class="headerlink" href="#tex-and-latex-in-html-documents" title="Permalink to this headline">¶</a></h2> +<p>Keep in mind that your mathematics is part of an HTML document, so you +need to be aware of the special characters used by HTML as part of its +markup. There cannot be HTML tags within the math delimiters (other +than <tt class="docutils literal"><span class="pre"><BR></span></tt>) as TeX-formatted math does not include HTML tags. +Also, since the mathematics is initially given as text on the page, +you need to be careful that your mathematics doesn’t look like HTML +tags to the browser (which parses the page before MathJax gets to see +it). In particular, that means that you have to be careful about +things like less-than and greater-than signs (<tt class="docutils literal"><span class="pre"><``and</span> <span class="pre">``></span></tt>), and +ampersands (<tt class="docutils literal"><span class="pre">&</span></tt>), which have special meaning to the browsers. For +example,</p> +<div class="highlight-latex"><div class="highlight"><pre>... when <span class="s">$</span><span class="nb">x<y</span><span class="s">$</span> we have ... +</pre></div> +</div> +<p>will cause a problem, because the brower will think <tt class="docutils literal"><span class="pre"><y</span></tt> is the +beginning of a tag named <tt class="docutils literal"><span class="pre">y</span></tt> (even though there is no such tag in +HTML). When this happens, the browser will think the tag continues up +to the next <tt class="docutils literal"><span class="pre">></span></tt> in the document (typically the end of the next +actual tag in the HTML file), and you may notice that you are missing +part of the text of the document. In the example above, the `` we +have ...`` will not be displayed because the browser thinks it is +part of the tag starting at <tt class="docutils literal"><span class="pre"><y</span></tt>. This is one indication you can +use to spot this prooblem; it is a common error and should be avoided.</p> +<p>Usually, it is sufficient to simply put spaces around these symbols to +cause the browser to avoid them, so</p> +<div class="highlight-latex"><div class="highlight"><pre>... when <span class="s">$</span><span class="nb">x < y</span><span class="s">$</span> we have ... +</pre></div> +</div> +<p>should work. Alternatively, you can use the HTML entities <tt class="docutils literal"><span class="pre">&lt;</span></tt>, +<tt class="docutils literal"><span class="pre">&gt;</span></tt> and <tt class="docutils literal"><span class="pre">&amp;</span></tt> to encode these characters so that the browser +will not interpret them, but MathJax will. E.g.,</p> +<div class="highlight-latex"><div class="highlight"><pre>... when <span class="s">$</span><span class="nb">x &lt; y</span><span class="s">$</span> we have ... +</pre></div> +</div> +<p>Finally, there are <tt class="docutils literal"><span class="pre">\lt</span></tt> and <tt class="docutils literal"><span class="pre">\gt</span></tt> macros defined to make it +easier to enter <tt class="docutils literal"><span class="pre"><</span></tt> and <tt class="docutils literal"><span class="pre">></span></tt> using TeX-like syntax:</p> +<div class="highlight-latex"><div class="highlight"><pre>... when <span class="s">$</span><span class="nb">x </span><span class="nv">\lt</span><span class="nb"> y</span><span class="s">$</span> we have ... +</pre></div> +</div> +<p>Keep in mind that the browser interprets your text before MathJax +does.</p> +</div> +<div class="section" id="tex-and-latex-extensions"> +<span id="tex-extensions"></span><h2>TeX and LaTeX extensions<a class="headerlink" href="#tex-and-latex-extensions" title="Permalink to this headline">¶</a></h2> +<p>While MathJax includes nearly all of the Plain TeX math macros, and +many of the LaTeX macros and environments, note everything is +implemented in the core TeX input processor. Some less-used commands +are defined in extensions to the TeX processor. MathJax will load +some extensions automatically when you first use the commands they +implement (for example, the <tt class="docutils literal"><span class="pre">\def</span></tt> and <tt class="docutils literal"><span class="pre">\newcommand</span></tt> macros are +implemented in the <tt class="docutils literal"><span class="pre">TeX/newcommand.js</span></tt> extension, but MathJax loads +this extension itself when you use those macros). Not all extensions +are set up to load automatically, however, so you may need to request +some extensions explicitly yourself.</p> +<p>To enable any of the TeX extensions, simply add the appropriate string +(e.g., <cite>“TeX/AMSmath.js”</cite>) to your config’s <cite>extensions</cite> array. The +main extensions are described below.</p> +<div class="section" id="amsmath-and-amssymbol"> +<h3>AMSmath and AMSsymbol<a class="headerlink" href="#amsmath-and-amssymbol" title="Permalink to this headline">¶</a></h3> +<p>The <cite>AMSmath</cite> extension implements AMS math environments and macros, +and the <cite>AMSsymbol</cite> extension implements macros for accessing the AMS +symbol fonts. To use these extensions, add them to your <cite>extensions</cite> array.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"TeX/AMSmath.js"</span><span class="p">,</span> <span class="s2">"TeX/AMSsymbol.js"</span><span class="p">,</span> <span class="p">...]</span> +</pre></div> +</div> +<p>See the list of commands at the end of this document for details about +what commands are implemented in these extensions.</p> +<p>The <cite>AMSmath</cite> extension will be loaded automatically when you first +use one of the math environments it defines, but you will have to load +it explicitly if you want to use the other macros that it defines. +The <cite>AMSsymbols</cite> extension is not loaded automatically, so you must +include it explicitly if you want to use the macros it defines.</p> +</div> +<div class="section" id="autobold"> +<h3>Autobold<a class="headerlink" href="#autobold" title="Permalink to this headline">¶</a></h3> +<p>The <cite>autobold</cite> extension adds <tt class="docutils literal"><span class="pre">\boldsymbol{...}</span></tt> around mathematics that +appears in a section of an HTML page that is in bold.</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"TeX/autobold.js"</span><span class="p">]</span> +</pre></div> +</div> +</div> +<div class="section" id="noerrors"> +<h3>noErrors<a class="headerlink" href="#noerrors" title="Permalink to this headline">¶</a></h3> +<p>The <cite>noErrors</cite> extension prevents TeX error messages from being +displayed and shows the original TeX code instead. You can configure +whether the dollar signs are shown or not for in-line math, and +whether to put all the TeX on one line or use multiple lines (if the +original text contained line breaks).</p> +<p>To enable the <cite>noErrors</cite> extension and configure it, use</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"TeX/noErrors.js"</span><span class="p">,</span> <span class="p">...],</span> +<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">noErrors</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">inlineDelimiters</span><span class="o">:</span> <span class="p">[</span><span class="s2">""</span><span class="p">,</span><span class="s2">""</span><span class="p">],</span> <span class="c1">// or ["$","$"] or ["\\(","\\)"]</span> + <span class="nx">multiLine</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span> <span class="c1">// false for TeX on all one line</span> + <span class="nx">style</span><span class="o">:</span> <span class="p">{</span> + <span class="s2">"font-family"</span><span class="o">:</span> <span class="s2">"serif"</span><span class="p">,</span> + <span class="s2">"font-size"</span><span class="o">:</span> <span class="s2">"80%"</span><span class="p">,</span> + <span class="s2">"color"</span><span class="o">:</span> <span class="s2">"black"</span><span class="p">,</span> + <span class="s2">"border"</span><span class="o">:</span> <span class="s2">"1px solid"</span> + <span class="c1">// add any additional CSS styles that you want</span> + <span class="c1">// (be sure there is no extra comma at the end of the last item)</span> + <span class="p">}</span> + <span class="p">}</span> +<span class="p">}</span> +</pre></div> +</div> +<p>Display-style math is always shown in multi-line format, and without +delimiters, as it will already be set off in its own centered +paragraph, like standard display mathematics.</p> +<p>The default settings place the invalid TeX in a multi-line box with a +black border. If you want it to look as though the TeX is just part of +the paragraph, use</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">noErrors</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">inlineDelimiters</span><span class="o">:</span> <span class="p">[</span><span class="s2">"$"</span><span class="p">,</span><span class="s2">"$"</span><span class="p">],</span> <span class="c1">// or ["",""] or ["\\(","\\)"]</span> + <span class="nx">multiLine</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span> + <span class="nx">style</span><span class="o">:</span> <span class="p">{</span> + <span class="s2">"font-size"</span><span class="o">:</span> <span class="s2">"normal"</span><span class="p">,</span> + <span class="s2">"border"</span><span class="o">:</span> <span class="s2">""</span> + <span class="p">}</span> + <span class="p">}</span> +<span class="p">}</span> +</pre></div> +</div> +<p>You may also wish to set the font family, as the default is “serif”</p> +</div> +<div class="section" id="noundefined"> +<h3>noUndefined<a class="headerlink" href="#noundefined" title="Permalink to this headline">¶</a></h3> +<p>The <cite>noUndefined</cite> extension causes undefined control sequences to be +shown as their macro names rather than produce an error message. So +<tt class="docutils literal"><span class="pre">$X_{\xxx}$</span></tt> would display as an “X” with a subscript consiting of the +text <tt class="docutils literal"><span class="pre">\xxx</span></tt> in red.</p> +<p>To enable and configure this extension, use for example</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"TeX/noUndefined.js"</span><span class="p">,</span> <span class="p">...],</span> +<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">noUndefined</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">attributes</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">mathcolor</span><span class="o">:</span> <span class="s2">"red"</span><span class="p">,</span> + <span class="nx">mathbackground</span><span class="o">:</span> <span class="s2">"#FFEEEE"</span><span class="p">,</span> + <span class="nx">mathsize</span><span class="o">:</span> <span class="s2">"90%"</span> + <span class="p">}</span> + <span class="p">}</span> + <span class="p">}</span> +</pre></div> +</div> +<p>The <tt class="docutils literal"><span class="pre">attributes</span></tt> setting specifies attributes to apply to the +<tt class="docutils literal"><span class="pre">mtext</span></tt> element that encodes the name of the undefined macro. The +default settings set <tt class="docutils literal"><span class="pre">mathcolor</span></tt> to <tt class="docutils literal"><span class="pre">"red"</span></tt>, but do not set any +other attributes. This example sets the background to a light pink, +and reduces the font size slightly.</p> +</div> +<div class="section" id="unicode-support"> +<h3>Unicode support<a class="headerlink" href="#unicode-support" title="Permalink to this headline">¶</a></h3> +<p>The <cite>unicode</cite> extension implements a <tt class="docutils literal"><span class="pre">\unicode{}</span></tt> extension to TeX +that allows arbitrary unicode code points to be entered in your +mathematics. You can specify the height and depth of the character +(the width is determined by the browser), and the default font from +which to take the character.</p> +<p>Examples:</p> +<div class="highlight-latex"><div class="highlight"><pre><span class="k">\unicode</span><span class="nb">{</span>65<span class="nb">}</span> <span class="c">% the character 'A'</span> +<span class="k">\unicode</span><span class="nb">{</span>x41<span class="nb">}</span> <span class="c">% the character 'A'</span> +<span class="k">\unicode</span><span class="na">[.55,0.05]</span><span class="nb">{</span>x22D6<span class="nb">}</span> <span class="c">% less-than with dot, with height .55em and depth 0.05em</span> +<span class="k">\unicode</span><span class="na">[.55,0.05][Geramond]</span><span class="nb">{</span>x22D6<span class="nb">}</span> <span class="c">% same taken from Geramond font</span> +<span class="k">\unicode</span><span class="na">[Garamond]</span><span class="nb">{</span>x22D6<span class="nb">}</span> <span class="c">% same, but with default height, depth of .8em,.2em</span> +</pre></div> +</div> +<p>Once a size and font are provided for a given unicode point, they need +not be specified again in subsequent <tt class="docutils literal"><span class="pre">\unicode{}</span></tt> calls for that +character.</p> +<p>The result of <tt class="docutils literal"><span class="pre">\unicode{...}</span></tt> will have TeX class <cite>ORD</cite> (i.e., it +will act like a variable). Use <tt class="docutils literal"><span class="pre">\mathbin{...}</span></tt>, <tt class="docutils literal"><span class="pre">\mathrel{...}</span></tt>, +etc., to specify a different class.</p> +<p>Note that a font list can be given in the <tt class="docutils literal"><span class="pre">\unicode{}</span></tt> macro, but +Internet Explorer has a buggy implementation of the <tt class="docutils literal"><span class="pre">font-family</span></tt> +CSS attribute where it only looks in the first font in the list that +is actually installed on the system, and if the required glyph is not +in that font, it does not look at later fonts, but goes directly to +the default font as set in the <cite>Internet-Options/Font</cite> panel. For +this reason, the default font list for the <tt class="docutils literal"><span class="pre">\unicode{}</span></tt> macro is +<tt class="docutils literal"><span class="pre">STIXGeneral,</span> <span class="pre">'Arial</span> <span class="pre">Unicode</span> <span class="pre">MS'</span></tt>, so if the user has <a class="reference internal" href="glossary.html#term-stix"><em class="xref std std-term">STIX</em></a> +fonts, the symbol will be taken from that (almost all the symbols are +in <cite>STIXGeneral</cite>), otherwise MathJax tries <cite>Arial Unicode MS</cite>.</p> +<p>The <cite>unicode</cite> extension is loaded automatically when you first use the +<tt class="docutils literal"><span class="pre">\unicode{}</span></tt> macro, so you do not need to add it to the <cite>extensions</cite> +array. You can configure the extension as follows:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">unicode</span><span class="o">:</span> <span class="p">{</span> + <span class="nx">fonts</span><span class="o">:</span> <span class="s2">"STIXGeneral, 'Arial Unicode MS'"</span> + <span class="p">}</span> +<span class="p">}</span> +</pre></div> +</div> +</div> +</div> +<div class="section" id="supported-latex-commands"> +<span id="tex-commands"></span><h2>Supported LaTeX commands<a class="headerlink" href="#supported-latex-commands" title="Permalink to this headline">¶</a></h2> +<p>This is a long list of the TeX macros supported by MathJax. If the +macro is defined in an extension, the name of the extension follows +the macro name.</p> +<div class="highlight-latex"><div class="highlight"><pre># +( ) +. +/ +[ ] +<span class="k">\!</span> +<span class="k">\#</span> +<span class="k">\$</span> +<span class="k">\%</span> +<span class="k">\&</span> +<span class="k">\:</span> +<span class="k">\;</span> +<span class="k">\\</span> +<span class="k">\_</span> +<span class="k">\{</span> <span class="k">\}</span> +<span class="k">\|</span> + +A +<span class="k">\above</span> +<span class="k">\abovewithdelims</span> +<span class="k">\acute</span> +<span class="k">\aleph</span> +<span class="k">\alpha</span> +<span class="k">\amalg</span> +<span class="k">\And</span> +<span class="k">\angle</span> +<span class="k">\approx</span> +<span class="k">\approxeq</span> AMSsymbols +<span class="k">\arccos</span> +<span class="k">\arcsin</span> +<span class="k">\arctan</span> +<span class="k">\arg</span> +<span class="k">\array</span> +<span class="k">\Arrowvert</span> +<span class="k">\arrowvert</span> +<span class="k">\ast</span> +<span class="k">\asymp</span> +<span class="k">\atop</span> +<span class="k">\atopwithdelims</span> + +B +<span class="k">\backepsilon</span> AMSsymbols +<span class="k">\backprime</span> AMSsymbols +<span class="k">\backsim</span> AMSsymbols +<span class="k">\backsimeq</span> AMSsymbols +<span class="k">\backslash</span> +<span class="k">\backslash</span> +<span class="k">\bar</span> +<span class="k">\barwedge</span> AMSsymbols +<span class="k">\Bbb</span> +<span class="k">\Bbbk</span> AMSsymbols +<span class="k">\bbFont</span> +<span class="k">\because</span> AMSsymbols +<span class="k">\begin</span> ... <span class="k">\end</span> +<span class="k">\begin</span><span class="nb">{</span>align*<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>align*<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>alignat*<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>alignat*<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>alignat<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>alignat<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>alignedat<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>alignedat<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>aligned<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>aligned<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>align<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>align<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>array<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>array<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>Bmatrix<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>Bmatrix<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>bmatrix<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>bmatrix<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>cases<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>cases<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>eqnarray*<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>eqnarray*<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>eqnarray<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>eqnarray<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>equation*<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>equation*<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>equation<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>equation<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>gather*<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>gather*<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>gathered<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>gathered<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>gather<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>gather<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>matrix<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>matrix<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>multline*<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>multline*<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>multline<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>multline<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>pmatrix<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>pmatrix<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>smallmatrix<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>smallmatrix<span class="nb">}</span> AMSmath +<span class="k">\begin</span><span class="nb">{</span>split<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>split<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>subarray<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>subarray<span class="nb">}</span> AMSmath +<span class="k">\begin</span><span class="nb">{</span>Vmatrix<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>Vmatrix<span class="nb">}</span> +<span class="k">\begin</span><span class="nb">{</span>vmatrix<span class="nb">}</span> ... <span class="k">\end</span><span class="nb">{</span>vmatrix<span class="nb">}</span> +<span class="k">\beta</span> +<span class="k">\beth</span> AMSsymbols +<span class="k">\between</span> AMSsymbols +<span class="k">\bf</span> +<span class="k">\Big</span> +<span class="k">\big</span> +<span class="k">\bigcap</span> +<span class="k">\bigcirc</span> +<span class="k">\bigcup</span> +<span class="k">\Bigg</span> +<span class="k">\bigg</span> +<span class="k">\Biggl</span> +<span class="k">\biggl</span> +<span class="k">\Biggm</span> +<span class="k">\biggm</span> +<span class="k">\Biggr</span> +<span class="k">\biggr</span> +<span class="k">\Bigl</span> +<span class="k">\bigl</span> +<span class="k">\Bigm</span> +<span class="k">\bigm</span> +<span class="k">\bigodot</span> +<span class="k">\bigoplus</span> +<span class="k">\bigotimes</span> +<span class="k">\Bigr</span> +<span class="k">\bigr</span> +<span class="k">\bigsqcup</span> +<span class="k">\bigstar</span> AMSsymbols +<span class="k">\bigtriangledown</span> +<span class="k">\bigtriangleup</span> +<span class="k">\biguplus</span> +<span class="k">\bigvee</span> +<span class="k">\bigwedge</span> +<span class="k">\binom</span> AMSmath +<span class="k">\blacklozenge</span> AMSsymbols +<span class="k">\blacksquare</span> AMSsymbols +<span class="k">\blacktriangle</span> AMSsymbols +<span class="k">\blacktriangledown</span> AMSsymbols +<span class="k">\blacktriangleleft</span> AMSsymbols +<span class="k">\blacktriangleright</span> AMSsymbols +<span class="k">\bmod</span> +<span class="k">\boldsymbol</span> +<span class="k">\bot</span> +<span class="k">\bowtie</span> +<span class="k">\Box</span> AMSsymbols +<span class="k">\boxdot</span> AMSsymbols +<span class="k">\boxed</span> AMSmath +<span class="k">\boxminus</span> AMSsymbols +<span class="k">\boxplus</span> AMSsymbols +<span class="k">\boxtimes</span> AMSsymbols +<span class="k">\brace</span> +<span class="k">\bracevert</span> +<span class="k">\brack</span> +<span class="k">\breve</span> +<span class="k">\buildrel</span> +<span class="k">\bullet</span> +<span class="k">\Bumpeq</span> AMSsymbols +<span class="k">\bumpeq</span> AMSsymbols + +C +<span class="k">\cal</span> +<span class="k">\Cap</span> AMSsymbols +<span class="k">\cap</span> +<span class="k">\cases</span> +<span class="k">\cdot</span> +<span class="k">\cdotp</span> +<span class="k">\cdots</span> +<span class="k">\centerdot</span> AMSsymbols +<span class="k">\cfrac</span> AMSmath +<span class="k">\check</span> +<span class="k">\checkmark</span> AMSsymbols +<span class="k">\chi</span> +<span class="k">\choose</span> +<span class="k">\circ</span> +<span class="k">\circeq</span> AMSsymbols +<span class="k">\circlearrowleft</span> AMSsymbols +<span class="k">\circlearrowright</span> AMSsymbols +<span class="k">\circledast</span> AMSsymbols +<span class="k">\circledcirc</span> AMSsymbols +<span class="k">\circleddash</span> AMSsymbols +<span class="k">\circledR</span> AMSsymbols +<span class="k">\circledS</span> AMSsymbols +<span class="k">\clubsuit</span> +<span class="k">\colon</span> +<span class="k">\color</span> +<span class="k">\complement</span> AMSsymbols +<span class="k">\cong</span> +<span class="k">\coprod</span> +<span class="k">\cos</span> +<span class="k">\cosh</span> +<span class="k">\cot</span> +<span class="k">\coth</span> +<span class="k">\cr</span> +<span class="k">\csc</span> +<span class="k">\Cup</span> AMSsymbols +<span class="k">\cup</span> +<span class="k">\curlyeqprec</span> AMSsymbols +<span class="k">\curlyeqsucc</span> AMSsymbols +<span class="k">\curlyvee</span> AMSsymbols +<span class="k">\curlywedge</span> AMSsymbols +<span class="k">\curvearrowleft</span> AMSsymbols +<span class="k">\curvearrowright</span> AMSsymbols + +D +<span class="k">\dagger</span> +<span class="k">\daleth</span> AMSsymbols +<span class="k">\dashleftarrow</span> AMSsymbols +<span class="k">\dashrightarrow</span> AMSsymbols +<span class="k">\dashv</span> +<span class="k">\dbinom</span> AMSmath +<span class="k">\ddagger</span> +<span class="k">\ddddot</span> AMSmath +<span class="k">\dddot</span> AMSmath +<span class="k">\ddot</span> +<span class="k">\ddots</span> +<span class="k">\DeclareMathOperator</span> AMSmath +<span class="k">\def</span> +<span class="k">\deg</span> +<span class="k">\Delta</span> +<span class="k">\delta</span> +<span class="k">\det</span> +<span class="k">\dfrac</span> AMSmath +<span class="k">\diagdown</span> AMSsymbols +<span class="k">\diagup</span> AMSsymbols +<span class="k">\Diamond</span> AMSsymbols +<span class="k">\diamond</span> +<span class="k">\diamondsuit</span> +<span class="k">\digamma</span> AMSsymbols +<span class="k">\dim</span> +<span class="k">\displaylines</span> +<span class="k">\displaystyle</span> +<span class="k">\div</span> +<span class="k">\divideontimes</span> AMSsymbols +<span class="k">\dot</span> +<span class="k">\Doteq</span> AMSsymbols +<span class="k">\doteq</span> +<span class="k">\doteqdot</span> AMSsymbols +<span class="k">\dotplus</span> AMSsymbols +<span class="k">\dots</span> +<span class="k">\dotsb</span> +<span class="k">\dotsc</span> +<span class="k">\dotsi</span> +<span class="k">\dotsm</span> +<span class="k">\dotso</span> +<span class="k">\doublebarwedge</span> AMSsymbols +<span class="k">\doublecap</span> AMSsymbols +<span class="k">\doublecup</span> AMSsymbols +<span class="k">\Downarrow</span> +<span class="k">\downarrow</span> +<span class="k">\downdownarrows</span> AMSsymbols +<span class="k">\downharpoonleft</span> AMSsymbols +<span class="k">\downharpoonright</span> AMSsymbols + +E +<span class="k">\ell</span> +<span class="k">\emptyset</span> +<span class="k">\enspace</span> +<span class="k">\epsilon</span> +<span class="k">\eqalign</span> +<span class="k">\eqalignno</span> +<span class="k">\eqcirc</span> AMSsymbols +<span class="k">\eqsim</span> AMSsymbols +<span class="k">\eqslantgtr</span> AMSsymbols +<span class="k">\eqslantless</span> AMSsymbols +<span class="k">\equiv</span> +<span class="k">\eta</span> +<span class="k">\eth</span> AMSsymbols +<span class="k">\exists</span> +<span class="k">\exp</span> + +F +<span class="k">\fallingdotseq</span> AMSsymbols +<span class="k">\fbox</span> +<span class="k">\Finv</span> AMSsymbols +<span class="k">\flat</span> +<span class="k">\forall</span> +<span class="k">\frac</span> +<span class="k">\frac</span> AMSmath +<span class="k">\frak</span> +<span class="k">\frown</span> + +G +<span class="k">\Game</span> AMSsymbols +<span class="k">\Gamma</span> +<span class="k">\gamma</span> +<span class="k">\gcd</span> +<span class="k">\ge</span> +<span class="k">\genfrac</span> AMSmath +<span class="k">\geq</span> +<span class="k">\geqq</span> AMSsymbols +<span class="k">\geqslant</span> AMSsymbols +<span class="k">\gets</span> +<span class="k">\gg</span> +<span class="k">\ggg</span> AMSsymbols +<span class="k">\gggtr</span> AMSsymbols +<span class="k">\gimel</span> AMSsymbols +<span class="k">\gnapprox</span> AMSsymbols +<span class="k">\gneq</span> AMSsymbols +<span class="k">\gneqq</span> AMSsymbols +<span class="k">\gnsim</span> AMSsymbols +<span class="k">\grave</span> +<span class="k">\gt</span> +<span class="k">\gt</span> +<span class="k">\gtrapprox</span> AMSsymbols +<span class="k">\gtrdot</span> AMSsymbols +<span class="k">\gtreqless</span> AMSsymbols +<span class="k">\gtreqqless</span> AMSsymbols +<span class="k">\gtrless</span> AMSsymbols +<span class="k">\gtrsim</span> AMSsymbols +<span class="k">\gvertneqq</span> AMSsymbols + +H +<span class="k">\hat</span> +<span class="k">\hbar</span> +<span class="k">\hbox</span> +<span class="k">\heartsuit</span> +<span class="k">\hom</span> +<span class="k">\hookleftarrow</span> +<span class="k">\hookrightarrow</span> +<span class="k">\hphantom</span> +<span class="k">\hskip</span> +<span class="k">\hslash</span> AMSsymbols +<span class="k">\hspace</span> +<span class="k">\Huge</span> +<span class="k">\huge</span> + +I +<span class="k">\idotsint</span> AMSmath +<span class="k">\iff</span> +<span class="k">\iiiint</span> AMSmath +<span class="k">\iiint</span> +<span class="k">\iint</span> +<span class="k">\Im</span> +<span class="k">\imath</span> +<span class="k">\impliedby</span> AMSsymbols +<span class="k">\implies</span> AMSsymbols +<span class="k">\in</span> +<span class="k">\inf</span> +<span class="k">\infty</span> +<span class="k">\injlim</span> AMSmath +<span class="k">\int</span> +<span class="k">\intercal</span> AMSsymbols +<span class="k">\intop</span> +<span class="k">\iota</span> +<span class="k">\it</span> + +J +<span class="k">\jmath</span> +<span class="k">\Join</span> AMSsymbols + +K +<span class="k">\kappa</span> +<span class="k">\ker</span> +<span class="k">\kern</span> + +L +<span class="k">\label</span> +<span class="k">\Lambda</span> +<span class="k">\lambda</span> +<span class="k">\land</span> +<span class="k">\langle</span> +<span class="k">\LARGE</span> +<span class="k">\Large</span> +<span class="k">\large</span> +<span class="k">\LaTeX</span> +<span class="k">\lbrace</span> +<span class="k">\lbrack</span> +<span class="k">\lceil</span> +<span class="k">\ldotp</span> +<span class="k">\ldots</span> +<span class="k">\le</span> +<span class="k">\leadsto</span> AMSsymbols +<span class="k">\left</span> +<span class="k">\Leftarrow</span> +<span class="k">\leftarrow</span> +<span class="k">\leftarrowtail</span> AMSsymbols +<span class="k">\leftharpoondown</span> +<span class="k">\leftharpoonup</span> +<span class="k">\leftleftarrows</span> AMSsymbols +<span class="k">\Leftrightarrow</span> +<span class="k">\leftrightarrow</span> +<span class="k">\leftrightarrows</span> AMSsymbols +<span class="k">\leftrightharpoons</span> AMSsymbols +<span class="k">\leftrightsquigarrow</span> AMSsymbols +<span class="k">\leftroot</span> +<span class="k">\leftthreetimes</span> AMSsymbols +<span class="k">\leq</span> +<span class="k">\leqalignno</span> +<span class="k">\leqq</span> AMSsymbols +<span class="k">\leqslant</span> AMSsymbols +<span class="k">\lessapprox</span> AMSsymbols +<span class="k">\lessdot</span> AMSsymbols +<span class="k">\lesseqgtr</span> AMSsymbols +<span class="k">\lesseqqgtr</span> AMSsymbols +<span class="k">\lessgtr</span> AMSsymbols +<span class="k">\lesssim</span> AMSsymbols +<span class="k">\lfloor</span> +<span class="k">\lg</span> +<span class="k">\lgroup</span> +<span class="k">\lhd</span> AMSsymbols +<span class="k">\lim</span> +<span class="k">\liminf</span> +<span class="k">\limits</span> +<span class="k">\limsup</span> +<span class="k">\ll</span> +<span class="k">\llap</span> +<span class="k">\llcorner</span> AMSsymbols +<span class="k">\Lleftarrow</span> AMSsymbols +<span class="k">\lll</span> AMSsymbols +<span class="k">\llless</span> AMSsymbols +<span class="k">\lmoustache</span> +<span class="k">\ln</span> +<span class="k">\lnapprox</span> AMSsymbols +<span class="k">\lneq</span> AMSsymbols +<span class="k">\lneqq</span> AMSsymbols +<span class="k">\lnot</span> +<span class="k">\lnsim</span> AMSsymbols +<span class="k">\log</span> +<span class="k">\Longleftarrow</span> +<span class="k">\longleftarrow</span> +<span class="k">\Longleftrightarrow</span> +<span class="k">\longleftrightarrow</span> +<span class="k">\longmapsto</span> +<span class="k">\Longrightarrow</span> +<span class="k">\longrightarrow</span> +<span class="k">\looparrowleft</span> AMSsymbols +<span class="k">\looparrowright</span> AMSsymbols +<span class="k">\lor</span> +<span class="k">\lower</span> +<span class="k">\lozenge</span> AMSsymbols +<span class="k">\lrcorner</span> AMSsymbols +<span class="k">\Lsh</span> AMSsymbols +<span class="k">\lt</span> +<span class="k">\ltimes</span> AMSsymbols +<span class="k">\lVert</span> AMSmath +<span class="k">\lvert</span> AMSmath +<span class="k">\lvertneqq</span> AMSsymbols + +M +<span class="k">\maltese</span> AMSsymbols +<span class="k">\mapsto</span> +<span class="k">\mathbb</span> +<span class="k">\mathbf</span> +<span class="k">\mathbin</span> +<span class="k">\mathcal</span> +<span class="k">\mathchoice</span> +<span class="k">\mathclose</span> +<span class="k">\mathfrak</span> +<span class="k">\mathinner</span> +<span class="k">\mathit</span> +<span class="k">\mathop</span> +<span class="k">\mathopen</span> +<span class="k">\mathord</span> +<span class="k">\mathpunct</span> +<span class="k">\mathrel</span> +<span class="k">\mathring</span> AMSmath +<span class="k">\mathrm</span> +<span class="k">\mathscr</span> +<span class="k">\mathsf</span> +<span class="k">\mathstrut</span> +<span class="k">\mathtt</span> +<span class="k">\matrix</span> +<span class="k">\max</span> +<span class="k">\mbox</span> +<span class="k">\measuredangle</span> AMSsymbols +<span class="k">\mho</span> AMSsymbols +<span class="k">\mid</span> +<span class="k">\min</span> +<span class="k">\mit</span> +<span class="k">\mkern</span> +<span class="k">\mod</span> +<span class="k">\models</span> +<span class="k">\moveleft</span> +<span class="k">\moveright</span> +<span class="k">\mp</span> +<span class="k">\mskip</span> +<span class="k">\mspace</span> +<span class="k">\mu</span> +<span class="k">\multimap</span> AMSsymbols + +N +<span class="k">\nabla</span> +<span class="k">\natural</span> +<span class="k">\ncong</span> AMSsymbols +<span class="k">\ne</span> +<span class="k">\nearrow</span> +<span class="k">\neg</span> +<span class="k">\negmedspace</span> AMSmath +<span class="k">\negthickspace</span> AMSmath +<span class="k">\negthinspace</span> +<span class="k">\neq</span> +<span class="k">\newcommand</span> +<span class="k">\newenvironment</span> +<span class="k">\newline</span> +<span class="k">\nexists</span> AMSsymbols +<span class="k">\ngeq</span> AMSsymbols +<span class="k">\ngeqq</span> AMSsymbols +<span class="k">\ngeqslant</span> AMSsymbols +<span class="k">\ngtr</span> AMSsymbols +<span class="k">\ni</span> +<span class="k">\nLeftarrow</span> AMSsymbols +<span class="k">\nleftarrow</span> AMSsymbols +<span class="k">\nLeftrightarrow</span> AMSsymbols +<span class="k">\nleftrightarrow</span> AMSsymbols +<span class="k">\nleq</span> AMSsymbols +<span class="k">\nleqq</span> AMSsymbols +<span class="k">\nleqslant</span> AMSsymbols +<span class="k">\nless</span> AMSsymbols +<span class="k">\nmid</span> AMSsymbols +<span class="k">\nobreakspace</span> AMSmath +<span class="k">\nolimits</span> +<span class="k">\nonumber</span> +<span class="k">\normalsize</span> +<span class="k">\not</span> +<span class="k">\notag</span> +<span class="k">\notin</span> +<span class="k">\nparallel</span> AMSsymbols +<span class="k">\nprec</span> AMSsymbols +<span class="k">\npreceq</span> AMSsymbols +<span class="k">\nRightarrow</span> AMSsymbols +<span class="k">\nrightarrow</span> AMSsymbols +<span class="k">\nshortmid</span> AMSsymbols +<span class="k">\nshortparallel</span> AMSsymbols +<span class="k">\nsim</span> AMSsymbols +<span class="k">\nsucc</span> AMSsymbols +<span class="k">\nsucceq</span> AMSsymbols +<span class="k">\ntriangleleft</span> AMSsymbols +<span class="k">\ntrianglelefteq</span> AMSsymbols +<span class="k">\ntriangleright</span> AMSsymbols +<span class="k">\ntrianglerighteq</span> AMSsymbols +<span class="k">\nu</span> +<span class="k">\nVDash</span> AMSsymbols +<span class="k">\nVdash</span> AMSsymbols +<span class="k">\nvDash</span> AMSsymbols +<span class="k">\nvdash</span> AMSsymbols +<span class="k">\nwarrow</span> + +O +<span class="k">\odot</span> +<span class="k">\oint</span> +<span class="k">\oldstyle</span> +<span class="k">\Omega</span> +<span class="k">\omega</span> +<span class="k">\omicron</span> +<span class="k">\ominus</span> +<span class="k">\operatorname</span> AMSmath +<span class="k">\oplus</span> +<span class="k">\oslash</span> +<span class="k">\otimes</span> +<span class="k">\over</span> +<span class="k">\overbrace</span> +<span class="k">\overleftarrow</span> +<span class="k">\overleftrightarrow</span> +<span class="k">\overline</span> +<span class="k">\overrightarrow</span> +<span class="k">\overset</span> +<span class="k">\overwithdelims</span> +<span class="k">\owns</span> + +P +<span class="k">\parallel</span> +<span class="k">\partial</span> +<span class="k">\perp</span> +<span class="k">\phantom</span> +<span class="k">\Phi</span> +<span class="k">\phi</span> +<span class="k">\Pi</span> +<span class="k">\pi</span> +<span class="k">\pitchfork</span> AMSsymbols +<span class="k">\pm</span> +<span class="k">\pmatrix</span> +<span class="k">\pmb</span> +<span class="k">\pmod</span> +<span class="k">\pod</span> +<span class="k">\Pr</span> +<span class="k">\prec</span> +<span class="k">\precapprox</span> AMSsymbols +<span class="k">\preccurlyeq</span> AMSsymbols +<span class="k">\preceq</span> +<span class="k">\precnapprox</span> AMSsymbols +<span class="k">\precneqq</span> AMSsymbols +<span class="k">\precnsim</span> AMSsymbols +<span class="k">\precsim</span> AMSsymbols +<span class="k">\prime</span> +<span class="k">\prod</span> +<span class="k">\projlim</span> AMSmath +<span class="k">\propto</span> +<span class="k">\Psi</span> +<span class="k">\psi</span> + +Q +<span class="k">\qquad</span> +<span class="k">\quad</span> + +R +<span class="k">\raise</span> +<span class="k">\rangle</span> +<span class="k">\rbrace</span> +<span class="k">\rbrack</span> +<span class="k">\rceil</span> +<span class="k">\Re</span> +<span class="k">\require</span> +<span class="k">\restriction</span> AMSsymbols +<span class="k">\rfloor</span> +<span class="k">\rgroup</span> +<span class="k">\rhd</span> AMSsymbols +<span class="k">\rho</span> +<span class="k">\right</span> +<span class="k">\Rightarrow</span> +<span class="k">\rightarrow</span> +<span class="k">\rightarrowtail</span> AMSsymbols +<span class="k">\rightharpoondown</span> +<span class="k">\rightharpoonup</span> +<span class="k">\rightleftarrows</span> AMSsymbols +<span class="k">\rightleftharpoons</span> +<span class="k">\rightleftharpoons</span> AMSsymbols +<span class="k">\rightrightarrows</span> AMSsymbols +<span class="k">\rightsquigarrow</span> AMSsymbols +<span class="k">\rightthreetimes</span> AMSsymbols +<span class="k">\risingdotseq</span> AMSsymbols +<span class="k">\rlap</span> +<span class="k">\rm</span> +<span class="k">\rmoustache</span> +<span class="k">\root</span> +<span class="k">\Rrightarrow</span> AMSsymbols +<span class="k">\Rsh</span> AMSsymbols +<span class="k">\rtimes</span> AMSsymbols +<span class="k">\Rule</span> +<span class="k">\rVert</span> AMSmath +<span class="k">\rvert</span> AMSmath + +S +<span class="k">\S</span> +<span class="k">\scr</span> +<span class="k">\scriptscriptstyle</span> +<span class="k">\scriptsize</span> +<span class="k">\scriptstyle</span> +<span class="k">\searrow</span> +<span class="k">\sec</span> +<span class="k">\setminus</span> +<span class="k">\sf</span> +<span class="k">\sharp</span> +<span class="k">\shortmid</span> AMSsymbols +<span class="k">\shortparallel</span> AMSsymbols +<span class="k">\shoveleft</span> AMSmath +<span class="k">\shoveright</span> AMSmath +<span class="k">\sideset</span> AMSmath +<span class="k">\Sigma</span> +<span class="k">\sigma</span> +<span class="k">\sim</span> +<span class="k">\simeq</span> +<span class="k">\sin</span> +<span class="k">\sinh</span> +<span class="k">\skew</span> +<span class="k">\small</span> +<span class="k">\smallfrown</span> AMSsymbols +<span class="k">\smallint</span> +<span class="k">\smallsetminus</span> AMSsymbols +<span class="k">\smallsmile</span> AMSsymbols +<span class="k">\smash</span> +<span class="k">\smile</span> +<span class="k">\Space</span> +<span class="k">\space</span> +<span class="k">\spadesuit</span> +<span class="k">\sphericalangle</span> AMSsymbols +<span class="k">\sqcap</span> +<span class="k">\sqcup</span> +<span class="k">\sqrt</span> +<span class="k">\sqsubset</span> AMSsymbols +<span class="k">\sqsubseteq</span> +<span class="k">\sqsupset</span> AMSsymbols +<span class="k">\sqsupseteq</span> +<span class="k">\square</span> AMSsymbols +<span class="k">\stackrel</span> +<span class="k">\star</span> +<span class="k">\strut</span> +<span class="k">\Subset</span> AMSsymbols +<span class="k">\subset</span> +<span class="k">\subseteq</span> +<span class="k">\subseteqq</span> AMSsymbols +<span class="k">\substack</span> AMSmath +<span class="k">\succ</span> +<span class="k">\succapprox</span> AMSsymbols +<span class="k">\succcurlyeq</span> AMSsymbols +<span class="k">\succeq</span> +<span class="k">\succnapprox</span> AMSsymbols +<span class="k">\succneqq</span> AMSsymbols +<span class="k">\succnsim</span> AMSsymbols +<span class="k">\succsim</span> AMSsymbols +<span class="k">\sum</span> +<span class="k">\sup</span> +<span class="k">\Supset</span> AMSsymbols +<span class="k">\supset</span> +<span class="k">\supseteq</span> +<span class="k">\supseteqq</span> AMSsymbols +<span class="k">\surd</span> +<span class="k">\swarrow</span> + +T +<span class="k">\tag</span> +<span class="k">\tan</span> +<span class="k">\tanh</span> +<span class="k">\tau</span> +<span class="k">\tbinom</span> AMSmath +<span class="k">\TeX</span> +<span class="k">\text</span> +<span class="k">\textbf</span> +<span class="k">\textit</span> +<span class="k">\textrm</span> +<span class="k">\textstyle</span> +<span class="k">\tfrac</span> AMSmath +<span class="k">\therefore</span> AMSsymbols +<span class="k">\Theta</span> +<span class="k">\theta</span> +<span class="k">\thickapprox</span> AMSsymbols +<span class="k">\thicksim</span> AMSsymbols +<span class="k">\thinspace</span> +<span class="k">\tilde</span> +<span class="k">\times</span> +<span class="k">\Tiny</span> +<span class="k">\tiny</span> +<span class="k">\to</span> +<span class="k">\top</span> +<span class="k">\triangle</span> +<span class="k">\triangledown</span> AMSsymbols +<span class="k">\triangleleft</span> +<span class="k">\trianglelefteq</span> AMSsymbols +<span class="k">\triangleq</span> AMSsymbols +<span class="k">\triangleright</span> +<span class="k">\trianglerighteq</span> AMSsymbols +<span class="k">\tt</span> +<span class="k">\twoheadleftarrow</span> AMSsymbols +<span class="k">\twoheadrightarrow</span> AMSsymbols + +U +<span class="k">\ulcorner</span> AMSsymbols +<span class="k">\underbrace</span> +<span class="k">\underleftarrow</span> +<span class="k">\underleftrightarrow</span> +<span class="k">\underline</span> +<span class="k">\underrightarrow</span> +<span class="k">\underset</span> +<span class="k">\unicode</span> +<span class="k">\unlhd</span> AMSsymbols +<span class="k">\unrhd</span> AMSsymbols +<span class="k">\Uparrow</span> +<span class="k">\uparrow</span> +<span class="k">\Updownarrow</span> +<span class="k">\updownarrow</span> +<span class="k">\upharpoonleft</span> AMSsymbols +<span class="k">\upharpoonright</span> AMSsymbols +<span class="k">\uplus</span> +<span class="k">\uproot</span> +<span class="k">\Upsilon</span> +<span class="k">\upsilon</span> +<span class="k">\upuparrows</span> AMSsymbols +<span class="k">\urcorner</span> AMSsymbols + +V +<span class="k">\varDelta</span> AMSsymbols +<span class="k">\varepsilon</span> +<span class="k">\varGamma</span> AMSsymbols +<span class="k">\varinjlim</span> AMSmath +<span class="k">\varkappa</span> AMSsymbols +<span class="k">\varLambda</span> AMSsymbols +<span class="k">\varliminf</span> AMSmath +<span class="k">\varlimsup</span> AMSmath +<span class="k">\varnothing</span> AMSsymbols +<span class="k">\varOmega</span> AMSsymbols +<span class="k">\varPhi</span> AMSsymbols +<span class="k">\varphi</span> +<span class="k">\varPi</span> AMSsymbols +<span class="k">\varpi</span> +<span class="k">\varprojlim</span> AMSmath +<span class="k">\varpropto</span> AMSsymbols +<span class="k">\varPsi</span> AMSsymbols +<span class="k">\varrho</span> +<span class="k">\varSigma</span> AMSsymbols +<span class="k">\varsigma</span> +<span class="k">\varTheta</span> AMSsymbols +<span class="k">\vartheta</span> +<span class="k">\vartriangle</span> AMSsymbols +<span class="k">\vartriangleleft</span> AMSsymbols +<span class="k">\vartriangleright</span> AMSsymbols +<span class="k">\varUpsilon</span> AMSsymbols +<span class="k">\varXi</span> AMSsymbols +<span class="k">\vcenter</span> +<span class="k">\Vdash</span> AMSsymbols +<span class="k">\vDash</span> AMSsymbols +<span class="k">\vdash</span> +<span class="k">\vdots</span> +<span class="k">\vec</span> +<span class="k">\vee</span> +<span class="k">\veebar</span> AMSsymbols +<span class="k">\verb</span> +<span class="k">\Vert</span> +<span class="k">\vert</span> +<span class="k">\vphantom</span> +<span class="k">\Vvdash</span> AMSsymbols + +W +<span class="k">\wedge</span> +<span class="k">\widehat</span> +<span class="k">\widetilde</span> +<span class="k">\wp</span> +<span class="k">\wr</span> + +X +<span class="k">\Xi</span> +<span class="k">\xi</span> +<span class="k">\xleftarrow</span> AMSmath +<span class="k">\xrightarrow</span> AMSmath + +Y +<span class="k">\yen</span> AMSsymbols + +Z +<span class="k">\zeta</span> +</pre></div> +</div> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">MathJax TeX and LaTeX Support</a><ul> +<li><a class="reference internal" href="#tex-and-latex-in-html-documents">TeX and LaTeX in HTML documents</a></li> +<li><a class="reference internal" href="#tex-and-latex-extensions">TeX and LaTeX extensions</a><ul> +<li><a class="reference internal" href="#amsmath-and-amssymbol">AMSmath and AMSsymbol</a></li> +<li><a class="reference internal" href="#autobold">Autobold</a></li> +<li><a class="reference internal" href="#noerrors">noErrors</a></li> +<li><a class="reference internal" href="#noundefined">noUndefined</a></li> +<li><a class="reference internal" href="#unicode-support">Unicode support</a></li> +</ul> +</li> +<li><a class="reference internal" href="#supported-latex-commands">Supported LaTeX commands</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="platforms/movable-type.html" + title="previous chapter">Using MathJax in Movable Type</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="mathml.html" + title="next chapter">MathJax MathML Support</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/tex.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="mathml.html" title="MathJax MathML Support" + >next</a> |</li> + <li class="right" > + <a href="platforms/movable-type.html" title="Using MathJax in Movable Type" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/html/typeset.html b/docs/html/typeset.html @@ -0,0 +1,321 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Modifying Math on the Page — MathJax v1.1 documentation</title> + <link rel="stylesheet" href="_static/mj.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: '', + VERSION: '1.1', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <link rel="top" title="MathJax v1.1 documentation" href="index.html" /> + <link rel="next" title="The MathJax API" href="api/index.html" /> + <link rel="prev" title="Loading MathJax Dynamically" href="dynamic.html" /> + </head> + <body> + + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + accesskey="I">index</a></li> + <li class="right" > + <a href="api/index.html" title="The MathJax API" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="dynamic.html" title="Loading MathJax Dynamically" + accesskey="P">previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="modifying-math-on-the-page"> +<span id="typeset-math"></span><h1>Modifying Math on the Page<a class="headerlink" href="#modifying-math-on-the-page" title="Permalink to this headline">¶</a></h1> +<p>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 <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> 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.</p> +<p>You should not simply call this method directly, however. Because +MathJax operates asynchonously (see <a class="reference internal" href="synchronize.html#synchronization"><em>Synchronizing with MathJax</em></a> for details), you need to be sure that +your call to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> is synchronized with the +other actions that MathJax is taking. For example, it may already be +typesetting portions of the page, or it may be waiting for an output +jax to load, etc., and so you need to queue to typeset action to be +performed after MathJax has finished whatever else it may be doing. +That may be immediately, but it may not, and there is no way to tell.</p> +<p>To queue the typeset action, use the command</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Typeset"</span><span class="p">,</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">]);</span> +</pre></div> +</div> +<p>This will cause MathJax to typeset the page when it is next able to do +so. It guarantees that the typesetting will synchronize properly +with the loading of jax, extensions, fonts, stylesheets, and other +asynchornous activity, and is the only truely safe way to ask MathJax +to process additional material.</p> +<p>The <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> command also accepts a parameter +that is a DOM element whose contents is to be typeset. That could be +a paragraph, or a <tt class="docutils literal"><span class="pre"><div></span></tt> element, or even a MathJax math +<tt class="docutils literal"><span class="pre"><script></span></tt> tag. It could also be a the DOM <cite>id</cite> of such an object, in +which case, MathJax will look up the DOM element for you. So</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Typeset"</span><span class="p">,</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">,</span><span class="s2">"MathExample"</span><span class="p">]);</span> +</pre></div> +</div> +<p>would typeset the mathematics contained in the element whose <cite>id</cite> is +<tt class="docutils literal"><span class="pre">MathExample</span></tt>. This is equivalent to</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">math</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="s2">"MathExample"</span><span class="p">);</span> +<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Typeset"</span><span class="p">,</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">,</span><span class="nx">math</span><span class="p">]);</span> +</pre></div> +</div> +<p>If no element or element <cite>id</cite> is provided, the whole document is +typeset.</p> +<p>Note that the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Queue()</span></tt> method will return +immediately, regardless of whether the typesetting has taken place or +not, so you can not assume that the mathematics is visible after you +make this call. That means that things like the size of the container +for the mathematics may not yet reflect the size of the typeet +mathematics. If you need to perform actions that depend on the +mathematics being typeset, you should push <em>those</em> actions onto the +<tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt> as well.</p> +<p>This can be quite subtle, so you have to think carefully about the +structure of your code that works with the typeset mathematics. Also, +the things you push onto the queue should be <cite>Callback</cite> objects that +perform the actions you want when they are called, not the <em>results</em> +of calling the functions that do what you want.</p> +<div class="section" id="manipulating-individual-math-elements"> +<h2>Manipulating Individual Math Elements<a class="headerlink" href="#manipulating-individual-math-elements" title="Permalink to this headline">¶</a></h2> +<p>If you are not changing a complete DOM structure, but simply want to +update the contents of a single mathematical equation, you do not need +to use <tt class="docutils literal"><span class="pre">innerHTML</span></tt> and <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> to preprocess +and process an elements new content. Instead, you can ask MathJax to +find the <cite>element jax</cite> for the math element on the page, and use its +methods to modify and update the mathematics that it displays.</p> +<p>For example, suppose you have the following HTML in your document</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><div</span> <span class="na">id=</span><span class="s">"MathDiv"</span><span class="nt">></span> + The answer you provided is: ${}$. +<span class="nt"></div></span> +</pre></div> +</div> +<p>and MathJax has already preprocessed and typeset the mathematics +within dollar signs (it will be blank). A student has typed +something elsewhere on the page, and you want to typeset their answer +in the location of the mathematics that is already there. You could +replace the entire contents of the <cite>MathDiv</cite> element and call +<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> as described above, but there is more +efficient approach, which is to ask MathJax for the element jax for +the mathematics, and call its method for replacing the formula shown +by that element. For example:</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">math</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">getAllJax</span><span class="p">(</span><span class="s2">"MathDiv"</span><span class="p">)[</span><span class="mi">0</span><span class="p">];</span> +<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Text"</span><span class="p">,</span><span class="nx">math</span><span class="p">,</span><span class="s2">"x+1"</span><span class="p">]);</span> +</pre></div> +</div> +<p>This looks up the list of math elements in <cite>MathDiv</cite> element (there is +only one) and takes the first one (element 0) and stores it in +<tt class="docutils literal"><span class="pre">math</span></tt>. This is an <cite>element jax</cite> object (see the <a class="reference internal" href="api/elementjax.html#api-element-jax"><em>Element Jax</em></a> specification for details), which has a +<a class="reference internal" href="api/elementjax.html#Text" title="Text"><tt class="xref py py-meth docutils literal"><span class="pre">Text()</span></tt></a> method that can be used to set the input text of the +math element, and retypeset it.</p> +<p>Again, since the typesetting should be synchronized with other actions +of MathJax, the call should be pushed onto the <tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt>, +as shown above, rather than called directly. The example above +performs the equivalent of <tt class="docutils literal"><span class="pre">math.Text("x+1")</span></tt> as soon as MathJax is +able to do so. Any additional actions the rely on the equation +<tt class="docutils literal"><span class="pre">x+1</span></tt> actually showing on screen should also be pushed onto the +queue so that they will not occur before the math is typeset.</p> +<p>The actions you can perform on an element jax include:</p> +<blockquote> +<div><dl class="describe"> +<dt> +<tt class="descname">Text(newmath)</tt></dt> +<dd><p>to set the math text of the element to <cite>newmath</cite> and typeset.</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">Reprocess()</tt></dt> +<dd><p>to remove the output and reproduce it again (for +example, if CSS has changed that would alter the spacing of the +mathematics).</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">Remove()</tt></dt> +<dd><p>to remove the output for this math element (but not +the original <tt class="docutils literal"><span class="pre"><script></span></tt> tag).</p> +</dd></dl> + +<dl class="describe"> +<dt> +<tt class="descname">SourceElement()</tt></dt> +<dd><p>to obtain a reference to the original +<tt class="docutils literal"><span class="pre"><script></span></tt> object that is assocaited with this element jax.</p> +</dd></dl> + +</div></blockquote> +<p>Note that once you have located an element jax, you can keep using it +and don’t have to look it up again. So for the example above, if the +student is going to be able to type several different answers that you +will want to typeset, you can look up the element jax once at the +beginning after MathJax has processed the page the first time, and +then use that result each time you adjust the mathematics to be +displayed.</p> +<p>To get the element jax the first time, you need to be sure that you +ask MathJax for it <strong>after</strong> MathJax has processed the page the first +time. This is another sitaution where you want to use the MathJax +queue. If your startup code performs the commands</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">studentDisplay</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span> +<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> + <span class="nx">studentDisplay</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">getAllJax</span><span class="p">(</span><span class="s2">"MathDiv"</span><span class="p">);</span> +<span class="p">});</span> +</pre></div> +</div> +<p>then you can use</p> +<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Text"</span><span class="p">,</span><span class="nx">studentDisplay</span><span class="p">,</span><span class="nx">studentAnswer</span><span class="p">])</span> +</pre></div> +</div> +<p>to change the student’s answer to be the typeset version of whatever +is in the <tt class="docutils literal"><span class="pre">studentAnswer</span></tt> variable.</p> +<p>Here is a complete example that illustrates this approach</p> +<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span> +<span class="nt"><head></span> +<span class="nt"><title></span>MathJax Dynamic Math Test Page<span class="nt"></title></span> + +<span class="nt"><script </span><span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></span> + <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> + <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">],</span> + <span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">],</span> + <span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span><span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s2">"$"</span><span class="p">,</span><span class="s2">"$"</span><span class="p">],[</span><span class="s2">"\\("</span><span class="p">,</span><span class="s2">"\\)"</span><span class="p">]]}</span> + <span class="p">});</span> +<span class="nt"></script></span> + +<span class="nt"></head></span> +<span class="nt"><body></span> + +<span class="nt"><script></span> + <span class="c1">//</span> + <span class="c1">// Use a closure to hide the local variables from the</span> + <span class="c1">// global namespace</span> + <span class="c1">//</span> + <span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> + <span class="kd">var</span> <span class="nx">QUEUE</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">queue</span><span class="p">;</span> <span class="c1">// shorthand for the queue</span> + <span class="kd">var</span> <span class="nx">math</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span> <span class="c1">// the element jax for the math output.</span> + + <span class="c1">//</span> + <span class="c1">// Get the element jax when MathJax has produced it.</span> + <span class="c1">//</span> + <span class="nx">QUEUE</span><span class="p">.</span><span class="nx">Push</span><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> + <span class="nx">math</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">getAllJax</span><span class="p">(</span><span class="s2">"MathOutput"</span><span class="p">)[</span><span class="mi">0</span><span class="p">];</span> + <span class="p">});</span> + + <span class="c1">//</span> + <span class="c1">// The onchange event handler that typesets the</span> + <span class="c1">// math entered by the user</span> + <span class="c1">//</span> + <span class="nb">window</span><span class="p">.</span><span class="nx">UpdateMath</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">TeX</span><span class="p">)</span> <span class="p">{</span> + <span class="nx">QUEUE</span><span class="p">.</span><span class="nx">Push</span><span class="p">([</span><span class="s2">"Text"</span><span class="p">,</span><span class="nx">math</span><span class="p">,</span><span class="s2">"\\displaystyle{"</span><span class="o">+</span><span class="nx">TeX</span><span class="o">+</span><span class="s2">"}"</span><span class="p">]);</span> + <span class="p">}</span> + <span class="p">})();</span> +<span class="nt"></script></span> + +Type some TeX code: +<span class="nt"><input</span> <span class="na">id=</span><span class="s">"MathInput"</span> <span class="na">size=</span><span class="s">"50"</span> <span class="na">onchange=</span><span class="s">"UpdateMath(this.value)"</span> <span class="nt">/></span> +<span class="nt"><p></span> + +<span class="nt"><div</span> <span class="na">id=</span><span class="s">"MathOutput"</span><span class="nt">></span> +You typed: ${}$ +<span class="nt"></div></span> + +<span class="nt"></body></span> +<span class="nt"></html></span> +</pre></div> +</div> +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">Modifying Math on the Page</a><ul> +<li><a class="reference internal" href="#manipulating-individual-math-elements">Manipulating Individual Math Elements</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="dynamic.html" + title="previous chapter">Loading MathJax Dynamically</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="api/index.html" + title="next chapter">The MathJax API</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="_sources/typeset.txt" + rel="nofollow">Show Source</a></li> + </ul> +<div id="searchbox" style="display: none"> + <h3>Quick search</h3> + <form class="search" action="search.html" method="get"> + <input type="text" name="q" size="18" /> + <input type="submit" value="Go" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + Enter search terms or a module, class or function name. + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="related"> + <h3>Navigation</h3> + <ul> + <li class="right" style="margin-right: 10px"> + <a href="genindex.html" title="General Index" + >index</a></li> + <li class="right" > + <a href="api/index.html" title="The MathJax API" + >next</a> |</li> + <li class="right" > + <a href="dynamic.html" title="Loading MathJax Dynamically" + >previous</a> |</li> + <li><a href="index.html">MathJax v1.1 documentation</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2011 Design Science. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. + </div> + + </body> +</html> +\ No newline at end of file diff --git a/docs/source/dynamic.rst b/docs/source/dynamic.rst @@ -133,7 +133,7 @@ IE+MathPlayer. } } -**Source**: `mathjax_mathml.user.js <_statis/mathjax_mathml.user.js>`_ +**Source**: `mathjax_mathml.user.js <_static/mathjax_mathml.user.js>`_ ---- @@ -178,4 +178,4 @@ converting the math images to their original TeX code. document.getElementsByTagName("head")[0].appendChild(script); } -**Source**: `mathjax_wikipedia.user.js <_statis/mathjax_wikipedia.user.js>`_ +**Source**: `mathjax_wikipedia.user.js <_static/mathjax_wikipedia.user.js>`_ diff --git a/docs/source/mjtheme/layout.html b/docs/source/mjtheme/layout.html @@ -108,7 +108,7 @@ {%- for scriptfile in script_files %} <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script> {%- endfor %} - <script type="text/javascript" src="{{ pathto('../../MathJax.js', 1) }}"></script> + <script type="text/javascript" src="{{ pathto('../../MathJax.js?config=TeX-AMS-MML_HTMLorMML', 1) }}"></script> {%- if use_opensearch %} <link rel="search" type="application/opensearchdescription+xml" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"