Merge branch 'doc-update' into v2.0-candidate

This commit is contained in:
Davide P. Cervone 2012-02-24 10:08:06 -05:00
commit 50d1f45668
176 changed files with 12348 additions and 2407 deletions

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSS Style Objects &mdash; MathJax v1.1 documentation</title>
<title>CSS Style Objects &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="index.html" />
<link rel="next" title="Glossary" href="glossary.html" />
<link rel="prev" title="Describing HTML snippets" href="HTML-snippets.html" />
</head>
@ -40,7 +40,7 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -52,8 +52,8 @@
<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
the look of the elements they create. These are described using <cite>CSS
style objects</cite>, 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
@ -73,25 +73,27 @@ quotation marks as well.</p>
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">&quot;.MathJax_Display&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;text-align&quot;</span><span class="o">:</span> <span class="s2">&quot;center&quot;</span><span class="p">,</span>
<span class="nx">margin</span><span class="o">:</span> <span class="s2">&quot;1em 0em&quot;</span>
<span class="p">},</span>
<span class="s2">&quot;.MathJax .merror&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;background-color&quot;</span><span class="o">:</span> <span class="s2">&quot;#FFFF88&quot;</span><span class="p">,</span>
<span class="nx">color</span><span class="o">:</span> <span class="s2">&quot;#CC0000&quot;</span><span class="p">,</span>
<span class="nx">border</span><span class="o">:</span> <span class="s2">&quot;1px solid #CC0000&quot;</span><span class="p">,</span>
<span class="nx">padding</span><span class="o">:</span> <span class="s2">&quot;1px 3px&quot;</span><span class="p">,</span>
<span class="s2">&quot;font-family&quot;</span><span class="o">:</span> <span class="s2">&quot;serif&quot;</span><span class="p">,</span>
<span class="s2">&quot;font-style&quot;</span><span class="o">:</span> <span class="s2">&quot;normal&quot;</span><span class="p">,</span>
<span class="s2">&quot;font-size&quot;</span><span class="o">:</span> <span class="s2">&quot;90%&quot;</span>
<span class="p">},</span>
<span class="s2">&quot;.MathJax_Preview&quot;</span><span class="o">:</span> <span class="p">{</span><span class="nx">color</span><span class="o">:</span> <span class="s2">&quot;#888888&quot;</span><span class="p">},</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>This defines two CSS styles, one for the selector
<tt class="docutils literal"><span class="pre">.MathJax_Display</span></tt>, which specifies its text alignment and margin
settings, and a second for <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.</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&#8217;t use two definitions for
@ -159,11 +161,11 @@ samples. In particular, the <tt class="docutils literal"><span class="pre">exte
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Describing HTML snippets &mdash; MathJax v1.1 documentation</title>
<title>Describing HTML snippets &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="index.html" />
<link rel="next" title="CSS Style Objects" href="CSS-styles.html" />
<link rel="prev" title="The MathJax Object-Oriented Programming Model" href="api/object.html" />
</head>
@ -40,7 +40,7 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -156,11 +156,11 @@ This is bold text shown in red
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -5,8 +5,8 @@ CSS Style Objects
*****************
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
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
`name:value` pairs where the `name` is the CSS selector that is being
defined, and the `value` is an object that gives the style for that
@ -31,24 +31,26 @@ declaration:
styles: {
".MathJax_Display": {
"text-align": "center",
margin: "1em 0em"
},
".MathJax .merror": {
"background-color": "#FFFF88",
color: "#CC0000",
border: "1px solid #CC0000",
padding: "1px 3px",
"font-family": "serif",
"font-style": "normal",
"font-size": "90%"
},
".MathJax_Preview": {color: "#888888"},
}
}
This defines two CSS styles, one for the selector ``.MathJax
.merror``, which specifies a background color, foreground color,
border, and so on, and a second for ``.MathJax_Preview`` that sets its
color.
This defines two CSS styles, one for the selector
``.MathJax_Display``, which specifies its text alignment and margin
settings, and a second for ``.MathJax .merror``, which specifies a
background color, foreground color, border, and so on.
You can add as many such definitions to a ``styles`` object as you
wish. Note, however, that since this is a JavaScript object, the

View File

@ -58,7 +58,7 @@ A callback specification is any one of the following:
the given function, and it would return their sum, ``5``, when
the callback is executed.
.. describe:: [object, fn]
.. describe:: [object, fn]
An array containing an object to use as `this` and a function to
call for the callback. For example,
@ -75,7 +75,7 @@ A callback specification is any one of the following:
Similar to the previous case, but with data that is passed to
the function as well.
..describe:: ["method", object]
.. describe:: ["method", object]
Here, `object` is an object that has a method called `method`, and
the callback will execute that method (with the object as
@ -220,24 +220,6 @@ MathJax.Callback Methods
- **callback** --- the callback specification
:Returns: the callback object
.. method:: ExecuteHooks(hooks[, data[,reset]])
Calls each callback in the `hooks` array (or the single hook if it
is not an array), passing it the arguments stored in the data
array. If `reset` is ``true``, then the callback's
:meth:`reset()` method will be called before each hook is
executed. If any of the hooks returns a `Callback` 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, :meth:`MathJax.Callback.ExecuteHooks()`
returns ``null``.
:Parameters:
- **hooks** --- array of hooks to be called, or a hook
- **data** --- array of arguments to pass to each hook in turn
- **reset** --- ``true`` if the :meth:`reset()` method should be called
:Returns: callback that waits for all the hooks to complete, or ``null``
.. method:: Queue([callback,...])
Creates a `MathJax.CallBack.Queue` object and pushes the given
@ -257,3 +239,66 @@ MathJax.Callback Methods
:Parameters:
- **name** --- name of the signal to get or create
:Returns: the `Signal` object
.. method:: ExecuteHooks(hooks[, data[,reset]])
Calls each callback in the `hooks` array (or the single hook if it
is not an array), passing it the arguments stored in the data
array. If `reset` is ``true``, then the callback's
:meth:`reset()` method will be called before each hook is
executed. If any of the hooks returns a `Callback` 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, :meth:`MathJax.Callback.ExecuteHooks()`
returns ``null``.
:Parameters:
- **hooks** --- array of hooks to be called, or a hook
- **data** --- array of arguments to pass to each hook in turn
- **reset** --- ``true`` if the :meth:`reset()` method should be called
:Returns: callback that waits for all the hooks to complete, or ``null``
.. method:: Hooks(reset)
Creates a prioritized list of hooks that are called in order based
on their priority (low priority numbers are handled first). This
is meant to replace :meth:`MathJax.Callback.ExecuteHooks()` and is
used internally for signal callbacks, pre- and post-filters, and
other lists of callbacks.
:Parameters:
- **reset** --- ``true`` if callbacks can be called more than once
:Returns: the `Hooks` object
The list has the following methods:
.. method:: Add(hook[,priority])
Add a callback to the prioritized list. If ``priority`` is
not provided, the default is 10. The ``hook`` is a `Callback`
specification as described above.
:Parameters:
- **hook** --- callback specification to add to the list
- **priority** --- priority of the hook in the list (default: 10)
:Returns: the callback object being added
.. method:: Remove(hook)
:noindex:
Remove a given hook (as returned from :meth:`Add()` above)
from the prioritized list.
:Parameters:
- **hook** --- the callback to be removed
:Returns: ``null``
.. method:: Execute()
Execute the list of callbacks, resetting them if requested.
If any of the hooks return callbacks, then ``Execute()``
returns a callback that will be executed when they all have
completed.
:Returns: a callback object or ``null``

View File

@ -42,13 +42,11 @@ Instance Properties
.. describe:: inputJax
A reference to the input jax that created the element. (In the
future, this will be changed to the name of the input jax.)
The name of the input jax that created the element.
.. describe:: outputJax
A reference to the output jax that has processed this element. (In
the future, this will be changed to the name of the output jax.)
The name of the output jax that has processed this element.
.. describe:: inputID
@ -89,13 +87,25 @@ Methods
- **callback** --- the callback specification
:Returns: the callback object
.. Method:: Rerender([callback])
:noindex:
Removes the output and produces it again (for example, if CSS has
changed that would alter the spacing of the mathematics). Note
that the internal representation isn't regenerated; only the
output is. The `callback`, if any, is called when the process
completes.
:Parameters:
- **callback** --- the callback specification
:Returns: the callback object
.. Method:: Reprocess([callback])
:noindex:
Removes the output and produces 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 `callback`, if any, is
called when the process completes.
Removes the output and then retranslates the input into the
internal form and reredners the output again. The `callback`, if
any, is called when the process completes.
:Parameters:
- **callback** --- the callback specification
@ -118,6 +128,16 @@ Methods
:Returns: the ``<script>`` element
.. Method:: needsUpdate()
Indicates whether the mathematics has changed so that its output
needs to be updated.
:Returns: ``true`` if the mathematics needs to be reprocessed,
``false`` otherwise
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 ``toMathML()``, or an accessibility output jax could add

View File

@ -92,6 +92,15 @@ Methods
- **text** --- the text that is to be the script's new content
:Returns: ``null``
.. method:: getScript(script)
Gets the contents of the ``script`` element, properly taking into
account the browser limitations and bugs.
:Parameters:
- **script** --- the script whose content is to be retrieved
:Returns: the text of the ``script``
.. describe:: Cookie.Set(name,data)
Creates a MathJax cookie using the ``MathJax.HTML.Cookie.prefix``

View File

@ -31,7 +31,17 @@ Properties
.. describe:: processUpdateTime: 250
The minimum time (in milliseconds) between updates of the
"Processing Math" message.
"Processing Math" message. After this amount of time has passed,
and after the next equation has finished being processed,
MathJax will stop processing momentarily so that the update
message can be displayed, and so that the browser can handle user
interaction.
.. describe:: processUpdateDelay: 10
The amount of time (in milliseconds) that MathJax pauses after
issuing its processing message before starting the processing again
(to give browsers time to handle user interaction).
.. describe:: signal
@ -60,6 +70,11 @@ Properties
running on a Macintosh computer or a Windows computer. They
will both be ``false`` for a Linux computer.
.. describe:: isMobile
This is ``true`` when MathJax is running a mobile version of a
WebKit or Gecko-based browser.
.. describe:: isFirefox, isSafari, isChrome, isOpera, isMSIE, isKonqueror
These are ``true`` when the browser is the indicated one, and
@ -97,6 +112,18 @@ Properties
}
);
.. describe:: inputJax
An object storing the MIME types associated with the various
registered input jax (these are the types of the ``<script>`` tags
that store the math to be processed by each input jax).
.. describe:: outputJax
An object storing the output jax associate with the various
element jax MIME types for the registered output jax.
Methods
=======
@ -243,13 +270,31 @@ Methods
.. method:: Reprocess([element[,callback]])
Removes any typeset mathematics from the document or DOM element (or
elements if it is an array of elements), 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 `element` is either the DOM `id` of the
element to scan, a reference to the DOM element itself, or an array of
id's or references. The `callback` is called when the processing is
Removes any typeset mathematics from the document or DOM element
(or elements if it is an array of elements), 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. Reprocess calls both the
input and output jax to completely rebuild the data for
mathematics. The `element` is either the DOM `id` of the element
to scan, a reference to the DOM element itself, or an array of
id's or references. The `callback` is called when the processing
is complete.
:Parameters:
- **element** --- the element(s) to be reprocessed
- **callback** --- the callback specification
:Returns: the callback object
.. method:: Rerender([element[,callback]])
Removes any typeset mathematics from the document or DOM element
(or elements if it is an array of elements), and then renders the
mathematics again, re-typesetting everything from the current
internal version (without calling the input jax again). The
`element` is either the DOM `id` of the element to scan, a
reference to the DOM element itself, or an array of id's or
references. The `callback` is called when the processing is
complete.
:Parameters:
@ -315,6 +360,21 @@ Methods
- **element** --- the element to inspect
:Returns: integer (-1, 0, 1)
.. Method:: setRenderer(renderer[,type])
Sets the output jax for the given element jax ``type`` (or ``jax/mml``
if none is specified) to be the one given by ``renderer``, which
must be the name of a renderer, such as ``NativeMML`` or
``HTML-CSS``. Note that this does not cause the math on the page
to be rerendered; it just sets the renderer for output in the
future (call :meth:``Rerender()`` above to replace the current
renderings by new ones).
:Parameters:
- **renderer** --- the name of the output jax to use for rendering
- **type** --- the element jax MIME type whose renderer to set
:Returns: ``null``
.. Method:: Insert(dst,src)
Inserts data from the `src` object into the `dst` object. The

View File

@ -56,13 +56,40 @@ Properties
Methods
=======
.. Method:: Translate(script)
.. Method:: Process(script,state)
:noindex:
This is the method that the ``MathJax.Hub`` calls when it needs
the input jax to process the given math ``<script>``. Its default
action is to do the following:
1. Start loading any element jax specified in the ``elementJax`` array;
2. Start loading the jax's ``jax.js`` file;
3. Start loading the required output jax (so it is ready when needed); and
4. Redefine itself to simply return the callback for the load operation
(so that further calls to it will cause the processing to wait for the
callback).
Once the ``jax.js`` file has loaded, this method is replaced by
the jax's ``Translate()`` method (see below), so that
subsequent calls to ``Process()`` will perform the appropriate
translation.
:Parameters:
- **script** --- reference to the DOM ``<script>`` object for
the mathematics to be translated
- **state** --- a structure containing information about the
current proccessing state of the mathematics
(internal use)
:Returns: an `ElementJax` object, or ``null``
.. Method:: Translate(script,state)
:noindex:
This is the main routine called by MathJax when a ``<script>`` of the
appropriate type is found. The default :meth:`Translate()` method
throws an error indicating that :meth:`Translate()` hasn't been
redefined, so when the ``jax.js`` file loads, it should override the
defined, so when the ``jax.js`` file loads, it should override the
default :meth:`Translate()` with its own version that does the actual
translation.
@ -72,6 +99,9 @@ Methods
:Parameters:
- **script** --- the ``<script>`` element to be translated
- **state** --- a structure containing information about the
current proccessing state of the mathematics
(internal use)
:Returns: the `element jax` resulting from the translation
.. Method:: Register(mimetype)
@ -87,3 +117,14 @@ Methods
- **mimetype** --- the MIME-type of the input this jax processes
:Returns: ``null``
.. Method:: needsUpdate(jax)
:noindex:
This implements the element jax's ``needsUpdate()`` method, and
returns ``true`` if the ``jax`` needs to be rerendered (i.e., the
text has changed), and ``false`` otherwise.
:Perameters:
- **jax** --- the element jax to be checked
:Returns: ``true`` if the jax's text has changed, ``false`` otherwise

View File

@ -63,34 +63,20 @@ Instance Properties
jax. These can be modified by the author by including a
configuration subsection for the specific jax in question.
.. describe:: JAXFILE: "jax.js"
The name of the file that contains the main code for the jax.
Methods
=======
.. Method:: Process(script)
:noindex:
This is the method that the ``MathJax.Hub`` calls when it needs the
input or output jax to process the given math ``<script>``. Its
default action is to start loading the jax's ``jax.js`` file, and
redefine itself to simply return the callback for the load operation
(so that further calls to it will cause the processing to wait for the
callback). Once the ``jax.js`` file has loaded, this method is
replaced by the jax's :meth:`Translate()` method, so that subsequent calls
to :meth:`Process()` will perform the appropriate translation.
:Parameters:
- **script** --- reference to the DOM ``<script>`` object for
the mathematics to be translated
:Returns: an `ElementJax` object, or ``null``
.. Method:: Translate(script)
This is a stub for a routine that should be defined by the jax's
``jax.js`` file when it is loaded. It should perform the translation
action for the specific jax. For an input jax, it should return the
`ElementJax` object that it created. The :meth:`Translate()` method is
never called directly by MathJax; during the :meth:`loadComplete()`
never called directly by MathJax; during the ``loadComplete()``
call, this function is copied to the :meth:`Process()` method, and is
called via that name. The default :meth:`Translate()` method throws an
error indicating that the :meth:`Translate()` method was not
@ -147,7 +133,10 @@ Methods
5. Post the "[name] Jax Startup" message to the startup signal.
6. Perform the jax's :meth:`Startup()` method.
7. Post the "[name] Jax Ready" message to the startup signal.
8. Perform the :meth:`MathJax.Ajax.loadComplete()` call for the
8. Copy the ``preTranslate``, ``Translate``, and
``postTranslate`` functions to ``preProcess``, ``Process``,
and ``postProcess``.
9. Perform the :meth:`MathJax.Ajax.loadComplete()` call for the
``jax.js`` file.
Note that the configuration process (the :meth:`Config()` call) can

View File

@ -48,17 +48,65 @@ Properties
The directory where the jax files are stored (e.g., ``"[MathJax]/jax/output/HTML-CSS"``);
.. describe:: fontDir
The directory where the fonts are stored (e.g., ``"[MathJax]/fonts"``)
.. describe:: imageDir
The directory where MathJax images are found (e.g. ``"[MathJax]/images"``)
Methods
=======
.. Method:: Translate(script)
.. Method:: preProcess(state)
This is called by ``MathJax.Hub`` to ask the output processor to
prepare to process math scripts. Its default action is to start
loading the jax's ``jax.js`` file, and redefine itself to simply
return the callback for the load operation (so that further calls
to it will cause the processing to wait for the callback).
Once the ``jax.js`` file has loaded, this method is replaced by
the jax's :meth:`preTranslate()` method, so that subsequent calls
to :meth:`preProcess()` will perform the appropriate translation.
:Parameters:
- **state** --- a structure containing information about the
current proccessing state of the mathematics
:Returns: ``null``
.. Method:: preTranslate(state)
This routine replaces :meth:`preProcess()` above when the jax's
``jax.js`` file is loaded. It is called by ``MathJax.Hub`` to ask
the output processor to prepare to process math scripts. (For
example, the HTML-CSS output jax uses this to determine em-sizes
for all the mathematics at once, to minimize page reflows that
slow down Internet Explorer.)
The routine can use ``state.jax[this.id]`` to obtain the array of
element jax that are to be processed. The output jax can use the
``state`` variable to maintain its own state information, but
any properties that it adds to the variable should have a prefix
that is the output jax's ID. For example, the HTML-CSS output jax
might use ``state.HTMLCSSlast`` to keep track of the last equation
it processed, or could add ``state.HTMLCSS = {...}`` to create an
object of its own within the state variable.
:Parameters:
- **state** --- a structure containing information about the
current proccessing state of the mathematics
:Returns: ``null``
.. Method:: Translate(script,state)
:noindex:
This is the main routine called by MathJax when an element jax is
to be converted to output. The default :meth:`Translate()`
method throws an error indicating that :meth:`Translate()` hasn't been
redefined, so when the ``jax.js`` file loads, it should override the
defined, so when the ``jax.js`` file loads, it should override the
default :meth:`Translate()` with its own version that does the actual
translation.
@ -66,12 +114,35 @@ Methods
element jax for the given script. The translation process may
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 ``<script>`` tag.
document near the jax's ``<script>`` tag. The output jax can use
the ``state`` variable to maintain information about its
processing state, but see :meth:`preTranslate()` above for naming
conventions for properties that are added.
:Parameters:
- **script** --- the ``<script>`` element to be translated
- **state** --- a structure containing information about the
current proccessing state of the mathematics
:Returns: the `element jax` resulting from the translation
.. Method:: postTranslate(state)
This routines is called by ``MathJax.Hub`` when the translation
of math elements is complete, and can be used by the output
processor to finalize any actions that it needs to complete.
(For example, making the mathematics visible, or forcing a reflow
of the page.)
The routine can use ``state.jax[this.id]`` to obtain the array of
element jax that were processed, or can use the ``state`` variable
to store its own state information (see :meth:`preProcess()`
above for caveats about naming properties).
:Parameters:
- **state** --- a structure containing information about the
current proccessing state of the mathematics
:Returns: ``null``
.. Method:: Register(mimetype)
:noindex:
@ -95,3 +166,53 @@ Methods
:Parameters:
- **jax** --- the element jax whose display should be removed
:Returns: ``null``
If an output jax wants its output to handle the contextual menu item
and zooming, then it needs to tie into the event-handling code
(`MathEvents`) and the zoom-handling code (`MathZoom`). That requires
the following methods.
.. Method:: getJaxFromMath(math)
This is called by the event-handling code (`MathEvents`) to get
the element jax associated with the DOM element that caused an
event to occur. The output jax will have attached event handlers
to some DOM element that is part of its output, and the
`MathEvents` code uses this routine to map back to the jax
associated with that output.
:Parameters:
- **math** --- a DOM element that triggered a DOM event
(e.g., a mouse click)
:Returns: the `ElementJax` structure associated with the DOM element
.. Method:: Zoom(jax,span,math,Mw,Mh)
This routine is called by the zoom-handling code (`MathZoom`)
when an expression has received its zoom trigger event (e.g., a
double-click). The ``jax`` is the math that needs to be zoomed,
``span`` is a ``<span>`` element in which the zoomed version of
the math should be placed, ``math`` is the DOM element that
received the zoom trigger event, and ``Mw`` and ``Mh`` are the
maximum width and height allowed for the zoom box (the ``span``).
The return value is an object with the following properties:
- ``Y`` --- the vertical offset from the top of the ``span`` to
the baseline of the mathematics
- ``mW`` --- the width of the original mathematics element
- ``mH`` --- the height of the original mathematics element
- ``zW`` --- the width of the zoomed math
- ``zH`` --- the height of the zoomed math
All of these values are in pixels.
:Parameters:
- **jax** --- the jax to be zoomed
- **span** --- the ``<span>`` in which to place the zoomed math
- **math** --- the DOM element generating the zoom event
- **Mw** --- the maximum width of the zoom box
- **Mh** --- the maximum height of the zoom box
:Returns: a structure as described above

View File

@ -19,7 +19,7 @@ Main MathJax Components
.. describe:: MathJax.Ajax
Contains the code for loading external modules and creating
stylesheets. Most of the code that causes most of MathJax to
stylesheets. Most of the code that causes MathJax to
operate asynchronously is handled here.
.. describe:: MathJax.Message
@ -43,6 +43,11 @@ Main MathJax Components
For example, the `tex2jax` preprocessor creates
``MathJax.Extension.tex2jax`` for its code and variables.
.. describe:: MathJax.Menu
Initially null, this is where the MathJax contextual menu is
stored, when ``extensions/MathMenu.js`` is loaded.
.. describe:: MathJax.Object
Contains the code for the MathJax object-oriented programming model.
@ -75,7 +80,11 @@ Properties
.. describe:: MathJax.version
The version number of the MathJax library.
The version number of the MathJax library as a whole.
.. describe:: MathJax.fileversion
The version number of the ``MathJax.js`` file specifically.
.. describe:: MathJax.isReady

View File

@ -0,0 +1,127 @@
.. _AsciiMath-support:
*************************
MathJax AsciiMath Support
*************************
The support for :term:`AsciiMath` in MathJax consists of two parts:
the `asciimath2jax` preprocessor, and the `AsciiMath` input processor.
The first of these looks for mathematics within your web page
(indicated by delimiters like ```...```) and marks the mathematics for
later processing by MathJax. The AsciiMath input processor is what
converts the AsciiMath notation into MathJax's internal format, where
one of MathJax's output processors then displays it in the web page.
The AsciiMath input jax actually includes a copy of Peter Jipsen's
``ASCIIMathML.js`` file (see the `AsciiMath home page
<http://www1.chapman.edu/~jipsen/mathml/asciimath.html>`_ for
details), and is included by permission of the author. This means
that the results of MathJax's AsciiMath processing should be the same
as using the actual ``ASCIIMathML.js`` package (at least as far as the
MathML that it generates is concerned). Thanks go to David Lippman
for writing the initial version of the AsciiMath preprocessor and
input jax.
The `asciimath2jax` preprocessor can be configured to look for whatever
markers you want to use for your math delimiters. See the
:ref:`asciimath2jax configuration options <configure-asciimath2jax>` section for
details on how to customize the action of `asciimath2jax`.
The AsciiMath input processor handles conversion of your mathematical
notation into MathJax's internal format (which is essentially MathML).
The AsciiMath input processor has few configuration options (see the
:ref:`AsciiMath options <configure-AsciiMath>` section for details).
The AsciiMath input jax handles only the original ASCIIMathML notation
(from ASCIIMathML v1.4.7), not the extened LaTeXMathML notation added
in version 2.0 of ASCIIMathML, though the AsciiMath input jax does
expose the tables that define the symbols that AsciiMath processes,
and so it would be possible to extend them to include additional
symbols. In general, it is probably better to use MathJax's :ref:`TeX
input jax <TeX-support>` to handle LaTeX notation instead.
AsciiMath delimiters
====================
By default, the `asciimath2jax` preprocessor defines the back-tick
(`````) as the delimiters for mathematics in AsciiMath format. It
does **not** define ``$...$`` as math delimiters. 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 AsciiMath notation, you must enable that
explicitly in your configuration:
.. code-block:: javascript
MathJax.Hub.Config({
asciimath2jax: {
delimiters: [['$','$'], ['`','`']]
}
});
Note that the dollar signs are frequently used as a delimiter for
mathematics in the :term:`TeX` format, and you can not enable the
dollar-sign delimiter for both. It is probably best to leave dollar
signs for TeX notation.
See the ``config/default.js`` file, or the :ref:`asiimath2jax
configuration options <configure-asciimath2jax>` page, for additional
configuration parameters that you can specify for the `asciimath2jax`
preprocessor, which is the component of MathJax that identifies
AsciiMath notation within the page.
AsciiMath in HTML documents
===============================
The AsciiMath syntax is descibed in the `ASCIIMathML syntax page
<http://www1.chapman.edu/~jipsen/mathml/asciimathsyntax.html>`_.
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 ``<BR>``) as AsciiMath-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 (``<`` and ``>``), and
ampersands (``&``), which have special meaning to the browsers. For
example,
.. code-block:: html
... when `x<y` we have ...
will cause a problem, because the brower will think ``<y`` is the
beginning of a tag named ``y`` (even though there is no such tag in
HTML). When this happens, the browser will think the tag continues up
to the next ``>`` 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 ``<y``. This is one indication you can
use to spot this problem; it is a common error and should be avoided.
Usually, it is sufficient to simply put spaces around these symbols to
cause the browser to avoid them, so
.. code-block:: html
... when `x < y` we have ...
should work. Alternatively, you can use the HTML entities ``&lt;``,
``&gt;`` and ``&amp;`` to encode these characters so that the browser
will not interpret them, but MathJax will. E.g.,
.. code-block:: html
... when `x &lt; y` we have ...
Keep in mind that the browser interprets your text before MathJax
does.

View File

@ -214,10 +214,10 @@ you simply passed the object's method to ``setTimeout()``. Or you
might want to pass an argument to the function called by
``setTimeout()``. (Altough the ``setTimeout()`` 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 `Callback` object to
do this, and the :meth:`MathJax.Callback()` method will create one for
you. For example,
when it is called, some versions of Internet Explorer do not implement
that feature, so you can't rely on it.) You can use a `Callback`
object to do this, and the :meth:`MathJax.Callback()` method will
create one for you. For example,
.. code-block:: javascript

View File

@ -15,37 +15,93 @@ it via
<script type="text/javascript" src="path-to-MathJax/MathJax.js?config=default"></script>
where ``path-to-MathJax`` is the URL to the MathJax directory on your
server or hard disk.
server or hard disk. If you are using MathJax from the CDN, you can
view the contents of `default.js
<http://cdn.mathjax.org/mathjax/latest/config/default.js>`_ as a
reference, but you will not be able to edit the CDN copy. It is
possible to use the CDN copy of MathJax with your own configuration
file, however; see :ref:`Using a Local Configuration File with the CDN
<local-config-files>` for details.
The remaining files are combined configuration files that include not just
configuration parameters but also the files that MathJax would need to
load for those configurations. This means MathJax will have to load fewer
files, and since each file access requires establishing connections over
the network, it can be better to load one larger file than several smaller
ones. See :ref:`Loading and Configuring MathJax <loading>` for more
details about how to load configurations, and how to modify the parameters
for a configuration file.
The remaining files in the `MathJax/config
<http://cdn.mathjax.org/mathjax/latest/config/>`_ directory are
combined configuration files that include not just configuration
parameters but also the files that MathJax would need to load for
those configurations. This means MathJax will have to load fewer
files, and since each file access requires establishing connections
over the network, it can be faster to load one larger file than
several smaller ones. See :ref:`Loading and Configuring MathJax
<loading>` for more details about how to load configurations, and how
to modify the parameters for a configuration file.
The following sections describe the contents of the combined configuration
files. Each comes in two flavors: a standard version and a "full" version.
The standard version simply defines the output processor(s) that are part
of the configuration, but doesn't load the code that implements the output
processor; the full version loads the complete output processors, so
processor. The full version loads the complete output processors, so
everything that MathJax needs for the page should be loaded up front, and
there will be no delay once the page is ready to be processed. To obtain
the "full" version, add ``-full`` to the end of the configuration file
name.
The ``TeX-AMS-MML_HTMLorMML`` configuration file
The ``TeX-MML-AM_HTMLorMML`` configuration file
================================================
This configuration file is the most general of the pre-defined
configurations. It loads all the important MathJax components, including
configurations. It loads all the main MathJax components, including
the TeX, MathML, and AsciiMath preprocessors and input processors, the
AMSmath, AMSsymbols, noErrors, and noUndefined TeX extensions, both
the native MathML and HTML-with-CSS output processor definitions, and
the MathMenu and MathZoom extensions. It is equivalent to the
following configuration:
.. code-block:: javascript
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: ["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS","output/NativeMML"],
extensions: ["tex2jax.js","mml2jax.js","asciimath2jax.js","MathMenu.js","MathZoom.js"],
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
}
});
In addition, it loads the mml Element Jax, the TeX, MathML, and
AsciiMath input jax main code (not just the definition files), as well
as the `toMathML` extension, which is used by the Show Source option
in the MathJax contextual menu. The `-full` version also loads both the
HTML-CSS and NativeMML output jax main code, plus the HTML-CSS
`mtable` extension, which is normally loaded on demand.
See the :ref:`tex2jax configuration <configure-tex2jax>` section for
other configuration options for the ``tex2jax`` preprocessor, and the
:ref:`TeX input jax configuration <configure-TeX>` section for options
that control the TeX input processor.
See the :ref:`mml2jax configuration <configure-mml2jax>` section for
other configuration options for the ``mml2jax`` preprocessor, and the
:ref:`MathML input jax configuration <configure-MathML>` section for
options that control the MathML input processor.
See the :ref:`asciimath2jax configuration <configure-asciimath2jax>` section for
other configuration options for the ``asciimath2jax`` preprocessor, and the
:ref:`AsciiMath input jax configuration <configure-AsciiMath>` section for
options that control the AsciiMath input processor.
See :ref:`MathJax Output Formats <output-formats>` for more
information on the NativeMML and HTML-CSS output processors. See the
:ref:`MMLorHTML configuration <configure-MMLorHTML>` section for
details on the options that control the ``MMLorHTML`` configuration.
The ``TeX-AMS-MML_HTMLorMML`` configuration file
================================================
This configuration file is the most commonly used of the pre-defined
configurations. It loads all the main MathJax components, including
the TeX and MathML preprocessors and input processors, the AMSmath,
AMSsymbols, noErrors, and noUndefined TeX extensions, both the native
MathML and HTML-with-CSS output processor definitions, and the MathMenu and
MathZoom extensions. It is equivalent to the following configuration:
MathML and HTML-with-CSS output processor definitions, and the
MathMenu and MathZoom extensions. It is equivalent to the following
configuration:
.. code-block:: javascript
@ -58,12 +114,12 @@ MathZoom extensions. It is equivalent to the following configuration:
}
});
In addition, it loads the mml Element Jax, the TeX and MathML input jax
main code (not just the definition files), as well as the `toMathML`
extension, which is used by the Show Source option in the MathJax
contextual menu. The full version also loads both the HTML-CSS and
NativeMML output jax main code, plus the HTML-CSS `mtable` extension, which
is normally loaded on demand.
In addition, it loads the mml Element Jax, the TeX and MathML input
jax main code (not just the definition files), as well as the
`toMathML` extension, which is used by the Show Source option in the
MathJax contextual menu. The ``-full`` version also loads both the
HTML-CSS and NativeMML output jax main code, plus the HTML-CSS
`mtable` extension, which is normally loaded on demand.
See the :ref:`tex2jax configuration <configure-tex2jax>` section for
other configuration options for the ``tex2jax`` preprocessor, and the
@ -106,7 +162,7 @@ extensions. It is equivalent to the following configuration:
In addition, it loads the mml Element Jax and the TeX input jax main code
(not just the definition file), as well as the `toMathML` extension, which
is used by the Show Source option in the MathJax contextual menu. The full
is used by the Show Source option in the MathJax contextual menu. The ``-full``
version also loads the HTML-CSS output jax main code, plus the HTML-CSS
`mtable` extension, which is normally loaded on demand.
@ -123,7 +179,7 @@ The ``MML_HTMLorMML`` configuration file
This configuration file is for sites that only use MathML format for their
mathematics. It will use MathML output in browsers where that is
supported, and HTML-CSS output otherwise. The user can still use the
supported well, and HTML-CSS output otherwise. The user can still use the
MathJax contextual menu to select the other output format if they desire.
This file includes all the important MathJax components for MathML input
@ -142,7 +198,7 @@ and MathZoom extensions. It is equivalent to the following configuration:
In addition, it loads the mml Element Jax and the MathML input jax main
code (not just the definition file), as well as the `toMathML` extension,
which is used by the Show Source option in the MathJax contextual menu.
The full version also loads both the HTML-CSS and NativeMML output jax main
The ``-full`` version also loads both the HTML-CSS and NativeMML output jax main
code files, plus the HTML-CSS `mtable` extension, which is normally loaded
on demand.
@ -156,13 +212,100 @@ information on the NativeMML and HTML-CSS output processors. See the
details on the options that control the ``MMLorHTML`` configuration.
The ``AM_HTMLorMML`` configuration file
================================================
This configuration file is for sites that only use AsciiMath format for their
mathematics. It will use MathML output in browsers where that is
supported well, and HTML-CSS output otherwise. The user can still use the
MathJax contextual menu to select the other output format if they desire.
This file includes all the important MathJax components for AsciiMath
input and output, including the `asciimath2jax` preprocessor and
AsciiMath input jax, the NativeMML and HTML-CSS output processor
definition files, and the MathMenu and MathZoom extensions. It is
equivalent to the following configuration:
.. code-block:: javascript
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: ["input/AsciiMath","output/HTML-CSS","output/NativeMML"],
extensions: ["asciimath2jax.js","MathMenu.js","MathZoom.js"]
});
In addition, it loads the mml Element Jax and the TeX input jax main code
(not just the definition file), as well as the `toMathML` extension, which
is used by the Show Source option in the MathJax contextual menu. The ``-full``
version also loads the HTML-CSS output jax main code, plus the HTML-CSS
`mtable` extension, which is normally loaded on demand.
See the :ref:`asciimath2jax configuration <configure-asciimath2jax>`
section for other configuration options for the ``asciimath2jax``
preprocessor, and the :ref:`AsciiMath input jax configuration
<configure-AsciiMath>` section for options that control the AsciiMath
input processor. See :ref:`MathJax Output Formats <output-formats>`
for more information on the HTML-CSS and NativeMML output processors.
See the :ref:`MMLorHTML configuration <configure-MMLorHTML>` section
for details on the options that control the ``MMLorHTML``
configuration.
The ``TeX-AMS-MML_SVG`` configuration file
================================================
This configuration file is the same as `TeX-AMS-MML_HTMLorMML` except
that it uses the SVG output renderer rather than the NativeMML or
HTML-CSS ones. It loads all the main MathJax components, including
the TeX and MathML preprocessors and input processors, the AMSmath,
AMSsymbols, noErrors, and noUndefined TeX extensions, the SVG output
processor definitions, and the MathMenu and MathZoom extensions. It
is equivalent to the following configuration:
.. code-block:: javascript
MathJax.Hub.Config({
jax: ["input/TeX","input/MathML","output/SVG"],
extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js"],
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
}
});
In addition, it loads the mml Element Jax, the TeX and MathML input
jax main code (not just the definition files), as well as the
`toMathML` extension, which is used by the Show Source option in the
MathJax contextual menu. The ``-full`` version also loads both the
SVG output jax main code, plus the SVG `mtable` extension, which
is normally loaded on demand.
See the :ref:`tex2jax configuration <configure-tex2jax>` section for
other configuration options for the ``tex2jax`` preprocessor, and the
:ref:`TeX input jax configuration <configure-TeX>` section for options
that control the TeX input processor.
See the :ref:`mml2jax configuration <configure-mml2jax>` section for
other configuration options for the ``mml2jax`` preprocessor, and the
:ref:`MathML input jax configuration <configure-MathML>` section for
options that control the MathML input processor.
See :ref:`MathJax Output Formats <output-formats>` for more
information on the SVG output processor.
The ``Accessible`` configuration file
================================================
This configuration file is essentially the same as
``TeX-AMS-MML_HTMLorMML`` except that it includes options that are
designed for assistive technology, particularly for those with visual
challenges. It is equivalent to the following configuration:
challenged. *This file is deprecated* since the controls that make
MathJax work with screen readers are now available in the MathJax
contextual menu, and so there is no need to set them in the
configuration file any longer. So you can use any of the other
pre-defined configurations and readers with special needs should be
able to change the MathJax settings themselves to be appropriate for
their software.
The Accessible configuration is equivalent to the following:
.. code-block:: javascript
@ -173,20 +316,24 @@ challenges. It is equivalent to the following configuration:
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
},
NativeMML: { showMathMenuMSIE: false },
menuSettings: { zoom: "Double-Click" },
menuSettings: {
zoom: "Double-Click",
mpContext: true,
mpMouse: true
},
errorSettings: { message: ["[Math Error]"] }
});
This turns off the MathJax contextual menu for Internet Explorer, since
it can interfere with some screen readers. It also sets the zoom trigger
This turns off the MathJax contextual menu for IE when MathPlayer is
active, and passes mouse events on to MathPlayer to allow screen
readers full access to MathPlayer. It also sets the zoom trigger
to double-click, so that readers can see a larger version of the
mathematics but double-clicking on any equation.
In addition, it loads the mml Element Jax, the TeX and MathML input jax
main code (not just the definition files), as well as the `toMathML`
extension, which is used by the Show Source option in the MathJax
contextual menu. The full version also loads both the HTML-CSS and
contextual menu. The ``-full`` version also loads both the HTML-CSS and
NativeMML output jax main code, plus the HTML-CSS `mtable` extension, which
is normally loaded on demand.

View File

@ -52,14 +52,14 @@ typical invocation of MathJax would be
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
which loads MathJax with a configuration file that includes everything you
need in order to enter mathematics in either TeX, LaTeX, or MathML
notation, and produces output using MathML if the browser supports that,
or HTML-with-CSS otherwise. If you **don't** load an explicit
configuration file, you will need to include an in-line configuration
block in order to tell MathJax how to read and display the mathematics on
your pages. See the section below on :ref:`Using In-line Configuration
Options <inline-config>` for details.
which loads MathJax with a configuration file that includes everything
you need in order to enter mathematics in either TeX, LaTeX, or MathML
notation, and produces output using MathML if the browser supports
that well enough, or HTML-with-CSS otherwise. If you **don't** load
an explicit configuration file, you will need to include an in-line
configuration block in order to tell MathJax how to read and display
the mathematics on your pages. See the section below on :ref:`Using
In-line Configuration Options <inline-config>` for details.
It is best to load MathJax in the document's ``<head>`` block, but it
is also possible to load MathJax into the ``<body>`` section, if
@ -82,7 +82,7 @@ advanced topic, however; see :ref:`Loading MathJax Dynamically
Loading MathJax from the CDN
============================
MathJax is now available as a web service from ``cdn.mathjax.org``, so you
MathJax is available as a web service from ``cdn.mathjax.org``, so you
can obtain MathJax from there without needing to install it on your own
server. The CDN is part of a distributed "cloud" network, so it is
handled by servers around the world. That means that you should get access
@ -100,19 +100,19 @@ get. The CDN has the following directory structure:
mathjax/ # project-name
1.0-latest/
1.1-beta/ # temporary
1.1-latest/ # the 1.1 release with any ciritical patches
2.0-beta/ # temporary
2.0-latest/ # the 2.0 release with any ciritical patches
...
latest/ # the most current version (1.1-latest in this case)
latest/ # the most current version (2.0-latest in this case)
Each directory corresponds to an official MathJax release; however,
hotfixes (urgent bug fixes) will be applied in each release branch as
necessary, even if new releases are not prepared. In other words,
``1.1-latest`` will initially point to v1.1, but over time may be updated
with patches that would correspond to releases that might be numbers 1.1a,
1.1b, etc., even if such releases are not actually prepared for
distribution (they likely won't be).
1.1b, etc., even if such releases are not actually packaged for
separate distribution (they likely won't be).
We may occasionally introduce directories for betas, as indicated above,
but they will be temporary, and will be removed after the official
release.
@ -124,7 +124,7 @@ For example,
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/1.1-latest/MathJax.js"></script>
will load the stable v1.1 version, even if we release v1.2 or other later
will load the stable v1.1 version, even after we release v2.0 or other later
versions, while
.. code-block:: html
@ -132,7 +132,7 @@ versions, while
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
will always be the most current stable release, so it will go from v1.1 to
v1.2 automatically when that is released. Note that all the versions
v2.0 automatically when that is released. Note that all the versions
available on the CDN are stable versions; the development version is not
hosted on the CDN. (If you wish to use the development version of
MathJax, you will need to install your own copy; see :ref:`Installing
@ -143,8 +143,9 @@ The use of ``cdn.mathjax.org`` is governed by its `terms of service
sure to read that before linking to the MathJax CDN server.
If you wish to use the MathJax CDN but use your own configuration file
rather than one of the pre-defined ones, see the information at the end
of the :ref:`Using a configuration file <config-files>` section below.
rather than one of the pre-defined ones, see the information at the
end of the :ref:`Using a Local Configuration File
<local-config-files>` section below.
Configuring MathJax
@ -157,7 +158,7 @@ pre-defined configuration file, but include in-line commands to
adjust the configuration to your needs.
Note that you must use at least one of these two forms of configuration.
Unlike earlier versions of MathJax, version 1.1 does not load a default
Unlike MathJax v1.0, version 1.1 and higher does not load a default
configuration file. If you have been using version 1.0's
``config/MathJax.js`` for your configuration, you will need to load that
configuration file explicitly via a ``config`` parameter, as described
@ -180,28 +181,41 @@ stored in the ``MathJax/config`` directory. Among these are the following
.. describe:: TeX-AMS-MML_HTMLorMML.js
Allows math to be specified in TeX, LaTeX, or MathML notation, with the
`AMSmath` and `AMSsymbols` packages included, producing output using
MathML if the browser supports it, and HTML-with-CSS otherwise.
Allows math to be specified in :term:`TeX`, :term:`LaTeX`, or
:term:`MathML` notation, with the `AMSmath` and `AMSsymbols`
packages included, producing output using MathML if the browser
supports it sufficiently, and HTML-with-CSS otherwise.
.. describe:: TeX-AMS_HTML.js
Allows math to be specified in TeX or LaTeX notation, with the
Allows math to be specified in :term:`TeX` or :term:`LaTeX` notation, with the
`AMSmath` and `AMSsymbols` packages included, and produces output
using the HTML-CSS output processor.
.. describe:: MML_HTMLorMML.js
Allows math to be specified using MathML notation, and produces MathML
output if the browser supports it, or HTML-CSS output otherwise.
Allows math to be specified using :term:`MathML` notation, and produces MathML
output if the browser supports it sufficiently, or HTML-CSS output otherwise.
.. describe:: Accessible.js
.. describe:: AM_HTMLorMML.js
Essentially the same as ``TeX-AMS-MML_HTMLorMML``, but with some
settings specified to make MathJax work better with assistive
technology (for the visually impaired). This includes setting the
zoom trigger to be a double-click, and removing the MathMenu in
Internet Explorer (which can interfere with some screen readers).
Allows math to be specified using :term:`AsciiMath` notation,
producing output in MathML if the browser supports it
sufficiently, or as HTML-with-CSS otherwise.
.. describe:: TeX-AMS-MML_SVG.js
Allows math to be specified in :term:`TeX`, :term:`LaTeX`, or
:term:`MathML` notation, with the `AMSmath` and `AMSsymbols`
packages included, producing output using SVG.
.. describe:: TeX-MML-AM_HTMLorMML.js
Allows math to be specified in :term:`TeX`, :term:`LaTeX`,
:term:`MathML`, or :term:`AsciiMath` notation, with the `AMSmath`
and `AMSsymbols` packages included, producing output using MathML
if the browser supports it sufficiently, and HTML-with-CSS
otherwise.
The first of these is a file that you can edit to suit your needs. It
contains nearly all the configuration options that MathJax allows, and has
@ -226,7 +240,7 @@ the main code, and a "full" version, that also includes the complete
output processors. For example, with ``TeX-AMS_HTML.js`` and
``TeX-AMS_HTML-full.js``, the latter includes the complete HTML-CSS output
processor. The "full" configuration files are substantially larger (on
the order of 70KB), so you need to decide whether it is worth loading the
the order of 70KB more), so you need to decide whether it is worth loading the
full configuration for your pages.
If most of your pages include mathematics, then it is to your advantage to
@ -271,8 +285,17 @@ can use
to first load the main configuration, then the local modifications.
You can also load MathJax from the MathJax CDN server but use a configuration from
your own local server:
.. _local-config-files:
Using a local configuration file with the CDN
=============================================
You can load MathJax from the MathJax CDN server but still use a
configuration from your own local server. For example, suppose you
have a configuration file called ``local.js`` on your own server, in a
directory called ``MathJax/config/local``. Then you can load MathJax
from the CDN and still use your configuration file as follows:
.. code-block:: html
@ -285,7 +308,7 @@ the complete URL to the local configuration file. Note that you also
have to edit the :meth:`loadComplete()` call that is at the bottom of
the configuration file to change it from
``[MathJax]/config/local/local.js`` to the complete URL as you give it
in the ``config`` parameter:
in the ``config`` parameter. In the example above, it would be
.. code-block:: javascript
@ -303,23 +326,24 @@ Using in-line configuration options
===================================
The second way to configure MathJax is through `in-line configuration`,
that puts the configuration options within the web page itself. This
process has changed in version 1.1 to make it compatible with HTML5.
which puts the configuration options within the web page itself. This
process was changed in version 1.1 to make it compatible with HTML5.
Earlier versions of MathJax had in-line configuration included within the
content of the ``<script>`` tag that loads ``MathJax.js``, but HTML5 makes
it illegal to have content for a script with a ``src`` attribute.
MathJax solves this problem by using separate ``<script>`` tags to perform
configuration for MathJax. Because MathJax starts its configuration
process as soon as it is loaded, the configuration script must come
**before** the script tag that loads ``MathJax.js`` itself. You do this
by including a ``<script>`` with ``type="text/x-mathjax-config"``, whose
content will be run when MathJax performs its configuration. Generally,
this script will include a :meth:`MathJax.Hub.Config()` call to perform
MathJax configuration, but it can also include other MathJax commands,
such as registering signal actions, or any JavaScript commands that you
want. You can have as many such script tags as you want, and MathJax will
process them in order as they appear in the document.
MathJax solves this problem by using separate ``<script>`` tags to
perform the configuration for and loading of MathJax. Because MathJax
starts its configuration process as soon as it is loaded, the
configuration script must come **before** the script tag that loads
``MathJax.js`` itself. You do this by including a ``<script>`` with
``type="text/x-mathjax-config"`` whose content will be run when
MathJax performs its configuration. Generally, this script will
include a :meth:`MathJax.Hub.Config()` call to perform MathJax
configuration, but it can also include other MathJax commands, such as
registering signal actions, or any JavaScript commands that you want.
You can have as many such script tags as you need, and MathJax will
process them in the order in which they appear in the document.
For instance,
@ -346,7 +370,7 @@ HTML-CSS processor to use the TeX fonts rather than other locally installed
fonts (e.g., :term:`STIX` fonts). See the :ref:`configuration options
<configuration>` section (or the comments in the ``config/default.js``
file) for more information about the configuration options that you can
include in the :meth:`MathJax.Hub.Config()` call. Note that this
include in the :meth:`MathJax.Hub.Config()` call. This
configuration does **not** load any pre-defined configuration file.
Note that you can combine in-line configuration with file-based
@ -354,8 +378,9 @@ configuration; simply include ``text/x-mathjax-config`` scripts as above,
but also include ``config=filename`` when you load the ``MathJax.js``
file. For example, the `tex2jax` preprocessor does **not** enable the TeX
single-dollar in-line math delimiters by default. You can load one of the
pre-defined configuration files that include the TeX preprocessor, and use
an in-line configuration block to enable the single-dollar signs:
pre-defined configuration files that includes the TeX preprocessor, and use
an in-line configuration block to enable the single-dollar signs, as
in this example:
.. code-block:: html
@ -424,19 +449,24 @@ in your theme's header file, and
MathJax.Hub.Configured()
</script>
in its footer, so that MathJax will delay setting up until the footer is
reached, but will not have to wait until images and other files are
loaded. If you have ``text/x-mathjax-config`` script tags within the main
body of the document, MathJax will read and process those before
continuing its startup. In this way you can use a default configuration
that can be modified on a page-by-page basis.
in its footer, so that MathJax will delay setting up until the footer
is reached, but will not have to wait until images and other files are
loaded. In this way, if you have ``text/x-mathjax-config`` script
tags within the main body of the document, MathJax will read and
process those before continuing its startup. In this way you can use
a default configuration that can be modified on a page-by-page basis.
Note that :meth:`MathJax.Hub.Configured()` is not called by MathJax;
you must make that call somewhere within the page yourself after the
configuration blocks are set up. If you do not execute this function,
MathJax will not process any of the math on the page.
Details of the MathJax configuration process
============================================
Since there are a number of different ways to configure MathJax, it is
important to know how they interact. The configuration process is the
important to know how they interact. The configuration actions are the
following:
1. Process any configuration file explicitly specified as a script parameter.

View File

@ -6,21 +6,16 @@ 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.
part of the original document in that it uses an ``onload`` or
``DOMContentLoaded`` 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 prior to version 2.0, MathJax had to
be told not to wait for the page ``onload`` event by calling
:meth:`MathJax.Hub.Startup.onload()` by hand. That is no longer
necessary, as MathJax v2.0 detects whether the page is already
available and when it is, it processes it immediately rather than
waiting for an event that has already happened.
Here is an example of how to load and configure MathJax dynamically:
@ -29,43 +24,37 @@ Here is an example of how to load and configure MathJax dynamically:
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js";
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}
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
You can adjust the ``config`` variable to your needs, but be careful to get
the commas right. The ``window.opera`` test is because some versions of
Opera don'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=filename`` method to
configure MathJax:
If you need to provide in-line configuration, you can do that using a
MathJax's configuration script:
.. code-block:: javascript
(function () {
var script = document.createElement("script");
var head = document.getElementsByTagName("head")[0], script;
script = document.createElement("script");
script.type = "text/x-mathjax-config";
script[(window.opera ? "innerHTML" : "text")] =
"MathJax.Hub.Config({\n" +
" tex2jax: { inlineMath: [['$','$'], ['\\\\(','\\\\)']] }\n" +
"});"
head.appendChild(script);
script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full";
var config = 'MathJax.Hub.Startup.onload();';
if (window.opera) {script.innerHTML = config}
else {script.text = config}
document.getElementsByTagName("head")[0].appendChild(script);
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
head.appendChild(script);
})();
You can adjust the configuration to your needs, but be careful to get
the commas right, as Internet Explorer 6 and 7 will not tolerate an
extra comma before a closing brace. The ``window.opera`` test is
because some versions of Opera don't handle setting ``script.text``
properly, while some versions of Internet Explorer don't handle
setting ``script.innerHTML``.
Note that the **only** reliable way to configure MathJax is to use an
in-line configuration block of the type discussed above. You should
**not** call :meth:`MathJax.Hub.Config()` directly in your code, as it will
@ -116,9 +105,8 @@ IE+MathPlayer.
(document.getElementsByTagNameNS == null ? false :
(document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full";
var config = 'MathJax.Hub.Startup.onload()';
if (window.opera) {script.innerHTML = config} else {script.text = config}
document.getElementsByTagName("head")[0].appendChild(script);
}
}
@ -157,9 +145,8 @@ converting the math images to their original TeX code.
// Load MathJax and have it process the page
//
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full";
var config = 'MathJax.Hub.Startup.onload()';
if (window.opera) {script.innerHTML = config} else {script.text = config}
document.getElementsByTagName("head")[0].appendChild(script);
}
}

View File

@ -8,6 +8,16 @@ Glossary
.. glossary::
AsciiMath
A notation for mathematics that uses characters commonly
available on all computer keyboards to represent the math in
an algebra-like syntax that should be intuitive and easily
read.
.. seealso::
`AsciiMath home page <http://www1.chapman.edu/~jipsen/mathml/asciimath.html>`_
Callback
A JavaScript function that is used to perform actions that
must wait for other actions to complete before they are
@ -44,6 +54,18 @@ Glossary
`LaTeX Wikipedia entry <http://en.wikipedia.org/wiki/LaTeX>`_
Markdown
A text format commonly used in blogs and wikis for creating
web pages without the need for complicated markup notation.
It is intended to be an easy-to-read and easy-to-write format
that still gives you the ability to specify a rich text result
(including things like bold, italics, bullet lists, and so
on).
.. seealso::
`Markdown home page <http://daringfireball.net/projects/markdown/>`_
MathML
An XML specification created to describe mathematical
notations and capture both its structure and content. MathML
@ -62,6 +84,18 @@ Glossary
`STIX project <http://stixfonts.org/>`_
SVG
Acronym for `Scalable Vector Graphics`. SVG is a graphics
format that allows images to be described as a collection of
graphics objects (like lines, rectangles, etc) rather than as
a bitmap of colored pixels. MathJax can use this format to
display mathematics as an alterantive to its HTML-CSS or
NativeMML output.
.. seealso::
`SVG Wilipedia entry <http://en.wikipedia.org/wiki/Scalable_Vector_Graphics>`_
TeX
A document markup language with robust math markup commands
developed by Donald Knuth in the late 1970's, but still in

View File

@ -2,8 +2,8 @@
MathJax Documentation
#####################
MathJax is an open-source JavaScript display engine for LaTeX and
MathML that works in all modern browsers.
MathJax is an open-source JavaScript display engine for LaTeX,
MathML, and AsciiMath notaion that works in all modern browsers.
Basic Usage
===========
@ -24,6 +24,7 @@ Basic Usage
MathJax TeX and LaTeX Support <tex>
MathJax MathML Support <mathml>
MathJax AsciiMath Support <asciimath>
MathJax Output Formats <output>
.. toctree::
@ -40,7 +41,8 @@ Upgrading MathJax
.. toctree::
:maxdepth: 1
What's New in MathJax v1.1 <whats-new>
What's New in MathJax v2.0 <whats-new-2.0>
What's New in MathJax v1.1 <whats-new-1.1>
Migrating from MathJax v1.0 to v1.1 <upgrade>
Converting to MathJax from jsMath <jsMath>

View File

@ -10,11 +10,12 @@ distributed network service (see :ref:`Using the MathJax CDN
yourself, and you can begin using MathJax right away; skip this document on
installation and go directly to :ref:`Configuring MathJax <loading>`.
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
``git``, ``svn``, 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.
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. There are three ways to do
this: via ``git``, ``svn``, 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.
.. _getting-mathjax-git:
@ -30,9 +31,9 @@ The easiest way to get MathJax and keep it up to date is to use the `Git
git clone git://github.com/mathjax/MathJax.git MathJax
to obtain and set up a copy of MathJax. Note that there is no longer
a ``fonts.zip`` file, and that the ``fonts`` directory is now part of
the repository itself.
to obtain and set up a copy of MathJax. (Note that there is no longer
a ``fonts.zip`` file, as there was in v1.0, and that the ``fonts``
directory is now part of the repository itself.)
Whenever you want to update MathJax, you can now use
@ -123,11 +124,11 @@ latest revision using ``svn``, use the command
.. code-block:: sh
svn checkout http://svn.github.com/mathjax/MathJax.git MathJax
svn checkout http://github.com/mathjax/MathJax/trunk MathJax
to obtain and set up a copy of MathJax. Note that there is no longer
a ``fonts.zip`` file, and that the ``fonts`` directory is now part of
the repository itself.
to obtain and set up a copy of MathJax. (Note that there is no longer
a ``fonts.zip`` file as of v1.1, and that the ``fonts`` directory is
now part of the repository itself.)
Whenever you want to update MathJax, you can now use
@ -152,18 +153,17 @@ This gets you the current development copy of MathJax, which is the version
that contains all the latest changes to MathJax. Although we try to make
sure this version is a stable and usable version of MathJax, it is under
active development, and at times it may be less stable than the "release"
version. If you prefer to use one of the tagged releases instead, then
either use ``git`` as described above, or one of the archive files as
described below. You can use
version. If you prefer to use one of the tagged releases instead,
then use
.. code-block:: sh
svn checkout http://svn.github.com/mathjax/MathJax.git@nnn mathjax
svn checkout http://github.com/mathjax/MathJax/branch/[name] MathJax
to check out revision number `nnn`, but it is not easy to tell what
svn revision number is associated with a particular release. GitHub's
``svn`` service doesn't appear to allow you to specify a particular
tagged version.
where ``[name]`` is replaced by the name of the branch you want to
check out; e.g., ``2.0-latest``. The branch names can be found on the
`GitHub MathJax page <http://github.com/mathjax/MathJax/>`_ under the
`branches <https://github.com/mathjax/MathJax/branches>`_ tab.
.. _getting-mathjax-zip:
@ -173,12 +173,12 @@ Obtaining MathJax via an archive
Release versions of MathJax are available in archive files from the
`MathJax download page <http://www.mathjax.org/download/>`_ or the
`GitHub downloads <http://github.com/mathjax/mathjax/>`_ (click the
big download button on the right), where you can download the archive
`MathJax GitHub page <http://github.com/mathjax/mathjax/>`_ (via the
"zip" button, or the "downloads" tab), where you can download the archive
that you need.
You should download the v1.1 archive (which will get you a file with a
name like ``mathjax-MathJax-v1.1-X-XXXXXXXX.zip``, where the X's are
You should download the v2.0 archive (which will get you a file with a
name like ``mathjax-MathJax-v2.0-X-XXXXXXXX.zip``, 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
@ -188,11 +188,10 @@ let you refer to the main MathJax file as ``/MathJax/MathJax.js`` from
within any page on your server.
From the `MathJax GitHub download link
<http://github.com/mathjax/mathjax/>`_ (the download button at the
right), you can also select the ``Download .tar.gz`` or ``Download
.zip`` buttons to get a copy of the current development version of
MathJax that contains all the latest changes and bug-fixes. You can
also get older tagged versions (if there are any).
<http://github.com/mathjax/mathjax/downloads>`_, you can also select
the ``Download .tar.gz`` or ``Download .zip`` buttons to get a copy of
the current development version of MathJax that contains all the
latest changes and bug-fixes.
If a packaged release receives any important updates, then those
updates will be part of the `branch` for that version. The link to
@ -200,9 +199,8 @@ the ``.zip`` file in the download list will be the original release
version, not the patched version. To obtain the patched version, use
the `Branches` drop down menu (at the far left of the menus within the
page) to select the release branch that you want (for example
``v1.1-latest``), and then use the download button and the ``Download
.tar.gz`` or ``Download .zip`` button to get the latest patched
version of that release.
``v2.0-latest``), and then use the "zip" button just above it to get
the latest patched version of that release.
Testing your installation
@ -215,6 +213,7 @@ installation is working properly::
index.html # Tests default configuration
index-images.html # Tests image-font fallback display
sample.html # Sample page with lots of pretty equations
examples.html # Page with links to all sample pages
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
@ -263,7 +262,7 @@ server <http://www.apache.org/>`_. In the remote server's
``.htaccess`` that contains the following lines:
::
<FilesMatch "\.(ttf|otf|eot)$">
<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
@ -328,7 +327,7 @@ IE9 and remote fonts
IE9's same-origin policy affects its ability to load web-based fonts, as
described above. This has implications not ony to cross-domain loading of
MathJax, but also to the case where you view a local page (with a
``file://`` URL) that accesses MathJax from a remote site, like the MathJax
``file://`` URL) that accesses MathJax from a remote site such as the MathJax
CDN service. In this case, IE9 does **not** honor the
``Access-Control-Allow-Origin`` setting of the remote server (as it would
if the web page came from an ``http://`` URL), and so it **never** allows the

View File

@ -2,16 +2,17 @@
What is MathJax?
****************
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.
MathJax is an open-source JavaScript display engine for LaTeX, MathML,
and AsciiMath notation 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, including those
on mobile devices. It requires no setup on the part of the user (no
plugins to download 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.
MathJax uses web-based fonts (in those browsers that support it) to
produce high-quality typesetting that scales and prints at full
@ -21,11 +22,12 @@ 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 `MathML <http://www.w3.org/TR/MathML3>`_, a World Wide
Web Consortium 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 paste it into other programs.
notation, `MathML <http://www.w3.org/TR/MathML3>`_, a World Wide Web
Consortium standard for representing mathematics in XML format, or
`AsciiMath <http://www1.chapman.edu/~jipsen/mathml/asciimath.html>`_
notation. 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 paste it into other programs.
MathJax is modular, so it loads components only when necessary, and
can be extended to include new capabilities as needed. MathJax is

View File

@ -20,10 +20,10 @@ displayed as MathML. Or you could use the `mml2jax` preprocessor 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 :ref:`common
configurations <common-configurations>` section for details and
examples.
you so that MathML is used in those browsers that support it well
enough, while HTML-CSS is used for those that don't. See the
:ref:`common configurations <common-configurations>` section for
details and examples.
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
@ -43,7 +43,7 @@ MathML in HTML pages
====================
For MathML that is handled via the preprocessor, you should not use
the named MathML entities, but rather use the numeric entities like
named MathML entities, but rather use numeric entities like
``&#x221A;`` 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
@ -64,12 +64,16 @@ tags. That is, use
<mspace width="thinmathspace"></mspace>
rather than ``<mspace width="thinmathspace />``. 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
``<mspace width="1em" />``, since there is no closing tag, the rest of
the mathematics will become the content of the ``<mspace>`` tag; but
since ``<mspace>`` should have no content, the rest of the mathematics
will not be displayed. This is a common error that should be avoided.
(prior to HTML5) 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 ``<mspace width="1em" />``, since there is no closing
tag, the rest of the mathematics will become the content of the
``<mspace>`` tag; but since ``<mspace>`` should have no content, the
rest of the mathematics will not be displayed. This is a common error
that should be avoided. Modern browsers that support HTML5 should be
able to handle self-closing tags, but older browsers have problems
with them, so if you want your mathematics to be visible to the widest
audience, do not use the self-closing form in HTML documents.
Supported MathML commands
@ -86,12 +90,12 @@ The deficiencies include:
- No support for the elementary math tags: ``mstack``, ``mlongdiv``,
``msgroup``, ``msrow``, ``mscarries``, and ``mscarry``.
- Limited support for line breaking (they are only allowed in direct
children of ``mrow`` or implied ``mrow`` elements).
- No support for alignment groups in table.
- No support for alignment groups in tables.
- No support for right-to-left rendering.
- Not all attributes are supported for tables. E.g., ``columnspan``
and ``rowspan`` are not implemented yet.
See the `results of the MathML3.0 test suite
<http://www.w3.org/Math/testsuite/results/tests.html>`_ for details.

View File

@ -5,7 +5,7 @@ The MathJax Processing Model
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.,
:term:`MathML` or :term:`LaTeX`), and MathJax provides high-quality
:term:`MathML`, :term:`LaTeX`, or :term:`AsciiMath`), 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
@ -35,7 +35,8 @@ 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 :ref:`TeX notation <TeX-support>`, :ref:`MathML
notation <MathML-support>`, and the :ref:`jsMath notation
notation <MathML-support>`, :ref:`AsciiMath notation
<AsciiMath-support>` and the :ref:`jsMath notation
<jsMath-support>` that uses `span` and `div` tags.
For pages that are constructed programmatically, such as HTML
@ -44,10 +45,12 @@ format (e.g., pages produced from Markdown documents, or via programs
like `tex4ht`), 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,
mathematics, since the extra preprocessing step would not be needed.
It also avoids the conflict between the use of the less-than sign,
``<``, in mathematics and as an HTML special character (that starts
an HTML tag).
an HTML tag), and several other issues involved in having the
mathematics directly in the text of the page (see the documentation on
the various input jax for more details on this).
.. _mathjax-script-tags:
@ -69,8 +72,9 @@ kind of script that the tag contains. The usual (and default) value
is ``type="text/javascript"``, and when a script has this type, the
browser executes the script as a javascript program. MathJax,
however, uses the type `math/tex` to identify mathematics in the TeX
and LaTeX notation, and `math/mml` for mathematics in MathML
notation. When the `tex2jax` or `mml2jax` preprocessors run, they
and LaTeX notation, `math/mml` for mathematics in MathML notation, and
`math/asciimath` for mathematics in AsciiMath notation. When the
`tex2jax`, `mml2jax`, or `asciimath2jax` preprocessors run, they
create ``<script>`` tags with these types so that MathJax can process
them when it runs its main typesetting pass.
@ -197,17 +201,25 @@ 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 don't
understand MathML. Output jax could be produced that render the
mathematics using SVG, for example, or that speak an equation for
blind users. The MathJax contextual menu can be used to switch
between the output jax that are available.
understand MathML. MathJax also has an :term:`SVG` output jax that
will render the mathematics using scalable vector grtaphics. Output
jax could be produced that render the mathematics using HTML5 canvas
elements, for example, or that speak an equation for blind users. The
MathJax contextual menu can be used to switch between the output jax
that are available.
Each input and output jax has a small configuration file that is
loaded when that input jax is included in the `jax` array in the
MathJax configuration, and a larger file that implements the core
functionality of that particular jax. The latter file is loaded
the first time the jax is needed by MathJax to process some
mathematics.
functionality of that particular jax. The latter file is loaded the
first time the jax is needed by MathJax to process some mathematics.
Most of the combined configuration files include only the small
configuration portion for the input and output jax, making the
configuraiton file smaller and faster to load for those pages that
don't actually incldue mathematics; the combined configurations that
end in ``-full`` include both parts of the jax, so there is no delay
when the math is to be rendered, but at the expense of a larger
initial download.
The **MathJax Hub** keeps track of the internal representations of the
various mathematical equations on the page, and can be queried to

View File

@ -0,0 +1,41 @@
.. _configure-AsciiMath:
*****************************
The AsciiMath input processor
*****************************
The options below control the operation of the AsciiMath input
processor that is run when you include ``"input/AsciiMath"`` in the
`jax` array of your configuration or load a combined configuration
file that includes the AsciiMath input jax. They are listed with
their default values. To set any of these options, include a
``AsciiMath`` section in your :meth:`MathJax.Hub.Config()` call. For
example
.. code-block:: javascript
MathJax.Hub.Config({
AsciiMath: {
displaystyle: false
}
});
would set the ``displaystyle`` configuration option so that the limits
for operators like summation symbols will appear next to them rather
than above and below.
.. describe:: displaystyle: true
Determines whether operators like summation symbols will have
their limits above and below the operators (true) or to their
right (false). The former is how they would appear in displayed
equations that appear on their own lines, while the latter is
better suited to in-line equations so that they don't interfere
with the line spacing so much.
.. describe:: decimal: "."
This is the character to be used for decimal points in numbers.
if you change this to ``","``, then you need to be careful about
entering points or intervals. E.g., use ``(1, 2)`` rather than
``(1,2)`` in that case.

View File

@ -126,12 +126,15 @@ would set the ``fadeoutTime`` option to 2000 milliseconds (2 seconds).
.. describe:: removeAfter: 12*1000
This is the amount of time to show the FontWarning message, in
milliseconds. The default is 12 seconds.
milliseconds. The default is 12 seconds. Setting this value
to zero means that the message will not fade out (the user must
close it manually).
.. describe:: fadeoutSteps: 10
This is the number of steps to take while fading out the
FontWarning message. More steps make for a smoother fade-out.
Set to zero to cause the message to be removed without fading.
.. describe:: fadeoutTime: 1.5*1000

View File

@ -6,10 +6,12 @@ The HTML-CSS output processor
The options below control the operation of the HTML-CSS output
processor that is run when you include ``"output/HTML-CSS"`` in the
`jax` array of your configuration. They are listed with their default
values. To set any of these options, include a ``"HTML-CSS"`` section
in your :meth:`MathJax.Hub.Config()` call. Note that, because of the
dash, you need to enclose the name in quotes. For example
`jax` array of your configuration or load a combined configuration
file that includes the HTML-CSS output jax. They are listed with
their default values. To set any of these options, include a
``"HTML-CSS"`` section in your :meth:`MathJax.Hub.Config()` call.
Note that, because of the dash, you need to enclose the name in
quotes. For example
.. code-block:: javascript
@ -25,7 +27,7 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
The scaling factor (as a percentage) of math with respect to the
surrounding text. The `HTML-CSS` output processor tries to match
the en-size of the mathematics with that of the text where it is
the ex-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.
@ -86,6 +88,68 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
(even if it doesn't contain the needed character), so order these
carefully.
.. describe:: mtextFontInherit: false
This setting controls whether ``<mtext>`` elements will be typeset
using the math fonts or the font of the surrounding text. When
``false``, the font for ``mathvariant="normal"`` will be used;
when ``true``, the font will be inherited from the surrounding
paragraph.
.. describe:: EqnChunk: 50
EqnChunkFactor: 1.5
EqnChunkDelay: 100
These values control how "chunky" the display of mathematical
expressions will be; that is, how often the equations will be
updated as they are processed.
``EqnChunk`` is the number of equations that will be typeset before
they appear on screen. Larger values make for less visual flicker
as the equations are drawn, but also mean longer delays before the
reader sees anything.
``EqChunkFactor`` is the factor by which the ``EqnChunk`` will
grow after each chunk is displayed.
``EqChunkDelay`` is the time (in milliseconds) to delay between
chunks (to allow the browser to respond to other user
interaction).
Set ``EqnChunk`` to 1, ``EqnChunkFactor`` to 1, and
``EqnChunkDelay`` to 10 to get the behavior from MathJax v1.1 and
below.
.. describe:: linebreaks: {}
This is an object that configures automatic linebreaking in the
HTML-CSS output. In order to be backward compatible with earlier
versions of MathJax, only explicit line breaks are performed by
default, so you must enable line breaks if you want automatic
ones. The object contains the following values:
.. describe:: automatic: false
This controls the automatic breaking of expressions: when
``false``, only ``linebreak="newline"`` is processed; when
``true``, line breaks are inserted automatically in long
expressions.
.. describe:: width: "container"
This controls how wide the lines of mathematics can be.
Use an explicit width like ``"30em"`` for a fixed width.
Use ``"container"`` to compute the size from the containing
element.
Use ``"nn% container"`` for a portion of the container.
Use ``"nn%"`` for a portion of the window size.
The container-based widths may be slower, and may not produce
the expected results if the layout width changes due to the
removal of previews or inclusion of mathematics during
typesetting.
.. describe:: styles: {}
This is a list of CSS declarations for styling the HTML-CSS
@ -96,18 +160,10 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
.. describe:: showMathMenu: true
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.
Set this to ``false`` to disable the menu. When ``true``, the
``MathMenu`` configuration block determines the operation of the
menu. See :ref:`the MathMenu options <configure-MathMenu>` for
more details.
This value has been moved to the core configuration block, since
it applies to all output jax, but it will still be honored (for
now) if it is set here. See the :ref:`Core configuration options
<configure-hub>` for more details.
.. describe:: tooltip: { ... }
@ -128,7 +184,8 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
The delay (in milliseconds) before the tooltop is cleared
after the mouse moves out of the ``maction`` element.
.. describe:: offsetX: 10 and offsetY: 5
.. describe:: offsetX: 10
offsetY: 5
These are the offset from the mouse position (in pixels)
where the tooltip will be placed.

View File

@ -6,9 +6,11 @@ The MMLorHTML configuration options
The options below control the operation of the MMLorHTML configuration
file that is run when you include ``"MMLorHTML.js"`` in the `config`
array of your configuration. They are listed with their default
values. To set any of these options, include a ``MMLorHTML`` section
in your :meth:`MathJax.Hub.Config()` call. For example
array of your configuration, or when you use one of the combined
configuration files that ends with ``_HTMLorMML``. They are listed
with their default values. To set any of these options, include a
``MMLorHTML`` section in your :meth:`MathJax.Hub.Config()` call. For
example
.. code-block:: javascript
@ -28,15 +30,29 @@ Note that if you use the ``MMLorHTML.js`` configuration file, you should
**not** specify an output processor in the `jax` array of your
configuration; `MMLorHTML` will fill that in for you.
.. describe:: prefer: { MSIE: "MML", Firefox: "MML", Opera: "HTML", other: "HTML" }
.. describe:: prefer: {
MSIE: "MML",
Firefox: "HTML",
Safari: "HTML",
Chrome: "HTML",
Opera: "HTML",
other: "HTML"
}
This lets you set the preferred renderer on a browser-by-browser
basis. You set the browser to either ``"MML"`` or ``"HTML"``
depending on whether you want to use the `NativeMML` or `HTML-CSS`
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
``"HTML"`` by default.
output processor. Note that although Opera and Safari do process some MathML
natively, their support is not sufficient to handle the more
complicated output generated by MathJax, so their settings are
``"HTML"`` by default. Although Firefox does support a large
subset of MathJax, it does not implement all the features needed by
MathJax, and so it is also set to ``"HTML"`` by default (this is
new in v2.0).
Note that users can still use the MathJax contextual menu to select
a different renderer after the default one has been chosen by
``MMLorHTML.js``.

View File

@ -0,0 +1,37 @@
.. _configure-MathEvents:
************************
The MathEvents extension
************************
The options below control the operation of the MathEvents component that
allows handles mouse and menu events attached to mathematics that is
typeset by MathJax. They are listed with their
default values. To set any of these options, include a ``MathEvents``
section in your :meth:`MathJax.Hub.Config()` call. For example
.. code-block:: javascript
MathJax.Hub.Config({
MathEvents: {
hover: 400
}
});
would set the required delay for hovering over a math element to
400 milliseconds.
.. describe:: hover: 500
This value is the time (in milliseconds) that a user must hold the
mouse still over a math element before it is considered to be
hovering over the math.
.. describe:: styles: {}
This is a list of CSS declarations for styling the zoomed
mathematics. See the definitions in ``extensions/MathEvents.js``
for details of what are defined by default. See :ref:`CSS Style
Objects <css-style-objects>` for details on how to specify CSS
style in a JavaScript object.

View File

@ -6,7 +6,8 @@ The MathML input processor
The options below control the operation of the MathML input processor
that is run when you include ``"input/MathML"`` in the `jax` array of
your configuration. They are listed with their default values. To
your configuration or load a combined configuration file that includes
the MathML input jax. They are listed with their default values. To
set any of these options, include a ``MathML`` section in your
:meth:`MathJax.Hub.Config()` call. For example

View File

@ -34,33 +34,41 @@ would set the ``delay`` option to 600 milliseconds.
.. describe:: showRenderer: true
This controls whether the "Math Renderer" item will be displayed in
the "Settings" submenu of the mathematics contextual menu. It
allows the user to change between the `HTML-CSS` and `NativeMML`
output processors for the mathematics on the page. Set to
``false`` to prevent this menu item from showing.
.. describe:: showContext: false
This controls whether the "Contextual Menu" item will be displayed
in the "Settings" submenu of the mathematics contextual menu.
It allows the user to decide whether the MathJax menu or the
browser's default contextual menu 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 `MathPlayer plugin
<http://www.dessci.com/en/products/mathplayer/>`_.) Set to
``false`` to prevent this menu item from showing.
This controls whether the "Math Renderer" item will be displayed
in the "Math Settings" submenu of the MathJax contextual menu.
It allows the user to change between the `HTML-CSS`, `NativeMML`,
and `SVG` output processors for the mathematics on the page. Set
to ``false`` to prevent this menu item from showing.
.. describe:: showFontMenu: false
This controls whether the "Font Preference" item will be displayed
in the "Settings" submenu of the mathematics contextual menu.
in the "Math Settings" submenu of the MathJax contextual menu.
This submenu lets the user select what font to use in the
mathematics produced by the `HTML-CSS` output processor. Note that
changing the selection in the font menu will cause the page to
reload. Set to ``false`` to prevent this menu item from showing.
.. describe:: showMathPlayer: true
This controls whether the "MathPlayer" item will be displayed in
the "Math Settings" submenu of the MathJax contextual menu. This
submenu lets the user select what events should be passed on to
the `MathPlayer plugin
<http://www.dessci.com/en/products/mathplayer/>`_, when it is
present. Mouse events can be passed on (so that clicks will be
processed by MathPlayer rather than MathJax), and emnu events can
be passed on (to allow the user access to the MathPlayer menu).
Set to ``false`` to prevent this menu item from showing.
.. describe:: showContext: false
This controls whether the "Contextual Menu" item will be displayed
in the "Math Settings" submenu of the MathJax contextual menu.
It allows the user to decide whether the MathJax menu or the
browser's default contextual menu will be shown when the context
menu click occurs over mathematics typeset by MathJax. Set to
``false`` to prevent this menu item from showing.
.. describe:: windowSettings: { ... }

View File

@ -14,23 +14,28 @@ section in your :meth:`MathJax.Hub.Config()` call. For example
MathJax.Hub.Config({
MathZoom: {
delay: 600
styles: {
"#MathJax_Zoom": {
"background-color": "#0000F0"
}
}
}
});
would set the ``delay`` option to 600 milliseconds.
would set the background color of the Zoom box to a very light blue.
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 ``menuSettings`` configuration section).
the ``menuSettings`` configuration section of the `core configuration
options <configure-hub>`).
.. describe:: delay: 400
.. describe:: delay: 500
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 `Hover`).
This value is now stored as the ``hover`` parameter in the
:ref:`MathEvents <configure-MathEvents>` configuration options, and
will have no effect if given here.
.. describe:: styles: {}

View File

@ -6,9 +6,11 @@ The NativeMML output processor
The options below control the operation of the NativeMML output
processor that is run when you include ``"output/NativeMML"`` in the
`jax` array of your configuration. They are listed with their default
values. To set any of these options, include a ``NativeMML`` section
in your :meth:`MathJax.Hub.Config()` call. For example
`jax` array of your configuration or load a combined configuration
file taht includes the NativeMML output jax. They are listed with
their default values. To set any of these options, include a
``NativeMML`` section in your :meth:`MathJax.Hub.Config()` call. For
example
.. code-block:: javascript
@ -23,38 +25,29 @@ would set the ``scale`` option to 105 percent.
.. describe:: scale: 100
The scaling factor (as a percentage) of math with respect to the
surrounding text. Since the `NativeMML` output relies on the
browser's native 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.
surrounding text. The `NativeMML` output processor tries to match
the ex-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.
.. describe:: minScaleAdjust: 50
This gives a minimum scale (as a percent) for the scaling used by
MathJax to match the equation to the surrounding text. This will
prevent MathJax from making the mathematics too small.
.. describe:: showMathMath: true
showMathMenuMSIE: true
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.
Set this to ``false`` to disable the menu. When ``true``, the
``MathMenu`` configuration block determines the operation of the
menu. See :ref:`the MathMenu options <configure-MathMenu>` for
more details.
These values have been moved to the core configuration block, since
it applies to all output jax, but they will still be honored (for
now) if it is set here. See the :ref:`Core configuration options
<configure-hub>` for more details.
.. describe:: showMathMenuMSIE: true
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 turning off the
menu support in other browsers.
.. describe:: styles: {}
This is a list of CSS declarations for styling the HTML-CSS
This is a list of CSS declarations for styling the NativeMML
output. See the definitions in ``jax/output/NativeMML/config.js``
for some examples of what are defined by default. See :ref:`CSS
Style Objects <css-style-objects>` for details on how to specify

View File

@ -0,0 +1,162 @@
.. _configure-SVG:
************************
The SVG output processor
************************
The options below control the operation of the SVG output
processor that is run when you include ``"output/SVG"`` in the
`jax` array of your configuration or load a combined configuration
file that includes the SVG output jax. They are listed with their default
values. To set any of these options, include an ``SVG`` section
in your :meth:`MathJax.Hub.Config()` call. Note that, because of the
dash, you need to enclose the name in quotes. For example
.. code-block:: javascript
MathJax.Hub.Config({
"SVG": {
scale: 120
}
});
would set the ``scale`` option to 120%.
.. describe:: scale: 100
The scaling factor (as a percentage) of math with respect to the
surrounding text. The `SVG` output processor tries to match
the ex-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.
.. describe:: minScaleAdjust: 50
This gives a minimum scale (as a percent) for the scaling used by
MathJax to match the equation to the surrounding text. This will
prevent MathJax from making the mathematics too small.
.. describe:: font: "TeX"
This is the font to use for rendering the mathematics. Note that
currently only the `TeX` font is available.
.. describe:: blacker: 10
This is the stroke width to use for all character paths (1em =
1000 units). This is a cheap way of getting slightly lighter or
darker characters, but remember that not all displays will act the
same, so a value that is good for you may not be good for everyone.
.. describe:: undefinedFamily: "STIXGeneral, 'Arial Unicode MS', serif"
This is the font-family CSS value used for characters that are not
in the selected font (e.g., this is where to look for characters
not included in the MathJax TeX fonts). IE will stop looking
after the first font that exists on the system (even if it doesn't
contain the needed character), so order these carefully.
.. describe:: mtextFontInherit: false
This setting controls whether ``<mtext>`` elements will be typeset
using the math fonts or the font of the surrounding text. When
``false``, the font for ``mathvariant="normal"`` will be used;
when ``true``, the font will be inherited from the surrounding
paragraph.
.. describe:: addMMLclasses: false
This controls whether the MathML structure is retained and CSS
classes are added to mark the original MathML elements (as in the
output from the `HTML-CSS` output jax). By default, the SVG
output jax removes unneeded nesting in order to produce a more
efficient markup, but if you want to use CSS to style the elements
as if they were MathML, you might need to set this to true.
.. describe:: EqnChunk: 50
EqnChunkFactor: 1.5
EqnChunkDelay: 100
These values control how "chunky" the display of mathematical
expressions will be; that is, how often the equations will be
updated as they are processed.
``EqnChunk`` is the number of equations that will be typeset before
they appear on screen. Larger values make for less visual flicker
as the equations are drawn, but also mean longer delays before the
reader sees anything.
``EqChunkFactor`` is the factor by which the ``EqnChunk`` will
grow after each chunk is displayed.
``EqChunkDelay`` is the time (in milliseconds) to delay between
chunks (to allow the browser to respond to other user
interaction).
Set ``EqnChunk`` to 1, ``EqnChunkFactor`` to 1, and
``EqnChunkDelay`` to 10 to get the behavior from MathJax v1.1 and
below.
.. describe:: linebreaks: {}
This is an object that configures automatic linebreaking in the
SVG output. In order to be backward compatible with earlier
versions of MathJax, only explicit line breaks are performed by
default, so you must enable line breaks if you want automatic
ones. The object contains the following values:
.. describe:: automatic: false
This controls the automatic breaking of expressions: when
``false``, only ``linebreak="newline"`` is processed; when
``true``, line breaks are inserted automatically in long
expressions.
.. describe:: width: "container"
This controls how wide the lines of mathematics can be.
Use an explicit width like ``"30em"`` for a fixed width.
Use ``"container"`` to compute the size from the containing
element.
Use ``"nn% container"`` for a portion of the container.
Use ``"nn%"`` for a portion of the window size.
The container-based widths may be slower, and may not produce
the expected results if the layout width changes due to the
removal of previews or inclusion of mathematics during
typesetting.
.. describe:: styles: {}
This is a list of CSS declarations for styling the SVG output.
See the definitions in ``jax/output/SVG/config.js`` for some
examples of what are defined by default. See :ref:`CSS Style
Objects <css-style-objects>` for details on how to specify CSS
style in a JavaScript object.
.. describe:: tooltip: { ... }
This sets the configuration options for ``<maction>`` elements
with ``actiontype="tooltip"``. (See also the ``#MathJax_Tooltip``
style setting in ``jax/output/SVG/config.js``, which can be
overridden using the ``styles`` option above.)
The ``tooltip`` section can contain the following options:
.. describe:: delayPost: 600
The delay (in milliseconds) before the tooltip is posted after
the mouse is moved over the ``maction`` element.
.. describe:: delayClear: 600
The delay (in milliseconds) before the tooltop is cleared
after the mouse moves out of the ``maction`` element.
.. describe:: offsetX: 10
offsetY: 5
These are the offset from the mouse position (in pixels)
where the tooltip will be placed.

View File

@ -6,7 +6,8 @@ The TeX input processor
The options below control the operation of the TeX input processor
that is run when you include ``"input/TeX"`` in the `jax` array of
your configuration. They are listed with their default values. To
your configuration or load a combined configuration file that includes
the TeX input jax. They are listed with their default values. To
set any of these options, include a ``TeX`` section in your
:meth:`MathJax.Hub.Config()` call. For example
@ -41,41 +42,90 @@ to be defined within the TeX input processor.
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.
.. describe:: equationNumbers: {}
This object controls the automatic equation numbering and the
equation referencing. It contains the following values:
.. describe:: autoNumber: "none"
This controls whether equations are numbered and how. By
default it is set to ``"none"`` to be compatible with earlier
versions of MathJax where auto-numbering was not performed (so
pages will not change their appearance). You can change
this to ``"AMS"`` for equations numbered as the `AMSmath`
package would do, or ``"all"`` to get an equation number for
every displayed equation.
.. describe:: formatNumber: function (n) {return n}
A function that tells MathJax what tag to use for equation
number ``n``. This could be used to have the equations labeled
by a sequence of symbols rather than numbers, or to use section
and subsection numbers instead.
.. describe:: formatTag: function (n) {return '('+n+')'}
A function that tells MathJax how to format an equation number
for displaying as a tag for an equation. This is what appears
in the margin of a tagged or numbered equation.
.. describe:: formatID: function {return 'mjx-eqn-'+String(n).replace(/[:'"<>&]/g,"")}
A function that rells MathJax what ID to use as an anchor for
the equation (so that it can be used in URL references).
.. describe:: formatURL: function (id) {return '#'+escape(id)}
A function that takes an equation ID and returns the URL to
link to it.
.. describe:: useLabelIds: true
This controls whether element ID's use the ``\label`` name or
the equation number. When ``true``, use the label, when
``false``, use the equation number.
See the `MathJax examples page
<http://cdn.mathjax.org/mathjax/latest/test/examples.html>`_ for
some examples of equation numbering.
.. describe:: Macros: {}
This lists macros to define before the TeX input processor begins.
These are name:value pairs where the `name` gives the name of the TeX
macro to be defined, and `value` gives the replacement text for the
macro. The `value` can be an array of the form `[value,n]`, where
`value` is the replacement text and `n` is the number of parameters
for the macro. Note that since the `value` is a javascript string,
backslashes in the replacement text must be doubled to prevent them
from acting as javascript escape characters.
This lists macros to define before the TeX input processor begins.
These are `name:value` pairs where the `name` gives the name of
the TeX macro to be defined, and `value` gives the replacement
text for the macro. The `value` can be an array of the form
`[value,n]`, where `value` is the replacement text and `n` is the
number of parameters for the macro. Note that since the `value`
is a javascript string, backslashes in the replacement text must
be doubled to prevent them from acting as javascript escape
characters.
For example,
For example,
.. code-block:: javascript
.. code-block:: javascript
Macros: {
RR: '{\\bf R}',
bold: ['{\\bf #1}', 1]
}
Macros: {
RR: '{\\bf R}',
bold: ['{\\bf #1}', 1]
}
would ask the TeX processor to define two new macros: ``\RR``,
which produces a bold-face "R", and ``\bold{...}``, which takes one
parameter and sets it in the bold-face font.
would ask the TeX processor to define two new macros: ``\RR``,
which produces a bold-face "R", and ``\bold{...}``, which takes one
parameter and sets it in the bold-face font.
.. describe:: MAXMACROS: 10000
Because a definition of the form ``\def\x{\x} \x`` would cause MathJax
to loop infinitely, the `MAXMACROS` constant will limit the number of
macro substitutions allowed in any expression processed by MathJax.
Because a definition of the form ``\def\x{\x} \x`` would cause MathJax
to loop infinitely, the `MAXMACROS` constant will limit the number of
macro substitutions allowed in any expression processed by MathJax.
.. describe:: MAXBUFFER: 5*1024
Because a definition of the form ``\def\x{\x aaa} \x`` would loop
infinitely, and at the same time stack up lots of a's in MathJax's
equation buffer, the `MAXBUFFER` constant is used to limit the size of
the string being processed by MathJax. It is set to 5KB, which should
be sufficient for any reasonable equation.
Because a definition of the form ``\def\x{\x aaa} \x`` would loop
infinitely, and at the same time stack up lots of a's in MathJax's
equation buffer, the `MAXBUFFER` constant is used to limit the size of
the string being processed by MathJax. It is set to 5KB, which should
be sufficient for any reasonable equation.

View File

@ -0,0 +1,110 @@
.. _configure-asciimath2jax:
******************************
The asciimath2jax Preprocessor
******************************
The options below control the operation of the `asciimath2jax` preprocessor
that is run when you include ``"asciimath2jax.js"`` in the `extensions` array
of your configuration. They are listed with their default values. To
set any of these options, include a ``asciimath2jax`` section in your
:meth:`MathJax.Hub.Config()` call. For example
.. code-block:: javascript
MathJax.Hub.Config({
asciimath2jax: {
delimiters: [['`','`'], ['$','$']]
}
});
would set the ASCIIMath delimiters for the `asciimath2jax`
preprocessor to include dollar signs as well as back-ticks.
.. describe:: delimiters: [['`','`']]
Array of pairs of strings that are to be used as math
delimiters. 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,
.. code-block:: javascript
inlineMath: [ ['$','$'], ['`','`'] ]
would cause `asciimath2jax` to look for ``$...$`` and ```...``` 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.)
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.
.. describe:: preview: "AsciiMath"
This controls whether `asciimath2jax` inserts ``MathJax_Preview``
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 ``"AsciiMath"``, which means use the ASCIIMath code as
the preview (which will be visible until it is processed by
MathJax). Set to ``"none"`` 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.
Examples:
.. code-block:: javascript
preview: ["[math]"], // insert the text "[math]" as the preview
.. code-block:: javascript
preview: [["img",{src: "/images/mypic.jpg"}]], // insert an image as the preview
See the :ref:`description of HTML snippets <html-snippets>` for
details on how to represent HTML code in this way.
.. describe:: skipTags: ["script","noscript","style","textarea","pre","code"]
This array lists the names of the tags whose contents should not
be processed by `asciimath2jax` (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.
.. describe:: ignoreClass: "asciimath2jax_ignore"
This is the class name used to mark elements whose contents should
not be processed by asciimath2jax (other than to look for the
``processClass`` pattern below). Note that this is a regular
expression, and so you need to be sure to quote any `regexp`
special characters. The pattern is inserted into one that
requires your pattern to match a complete word, so setting
``ignoreClass: "class2"`` would cause it to match an element with
``class="class1 class2 class3"`` but not ``class="myclass2"``.
Note that you can assign several classes by separating them by the
vertical line character (``|``). For instance, with
``ignoreClass: "class1|class2"`` any element assigned a class of
either ``class1`` or ``class2`` will be skipped.
.. describe:: processClass: "asciimath2jax_process"
This is the class name used to mark elements whose contents
*should* be processed by `asciimath2jax`. This is used to restart
processing within tags that have been marked as ignored via the
``ignoreClass`` or to cause a tag that appears in the ``skipTags``
list to be processed rather than skipped. Note that this is a
regular expression, and so you need to be sure to quote any
`regexp` special characters. The pattern is inserted into one
that requires your pattern to match a complete word, so setting
``processClass: "class2"`` would cause it to match an element with
``class="class1 class2 class3"`` but not ``class="myclass2"``.
Note that you can assign several classes by separating them by the
vertical line character (``|``). For instance, with
``processClass: "class1|class2"`` any element assigned a class of
either ``class1`` or ``class2`` will have its contents processed.

View File

@ -19,10 +19,7 @@ behavior of MathJax. They are given with their default values.
A comma-separated list of extensions to load at startup. The
default directory is ``MathJax/extensions``. The ``tex2jax`` and
``mml2jax`` preprocessors can be listed here, as well as a number
of TeX-specific extensions (see the :ref:`TeX and LaTeX input
<tex-and-latex-input>` section of the :ref:`Getting Started
<getting-started>` document for more details). There is also a
``mml2jax`` preprocessors can be listed here, as well as a
``FontWarnings`` 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.
@ -33,7 +30,9 @@ behavior of MathJax. They are given with their default values.
starts up, e.g., to define local macros, etc., and there is a
sample config file named ``config/local/local.js``. The default
directory is the `MathJax/config` directory. The ``MMLorHTML.js``
configuration is the only other predefined configuration file.
configuration is one such configuration file, and there are a
number of other pre-defined configurations (see :ref:`Using a
configuration file <config-files>` for more details).
.. describe:: styleSheets: []
@ -43,8 +42,9 @@ behavior of MathJax. They are given with their default values.
.. describe:: styles: {}
CSS `selector: rules;` styles to be defined dynamically at startup
time.
CSS styles to be defined dynamically at startup time. These are
in the form `selector:rules` (see :ref:`CSS Style Objects
<css-style-objects>` for complete details).
.. describe:: preJax: null and postJax: null
@ -59,22 +59,23 @@ behavior of MathJax. They are given with their default values.
no space before it and the preceding 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 ``\\`` (doubled
for javascript). For example, ``"\\["`` represents the pattern
``\[`` in the regular expression. That means that if you want an
actual backslash in your guard characters, you need to use
``"\\\\"`` in order to get ``\\`` in the regular expression, and
``\`` in the actual text. If both preJax and postJax are defined,
both must be present in order to be removed.
Note that these are used as part of a regular expression, 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 ``\\``
(doubled for javascript). For example, ``"\\["`` represents the
pattern ``\[`` in the regular expression, or ``[`` in the text of
the web page. That means that if you want an actual backslash in
your guard characters, you need to use ``"\\\\"`` in order to get
``\\`` in the regular expression, and ``\`` in the actual text.
If both ``preJax`` and ``postJax`` are defined, both must be
present in order to be removed.
See also the ``preRemoveClass`` comments below.
Examples:
``preJax: "\\\\\\\\\"`` makes a double backslash the preJax text
``preJax: "\\\\\\\\\"`` makes a double backslash the ``preJax`` text
``preJax: "\\[\\[", postJax: "\\]\\]"`` makes it so jax
scripts must be enclosed in double brackets.
@ -148,13 +149,51 @@ behavior of MathJax. They are given with their default values.
.. describe:: elements: []
This is a list of DOM element ID's that are the ones to process for
mathematics when any of the Hub typesetting calls (Typeset, Process,
Update, etc.) are called with no element specified, and during
mathematics when any of the Hub typesetting calls (``Typeset()``, ``Process()``,
``Update()``, etc.) are called with no element specified, and during
MathJax's initial typesetting run when it starts up. This lets you
restrict the processing to particular containers rather than scanning
the entire document for mathematics. If none are supplied, the complete
document is processed.
.. describe:: positionToHash: true
Since typesetting usually changes the vertical dimensions of the
page, if the URL contains an anchor position, then after the page
is typeset, you may no longer be positioned at the correct
position on the page. MathJax can reposition to that location
after it completes its initial typesetting of the page. This
value controls whether MathJax will reposition the browser to the
``#hash`` location from the page URL after typesetting for the page.
.. describe:: showMathMenu: true
showMathMenuMSIE: true
These control whether to attach the MathJax contextual menu to the
expressions typeset by MathJax. Since the code for handling
MathPlayer in Internet Explorer is somewhat delicate, it is
controlled separately via ``showMathMenuMSIE``, but the latter is
now deprecated in favor of the MathJax contextual menu settings
for MathPlayer (see below).
If ``showMathMenu`` is ``true``, then right-clicking (on Windows
or Linux) or control-clicking (on Mac OS X) 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.
Set this to ``false`` to disable the menu. When ``true``, the
``MathMenu`` configuration block determines the operation of the
menu. See :ref:`the MathMenu options <configure-MathMenu>` for
more details.
These values used to be listed in the separate output jax, but
have been moved to this more central location since they are
shared by all output jax. MathJax will still honor their values
from their original positions, if they are set there.
.. describe:: menuSettings: { ... }
This block contains settings for the mathematics contextual menu
@ -194,9 +233,19 @@ behavior of MathJax. They are given with their default values.
to ``"Browser"``, you will get the MathPlayer contextual menu
rather than the MathJax menu.
There are also settings for ``format``, ``renderer``, and ``font``,
but these are maintained by MathJax and should not be set by the
page author.
.. describe:: texHints: true
This controls whether the "Show Source" menu item includes
special class names that help MathJax to typeset the
mathematics that was produced by the TeX input jax. If these
are included, then you can take the output from "Show Source"
and put it into a page that uses MathJax's MathML input jax
and expect to get the same results as the original TeX.
(Without this, there may be some spacing differences.)
There are also settings for ``format``, ``renderer``, ``font``,
``mpContext``, and ``mpMouse``, but these are maintained by
MathJax and should not be set by the page author.
.. describe:: errorSettings: { ... }

View File

@ -13,16 +13,16 @@ will see that ``config/default.js`` is itself one big call to
``config/default.js`` can be included in-line to configure MathJax.
The structure that you pass to :meth:`MathJax.Hub.Config()` is a
JavaScript object that includes name-value pairs giving the names of
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.
The MathJax components, like the TeX input processor, have their own
sections in the configuration object, labeled by the component name,
and using a configuration object as its value. The object is itself
a configuration object made up of name-value pairs that give the
sections in the configuration object labeled by the component name,
and using an object as its value. That object is itself
a configuration object made up of `name:value` pairs that give the
configuration options for the component.
For example,
@ -70,6 +70,7 @@ are categorized by the component they affect.
The tex2jax preprocessor options <tex2jax>
The mml2jax preprocessor options <mml2jax>
The asciimath2jax preprocessor options <asciimath2jax>
The jsMath2jax preprocessor options <jsMath2jax>
.. toctree::
@ -77,8 +78,10 @@ are categorized by the component they affect.
The TeX input processor options <TeX>
The MathML input processor options <MathML>
The AsciiMath input processor options <AsciiMath>
The HTML-CSS output processor options <HTML-CSS>
The NativeMML output processor options <NativeMML>
The SVG output processor options <SVG>
The MMLorHTML configuration options <MMLorHTML>
.. toctree::
@ -86,6 +89,7 @@ are categorized by the component they affect.
The MathMenu options <MathMenu>
The MathZoom options <MathZoom>
The MathEvents options <MathEvents>
The FontWarnings options <FontWarnings>

View File

@ -56,6 +56,21 @@ preprocessor.
the browser before MathJax has the chance to run. You can only
include text, not tags, as your math delimiters.
.. describe:: balanceBraces: true,
This value determines whether `tex2jax` requires braces to be
balanced within math delimiters (which allows for nested dollar
signs). Set to ``false`` to get pre-v2.0 compatibility. When
``true``,
.. code-block:: latex
$y = x^2 \hbox{ when $x > 2$}$.
will be properly handled as a single expression. When ``false``,
it would be interpreted as two searpate expressions, each with
improperly balanced braces.
.. describe:: processEscapes: false
When set to ``true``, you may use ``\$`` to represent a literal
@ -113,20 +128,28 @@ preprocessor.
not be processed by tex2jax (other than to look for the
``processClass`` pattern below). Note that this is a regular
expression, and so you need to be sure to quote any `regexp`
special characters. The pattern is automatically preceeded by
``'(^| )('`` and followed by ``')( |$)'``, so your pattern will
have to match full words in the class name. Assigning an element
this class name will prevent `tex2jax` from processing its
contents.
special characters. The pattern is inserted into one that
requires your pattern to match a complete word, so setting
``ignoreClass: "class2"`` would cause it to match an element with
``class="class1 class2 class3"`` but not ``class="myclass2"``.
Note that you can assign several classes by separating them by the
vertical line character (``|``). For instance, with
``ignoreClass: "class1|class2"`` any element assigned a class of
either ``class1`` or ``class2`` will be skipped.
.. describe:: processClass: "tex2jax_process"
This is the class name used to mark elements whose contents
*should* be processed by `tex2jax`. 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 `regexp` special characters. The pattern is
automatically preceeded by ``'(^| )('`` and followed by ``')(
|$)'``, 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.
*should* be processed by `tex2jax`. This is used to restart
processing within tags that have been marked as ignored via the
``ignoreClass`` or to cause a tag that appears in the ``skipTags``
list to be processed rather than skipped. Note that this is a
regular expression, and so you need to be sure to quote any
`regexp` special characters. The pattern is inserted into one
that requires your pattern to match a complete word, so setting
``processClass: "class2"`` would cause it to match an element with
``class="class1 class2 class3"`` but not ``class="myclass2"``.
Note that you can assign several classes by separating them by the
vertical line character (``|``). For instance, with
``processClass: "class1|class2"`` any element assigned a class of
either ``class1`` or ``class2`` will have its contents processed.

View File

@ -4,24 +4,26 @@
MathJax Output Formats
**********************
Currently, MathJax can render math in two ways:
Currently, MathJax can render math in three ways:
- Using HTML-with-CSS to lay out the mathematics, or
- Using HTML-with-CSS to lay out the mathematics,
- Using :term:`SVG` to lay out the mathematics, or
- Using a browser's native MathML support.
These are implemented by the `HTML-CSS` and `NativeMML` output
These are implemented by the `HTML-CSS`, `SVG` and `NativeMML` output
processors.
If you are using one of the combined configuration files, then this will
select one of these output processors for you. If the config file ends in
``_HTML``, then it is the HTML-CSS output processor, and if it ends in
``_HTML``, then it is the HTML-CSS output processor, and if it ends in
``_SVG`` then the SVG output processor will be used. If it ends in
``_HTMLorMML``, then the NativeMML output processor will be chosen if the
browser supports it, otherwise HTML-CSS output will be used.
browser supports it well enough, otherwise HTML-CSS output will be used.
If you are performing your own in-line or file-based configuration, you
select which one you want to use by including either ``"output/HTML-CSS"``
or ``"output/NativeMML"`` in the `jax` array of your MathJax configuration.
For example
If you are performing your own in-line or file-based configuration,
you select which one you want to use by including either
``"output/HTML-CSS"``, ``"output/SVG"``, or ``"output/NativeMML"`` in
the `jax` array of your MathJax configuration. For example
.. code-block:: javascript
@ -30,39 +32,61 @@ For example
would specify TeX input and HTML-with-CSS output for the mathematics
in your document.
The HTML-CSS output processor produces high-quality output in all
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. Its major
advantage is its quality and consistency; its drawback is that it is
slower than 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
:ref:`HTML-CSS with IE8 <html-css-with-ie8>` below for some strategies
to deal with this.)
slower than the NativeMML mode at rendering the mathematics.
Historically, the performance in Internet Explorer (and IE8 in
particular) was quite poor, with the page getting slower and slower as
more math is processed. MathJax version 2.0 includes a number of
optimizations to improve the display performance in IE, and it is now
more comparable to other browsers. The HTML-CSS output uses web-based
fonts so that users don't have to have math fonts installed on their
computers; but this does introduce some printing issues in some
browsers.
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 `MathPlayer plugin
The **SVG output processor** is new in MathJax version 2.0, and it uses
`Scalable Vector Graphics` to render the mathematics on the page. SVG
is supported in all the major browsers and most mobile devices; note,
however, that Internet Explorer prior to IE9 does not support SVG, and
IE9 only does in "IE9 standards mode", not its emulation modes for
earlier versions. The SVG output mode is high quality and slightly
faster than HTML-CSS, and it does not suffer from some of the
font-related issues that HTML-CSS does, so prints well in all
browsers. This format also works well in some ebook readers (e.g.,
iBooks). The disadvantage of this mode is that it does not take
advantage of STIX fonts, and so only has access to the characters in
the web-based fonts, and it variable-width tables become fixed size
once they are typeset, and don't rescale if the window size changes
(for example). Since equation numbers are handled through
variable-width tables, that means equation numbers may not stay at the
edge of the window if it is resized.
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 `MathPlayer plugin
<http://www.dessci.com/en/products/mathplayer/>`_ 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,
don't recommend using the NativeMML output processor with Opera.
Safari has some support for MathML since version 5.1, but the quality
is not as high as either Firefox's implementation or IE with MathPlayer.
Chrome, Konqueror, and most other browsers don't support MathML
natively, but may in the future, since MathML is part of the HTML5
natively, but may in the future, since MathML is part of the HTML5
specification.
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, 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 ``negativethinmathspace``). The results
using the NativeMML output processor may have spacing or other rendering
problems that are outside of MathJax's control.
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, 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 relies on features that
are not available in some renderers (for example, Firefox's MathML
support does not implement the features needed for labeled equations).
The results using the NativeMML output processor may have spacing or
other rendering problems that are outside of MathJax's control.
Automatic Selection of the Output Processor
===========================================
@ -70,9 +94,10 @@ Automatic Selection of the Output Processor
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 a number of its combined configuration files will select NativeMML
output when the browser supports it, and HTML-CSS output otherwise. These
are the configuration files that end in ``_HTMLorMML``.
since a number of its combined configuration files will select
NativeMML output when the browser supports it well enough, and
HTML-CSS output otherwise. These are the configuration files that end
in ``_HTMLorMML``.
If you are doing your own configuration, there is a special configuration
file that you can include that will choose between NativeMML and HTML-CSS
@ -86,28 +111,37 @@ the abilities of your user's browser.
config: ["MMLorHTML.js"],
jax: ["input/TeX"]
You can customize which choice to make on a browser-by-browser basis
or a global basis. See the ``config/default.js`` file or the
By default, MathJax will choose HTML-CSS in all browsers except for
one case: Internet Explorer when the MathPlayer plugin is present.
In the past, MathJax selected NativeMML output for Firefox as well,
but we have found that there are too many rendering issues with
Firefox's native MathML implementation, and so MathJax now selects
HTML-CSS output for Firefox by default as well. Users can still use
the Mathjax contextual menu to select the NativeMML renderer if they
wish to choose greater speed at the expense of some quality.
You can customize which choice MathJax makes on a browser-by-browser
basis or a global basis. See the ``config/default.js`` file or the
:ref:`Configuring MMLorHTML <configure-MMLorHTML>` section for further
details. As an example, this configuration tells MathJax to use HTML-CSS
output rather than native MathML support for Firefox:
details. As an example, this configuration tells MathJax to use
native MathML support rather than HTML-CSS output for Firefox:
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
MMLorHTML: { prefer: { Firefox: "HTML" } }
MMLorHTML: { prefer: { Firefox: "MML" } }
});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
With this configuration, MathML output will be used only for IE with the
MathPlayer plugin (Firefox is the only other browser to have native MathML
support that is sufficient for use with MathJax). Note, however, that a
user can employ the MathJax contextual menu to select the other renderer if
he or she wishes.
With this configuration, MathML output will be used for both Firefox
and IE with the MathPlayer plugin. Note, however, that a user can
employ the MathJax contextual menu to select the other renderer if he
or she wishes.
MathJax produces MathML that models the underlying mathematics as best
it can, rather than using complicated hacks to improve output for a
@ -116,44 +150,109 @@ 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.
.. _automatic-linebreaking:
.. _html-css-with-ie8:
Automatic Line Breaking
=======================
HTML-CSS with IE8
=================
Internet Explorer 8 has at least eight different rendering modes in which
it can operate, and that are triggered by the `DOCTYPE` 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 `DOCTYPE` 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, on the sample
equations page in ``test/sample.html``.
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
The HTML-CSS and SVG output processors implement (most of) the MathML3
automatic line-breaking specification. (The NativeMML output
processor relies on the browser's native MathML support to handle line
breaking when it is used.) Since line-breaking takes extra processing
and so can slow down the mathematical output, it is off by default,
but you can enable it by adding
.. code-block:: html
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
"HTML-CSS": { linebreaks: { automatic: true } },
SVG: { linebreaks: { automatic: true } }
});
</script>
at the top of the ``<head>`` section of your HTML documents. This
lets you keep the strict `DOCTYPE` for validation purposes, while
still managing to get reasonable performance from Internet Explorer
8. Note that this line must come at the beginning of the ``<head>``,
before any stylesheets or other content are loaded.
to your page just before the ``<script>`` tag that loads
``MathJax.js`` itself.
Alternatively, you can use the `MMLorHTML` configuration file
described above to select NativeMML output when possible, and request
that your users install the `MathPlayer plugin
<http://www.dessci.com/en/products/mathplayer/>`_, which will render
the mathematics much more quickly.
Note that line breaking only applies to displayed equations, not
in-line equations (unless the in-line euqation is itself longer than a
line), and that the line-breaks are only computed once when the
equation is initially typeset, and do not change if the user changes
the window size, or if the container changes size for some other
reason.
It appears that IE9 in IE9 standards mode may perform better than IE8, but
since IE9 is still in beta testing as of this writing, we have yet to see
exactly what the performance of MathJax in IE9 will be like.
You can control what width is used to determine where the line breaks
shoud occur using the ``container`` parameter of the ``linebreaks``
block. By default it is the width of the containing element, but you
can make it a fixed width, or make it a percentage of the container.
See the :ref:`HTML-CSS configuration <configure-HTML-CSS>` or
:ref:`SVG configuration <configure-SVG>` pages for more details.
The linbe-breaking algorithm uses the nesting depth, the type of
operator, the size of spaces, and other factors to decide on the
breakpoints, but it does not know the meaning of the mathematics, and
may not choose the optimal breakpoints. We will continue to work on
the algorithm as we gain information from its actual use in the field.
If you are using :term:`MathML` as your input format, you can use the
``linebreak="goodbreak"`` and ``linebreak="badbreak"`` attributes on
``<mo>`` elements to help MathJax pick the best breakpoints for your
mathematics.
.. _html-css-with-ie8:
HTML-CSS with IE
================
The performance of MathJax in Internet Explorer 8 and 9 has been
substantially improved in version 2.0. The HTML-CSS output processing
was redesigned to avoid the page reflows that were the main source of
the speed problem in I8 and IE9. For test pages having between 20 and
50 typeset expressions, we see an 80% reduction in output processing
time for IE8, a 50% reduction for IE9, and between 15% and 25%
reduction for most other browsers over the v1.1a times. Since the
processing time in v1.1a grows non-linearly in IE, you should see even
larger savings for pages with more equations when using v2.0.
In the past, we recommended forcing IE8 and IE9 into IE7-emulation
mode in order to get better performance. That is no longer necessary.
Indeed, the fastest modes in IE8 and IE9 now are their IE8 standards
and IE9 standards modes, so it is best to force the highest mode
possible. That can be accomplished by adding
.. code-block:: html
<meta http-equiv="X-UA-Compatible" content="IE=edge">
at the top of the ``<head>`` section of your HTML documents. Note
that this line must come at the beginning of the ``<head>``, before
any stylesheets, scripts, or other content are loaded.
.. _html-css-extensions:
HTML-CSS Extensions
===================
The HTML-CSS output jax uses elements with width set to 100% when it
typesets displayed equations. If there are floating elements on the
left or right, this can mean that displayed mathematics isn't properly
centered, and can cause equation numbers to overlap the floating
content. To avoid this, you can specify the `handle-floats` extension
in the `extensions` array of your `HTML-CSS` configuration block.
.. code-block:: javascript
"HTML-CSS": {
extensions: ["handle-floats.js"]
}
This will use CSS that puts the displayed equations into elements that
work like tabel cells, and won't overlap the floaring content.
Because this is somewhat of a misuse of CSS, it is not used by
default, but it has proved successful in most situations, so you may
consider using it in pages that include material that floats to the
left or right of text containing displayed mathematics, especially
when equation numbers or tags are used.
See the :ref:`HTML-CSS configuration options <configure-HTML-CSS>` for
other options of the HTML-CSS output jax.

View File

@ -4,15 +4,16 @@
Using MathJax in popular web platforms
======================================
MathJax plugins are available for a growing number of wikis, blogs, and
other content-management systems. These include WordPress, Blogger,
Sphinx, TiddlyWiki, and MathEL-Wiki. A list of these is available in the
`web applications and integrations
<http://www.mathjax.org/community/mathjax-in-use/#web-apps>`_ list of the
MathJax plugins are available for a growing number of wikis, blogs,
and other content-management systems. These include WordPress,
Blogger, Sphinx, TiddlyWiki, and MathEL-Wiki. A list of these is
available in the `web applications
<http://www.mathjax.org/community/mathjax-in-use>`_ list of the
`MathJax web site <http://www.mathjax.org>`_.
If the program you are using is not one of these, you may still be able to
use MathJax by modifying the theme or template for your wiki or blog.
use MathJax by modifying the theme or template for your wiki or blog,
as explained below.
Using MathJax in a Theme File

View File

@ -53,14 +53,14 @@ 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 ``Extension [name] Ready`` 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 *has* 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 synchronizing code components no matter when they are
loaded and run.
signal when they are loaded and initialized via an ``Extension [name]
Ready`` message, or just ``[name] Ready``, 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 *has* 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
synchronizing code components no matter when they are loaded and run.
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
@ -79,14 +79,14 @@ message, and can act on it in whatever ways they see fit.
Creating a Listener
===================
MathJax maintains two separate signal channels: the `startup signal`
and the `processing signal` (or the `hub signal`). 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 ``New Math`` 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).
MathJax maintains two separate pre-defined signal channels: the
`startup signal` and the `processing signal` (or the `hub signal`).
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 ``New
Math`` 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).
The easiest way to create a listener is to use either
:meth:`MathJax.Hub.Register.StartupHook()` or
@ -103,10 +103,12 @@ called when it arrives. For example
See the :ref:`MathJax Startup Sequence <startup-sequence>` page for
details of the messages sent during startup. See also the
``test/sample-signals.html`` 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 various components.
`test/sample-signals.html
<http://cdn.mathjax.org/mathjax/latest/test/sample-signals.html>`_
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 various components.
In this example, the listener starts loading an extra configuration
file (from the same directory as the web page). Since it returns
@ -154,8 +156,9 @@ signal's :meth:`Interest()` method, as in the following example.
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 *lot* of
them; instead, use the ``test/sample-signals.html`` file, which
displays them in the web page.
them; instead, use the `test/sample-signals.html
<http://cdn.mathjax.org/mathjax/latest/test/sample-signals.html>`_
file, which displays them in the web page.
See the :ref:`Signal Object <api-signal>` reference page for details on the
structure and methods of the signal object.

View File

@ -5,15 +5,15 @@ Getting Started
***************
MathJax allows you to include mathematics in your web pages, either
using TeX and LaTeX notation, or as MathML, and you can even use both
in the same document.
using TeX and LaTeX notation, MathML, or AsciiMath notation, and you
can even use all three in the same document.
There are two ways to access MathJax: the easiest way is to use the
copy of MathJax available from our distributed network service at
``cdn.mathjax.org``, but you can also download and install a copy of
MathJax on your own server, or for use locally on your own hard disk
(with no need for network access). Both of these are described below,
with links to more detailed explanations. This page gives the
MathJax on your own server, or use it locally on your own hard disk
(with no need for network access). All three of these are described
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.
@ -43,12 +43,13 @@ into the ``<head>`` block of your document. (It can also go in the
load the latest version of MathJax from the distributed server, and
configure it to recognize mathematics in both TeX and MathML notation,
and ask it to generate its output using MathML if the browser supports
that, and otherwise use HTML-with-CSS to display the mathematics.
This is the most general configuration, and should suffice for most
people's needs. Other configurations are available, however, and you
can also provide additional configuration parameters to taylor one of
the configurations to your needs. More details can be found in the
:ref:`Loading and Configuring MathJax <loading>` instructions.
that well enough, and otherwise use HTML-with-CSS to display the
mathematics. This is one of the most general configurations, and
should suffice for most people's needs. Other configurations are
available, however, and you can also provide additional configuration
parameters to taylor one of the configurations to your needs. More
details can be found in the :ref:`Loading and Configuring MathJax
<loading>` instructions.
The use of ``cdn.mathjax.org`` is governed by its `terms of service
<http://www.mathjax.org/download/mathjax-cdn-terms-of-service/>`_, so be
@ -68,7 +69,7 @@ and replace it. This is sometimes called a
`man-in-the-middle <http://en.wikipedia.org/wiki/Man-in-the-middle_attack>`_ attack.
To prevent such attacks, it is necessary to access the MathJax CDN
over a secure HTTPS connection. This can be easily done by using the
over a secure HTTPS connection. This can be done easily by using the
following ``<script>`` tag instead of the one listed above:
.. code-block:: html
@ -78,8 +79,9 @@ following ``<script>`` tag instead of the one listed above:
</script>
Currently, the Amazon Cloudfront service used by the MathJax CDN does
not support the use of a human-friendly name like cdn.mathjax.org for
secure connections. However, this address is stable and safe to use.
not support the use of a human-friendly name like ``cdn.mathjax.org``
for secure connections; however, the address given above is stable and
safe to use.
Installing Your Own Copy of MathJax
@ -89,7 +91,8 @@ We recommend using the CDN service if you can, but you can also install
MathJax on your own server, or locally on your own hard disk. To do
so you will need to do the following things:
1. Obtain a copy of MathJax and make it available on your server.
1. Obtain a copy of MathJax and make it available on your server or
hard disk.
2. Configure MathJax to suit the needs of your site.
@ -108,8 +111,8 @@ should obtain a file named something like
``mathjax-MathJax-v1.1-X-XXXXXXXX.zip``, 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. Note that this is different from earlier releases, which had
the fonts separate from the rest of the code.
need. Note that this is different from v1.0 and earlier releases,
which had the fonts separate from the rest of the code.
Unpack the archive and place the resulting MathJax folder onto your
web server at a convenient location where you can include it into your
@ -118,7 +121,7 @@ your server would be one natural way to do this. That would let you
refer to the main MathJax file via the URL ``/MathJax/MathJax.js``
from within any page on your server.
Note: While this is the easiest way to set up MathJax initially, there
**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. That uses the `Git <http://git-scm.com/>`_ version
control system, and is described in the :ref:`Installing MathJax
@ -128,17 +131,18 @@ of MathJax (see :ref:`Installing MathJax via SVN
<getting-mathjax-svn>`).
Once you have MathJax set up on your server, you can test it using the
files in the ``MathJax/test`` directory. Load them in your browser
using its web address rather than opening them locally (i.e., use an
``http://`` URL rather than a ``file://`` URL). When you view the
``index.html`` file, after a few moments you should see a message
indicating 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.
files in the ``MathJax/test`` directory. If you are putting MathJax
on a server, load them in your browser using their web addresses
rather than opening them locally (i.e., use an ``http://`` URL rather
than a ``file://`` URL). When you view the ``index.html`` file, after
a few moments you should see a message indicating 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.
Configuring your copy of MathJax
@ -147,11 +151,12 @@ Configuring your copy of MathJax
When you include MathJax into your web pages as described below, it
will load the file ``config/TeX-AMS-MML_HTMLorMML.js`` (i.e., the file
named ``TeX-AMS-MML_HTMLorMML.js`` in the ``config`` folder of the
main ``MathJax`` folder). This file preloads all the most commonly-used
components of MathJax, allowing it to process mathematics that is in
the TeX or LaTeX format, or in MathML notation. It will produce
output in MathML form if the user's browser supports that, and will use
HTML-with-CSS to render the mathematics otherwise.
main ``MathJax`` folder). This file preloads all the most
commonly-used components of MathJax, allowing it to process
mathematics that is in the TeX or LaTeX format, or in MathML notation.
It will produce output in MathML form if the user's browser supports
that sufficiently, and will use HTML-with-CSS to render the
mathematics otherwise.
There are a number of other prebuilt configuration files that you can
choose from as well, or you could use the ``config/default.js`` file and
@ -160,11 +165,11 @@ described more fully in :ref:`Common Configurations
<common-configurations>`, and the configuration options are described in
:ref:`Configuration Options <configuration>`.
Note: The configuration process has changed in MathJax v1.1, so if you have
existing pages that use MathJax, you may need to modify the tag that
loads MathJax so that it conforms with the new configuration process.
See :ref:`Installing and Configuring MathJax <installation>` for more
details.
Note: The configuration process changed between MathJax v1.0 and v1.1,
so if you have existing pages that use MathJax v1.0, you may need to
modify the tag that loads MathJax so that it conforms with the new
configuration process. See :ref:`Installing and Configuring MathJax
<installation>` for more details.
Linking your copy of MathJax into a web page
@ -210,13 +215,15 @@ of MathJax.
Putting mathematics in a web page
=================================
To put mathematics in your web page, you can use either :term:`TeX`
and :term:`LaTeX` notation or :term:`MathML` notation or both within
the same page; the MathJax configuration tells MathJax which you want
to use, and how you plan to indicate the mathematics when you are
using TeX notation. The configuration file used in the examples above
tells MathJax to look for both TeX and MathML notation within your
pages. These two formats are described in more detail below.
To put mathematics in your web page, you can use :term:`TeX` and
:term:`LaTeX` notation, :term:`MathML` notation, :term:`AsciiMath`
notation, or a combination of all three within the same page; the
MathJax configuration tells MathJax which you want to use, and how you
plan to indicate the mathematics when you are using TeX notation. The
configuration file used in the examples above tells MathJax to look
for both TeX and MathML notation within your pages. Other
configuration files tell MathJax to use AsciiMath input. These three
formats are described in more detail below.
.. _tex-and-latex-input:
@ -258,10 +265,14 @@ options <configure-tex2jax>` page, for additional configuration
parameters that you can specify for the `tex2jax` preprocessor,
which is the component of MathJax that identifies TeX notation within
the page. See the :ref:`TeX and LaTeX <TeX-support>` page for
more on MathJax's support for TeX.
more on MathJax's support for TeX, and in particular how to deal with
single dollar signs in your text when you have enabled single
dollar-sign delimiters.
Here is a complete sample page containing TeX mathematics (also available
in the ``test/sample-tex.html`` file):
Here is a complete sample page containing TeX mathematics (also
available in the `test/sample-tex.html
<http://cdn.mathjax.org/mathjax/2.0-latest/test/sample-tex.html>`_
file):
.. code-block:: html
@ -290,6 +301,16 @@ a tag in HTML. Putting a space on both sides of the less-than sign
should be sufficient, but see :ref:`TeX and LaTeX support
<TeX-support>` for details.
If you are using MathJax within a blog, wiki, or other content
management system, the markup language used by that system may
interfere with the TeX notation used by MathJax. For example, if your
blog uses :term:`Markdown` notation for authoring your pages, the
underscores used by TeX to indicate subscripts may be confused with
the use of underscores by Markdown to indicate italics, and the two
uses may prevent your mathematics from being displayed. See :ref:`TeX
and LaTeX support <TeX-support>` for some suggestions about how to
deal with the problem.
There are a number of extensions for the TeX input processor that are
loaded by the ``TeX-AMS-MML_HTMLorMML`` configuration. These include:
@ -305,9 +326,13 @@ loaded by the ``TeX-AMS-MML_HTMLorMML`` configuration. These include:
- `TeX/noUndefined.js`, which prevents undefined macros from
producing an error message, and instead shows the macro name in red.
Other extensions may be loaded automatically when needed.
Other extensions may be loaded automatically when needed. See
:ref:`TeX and LaTeX support <TeX-support>` for details on the other
TeX extensions that are available.
.. _mathml-input:
MathML input
------------
@ -321,10 +346,21 @@ 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
``<math>`` tags; for example, you should not use ``<m:math>`` except
in a file where you have tied the ``m`` namespace to the MathML DTD.
in a file where you have tied the ``m`` namespace to the MathML DTD by
adding the ``xmlns:m="http://www.w3.org/1998/Math/MathML"`` attribtue
to your file's ``<html>`` tag.
Here is a complete sample page containing MathML mathematics (also
available in the ``test/sample-mml.html`` file):
Although it is not required, it is recommended that you include the
``xmlns="http://www.w3.org/1998/Math/MathML"`` attribute on all
``<math>`` tags in your document (and this is preferred to the use of
a namespace prefix like ``m:`` above, since those are deprecated in
HTML5) in order to make your MathML work in the widest range of
situations.
Here is a complete sample page containing MathML mathematics (also
available in the `test/sample-mml.html
<http://cdn.mathjax.org/mathjax/2.0-latest/test/sample-mml.html>`_
file):
.. code-block:: html
@ -338,13 +374,19 @@ available in the ``test/sample-mml.html`` file):
</head>
<body>
When <math><mi>a</mi><mo>&#x2260;</mo><mn>0</mn></math>,
there are two solutions to <math>
<p>
When
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>a</mi><mo>&#x2260;</mo><mn>0</mn>
</math>,
there are two solutions to
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>a</mi><msup><mi>x</mi><mn>2</mn></msup>
<mo>+</mo> <mi>b</mi><mi>x</mi>
<mo>+</mo> <mi>c</mi> <mo>=</mo> <mn>0</mn>
</math> and they are
<math mode="display">
</math>
and they are
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mi>x</mi> <mo>=</mo>
<mrow>
<mfrac>
@ -363,6 +405,7 @@ available in the ``test/sample-mml.html`` file):
</mrow>
<mtext>.</mtext>
</math>
</p>
</body>
</html>
@ -374,20 +417,66 @@ should use
.. code-block:: html
<mspace width="thinmathspace"></mspace>
<mspace width="5pt"></mspace>
rather than ``<mspace width="5pt" />`` in an HTML document. If you use the
self-closing form, some browsers will not build the math tree properly, and
MathJax will receive a damaged math structure, which will not be rendered
as the original notation would have been. Unfortunately, there is nothing
MathJax can do about that, since the browser has incorrectly interpreted
the tags long before MathJax has a chance to work with them.
rather than ``<mspace width="5pt" />`` in an HTML document. If you
use the self-closing form, some browsers will not build the math tree
properly, and MathJax will receive a damaged math structure, which
will not be rendered as the original notation would have been.
Typically, this will cause parts of your expression to not be
displayed. Unfortunately, there is nothing MathJax can do about that,
since the browser has incorrectly interpreted the tags long before
MathJax has a chance to work with them.
The component of MathJax that recognizes MathML notation within the
page is called the `mml2jax` extension, and it has only a few
configuration options; see the ``config/default.js`` file or the
:ref:`mml2jax configuration options <configure-mml2jax>` page for more
details. See the :ref:`MathML <MathML-support>` page for more on
MathJax's MathML support.
.. _asciimath-input:
AsciiMath input
---------------
MathJax v2.0 includes a new input format: :term:`AsciiMath` notation.
For mathematics written in this form, you mark your mathematical
expressions by surrounding them in "back-ticks", i.e., ```...```.
Here is a complete sample page containing AsciiMath notation (also
available in the `test/sample-asciimath.html
<http://cdn.mathjax.org/mathjax/2.0-latest/test/sample-asciimath.html>`_
file):
.. code-block:: html
<!DOCTYPE html>
<html>
<head>
<title>MathJax AsciiMath Test Page</title>
<script type="text/javascript"
src="../MathJax.js?config=AM_HTMLorMML-full"></script>
</head>
<body>
<p>When `a != 0`, there are two solutions to `ax^2 + bx + c = 0` and
they are</p>
<p style="text-align:center">
`x = (-b +- sqrt(b^2-4ac))/(2a) .`
</p>
</body>
</html>
The component of MathJax that recognizes asciimath notation within the
page is called the `asciimath2jax` extension, and it has only a few
configuration options; see the ``config/default.js`` file or the
:ref:`asciimath2jax configuration options <configure-asciimath2jax>` page for more
details. See the :ref:`AsciiMath support <AsciiMath-support>` page for more on
MathJax's AsciiMath support.
The component of MathJax that recognizes MathML notation is called the
`mml2jax` extension, and it has only a few configuration options; see the
``config/default.js`` file or the :ref:`mml2jax configuration options
<configure-mml2jax>` page for more details. See the :ref:`MathML
<MathML-support>` page for more on MathJax's MathML support.
Where to go from here?

View File

@ -90,7 +90,12 @@ pushed into the queue:
..
5. Load the jax configuration files:
5. Initialize the Message system (the grey information box in the
lower left)
..
6. Load the jax configuration files:
- Post the ``Begin Jax`` startup signal
- Load the jax config files from the ``MathJax.Hub.config.jax`` array
@ -101,7 +106,7 @@ pushed into the queue:
..
6. Load the extension files:
7. Load the extension files:
- Post the ``Begin Extensions`` startup signal
- Load the files from the ``MathJax.Hub.config.extensions`` array
@ -114,20 +119,22 @@ pushed into the queue:
..
7. Set the MathJax menu's renderer value based on the jax that have been
8. Set the MathJax menu's renderer value based on the jax that have been
loaded
..
8. Wait for the onload handler to fire
9. Wait for the onload handler to fire (in MathJax v2.0 this can
occur on the ``DOMContentLoaded`` event rather than the page's
``onload`` event, so processing of mathematics can start earlier)
..
9. Set ``MathJax.isReady`` to ``true``
10. Set ``MathJax.isReady`` to ``true``
..
10. Perform the typesetting pass (preprocessors and processors)
11. Perform the typesetting pass (preprocessors and processors)
- Post the ``Begin Typeset`` startup signal
- Post the ``Begin PreProcess`` hub signal
@ -137,6 +144,12 @@ pushed into the queue:
- Post the ``Begin Process`` hub signal
- Process the math script elements on the page
- There are a number of Hub signals generated during math
processing, including a signal that a ``Math`` action is
starting (with a parameter indicating what action that is),
``Begin`` and ``End Math Input`` messages, and ``Begin`` and
``End Math Output`` signals.
- Each new math element generates a ``New Math`` hub signal
with the math element's ID
@ -145,7 +158,18 @@ pushed into the queue:
..
11. Post the ``End`` startup signal
12. Jump to the location specified in the URL's hash reference, if
any.
..
13. Initiate timers to load the zoom and menu code, if it hasn't
already been loading in the configuration (so it will be ready
when the user needs it).
..
14. Post the ``End`` startup signal
The loading of the jax and extensions in steps 5 and 6 are now done in
@ -157,4 +181,6 @@ followed by `Begin Extensions`, but the order of `End Jax` and `End
Extensions` will depend on the files being loaded.) Both 5 and 6 must
complete, however, before 7 will be performed.
See the ``test/sample-signals.html`` file to see the signals in action.
See the `test/sample-signals.html
<http://cdn.mathjax.org/mathjax/latest/test/sample-signals.html>`_ file
to see the signals in action.

View File

@ -12,7 +12,7 @@ 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
actions is made much more difficult. MathJax uses three mechanisms to
overcome this language shortcoming: callbacks, queues, and signals.
**Callbacks** are functions that are called when an action is
@ -37,20 +37,23 @@ queues for actions that need to be synchronized with each other, but
not to MathJax as a whole. See the :ref:`Queue Object <api-queue>`
reference page for more details.
**Signals** 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 `Signal`. 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 occurrences as well as any future ones. See the
:ref:`Signal Object <api-signal>` reference page for more details. See
also the ``test/sample-signals.html`` file in the MathJax ``test``
directory for a working example of using signals.
**Signals** 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
`Signal`. 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 occurrences as well as any future ones. See the
:ref:`Signal Object <api-signal>` reference page for more details.
See also the `test/sample-signals.html
<http://cdn.mathjax.org/mathjax/latest/test/sample-signals.html>`_
file in the MathJax ``test`` directory for a working example of using
signals.
Each of these is explained in more detail in the links below:

View File

@ -81,7 +81,7 @@ TeX and LaTeX in HTML documents
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 ``<BR>``) as TeX-formatted math does not include HTML tags.
than ``<br>``) 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
@ -129,6 +129,228 @@ easier to enter ``<`` and ``>`` using TeX-like syntax:
Keep in mind that the browser interprets your text before MathJax
does.
Another source of difficulty is when MathJax is used in content
management systems that have their own document processing commands
that are interpreted before the HTML page is created. For example,
many blogs and wikis use formats like :term:`Markdown` to allow you to
create the content of you pages. In Markdown, the underscore is used
to indicate italics, and this usage will conflict with MathJax's ise
of the underscore to indicate a subscript. Since Markdown is applied
to the page first, it will convert your subscripts markers into
italics (inserting ``<i>`` tags into your mathematics, which will
cause MathJax to ignore the math).
Such systems need to be told not to modify the mathematics that
appears between math delimiters. That usually involves modifying the
content-management system itself, which is beyond the means of most
page authors. If you are lucky, someone else will already have done
this for you, and you can find a MathJax plugin for your system on the
`MathJax-In-Use page
<http://www.mathjax.org/community/mathjax-in-use/>`_ page.
If there is no plugin for your system, or if it doesn't handle the
subtleties of issolating the mathematics from the other markup that it
supports, then you may have to "trick" it into leaving your
mathematics untouched. Most content-management systems provide some
means of indicating text that should not be modified ("verbatim"
text), often for giving code snippets for computer languages.
You may be use that to enclose your mathematics so that the system
leaves it unchanged and MathJax can process it. For example, in
Markdown, the back-tick (`````) is used to mark verbatim text, so
.. code-block:: latex
... we have `\(x_1 = 132\)` and `\(x_2 = 370\)` and so ...
may be able to protect the underscores from being processed by
Markdown.
Some content-management systems use the backslash (``\``) as a special
character for "escaping" other characters, but TeX uses this character
to indicate a macro name. In such systems, you may have to double the
backslashes in order to obtain a single backslash in your HTML page.
For example, you may have to do
.. code-block:: latex
\\begin{array}{cc}
a & b \\\\
c & c
\\end{array}
to get an array with the four entries *a*, *b*, *c*, and *d*. Note in
particular that if you want ``\\`` you will have to double *both*
backslashes, giving ``\\\\``.
Finally, if you have enabled single dollar-signs as math delimiters,
and you want to include a literal dollar sign in your web page (one
that doesn't represent a math delimiter), you will need to prevent
MathJax from using it as a math delimiter. If you also enable the
``processEscapes`` configuration parameter, then you can use ``\$`` in
the text of your page to get a dollar sign (without the backslash) in
the end. Alternatively, you use something like
``<span>$</span>`` to isolate the dollar sign so that
MathJax will not use it as a delimiter.
.. _tex-macros:
Defining TeX macros
===================
You can use the ``\def``, ``\newcommand``, ``\renewcommand``,
``\newenvironment``, ``\renewenvironment``, and ``\let`` commands to
create your own macros and environments. Unlike actual TeX, however,
in order for MathJax to process these, they must be enclosed in math
delimiters (since MathJax only processes macros in math-mode). For
example
.. code-block:: latex
\(
\def\RR{\bf R}
\def\bold#1{\bf #1}
\)
would define ``\RR`` to produce a bold-faced "R", and ``\bold{...}``
to put its argument into bold face. Both definitions would be
available throughout the rest of the page.
You can include macro definitions in the `Macros` section of the `TeX`
blocks of your configuration, but they must be represetned as
JavaScript objects. For example, the two macros above can be
pre-defined in the configuraiton by
.. code-block:: javascript
MathJax.Hub.Config({
TeX: {
Macros: {
RR: "{\\bf R}",
bold: ["{\\bf #1}",1]
}
}
});
Here you give the macro as a `name:value` pair, where the `name`
is the name of the control sequence (without the backslash) that you
are defining, and `value` is either the replacement string for the
macro (when there are no arguments) or an array consisting of the
replacement string followed by the number of arguments for the macro.
Note that the replacement string is given as a JavaScript string
literal, and the backslash has special meaning in JavaScript strings.
So to get an actual backslash in the string you must double it, as int
he examples above.
If you have many such definitions that you want to use on more than
one page, you could put them into a configuration file that you can
load along with the main configuration file. For example, you could
create a file in ``MathJax/config/local`` called ``local.js`` that
contains your macro definitions:
.. code-block:: javascript
MathJax.Hub.Config({
TeX: {
Macros: {
RR: "{\\bf R}",
bold: ["{\\bf #1}",1]
}
}
});
MathJax.Ajax.loadComplete("[MathJax]/config/local/local.js");
and then load it along with your main configuration file on the script
that loads ``MathJax.js``:
.. code-block:: html
<script src="/MathJax/MathJax.js?config=TeX-AMS_HTML,local/local.js"></script>
If you are using the CDN, you can make a local configuration file on
your own server, and load MathJax itself from the CDN and your
configuration file from your server. See :ref:`Using a Local
Configuration File with the CDN <local-config-files>` for details.
.. _tex-eq-numbers:
Autmatic Equation Numering
==========================
New in MathJax v2.0 is the ability to have equations be numbered
automatically. This is off by default, so that pages don't change
when you update from v1.1 to v2.0, but it is easy to configure MathJax
to produce automatic equation numbers by adding:
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } }
});
</script>
to your page just before the ``<script>`` tag that loads
``MathJax.js`` itself.
Equations can be numbered in two ways: either number the AMSmath
environments as LaTeX would, or number all displayed equations (the
example above uses AMS-style numbering). Set ``autoNumber`` to
``"all"`` if you want every displayed equation to be numbered.
You can use ``\notag`` or ``\nonumber`` to prevent
individual equations from being numbered, and ``\tag{}`` can be used
to override the usual equation number with your own symbol instead.
Note that the AMS environments come in two forms: starred and
unstarred. The unstarred versions produce equation numbers (when
``autoNumber`` is set to ``"AMS"``) and the starred ones don't. For
example
.. code-block:: latex
\begin{equation}
E = mc^2
\end{equation}
will be numbered, while
.. code-block:: latex
\begin{equation*}
e^{\pi i} - 1 = 0
\end{equation*}
won't be numbered (when ``autoNumber`` is ``"AMS"``).
You can use ``\label`` to give an equation an identifier that you can
use to refer to it later, and then use ``\ref`` or ``\eqref`` within
your document to insert the actual equation number at that location,
as a reference. For example,
.. code-block:: latex
In equation \eqref{eq:sample}, we find the value of an
interesting integral:
\begin{equation}
\int_0^\infty \frac{x^3}{e^x-1}\,dx = \frac{\pi^4}{15}
\label{eq:sample}
\end{equation}
includes a labeled equation and a reference to that equation. Note
that references can come before the corresponding formula as well as
after them. See the equation numbering links in the `MathJax examples
page <http://cdn.mathjax.org/mathjax/latest/test/examples.html>`_ for
more examples.
You can configure the way that numbers are displayed and how the
references to them are made using paramters in the ``equationNumbers``
block of your ``TeX`` configuration. See the :ref:`TeX configuration
options <configure-TeX>` page for more details.
.. _tex-extensions:
@ -165,7 +387,82 @@ script prior to loading MathJax. For example
will load the `autobold` TeX extension in addition to those already
included in the ``TeX-AMS_HTML`` configuration file.
The main extensions are described below.
You can also load these extensions from within a math expresion using
the non-standard ``\require{extension}`` macro. For example
.. code-block:: latex
\(\require{color}\)
would load the `color` extension into the page. This way you you can
load extensions into pages that didn't load them in their
configurations (and prevents you from having to load all the
extensions into all pages even if they aren't used).
It is also possible to create a macro that will autoload an extension
when it is first used (under the assumption that the extension will
redefine it to perform its true function). For example
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions.macros,{
cancel: ["Extension","cancel"],
bcancel: ["Extension","cancel"],
xcancel: ["Extension","cancel"],
cancelto: ["Extension","cancel"]
});
});
</script>
would declare the ``\cancel``, ``\bcancel``, ``\xcancel``, and
``\cancelto`` macros to load the `cancel` extension (where they are
actually defined). Whichever is used first will cause the extension
to be loaded, redefining all four to their proper values. Note that
this may be better than loading the extension explicitly, since it
avoids loading the extra file on pages where these macros are *not*
used. The `sample autoloading macros
<http://cdn.mathjax.org/mathjax/latest/test/sample-autoload.html>`_
example page shows this in action. The `autoload-all` extension below
defines such macros for *all* the extensions so that if you include
it, MathJax will have access to all the macros it knows about.
The main extensions are described below.
Action
------
The `action` extension gives you access to the MathML ``<maction>``
element. It defines three new non-standard macros:
.. describe:: \\mathtip{math}{tip}
Use ``tip`` (in math mode) as tooltip for ``math``.
.. describe:: \\texttip{math}{tip}
Use ``tip`` (in text mode) as tooltip for ``math``.
.. describe:: \\toggle{math1}{math2}...\\endtoggle
Show ``math1``, and when clicked, show ``math2``, and so on.
When the last one is clicked, go back to math1.
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["action.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
AMSmath and AMSsymbols
----------------------
@ -192,6 +489,9 @@ want to use the other macros that it defines. The `AMSsymbols` extension
is not loaded automatically, so you must include it explicitly if you want
to use the macros it defines.
Both extensions are included in all the combined configuration files
that load the TeX input processor.
Autobold
--------
@ -208,6 +508,295 @@ appears in a section of an HTML page that is in bold.
This extension is **not** loaded by the combined configuration files.
BBox
----
The `bbox` extension defines a new macro for adding background colors,
borders, and padding to your math expressions.
.. describe:: \\bbox[options]{math}
puts a bounding box around ``math`` using the provided ``options``.
The options can be one of the following:
1. A color name used for the background color.
2. A dimension (e.g., ``2px``) to be used as a padding around the
mathematics (on all sides).
3. Style attributes to be applied to the mathematics (e.g.,
``border:1px solid red``).
4. A combination of these separated by commas.
Here are some examples:
.. code-block:: latex
\bbox[red]{x+y} % a red box behind x+y
\bbox[2pt]{x+1} % an invisible box around x+y with 2pt of extra space
\bbox[red,2pt]{x+1} % a red box around x+y with 2pt of extra space
\bbox[5px,border:2px solid red]
% a 2px red border around the math 5px away
This extension is **not** included in any of the combined configurations,
but it will be loaded automatically, so you do not need to include it
in your `extensions` array.
Begingroup
----------
The `begingroup` extension implements commands that provide a
mechanism for localizing macro defintions so that they are not
permanent. This is useful if you have a blog site, for example, and
want to isolate changes that your readers make in their comments so
that they don't affect later comments.
It defines two new non-standard macros, ``\begingroup`` and
``\endgroup``, that are used to start and stop a local namespace for
macros. Any macros that are defined between the ``\begingroup`` and
``\endgroup`` will be removed after the ``\endgroup`` is executed.
For example, if you put ``\(\begingroup\)`` at the top of each reader's
comments and ``\(\endgroup\)`` at the end, then any macros they define
within their response will be removed after it is processed.
In addition to these two macros, the `begingroup` extension defines
the standard ``\global`` and ``\gdef`` control sequences from TeX.
(The ``\let``, ``\def``, ``\newcommand``, and ``\newenvironment``
control sequences are already defined in the core TeX input jax.)
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["begingroup.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
Cancel
------
The `cancel` extension defines the following macros:
.. describe:: \\cancel{math}
Strikeout ``math`` from lower left to upper right.
.. describe:: \\bcancel{math}
Strikeout ``math`` from upper left to lower right.
.. describe:: \\xcancel{math}
Strikeout ``math`` with an "X".
.. describe:: \\cancelto{value}{math}
Strikeout ``math`` with an arrow going to ``value``.
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["cancel.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
Color
-----
The ``\color`` command in the core TeX input jax is not standard in
that it takes the mathematics to be colored as one of its parameters,
whereas the LaTeX ``\color`` command is a switch that changes the
color of everything that follows it.
The `color` extension changes the ``\color`` command to be compatible
with the LaTeX implementation, and also defines ``\colorbox``,
``\fcolorbox``, and ``\DefineColor``, as in the LaTeX color package.
It defines the standard set of colors (Apricot, Aquamarine,
Bittersweet, and so on), and provides the RGB and grey-scale color
spaces in addition to named colors.
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["color.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands,
and have ``\color`` be compatible with LaTeX usage.
Enclose
-------
The `enclose` extension gives you access to the MathML ``<menclose>``
element for adding boxes, ovals, strikethroughs, and other marks over
your mathematics. It defines the following non-standard macro:
.. describe:: \\enclose{notation}[attributes]{math}
Where ``notation`` is a comma-separated list of MathML
``<menclose>`` notations (e.g., ``circle``, ``left``,
``updiagonalstrike``, ``longdiv``, etc.), ``attributes`` are
MathML attribute values allowed on the ``<menclose>`` element
(e.g., ``mathcolor="red"``, ``mathbackground="yellow"``), and
``math`` is the mathematics to be enclosed.
For example
.. code-block:: latex
\enclose{circle}[mathcolor="red"]{x}
\enclose{circle}[mathcolor="red"]{\color{black}{x}}
\enclose{circle,box}{x}
\enclose{circle}{\enclose{box}{x}}
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["enclose.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
Extpfeil
--------
The `extpfeil` extension adds more macros for producing extensible
arrows, including ``\xtwoheadrightarrow``, ``\xtwoheadleftarrow``,
``\xmapsto``, ``\xlongequal``, ``\xtofrom``, and a non-standard
``\Newextarrow`` for creating your own extensible arrows. The latter
has the form
.. describe:: \\Newextarrow{\\cs}{lspace,rspace}{unicode-char}
where ``\cs`` is the new control sequence name to be defined,
``lspace`` and ``rspace`` are integers representing the amount of
space (in suitably small units) to use at the left and right of
text that is placed above or below the arrow, and ``unicode-char``
is a number representing a unicode character position in either
decimal or hexadecimal notation.
For example
.. code-block:: latex
\Newextarrow{\xrightharpoonup}{5,10}{0x21C0}
defines an extensible right harpoon with barb up. Note that MathJax
knows how to stretch only a limited number of characters, so you may
not actually get a stretchy character this way.
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["extpfeil.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
HTML
----
The `HTML` extension gives you access to some HTML features like
styles, classes, element ID's and clickable links. It defines the
following non-standard macros:
.. describe:: \\href{url}{math}
Makes ``math`` be a link to the page given by ``url``.
.. describe:: \\class{name}{math}
Attaches the CSS class ``name`` to the output associated with
``math`` when it is included in the HTML page. This allows your
CSS to style the element.
.. describe:: \\cssId{id}{math}
Attaches an id attribute with value ``id`` to the output
associated with ``math`` when it is included in the HTML page.
This allows your CSS to style the element, or your javascript to
locate it on the page.
.. describe:: \\style{css}{math}
Adds the give ``css`` declarations to the element associated with
``math``.
For example:
.. code-block:: latex
x \href{why-equal.html}{=} y^2 + 1
(x+1)^2 = \class{hidden}{(x+1)(x+1)}
(x+1)^2 = \cssId{step1}{\style{visibility:hidden}{(x+1)(x+1)}}
This extension is **not** included in any of the combined configurations,
but it will be loaded automatically when any of these macros is used,
so you do not need to include it explicitly in your configuration.
mhchem
------
The `mhchem` extensions implements the ``\ce``, ``\cf``, and ``\cee``
chemical equation macros of the LaTeX `mhchem` package. See the
`mhchem CPAN page <http://www.ctan.org/pkg/mhchem>`_ for more
information and a link to the documentation for `mhchem`.
For example
.. code-block:: latex
\ce{C6H5-CHO}
\ce{$A$ ->[\ce{+H2O}] $B$}
\ce{SO4^2- + Ba^2+ -> BaSO4 v}
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["mhchem.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
noErrors
--------
@ -230,10 +819,11 @@ following to your :meth:`MathJax.Hub.Config()` call:
inlineDelimiters: ["",""], // or ["$","$"] or ["\\(","\\)"]
multiLine: true, // false for TeX on all one line
style: {
"font-family": "serif",
"font-size": "80%",
"font-size": "90%",
"text-align": "left",
"color": "black",
"border": "1px solid"
"padding": "1px 3px",
"border": "1px solid"
// add any additional CSS styles that you want
// (be sure there is no extra comma at the end of the last item)
}
@ -261,7 +851,20 @@ the paragraph, use
}
}
You may also wish to set the font family, as the default is "serif".
You may also wish to set the font family or other CSS values here.
If you are using a combined configuration file that loads the TeX
input processor, it will also load the `noErrors` extension
automatically. If you want to disable the `noErrors` extension so
that you receive the normal TeX error messages, use the following
configuration:
.. code-block:: javascript
TeX: { noErrors: { disabled: true } }
Any math that includes errors will be replaced by an error message
indicating what went wrong.
noUndefined
@ -296,6 +899,19 @@ default values set ``mathcolor`` to ``"red"``, but do not set any
other attributes. This example sets the background to a light pink,
and reduces the font size slightly.
If you are using a combined configuration file that loads the TeX
input processor, it will also load the `noUndefined` extension
automatically. If you want to disable the `noUndefined` extension so
that you receive the normal TeX error messages for undefined macros,
use the following configuration:
.. code-block:: javascript
TeX: { noUndefined: { disabled: true } }
Any math that includes an undefined control sequence name will be
replaced by an error message indicating what name was undefined.
Unicode support
---------------
@ -348,6 +964,53 @@ array. You can configure the extension as follows:
}
Autoload-all
------------
The `autoload-all` extension predefines all the macros from the
extensions above so that they autoload the extensions when first
used. A number of macros already do this, e.g., ``\unicode``, but
this extension defines the others to do the same. That way MathJax
will have access to all the macros that it knows about.
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["autoload-all.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
Note that `autoload-all` redefines ``\color`` to be the one from the
`color` extension (the LaTeX-compatible one rather than the
non-standard MathJax version). This is because ``\colorbox`` and
``\fcolorbox`` autoload the `color` extension, which will cause
``\color`` to be redefined, and so for consistency, ``\color`` is
redefined immediately.
If you wish to retain the original definition of ``\color``, then use
the following
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: { extensions: ["autoload-all.js"] }
});
MathJax.Hub.Register.StartupHook("TeX autoload-all Ready", function () {
var MACROS = MathJax.InputJax.TeX.Definitions.macros;
MACROS.color = "Color";
delete MACROS.colorbox;
delete MACROS.fcolorbox;
});
</script>
.. _tex-commands:
Supported LaTeX commands
@ -358,6 +1021,11 @@ macro is defined in an extension, the name of the extension follows
the macro name. If the extension is in brackets, the extension will
be loaded automatically when the macro or environment is first used.
More complete details about how to use these macros, with examples and
explanations, is available at Carol Fisher's `TeX Commands Available
in MathJax
<http://www.onemathematicalcat.org/MathJaxDocumentation/TeXSyntax.htm>`_ page.
Symbols
-------
@ -431,8 +1099,11 @@ B
\barwedge AMSsymbols
\Bbb
\Bbbk AMSsymbols
\bbox [bbox]
\bcancel cancel
\because AMSsymbols
\begin
\begingroup begingroup non-standard
\beta
\beth AMSsymbols
\between AMSsymbols
@ -498,13 +1169,18 @@ C
.. code-block:: latex
\cal
\cancel cancel
\cancelto cancel
\cap
\Cap AMSsymbols
\cases
\cdot
\cdotp
\cdots
\ce mhchem
\cee mhchem
\centerdot AMSsymbols
\cf mhchem
\cfrac AMSmath
\check
\checkmark AMSsymbols
@ -522,7 +1198,8 @@ C
\class [HTML] non-standard
\clubsuit
\colon
\color
\color color
\colorbox color
\complement AMSsymbols
\cong
\coprod
@ -603,12 +1280,15 @@ E
\ell
\emptyset
\enclose enclose non-standard
\end
\endgroup begingroup non-standard
\enspace
\epsilon
\eqalign
\eqalignno
\eqcirc AMSsymbols
\eqref [AMSmath]
\eqsim AMSsymbols
\eqslantgtr AMSsymbols
\eqslantless AMSsymbols
@ -625,6 +1305,7 @@ F
\fallingdotseq AMSsymbols
\fbox
\fcolorbox color
\Finv AMSsymbols
\flat
\forall
@ -642,6 +1323,7 @@ G
\Gamma
\gamma
\gcd
\gdef begingroup
\ge
\genfrac AMSmath
\geq
@ -652,6 +1334,7 @@ G
\ggg AMSsymbols
\gggtr AMSsymbols
\gimel AMSsymbols
\global begingroup
\gnapprox AMSsymbols
\gneq AMSsymbols
\gneqq AMSsymbols
@ -735,6 +1418,7 @@ L
.. code-block:: latex
\label [AMSmath]
\Lambda
\lambda
\land
@ -774,6 +1458,7 @@ L
\lesseqqgtr AMSsymbols
\lessgtr AMSsymbols
\lesssim AMSsymbols
\let [newcommand]
\lfloor
\lg
\lgroup
@ -843,6 +1528,7 @@ M
\mathscr
\mathsf
\mathstrut
\mathtip action non-standard
\mathtt
\matrix
\max
@ -850,9 +1536,11 @@ M
\measuredangle AMSsymbols
\mho AMSsymbols
\mid
\middle
\min
\mit
\mkern
\mmlToken non-standard
\mod
\models
\moveleft
@ -880,6 +1568,7 @@ N
\neq
\newcommand [newcommand]
\newenvironment [newcommand]
\Newextarrow extpfeil
\newline
\nexists AMSsymbols
\ngeq AMSsymbols
@ -1007,7 +1696,9 @@ R
\rbrack
\rceil
\Re
\ref [AMSmath]
\renewcommand [newcommand]
\renewenvironment [newcommand]
\require non-standard
\restriction AMSsymbols
\rfloor
@ -1130,6 +1821,7 @@ T
\textit
\textrm
\textstyle
\texttip action non-standard
\tfrac AMSmath
\therefore AMSsymbols
\Theta
@ -1142,6 +1834,7 @@ T
\tiny
\Tiny non-standard
\to
\toggle action non-standard
\top
\triangle
\triangledown AMSsymbols
@ -1250,8 +1943,14 @@ X
\Xi
\xi
\xcancel cancel
\xleftarrow AMSmath
\xlongequal extpfeil
\xmapsto extpfeil
\xrightarrow AMSmath
\xtofrom extpfeil
\xtwoheadleftarrow extpfeil
\xtwoheadrightarrow extpfeil
Y
-

View File

@ -127,17 +127,28 @@ The actions you can perform on an element jax include:
to set the math text of the element to `newmath` and typeset.
.. describe:: Rerender()
to remove the output and reproduce it again (for example, if
CSS has changed that would alter the spacing of the
mathematics). Note that the internal representation isn't
regenerated; only the output is.
.. describe:: Reprocess()
to remove the output and reproduce it again (for
example, if CSS has changed that would alter the spacing of the
mathematics).
to remove the output and then retranslate the input into the
internal MathML and rerender the output.
.. describe:: Remove()
to remove the output for this math element (but not
the original ``<script>`` tag).
.. describe:: needsUpdate()
to find out if the mathematics has changed so that its output
needs to be updated.
.. describe:: SourceElement()
to obtain a reference to the original
@ -161,7 +172,7 @@ queue. If your startup code performs the commands
var studentDisplay = null;
MathJax.Hub.Queue(function () {
studentDisplay = MathJax.Hub.getAllJax("MathDiv");
studentDisplay = MathJax.Hub.getAllJax("MathDiv")[0];
});
then you can use
@ -173,8 +184,12 @@ then you can use
to change the student's answer to be the typeset version of whatever
is in the ``studentAnswer`` variable.
Here is a complete example that illustrates this approach (available in a
more full-featured version as ``test/sample-dynamic.html``):
Here is a complete example that illustrates this approach. Note,
however, that Internet Explorer does not fire the ``onchange`` event
when you press RETURN, so this example does not work as expected in
IE. A more full-featured version that addresses this problem is
available in `test/sample-dynamic.html
<http://cdn.mathjax.org/mathjax/latest/test/sample-dynamic.html>`_.
.. code-block:: html
@ -232,3 +247,8 @@ more full-featured version as ``test/sample-dynamic.html``):
</body>
</html>
There are a number of additional example pages at `test/examples.html
<http://cdn.mathjax.org/mathjax/latest/test/examples.html>`_ that
illustrate how to call MathJax dynamically or perform other actions
with MathJax.

View File

@ -1,4 +1,4 @@
.. _whats-new:
.. _whats-new-1.1:
**************************
What's New in MathJax v1.1
@ -29,7 +29,7 @@ Optimization
* Parallel downloading of files needed by MathJax, for faster startup
times.
* Shorter timeout for web fonts, so if they can't be downlaoded, you don't
* Shorter timeout for web fonts, so if they can't be downloaded, you don't
have to wait so long.
* Rollover to image fonts if a web font fails to load (so you don't have

View File

@ -0,0 +1,718 @@
.. _whats-new-2.0:
**************************
What's New in MathJax v2.0
**************************
MathJax version 2.0 includes many new and improved features, including
much better speeds in Internet Explorer, a new AsciiMath input
processor, a new :term:`SVG` output processor, support for additional
LaTeX commands, and many bug fixes, to name just a few of the changes.
Major speed improvement for HTML-CSS output, particularly in IE
===============================================================
The HTML-CSS output processing was redesigned to avoid the page
reflows that were the main source of the speed problem in Internet
Explorer 8 and 9. For test pages having between 20 and 50 typeset
expressions, we see an 80% reduction in output processing time for
IE8, a 50% reduction for IE9, and between 15% and 25% reduction for
most other browsers over the corresponding v1.1a times. Since the
processing time in v1.1a grows non-linearly in IE, you should see even
larger savings for pages with more equations when using v2.0. Forcing
IE7 emulation mode is no longer necessary (and indeed is no longer
recommended).
Reduced flickering during typsetting
====================================
In the past, each expression was displayed as soon as it was typeset,
which caused a lot of visual flickering as MathJax processed the page.
In v2.0, the output is processed in blocks so that typeset expressions
are revealed in groups. This reduces the visual distraction, and also
speeds up the processing. The number of equations in a block can be
controlled through the ``EqnChunk`` parameter in the HTML-CSS or SVG
block of your configuration. See the :ref:`configuration options for
HTML-CSS <configure-HTML-CSS>` and :ref:`configuration options for SVG
<configure-SVG>` pages for details.
If the page URL includes a hash reference (a link to a particular
location within the page), MathJax v2.0 will jump to that location
after the page has finished typsetting. (Since the size of the page
may have changed due to the mathematical typsetting, that location may
no longer be visible on screen, so MathJax moves there when it is done
with the initial typesetting.) You can control this behavior with the
``positionToHash`` parameter in the main section of your
configuration. See the :ref:`core configuration options
<configure-hub>` page for details.
Automatic equation numbering of TeX formulas
============================================
The TeX input jax now can be configured to add equation numbers
(though the default is not to number equations so that existing pages
will not change their appearance). This is controlled through the
``equationNumbers`` section of the ``TeX`` block of your configuration
(see the :ref:`equation numbering <tex-eq-numbers>` section for
details). You can request that the numbering follow the AMS-style
numbering of environments, or you can request that every displayed
equation be numbered. There are now ``\label``, ``\ref``, and
``\eqref`` commands to make it easier to link to particular equations
within the document.
Automatic line breaking of long displayed equations
===================================================
MathJax now implements the MathML3 specification for automatic line
breaking of displayed equations in its HTML-CSS output. This is
disabled by default, but can be enabled via the ``linebreaks`` section
of the ``HTML-CSS`` or ``SVG`` block of your configuration (see the
:ref:`automatic line breaking <automatic-linebreaking>` section for
details). Note that automatic line breaking only applies to displayed
equations, not in-line equations, unless they are themselves longer
than a line. The algorithm uses the nesting depth, the type of
operator, the size of spaces, and other factors to decide on the
breakpoints, but it does not know the meaning of the mathematics, and
may not choose the optimal breakpoints. We will continue to work on
the algorithm as we gain information from its actual use in the field.
New AsciiMath input jax and SVG output jax
==========================================
MathJax currently processes math in either :term:`TeX` and
:term:`LaTeX` format, or :term:`MathML` notation; version 2.0 augments
that to include :term:`AsciiMath` notation (see `the ASCIIMathML
home page <http://www1.chapman.edu/~jipsen/mathml/asciimath.html>`_
for details on this format). This is a notation that is easier for
students to use than TeX, and has been requested by the user
community. See the :ref:`AsciiMath support <AsciiMath-support>` page
for details.
In addition to the HTML-CSS and Native MathML output available in
v1.1, MathJax v2.0 includes an :term:`SVG`-based output jax. This should
prove to be more reliable than the HTML-CSS output, as it avoids some
CSS, web-font, and printing issues that the HTML-CSS output suffers
from, and it currently has no browser-dependent code. The SVG mode
even works in some ebook readers (like Apple iBooks and Calibre). See
the :ref:`output formats <output-formats>` documentation for details.
New combined configuration files
================================
Pre-defined configuration files that include the AsciiMath and SVG
processors are now available with MathJax v2.0. These include
``AM_HTMLorMML``, ``TeX-AMS-MML_SVG``, and ``TeX-MML-AM_HTMLorMML``.
See the :ref:`common configurations <config-files>` section for details.
MathJax contextual menu now available on mobile devices
=======================================================
MathJax v2.0 provides access to its contextual menu in mobile devices
that are based on the WebKit (Safari) and Gecko (Firefox) engines.
For Mobile Firefox, the menu is accessed by a tap-and-hold on any
expression rendered by MathJax (this is Mobile Firefox's standard
method of triggering a contextual menu). In Mobile Safari, use a
double-tap-and-hold (you may need to zoom in a bit to be able to
accomplish this). This is the first step toward providing a better
interface for mobile devices.
Improved support for screen readers
===================================
Some issues surrounding the use of screen readers and their
interaction with MathPlayer have been resolved in MathJax v2.0. In
particular, there are additional menu items that allow the user finer
control over some aspects of MathJax's interface that were interfering
with some screen readers' ability to properly identify the
mathematics. Several stability issues with MathPlayer have also been
addressed. In Internet Explorer when MathPlayer is installed, there
is now a new contextual menu item to allow you to specify what events
are handled by MathJax and what should be handled by MathPlayer. This
gives you finer control over MathPlayer's interaction with some screen
readers.
Many new TeX additions and enhancements
=======================================
* New `mhchem` chemistry extension (adds ``\ce``, ``\cf``, and ``\cee`` macros)
* New `cancel` extension (adds ``\cancel``, ``\bcancel``, ``\xcancel``, and ``\cancelto`` macros)
* New `extpfeil` extension (adds more stretchy arrows)
* New `color` extension (makes ``\color`` work as a switch, as in LaTeX).
Adds ``\definecolor``, other color models, LaTeX named colors,
``\colorbox``, ``\fcolorbox``, etc.
* New `begingroup` extension to allow macro definitions to be
localized. Adds ``\begingroup`` and ``\endgroup`` for isolating macro
declarations, and defines ``\let``, ``\renewenvironment``, ``\global``, and
``\gdef``.
* New `enclose` extension to give TeX access to ``<menclose>`` elements.
Adds ``\enclose{type}[attributes]{math}`` macro.
* New `action` extension to give TeX access to ``<maction>`` elements.
Adds ``\mathtip{math}{tip}``, ``\texttip{math}{tip}``, and
``\toggle{math1}{math2}...\endtoggle`` macros.
* New ``\mmToken{type}[attributes]{text}`` macro for producing ``<mo>``,
``<mi>``, ``<mtext>``, and other token MathML elements directly.
* New ``\bbox[color;attributes]{math}`` macro to add background color,
padding, borders, etc.
* New ``\middle`` macro for stretchy delimiters between ``\left`` and ``\right``.
* New ``\label``, ``\ref``, and ``\eqref`` macros for numbered equations.
* Better implementation of ``\not`` so it produces proper MathML when possible.
* Better implementation of ``\dots`` that selects ``\ldots`` or ``\cdots``
depending on the context.
* Better implementation of ``\cases`` that automatically uses ``\text`` on
the second entry in each row.
* Safer implementation of ``\require`` that only allows loading from
extensions directory.
* Allow ``\newcomand`` to provide a default parameter.
* Allow ``\\`` to take an optional argument that specifies additional
space between lines.
* Allow ``\\`` to be used anywhere (to force a line break), not just in
arrays.
* Allow optional alignment parameter for array, aligned, and gathered
environments.
See the :ref:`TeX support <TeX-support>` page for details on these
extensions and macros.
Font enhancements
=================
* Work around for the OS X Lion STIX font problem.
* Support for STIX-1.1 fonts (detection of which version you have,
and use data appropriate for that).
* New WOFF versions of the web fonts (smaller, so faster to
download).
* Data for more stretchy characters in HTML-CSS output.
* Add support for Unicode planes 1 through 10 (not just the Math
Alphabet block) in HTML-CSS output.
* Increased timeout for web fonts (since it was switching to image
fonts too often, especially for mobile devices).
* Only switch to image fonts if the first web font fails to load (if
we can access one, assume we can access them all).
* Allow ``<mtext>`` elements to use the page font rather than MathJax
fonts (optionally). This is controlled by the ``mtextFontInerhit``
configuration parameter for HTML-CSS and SVG output jax.
* Provide better control over the font used for characters that are
not in the MathJax fonts.
* Allow Firefox to use web-based fonts when a local URL uses MathJax
from the CDN (in the past it would force image fonts when that was
not necessary).
Interface improvements
======================
* The MathJax contextual menu has been reorganized to make it easier
to get the source view, and to control the parameters for
MathPlayer in IE.
* The MathJax contextual menu is available in mobile devices (see
description above).
* Warning messages are issued if you switch renderers to one that is
inappropriate for your browser.
* MathJax now starts processing the page on the ``DOMContentLoaded``
event rather than the page ``onload`` event (this allows the
mathematics to appear sooner).
* Native MathML output is now scaled to better match the surrounding
font (like it is for HTML-CSS output).
* Better CSS styling for NativeMML output in Firefox in order to
handle ``\cal`` and other fonts.
* MathML output now (optionally) includes class names to help mark
special situations generated by the TeX input jax. (This lets the
MathML from the Show Source menu item better reproduce the original
TeX output.)
* MathJax now loads the menu and zoom code (if they haven't been
loaded already) after the initial typesetting has occured so that
they will be available immediately when a user needs those
features, but do not delay the initial typesetting of the
mathematics.
* For the `tex2jax` preprocessor, the ``processClass`` can now be
used to override the ``skipTags`` to force a tag that is usually
skipped to have its contents be processed.
* The `noErrors` and `noUndefined` extensions can now be disabled via
a configuration option (since they are included in many of the
combined configuration files). See the `noErrors` and
`noUndefined` sections of the :ref:`TeX support
<TeX-support>` page for more information.
* There is a new :meth:`MathJax.Hub.setRenderer()` function that can
be used to switch the current renderer. See the :ref:`MathJax Hub
API <api-hub>` documentation for details.
* A user-defined macros is no longer overridden if an extension is
loaded that redefines that macro.
* Improved web-font detection reliability.
.. _important-changes-2.0:
Important changes from previous versions
========================================
* The default renderer for Firefox has been changed from `NativeMML` to
`HTML-CSS` (in those configurations that choose between the two).
The only browser that defaults to `NativeMML` is now IE with
MathPlayer installed. You can configure this to your liking using
the :ref:`MMLorHTML configuration options <configure-MMLorHTML>`.
* `NativeMML` output will now be selected in IE9 when MathPlayer is
present (since IE9 was released the same day as MathJax v1.1a, and
there had been problems with IE9 beta releases, we weren't sure if
MathPlayer would work with the official release, and so did not
select NativeMML by default.)
* The performance improvements in IE8 and IE9 now make it unnecessary
to use a ``<meta>`` tag to force IE7 emulation mode. In fact IE9 in
IE9 standards mode now runs faster than IE9 in IE7 standards mode,
and IE8 in IE8 standards mode is comparable to IE8 in IE7 standards
mode. We now recommend that you use
.. code-block:: html
<meta http-equiv="X-UA-Compatible" content="IE=edge">
to obtain the highest emulation mode available in IE, which
will be the fastest one for MathJax 2.0.
* The `tex2jax` preprocessor now balances braces when looking for the
closing math delimiter. That allows expressions like
.. code-block:: latex
$y = x^2 \hbox{ when $x > 2$}$
to be properly parsed as a single math expression rather than two
separate ones with unbalanced braces. The old behavior can be
obtained by setting ``balanceBraces`` to false in the ``tex2jax``
block of your configuration. (See the :ref:`tex2jax configuration
options <configure-tex2jax>` for details.)
* If you are hosting your own copy of MathJax on your server, and
that copy is being used from pages in a different domain, you will
have set up the access control paramters for the font directory to
allow Firefox to access the font files properly. Since MathJax 2.0
includes fonts in WOFF format, you will need to include ``woff`` in
you access control declaration for the fonts. E.g., use
::
<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
in the ``.htaccess` file for the ``Mathjax/fonts`` directory if you
are using the Apache web server. See :ref:`Notes about shared
installations <cross-domain-linking>` for details.
* The ``\cases`` macro now properly places the second column in text
mode not math mode. In the past, one needed to use ``\text`` in
the second column to achieve the proper results; pages that did
this will still work properly in v2.0. Pages that took advantage
of the math mode in the second column will need to be adjusted.
* The ``\dots`` macro now produces ``\ldots`` or ``\cdots`` depending
on the context (in the past, ``\dots`` always produced ``\ldots``).
* A one pixel padding has been added above and below HTML-CSS and SVG
output so that math on successive lines of a paragraph won't bump
into each other.
* There is a new `MathPlayer` submenu of the `Math Settings` menu in
the MathJax contextual menu that allows the user to control what
events are passed on to MathPlayer. This allows better control for
those using assistive devices like screen readers. When menu
events are being passed on to MathPlayer, the MathJax menu can be
obtained by ALT-clicking on a typeset expression (so the user can
still access MathJax's other features).
* In order to improve stability with IE when MathPlayer is installed,
MathJax now adds the namespace and object bindings that are needed
for MathPlayer at the time that Mathjax is first loaded, rather
than waiting for the `NativeMML` output jax to be loaded. Since
this is before the configuration information has been obtained,
this will happen regardless of whether the `NativeMML` output jax
is requested. This means that IE may ask the user to allow
MathPlayer to be used, and may show the MathPlayer splash dialog
even when MathPlayer is not in the end used by MathJax. Note that
this setup can only be performed if MathJax is loaded explicitly as
part of the initial web page; if it is injected into the page later
by adding a ``<script>`` tag to the page dynamically, then
MathPlayer will be set up when the `NativeMML` jax is loaded as in
the past, and some stability issues may occur if events are passed
to MathPlayer.
* The MathJax typesetting is now started on ``DOMContentLoaded``
rather than at the page ``onload`` event, when possible, so that
means MathJax may start typesetting the page earlier than in the
past. This should speed up typesetting one pages with lots of
images or side-bar content, for example.
* MathJax now attempts to determine whether the page's ``onload``
event had already occurred, and if it has, it does not try to wait
for the ``DOMContentLoaded`` or ``onload`` event before doing its
initial typeset pass. This means that it is no longer necessary to
call ``MathJax.Hub.Startup.onload()`` by hand if you insert MathJax
into the page dynamically (e.g., from a GreaseMonkey script).
* If the page URL includes a hash reference (a link to a particular
location within the page), MathJax v2.0 will jump to that location
after the page has finished typsetting. Since the size of the page
may have changed due to the mathematical typsetting, that location
may no longer be visible on screen, so MathJax moves there when it
is done with the initial typesetting. You can control this
behavior with the ``positionToHash`` parameter in the main section
of your configuration (see :ref:`core configuration options
<configure-hub>`).
* In the event that MathJax is not able to load the configuration file
you have specified in the script tag that loads ``MathJax.js`` via
``config=filename``, it will no longer issue the warning message
about a missing configuration. The configuration process changed
in v1.1, and that message was to help page maintainers update their
configurations, but it turns out that for users with slow network
connections, MathJax could time out waiting for the configuration
file and would issue the warning message in that case, even though
the page included the proper configuration. That should no longer
occur in MathJax v2.0.
Other enhancements
==================
* Use prioritized lists of callbacks for StartupHooks, MessageHooks,
LoadHooks, PreProcessors, and pre- and post-filters on the input jax.
* Updated operator dictionary to correspond to current W3C version.
* Improved browser detection for Gecko and WebKit browsers.
* Make prefilters and postfilters for all input jax, and make them into
hook lists rather than a single hook.
* Use ``<mi>`` rather than ``<mo>`` for ``\sin``, ``\cos``, and other
such functions, for ``\mathop{\rm...}`` and ``\operatorname``.
* Add ``&ApplyFunction;`` after ``\mathop{}`` and other macros that are
functions (e.g., ``\sin``).
* The ``MathJax_Preview`` style has been moved from ``HTML-CSS/jax.js`` to
``MathJax.js``, since it is common to all output.
* The `autobold` extension now uses ``\boldsymbol`` rather than
``\bf`` so that it will affect more characters.
* Make units of ``mu``'s be relative to the scriptlevel (as they
are supposed to be).
* Reorganized the event-handling code to make it more modular and reduce
redundancy in the different output jax.
* Modified CSS in `NativeMML` output for Firefox to use local copies of
the web fonts, if they are available.
* Error messages now have the MathJax contextual menu.
* Better handling of some characters not in the web fonts (remap to
locations where they exist, when possible).
* Better choice of accent characters in some cases.
* Better handling of pseudo-scripts (like primes).
* Better sizing of characters introduced by ``\unicode{}``, or
otherwise outside of the fonts known to MathJax.
* Provide a new extension to handle tagged equations better in
`HTML-CSS` output when there are floating elements that might
reduce the area available to displayed equations. (See the
HTML-CSS extensions section of the :ref:`output formats
<output-formats>` documentation for detais.)
* Use a text font for ``\it`` rather than the math italics, so
spacing is better.
* Handle italic correction better in `HTML-CSS` output
* Handle ``href`` attributes better, especially when on ``<math>``
elements.
* Allow ``\sqrt\frac{}{}`` without producing an error.
Other bug fixes
===============
* MathPlayer setup changed to prevent crashes.
* Moved remapping of ``<mo>`` contents to the output jax so that the
original contents aren't changed.
* Don't combine ``mathvariant`` with ``fontstyle`` or ``fontweight``
(as per the MathML specification).
* Isolate non-standard attributes on MathML elements so that they don't
interfere with the inner workings of MathJax.
* Properly handle width of border and padding in merrors in `HTML-CSS`
output.
* Properly handle lower-case Greek better.
* Process weight and style of unknown characters properly.
* Fixed spacing problems with ``\cong`` in MathJax web fonts .
* Choose better sizes for ``\widehat`` and ``\widetilde``
* Fixed problem with detecting em/ex sizes when uses in mobile devices
with small screen widths.
* Fixed MathML output when dimensions of ``mu``'s are used in TeX input.
* Better handling of table borders from TeX.
* Fixed some problems with table widths and heights, and spacing.
* Better handling of colored backgrounds in `HTML-CSS` output.
* Handle border and padding CSS styles better in `HTML-CSS` output.
* Fixed multline environment to put tags on bottom row when
``TagSide`` is set to ``right``.
* Force reflow after equations are typeset so that some rendering
problems in tables are corrected in Firefox and WebKit browsers.
* Fixed a number of bugs with the size of zoom boxes and the size of their
content.
* Have equations with tags zoom into a full-width zoom box to
accommodate the tag.
* Fixed positioning problem with zoom boxes in NativeMML mode.
* Don't allow mouse events on zoomed math.
* Fixed ``MathJax.Hub.getJaxFor()`` and ``MathJax.Hub.isJax()`` to
properly handle elements that are part of an output jax's output
(in particular, you can find the element jax from any DOM element
in the output).
* Fixed a number of font anomalies (problems in the data files).
* Fixed problem where ``<mspace>`` with a background color would not
always overlay previous items.
* Fixed a problem with colored ``<mspace>`` elements being too tall in
IE/quirks mode.
* Fixed problem where ``<mtable>`` with ``equalrows="true"`` would
not produce equal height rows.
* Allow ``<mpadded>`` background color to be specified exactly (i.e.,
without the 1px padding) when one of its dimensions is given
explicitly (or there is no content).
* Avoiding flicker problem with hover zoom trigger in Firefox.
* Fix ``\unicode`` bug with font names that include spaces.
* Remove internal multiple spaces in token elements as per the MathML
specification.
* Work around HTML5 removing namespaces, so that ``xmlns:xlink``
becomes ``xlink`` with no namespace, which confuses the XML parsers.
* Fix ``MathJax.Message.Set()`` and ``MathJax.Message.Clear()`` so
that a delay of 0 is properly handled.
* Produce better MathML for ``\bmod``, ``\mod``, and ``\pmod``.
* Don't allow Safari/Windows to use STIX fonts since it can't access
characters in Plane1 (the mathematical alphabets).
* Fix ``\thickapprox`` to use the correct glyph in `HTML-CSS` output
with MathJax web fonts.
* Make style attributes work on ``<mstyle>`` elements.
* Better handling of border and padding on MathML elements in
`HTML-CSS` output.
* Fixed error with size of ``\:`` space.
* Allow delimiter of ``.`` on ``\genfrac`` (it was accidentally rejected).
* Handle AMSmath control sequences with stars better (``\cs{*}`` no longer
counts as ``\cs*``).
* Fixed wrong character number in stretchy data for `U+221A`.
* Fixed ``<annotation-xml>`` to use the proper scaling in `HTML-CSS`
output.
* Fixed a problem with combining characters when they are used as
accents.
* Fixed a problem in Firefox with ``\mathchoice`` when the contents have
negative width.
* TeX input jax no longer incorrectly combines ``<mo>`` elements that have
different variants, styles, classes, or id's.
* Fixed the ``scriptlevel`` when ``<munderover>`` has base with
``movablelimits="true"`` in non-display mode.
* Fixed typo in implementation of ``SimpleSUPER``.
* Fixed typo in self-closing flag for ``<mprescript>`` tag.
* Prevent infinite loop if one of the jax fails to load (due to failure
to compile or timeout waiting for it to load).
* Fixed a whitespace issue in token elements with IE/quirks mode in
the `MathML` input jax.
* Make sure height is above depth when making spaces and rules in
`HTML-CSS` and `SVG` output.
* Fixed `HTML-CSS` tooltip to be work properly when a restart occurs
within the tooltip.
* Fixed problem with size of colored backgrounds on ``<mo>`` in some
circumstances in `HTML-CSS` output.
* Make ``\ulcorner``, etc. use more approprate unicode positions, and remap
those positions to the locations in the MathJax web fonts.
Some technical changes
======================
* Break the processing phase into two separate phases to do input
processing separately from output processing (they used to be
interleaved). This makes it easier to implement forward references
for the ``\ref`` macro.
* Make ``Font Preference`` menu honor the ``imageFont`` setting.
* Changed the name of the preview filter commands to ``previewFilter``
in all preprocessors.
* Make ``^`` and ``_`` be stretchy even though that isn't in the W3C
dictionary.
* Fixed `HTML-CSS` output problem when a multi-character token element has
characters taken from multiple fonts.
* Force message text to be black in FontWarnings and configuration
warnings.
* Added ``Find()`` and ``IndexOf()`` commands to menus to locate menu items.
* Added menu signals for post/unpost and activation of menu items.
* Added signals for typesetting of unknown characters.
* Added signals for zoom/unzoom.
* Added More signals for error conditions.
* Allow preferences to select MathML output for Safari with late enough
version.
* Improved `About MathJax` box.
* Have `tex2jax` handle empty delimiter arrays and don't scan page if
there is nothing to look for.
* Make delay following a `processing` message configurable and lengthen
it to make browser more responsive during typesetting.
* Make thin rules be in pixels to try to improve results in IE
(disappearing division lines).
* Mark all output elements as ``isMathJax``, so it can be used to identify
what elements are part of mathematical output.
* Force MathZoom and MathMenu to wait for the ``Begin Styles`` message
before inserting their styles so when they are included in the
combined files, the author can still configure them.
* Add default id's to the jax base object classes.
* Mark top-level math element as having a ``texError`` when it is one (to
make it easier to recognize).
* Have ``Update()`` method ask ElementJax to determine if it needs updating
(which in turn asks the associated input jax).
* Make ``Remove()`` work for just clearing output (without detaching) if
desired.
* Have ElementJax store input and output jax ID's rather than pointers
(to help avoid circular references for cleanup purposes).
* Move input/output jax and preprocessor registries from ``Hub.config`` to
Hub itself (they are not user configurable through ``Hub.Config``, and so
even though they are configurations, they don't belong there).
* Make sure embelished large ops are type ``OP`` not ``ORD`` to get spacing
right.
* Added ``MathJax.HTML.getScript()`` to get the contents of a script (needed
since it works differently in different browsers).
* Move code that prevents numbers from being treated as a unit for
super- and subscripts to the super- and subscript routine in the
`TeX` input jax (prevents making changes to ``\text{}``,
``\hbox{}``, ``\href{}``, etc.).
* Make `mml2jax` work better with IE namespaces (IE9 no longer seems to
list the ``xmlns`` entries on the ``<html>`` element).

View File

@ -10,9 +10,9 @@ if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) {
(document.getElementsByTagNameNS == null ? false :
(document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full";
var config = 'MathJax.Hub.Startup.onload()';
if (window.opera) {script.innerHTML = config} else {script.text = config}
document.getElementsByTagName("head")[0].appendChild(script);
}
}

View File

@ -23,9 +23,8 @@ if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) {
// Load MathJax and have it process the page
//
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full";
var config = 'MathJax.Hub.Startup.onload()';
if (window.opera) {script.innerHTML = config} else {script.text = config}
document.getElementsByTagName("head")[0].appendChild(script);
}
}

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax.Ajax Object &mdash; MathJax v1.1 documentation</title>
<title>The MathJax.Ajax Object &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">The MathJax API</a> &raquo;</li>
</ul>
</div>
@ -423,12 +423,12 @@ actual root URL location).</p>
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >The MathJax API</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax.Callback Class &mdash; MathJax v1.1 documentation</title>
<title>The MathJax.Callback Class &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">The MathJax API</a> &raquo;</li>
</ul>
</div>
@ -102,12 +102,12 @@ the window object. For example,</p>
<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>
</dd></dl>
<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
<dd><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">&#39;foo&#39;</span><span class="p">,</span> <span class="nx">y</span><span class="o">:</span><span class="s1">&#39;bar&#39;</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>
@ -123,9 +123,10 @@ when it is called.</p>
the function as well.</p>
</dd></dl>
<p>..describe:: [&#8220;method&#8221;, object]</p>
<blockquote>
<div><p>Here, <cite>object</cite> is an object that has a method called <cite>method</cite>, and
<dl class="describe">
<dt>
<tt class="descname">[&quot;method&quot;, object]</tt></dt>
<dd><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">&quot;toString&quot;</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>
@ -133,7 +134,8 @@ the callback will execute that method (with the object as
</div>
<p>would call the <cite>toString</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">1,2,3,4</span></tt>.</p>
</div></blockquote>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">[&quot;method&quot;, object, data...]</tt></dt>
@ -288,36 +290,6 @@ commands.</p>
</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. If <cite>reset</cite> is <tt class="docutils literal"><span class="pre">true</span></tt>, then the callback&#8217;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> &#8212; array of hooks to be called, or a hook</li>
<li><strong>data</strong> &#8212; array of arguments to pass to each hook in turn</li>
<li><strong>reset</strong> &#8212; <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>
@ -362,6 +334,122 @@ and returns the signal object. See
</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. If <cite>reset</cite> is <tt class="docutils literal"><span class="pre">true</span></tt>, then the callback&#8217;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> &#8212; array of hooks to be called, or a hook</li>
<li><strong>data</strong> &#8212; array of arguments to pass to each hook in turn</li>
<li><strong>reset</strong> &#8212; <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="Hooks">
<tt class="descname">Hooks</tt><big>(</big><em>reset</em><big>)</big><a class="headerlink" href="#Hooks" title="Permalink to this definition"></a></dt>
<dd><p>Creates a prioritized list of hooks that are called in order based
on their priority (low priority numbers are handled first). This
is meant to replace <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback.ExecuteHooks()</span></tt> and is
used internally for signal callbacks, pre- and post-filters, and
other lists of callbacks.</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>reset</strong> &#8212; <tt class="docutils literal"><span class="pre">true</span></tt> if callbacks can be called more than once</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the <cite>Hooks</cite> object</p>
</td>
</tr>
</tbody>
</table>
<p>The list has the following methods:</p>
<dl class="method">
<dt id="Add">
<tt class="descname">Add</tt><big>(</big><em>hook</em><span class="optional">[</span>, <em>priority</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Add" title="Permalink to this definition"></a></dt>
<dd><p>Add a callback to the prioritized list. If <tt class="docutils literal"><span class="pre">priority</span></tt> is
not provided, the default is 10. The <tt class="docutils literal"><span class="pre">hook</span></tt> is a <cite>Callback</cite>
specification as described above.</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>hook</strong> &#8212; callback specification to add to the list</li>
<li><strong>priority</strong> &#8212; priority of the hook in the list (default: 10)</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the callback object being added</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt>
<tt class="descname">Remove</tt><big>(</big><em>hook</em><big>)</big></dt>
<dd><p>Remove a given hook (as returned from <a class="reference internal" href="#Add" title="Add"><tt class="xref py py-meth docutils literal"><span class="pre">Add()</span></tt></a> above)
from the prioritized list.</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>hook</strong> &#8212; the callback to 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>
<dl class="method">
<dt id="Execute">
<tt class="descname">Execute</tt><big>(</big><big>)</big><a class="headerlink" href="#Execute" title="Permalink to this definition"></a></dt>
<dd><p>Execute the list of callbacks, resetting them if requested.
If any of the hooks return callbacks, then <tt class="docutils literal"><span class="pre">Execute()</span></tt>
returns a callback that will be executed when they all have
completed.</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">a callback object or <tt class="docutils literal"><span class="pre">null</span></tt></td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
</div>
@ -420,12 +508,12 @@ and returns the signal object. See
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >The MathJax API</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax.ElementJax Class &mdash; MathJax v1.1 documentation</title>
<title>The MathJax.ElementJax Class &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">The MathJax API</a> &raquo;</li>
</ul>
</div>
@ -91,15 +91,13 @@ that class.</p>
<dl class="describe">
<dt>
<tt class="descname">inputJax</tt></dt>
<dd><p>A reference to the input jax that created the element. (In the
future, this will be changed to the name of the input jax.)</p>
<dd><p>The name of 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. (In
the future, this will be changed to the name of the output jax.)</p>
<dd><p>The name of the output jax that has processed this element.</p>
</dd></dl>
<dl class="describe">
@ -157,13 +155,36 @@ new one given by <cite>text</cite>). When the processing is complete, the
</table>
</dd></dl>
<dl class="method">
<dt>
<tt class="descname">Rerender</tt><big>(</big><span class="optional">[</span><em>callback</em><span class="optional">]</span><big>)</big></dt>
<dd><p>Removes the output and produces it again (for example, if CSS has
changed that would alter the spacing of the mathematics). Note
that the internal representation isn&#8217;t regenerated; only the
output is. 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> &#8212; 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>Removes the output and produces 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>
<dd><p>Removes the output and then retranslates the input into the
internal form and reredners the output again. 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" />
@ -212,6 +233,22 @@ associated to this element jax.</p>
</table>
</dd></dl>
<dl class="method">
<dt id="needsUpdate">
<tt class="descname">needsUpdate</tt><big>(</big><big>)</big><a class="headerlink" href="#needsUpdate" title="Permalink to this definition"></a></dt>
<dd><p>Indicates whether the mathematics has changed so that its output
needs to be updated.</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">true</span></tt> if the mathematics needs to be reprocessed,
<tt class="docutils literal"><span class="pre">false</span></tt> otherwise</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
@ -271,12 +308,12 @@ contextual menu.</p>
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >The MathJax API</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax.HTML Object &mdash; MathJax v1.1 documentation</title>
<title>The MathJax.HTML Object &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">The MathJax API</a> &raquo;</li>
</ul>
</div>
@ -199,6 +199,27 @@ bugs.</p>
</table>
</dd></dl>
<dl class="method">
<dt id="getScript">
<tt class="descname">getScript</tt><big>(</big><em>script</em><big>)</big><a class="headerlink" href="#getScript" title="Permalink to this definition"></a></dt>
<dd><p>Gets the contents of the <tt class="docutils literal"><span class="pre">script</span></tt> element, properly taking into
account the browser limitations and bugs.</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> &#8212; the script whose content is to be retrieved</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the text of the <tt class="docutils literal"><span class="pre">script</span></tt></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">Cookie.Set(name,data)</tt></dt>
@ -300,12 +321,12 @@ above,</p>
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >The MathJax API</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax.Hub Object &mdash; MathJax v1.1 documentation</title>
<title>The MathJax.Hub Object &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">The MathJax API</a> &raquo;</li>
</ul>
</div>
@ -79,7 +79,19 @@ Options</em></a> reference page.</p>
<dt>
<tt class="descname">processUpdateTime: 250</tt></dt>
<dd><p>The minimum time (in milliseconds) between updates of the
&#8220;Processing Math&#8221; message.</p>
&#8220;Processing Math&#8221; message. After this amount of time has passed,
and after the next equation has finished being processed,
MathJax will stop processing momentarily so that the update
message can be displayed, and so that the browser can handle user
interaction.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">processUpdateDelay: 10</tt></dt>
<dd><p>The amount of time (in milliseconds) that MathJax pauses after
issuing its processing message before starting the processing again
(to give browsers time to handle user interaction).</p>
</dd></dl>
<dl class="describe">
@ -117,6 +129,13 @@ 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">isMobile</tt></dt>
<dd><p>This is <tt class="docutils literal"><span class="pre">true</span></tt> when MathJax is running a mobile version of a
WebKit or Gecko-based browser.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">isFirefox, isSafari, isChrome, isOpera, isMSIE, isKonqueror</tt></dt>
@ -161,6 +180,21 @@ need to do special processing. For example:</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">inputJax</tt></dt>
<dd><p>An object storing the MIME types associated with the various
registered input jax (these are the types of the <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tags
that store the math to be processed by each input jax).</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">outputJax</tt></dt>
<dd><p>An object storing the output jax associate with the various
element jax MIME types for the registered output jax.</p>
</dd></dl>
</div>
<div class="section" id="methods">
<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline"></a></h2>
@ -434,13 +468,43 @@ references. The <cite>callback</cite> is called when the processing is complete
<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 (or
elements if it is an array of elements), 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, a reference to the DOM element itself, or an array of
id&#8217;s or references. The <cite>callback</cite> is called when the processing is
<dd><p>Removes any typeset mathematics from the document or DOM element
(or elements if it is an array of elements), 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. Reprocess calls both the
input and output jax to completely rebuild the data for
mathematics. The <cite>element</cite> is either the DOM <cite>id</cite> of the element
to scan, a reference to the DOM element itself, or an array of
id&#8217;s or references. 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> &#8212; the element(s) to be reprocessed</li>
<li><strong>callback</strong> &#8212; 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="Rerender">
<tt class="descname">Rerender</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="#Rerender" title="Permalink to this definition"></a></dt>
<dd><p>Removes any typeset mathematics from the document or DOM element
(or elements if it is an array of elements), and then renders the
mathematics again, re-typesetting everything from the current
internal version (without calling the input jax again). The
<cite>element</cite> is either the DOM <cite>id</cite> of the element to scan, a
reference to the DOM element itself, or an array of id&#8217;s or
references. 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" />
@ -577,6 +641,33 @@ handled by MathJax, and returns <tt class="docutils literal"><span class="pre">1
</table>
</dd></dl>
<dl class="method">
<dt id="setRenderer">
<tt class="descname">setRenderer</tt><big>(</big><em>renderer</em><span class="optional">[</span>, <em>type</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#setRenderer" title="Permalink to this definition"></a></dt>
<dd><p>Sets the output jax for the given element jax <tt class="docutils literal"><span class="pre">type</span></tt> (or <tt class="docutils literal"><span class="pre">jax/mml</span></tt>
if none is specified) to be the one given by <tt class="docutils literal"><span class="pre">renderer</span></tt>, which
must be the name of a renderer, such as <tt class="docutils literal"><span class="pre">NativeMML</span></tt> or
<tt class="docutils literal"><span class="pre">HTML-CSS</span></tt>. Note that this does not cause the math on the page
to be rerendered; it just sets the renderer for output in the
future (call :meth:<tt class="docutils literal"><span class="pre">Rerender()</span></tt> above to replace the current
renderings by new ones).</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>renderer</strong> &#8212; the name of the output jax to use for rendering</li>
<li><strong>type</strong> &#8212; the element jax MIME type whose renderer to 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="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>
@ -685,12 +776,12 @@ error on the page.</p>
<li class="right" >
<a href="variable.html" title="The MathJax variable"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >The MathJax API</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax API &mdash; MathJax v1.1 documentation</title>
<title>The MathJax API &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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>
@ -40,7 +40,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -132,11 +132,11 @@ on the main MathJax documentation page.</p>
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax.InputJax Class &mdash; MathJax v1.1 documentation</title>
<title>The MathJax.InputJax Class &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">The MathJax API</a> &raquo;</li>
</ul>
</div>
@ -107,11 +107,57 @@ that class.</p>
<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>
<tt class="descname">Process</tt><big>(</big><em>script</em>, <em>state</em><big>)</big></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 jax to process the given math <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt>. Its default
action is to do the following:</p>
<ol class="arabic simple">
<li>Start loading any element jax specified in the <tt class="docutils literal"><span class="pre">elementJax</span></tt> array;</li>
<li>Start loading the jax&#8217;s <tt class="docutils literal"><span class="pre">jax.js</span></tt> file;</li>
<li>Start loading the required output jax (so it is ready when needed); and</li>
<li>Redefine itself to simply return the callback for the load operation
(so that further calls to it will cause the processing to wait for the
callback).</li>
</ol>
<p>Once the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file has loaded, this method is replaced by
the jax&#8217;s <tt class="docutils literal"><span class="pre">Translate()</span></tt> method (see below), so that
subsequent calls to <tt class="docutils literal"><span class="pre">Process()</span></tt> will perform the appropriate
translation.</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> &#8212; reference to the DOM <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> object for</dt>
<dd><p class="first last">the mathematics to be translated</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><strong>state</strong> &#8212; a structure containing information about the</dt>
<dd><p class="first last">current proccessing state of the mathematics
(internal use)</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>
<tt class="descname">Translate</tt><big>(</big><em>script</em>, <em>state</em><big>)</big></dt>
<dd><p>This is the main routine called by MathJax when a <tt class="docutils literal"><span class="pre">&lt;script&gt;</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
throws an error indicating that <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> hasn&#8217;t been
redefined, so when the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file loads, it should override the
defined, so 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.</p>
<p>The translation process should include the creation of an
@ -121,8 +167,16 @@ for this element.</p>
<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> &#8212; the <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> element to be translated</li>
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first">
<li><p class="first"><strong>script</strong> &#8212; the <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> element to be translated</p>
</li>
<li><dl class="first docutils">
<dt><strong>state</strong> &#8212; a structure containing information about the</dt>
<dd><p class="first last">current proccessing state of the mathematics
(internal use)</p>
</dd>
</dl>
</li>
</ul>
</td>
</tr>
@ -157,6 +211,28 @@ of the various types from one another.</p>
</table>
</dd></dl>
<dl class="method">
<dt>
<tt class="descname">needsUpdate</tt><big>(</big><em>jax</em><big>)</big></dt>
<dd><p>This implements the element jax&#8217;s <tt class="docutils literal"><span class="pre">needsUpdate()</span></tt> method, and
returns <tt class="docutils literal"><span class="pre">true</span></tt> if the <tt class="docutils literal"><span class="pre">jax</span></tt> needs to be rerendered (i.e., the
text has changed), and <tt class="docutils literal"><span class="pre">false</span></tt> otherwise.</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">Perameters :</th><td class="field-body"><ul class="first simple">
<li><strong>jax</strong> &#8212; the element jax to be checked</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">true</span></tt> if the jax&#8217;s text has changed, <tt class="docutils literal"><span class="pre">false</span></tt> otherwise</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
</div>
@ -210,12 +286,12 @@ of the various types from one another.</p>
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >The MathJax API</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The Base Jax Class &mdash; MathJax v1.1 documentation</title>
<title>The Base Jax Class &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">The MathJax API</a> &raquo;</li>
</ul>
</div>
@ -119,41 +119,15 @@ jax. These can be modified by the author by including a
configuration subsection for the specific jax in question.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">JAXFILE: &quot;jax.js&quot;</tt></dt>
<dd><p>The name of the file that contains the main code for the jax.</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">Process</tt><big>(</big><em>script</em><big>)</big></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">&lt;script&gt;</span></tt>. Its
default action is to start loading the jax&#8217;s <tt class="docutils literal"><span class="pre">jax.js</span></tt> file, and
redefine itself to simply return the callback for the load operation
(so that further calls to it will cause the processing to wait for the
callback). Once the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file has loaded, this method is
replaced by the jax&#8217;s <a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method, so that subsequent calls
to <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> will perform the appropriate translation.</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> &#8212; reference to the DOM <tt class="docutils literal"><span class="pre">&lt;script&gt;</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="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>
@ -161,7 +135,7 @@ to <a class="reference internal" href="hub.html#Process" title="Process"><tt cla
<tt class="docutils literal"><span class="pre">jax.js</span></tt> file when it is loaded. It should perform the translation
action for the specific jax. For an input jax, it should return the
<cite>ElementJax</cite> object that it created. 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 is
never called directly by MathJax; during the <a class="reference internal" href="ajax.html#loadComplete" title="loadComplete"><tt class="xref py py-meth docutils literal"><span class="pre">loadComplete()</span></tt></a>
never called directly by MathJax; during the <tt class="docutils literal"><span class="pre">loadComplete()</span></tt>
call, this function is copied to the <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> method, and is
called via that name. The default <a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method throws an
error indicating that 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 was not
@ -249,6 +223,9 @@ following:</p>
<li>Post the &#8220;[name] Jax Startup&#8221; message to the startup signal.</li>
<li>Perform the jax&#8217;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 &#8220;[name] Jax Ready&#8221; message to the startup signal.</li>
<li>Copy the <tt class="docutils literal"><span class="pre">preTranslate</span></tt>, <tt class="docutils literal"><span class="pre">Translate</span></tt>, and
<tt class="docutils literal"><span class="pre">postTranslate</span></tt> functions to <tt class="docutils literal"><span class="pre">preProcess</span></tt>, <tt class="docutils literal"><span class="pre">Process</span></tt>,
and <tt class="docutils literal"><span class="pre">postProcess</span></tt>.</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>
@ -313,12 +290,12 @@ isn&#8217;t called until those files are completely loaded.</p>
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >The MathJax API</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax.Message Object &mdash; MathJax v1.1 documentation</title>
<title>The MathJax.Message Object &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">The MathJax API</a> &raquo;</li>
</ul>
</div>
@ -272,12 +272,12 @@ newlines. This is used in debugging MathJax operations.</p>
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >The MathJax API</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax Object-Oriented Programming Model &mdash; MathJax v1.1 documentation</title>
<title>The MathJax Object-Oriented Programming Model &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="The MathJax API" href="index.html" />
<link rel="next" title="Describing HTML snippets" href="../HTML-snippets.html" />
<link rel="prev" title="The Base Jax Class" href="jax.html" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">The MathJax API</a> &raquo;</li>
</ul>
</div>
@ -341,12 +341,12 @@ wrapping the <cite>def</cite> for the <a class="reference internal" href="#Subcl
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >The MathJax API</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax.OutputJax Class &mdash; MathJax v1.1 documentation</title>
<title>The MathJax.OutputJax Class &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">The MathJax API</a> &raquo;</li>
</ul>
</div>
@ -96,29 +96,121 @@ that class.</p>
<dd><p>The directory where the jax files are stored (e.g., <tt class="docutils literal"><span class="pre">&quot;[MathJax]/jax/output/HTML-CSS&quot;</span></tt>);</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">fontDir</tt></dt>
<dd><p>The directory where the fonts are stored (e.g., <tt class="docutils literal"><span class="pre">&quot;[MathJax]/fonts&quot;</span></tt>)</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">imageDir</tt></dt>
<dd><p>The directory where MathJax images are found (e.g. <tt class="docutils literal"><span class="pre">&quot;[MathJax]/images&quot;</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 id="preProcess">
<tt class="descname">preProcess</tt><big>(</big><em>state</em><big>)</big><a class="headerlink" href="#preProcess" title="Permalink to this definition"></a></dt>
<dd><p>This is called by <tt class="docutils literal"><span class="pre">MathJax.Hub</span></tt> to ask the output processor to
prepare to process math scripts. Its default action is to start
loading the jax&#8217;s <tt class="docutils literal"><span class="pre">jax.js</span></tt> file, and redefine itself to simply
return the callback for the load operation (so that further calls
to it will cause the processing to wait for the callback).</p>
<p>Once the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file has loaded, this method is replaced by
the jax&#8217;s <a class="reference internal" href="#preTranslate" title="preTranslate"><tt class="xref py py-meth docutils literal"><span class="pre">preTranslate()</span></tt></a> method, so that subsequent calls
to <a class="reference internal" href="#preProcess" title="preProcess"><tt class="xref py py-meth docutils literal"><span class="pre">preProcess()</span></tt></a> will perform the appropriate translation.</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>state</strong> &#8212; a structure containing information about the</dt>
<dd><p class="first last">current proccessing state of the mathematics</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="preTranslate">
<tt class="descname">preTranslate</tt><big>(</big><em>state</em><big>)</big><a class="headerlink" href="#preTranslate" title="Permalink to this definition"></a></dt>
<dd><p>This routine replaces <a class="reference internal" href="#preProcess" title="preProcess"><tt class="xref py py-meth docutils literal"><span class="pre">preProcess()</span></tt></a> above when the jax&#8217;s
<tt class="docutils literal"><span class="pre">jax.js</span></tt> file is loaded. It is called by <tt class="docutils literal"><span class="pre">MathJax.Hub</span></tt> to ask
the output processor to prepare to process math scripts. (For
example, the HTML-CSS output jax uses this to determine em-sizes
for all the mathematics at once, to minimize page reflows that
slow down Internet Explorer.)</p>
<p>The routine can use <tt class="docutils literal"><span class="pre">state.jax[this.id]</span></tt> to obtain the array of
element jax that are to be processed. The output jax can use the
<tt class="docutils literal"><span class="pre">state</span></tt> variable to maintain its own state information, but
any properties that it adds to the variable should have a prefix
that is the output jax&#8217;s ID. For example, the HTML-CSS output jax
might use <tt class="docutils literal"><span class="pre">state.HTMLCSSlast</span></tt> to keep track of the last equation
it processed, or could add <tt class="docutils literal"><span class="pre">state.HTMLCSS</span> <span class="pre">=</span> <span class="pre">{...}</span></tt> to create an
object of its own within the state variable.</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>state</strong> &#8212; a structure containing information about the</dt>
<dd><p class="first last">current proccessing state of the mathematics</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>
<tt class="descname">Translate</tt><big>(</big><em>script</em><big>)</big></dt>
<tt class="descname">Translate</tt><big>(</big><em>script</em>, <em>state</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 throws an error indicating that <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> hasn&#8217;t been
redefined, so when the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file loads, it should override the
defined, so 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.</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
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&#8217;s <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tag.</p>
document near the jax&#8217;s <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tag. The output jax can use
the <tt class="docutils literal"><span class="pre">state</span></tt> variable to maintain information about its
processing state, but see <a class="reference internal" href="#preTranslate" title="preTranslate"><tt class="xref py py-meth docutils literal"><span class="pre">preTranslate()</span></tt></a> above for naming
conventions for properties that are added.</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> &#8212; the <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> element to be translated</li>
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first">
<li><p class="first"><strong>script</strong> &#8212; the <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> element to be translated</p>
</li>
<li><dl class="first docutils">
<dt><strong>state</strong> &#8212; a structure containing information about the</dt>
<dd><p class="first last">current proccessing state of the mathematics</p>
</dd>
</dl>
</li>
</ul>
</td>
</tr>
@ -129,6 +221,39 @@ document near the jax&#8217;s <tt class="docutils literal"><span class="pre">&lt
</table>
</dd></dl>
<dl class="method">
<dt id="postTranslate">
<tt class="descname">postTranslate</tt><big>(</big><em>state</em><big>)</big><a class="headerlink" href="#postTranslate" title="Permalink to this definition"></a></dt>
<dd><p>This routines is called by <tt class="docutils literal"><span class="pre">MathJax.Hub</span></tt> when the translation
of math elements is complete, and can be used by the output
processor to finalize any actions that it needs to complete.
(For example, making the mathematics visible, or forcing a reflow
of the page.)</p>
<p>The routine can use <tt class="docutils literal"><span class="pre">state.jax[this.id]</span></tt> to obtain the array of
element jax that were processed, or can use the <tt class="docutils literal"><span class="pre">state</span></tt> variable
to store its own state information (see <a class="reference internal" href="#preProcess" title="preProcess"><tt class="xref py py-meth docutils literal"><span class="pre">preProcess()</span></tt></a>
above for caveats about naming 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">
<li><dl class="first docutils">
<dt><strong>state</strong> &#8212; a structure containing information about the</dt>
<dd><p class="first last">current proccessing state of the mathematics</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>
<tt class="descname">Register</tt><big>(</big><em>mimetype</em><big>)</big></dt>
@ -175,6 +300,88 @@ tag associated with the element jax.</p>
</table>
</dd></dl>
<p>If an output jax wants its output to handle the contextual menu item
and zooming, then it needs to tie into the event-handling code
(<cite>MathEvents</cite>) and the zoom-handling code (<cite>MathZoom</cite>). That requires
the following methods.</p>
<dl class="method">
<dt id="getJaxFromMath">
<tt class="descname">getJaxFromMath</tt><big>(</big><em>math</em><big>)</big><a class="headerlink" href="#getJaxFromMath" title="Permalink to this definition"></a></dt>
<dd><p>This is called by the event-handling code (<cite>MathEvents</cite>) to get
the element jax associated with the DOM element that caused an
event to occur. The output jax will have attached event handlers
to some DOM element that is part of its output, and the
<cite>MathEvents</cite> code uses this routine to map back to the jax
associated with that output.</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>math</strong> &#8212; a DOM element that triggered a DOM event</dt>
<dd><p class="first last">(e.g., a mouse click)</p>
</dd>
</dl>
</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the <cite>ElementJax</cite> structure associated with the DOM element</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="Zoom">
<tt class="descname">Zoom</tt><big>(</big><em>jax</em>, <em>span</em>, <em>math</em>, <em>Mw</em>, <em>Mh</em><big>)</big><a class="headerlink" href="#Zoom" title="Permalink to this definition"></a></dt>
<dd><p>This routine is called by the zoom-handling code (<cite>MathZoom</cite>)
when an expression has received its zoom trigger event (e.g., a
double-click). The <tt class="docutils literal"><span class="pre">jax</span></tt> is the math that needs to be zoomed,
<tt class="docutils literal"><span class="pre">span</span></tt> is a <tt class="docutils literal"><span class="pre">&lt;span&gt;</span></tt> element in which the zoomed version of
the math should be placed, <tt class="docutils literal"><span class="pre">math</span></tt> is the DOM element that
received the zoom trigger event, and <tt class="docutils literal"><span class="pre">Mw</span></tt> and <tt class="docutils literal"><span class="pre">Mh</span></tt> are the
maximum width and height allowed for the zoom box (the <tt class="docutils literal"><span class="pre">span</span></tt>).</p>
<p>The return value is an object with the following properties:</p>
<ul>
<li><dl class="first docutils">
<dt><tt class="docutils literal"><span class="pre">Y</span></tt> &#8212; the vertical offset from the top of the <tt class="docutils literal"><span class="pre">span</span></tt> to</dt>
<dd><p class="first last">the baseline of the mathematics</p>
</dd>
</dl>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">mW</span></tt> &#8212; the width of the original mathematics element</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">mH</span></tt> &#8212; the height of the original mathematics element</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">zW</span></tt> &#8212; the width of the zoomed math</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">zH</span></tt> &#8212; the height of the zoomed math</p>
</li>
</ul>
<p>All of these values are in pixels.</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> &#8212; the jax to be zoomed</li>
<li><strong>span</strong> &#8212; the <tt class="docutils literal"><span class="pre">&lt;span&gt;</span></tt> in which to place the zoomed math</li>
<li><strong>math</strong> &#8212; the DOM element generating the zoom event</li>
<li><strong>Mw</strong> &#8212; the maximum width of the zoom box</li>
<li><strong>Mh</strong> &#8212; the maximum height of the zoom box</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">a structure as described above</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
</div>
@ -228,12 +435,12 @@ tag associated with the element jax.</p>
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >The MathJax API</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax.Callback.Queue Class &mdash; MathJax v1.1 documentation</title>
<title>The MathJax.Callback.Queue Class &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">The MathJax API</a> &raquo;</li>
</ul>
</div>
@ -231,12 +231,12 @@ it has been waiting for a command to complete.</p>
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >The MathJax API</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax.Callback.Signal Class &mdash; MathJax v1.1 documentation</title>
<title>The MathJax.Callback.Signal Class &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">The MathJax API</a> &raquo;</li>
</ul>
</div>
@ -319,12 +319,12 @@ message is posted to the signal.</p>
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >The MathJax API</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax variable &mdash; MathJax v1.1 documentation</title>
<title>The MathJax variable &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">The MathJax API</a> &raquo;</li>
</ul>
</div>
@ -70,7 +70,7 @@ code, the onload handler, the browser data, and so forth.</p>
<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
stylesheets. Most of the code that causes MathJax to
operate asynchronously is handled here.</p>
</dd></dl>
@ -103,6 +103,13 @@ For example, the <cite>tex2jax</cite> preprocessor creates
<tt class="docutils literal"><span class="pre">MathJax.Extension.tex2jax</span></tt> for its code and variables.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">MathJax.Menu</tt></dt>
<dd><p>Initially null, this is where the MathJax contextual menu is
stored, when <tt class="docutils literal"><span class="pre">extensions/MathMenu.js</span></tt> is loaded.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">MathJax.Object</tt></dt>
@ -142,7 +149,13 @@ itself as <tt class="docutils literal"><span class="pre">MathJax.ElementJax.mml<
<dl class="describe">
<dt>
<tt class="descname">MathJax.version</tt></dt>
<dd><p>The version number of the MathJax library.</p>
<dd><p>The version number of the MathJax library as a whole.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">MathJax.fileversion</tt></dt>
<dd><p>The version number of the <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> file specifically.</p>
</dd></dl>
<dl class="describe">
@ -205,12 +218,12 @@ perform typesetting actions (and is <tt class="docutils literal"><span class="pr
<li class="right" >
<a href="index.html" title="The MathJax API"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >The MathJax API</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

213
docs/html/asciimath.html Normal file
View File

@ -0,0 +1,213 @@
<!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 AsciiMath Support &mdash; MathJax v2.0 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: '2.0',
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 v2.0 documentation" href="index.html" />
<link rel="next" title="MathJax Output Formats" href="output.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="output.html" title="MathJax Output Formats"
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 v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="mathjax-asciimath-support">
<span id="asciimath-support"></span><h1>MathJax AsciiMath Support<a class="headerlink" href="#mathjax-asciimath-support" title="Permalink to this headline"></a></h1>
<p>The support for <a class="reference internal" href="glossary.html#term-asciimath"><em class="xref std std-term">AsciiMath</em></a> in MathJax consists of two parts:
the <cite>asciimath2jax</cite> preprocessor, and the <cite>AsciiMath</cite> input processor.
The first of these looks for mathematics within your web page
(indicated by delimiters like <tt class="docutils literal"><span class="pre">`...`</span></tt>) and marks the mathematics for
later processing by MathJax. The AsciiMath input processor is what
converts the AsciiMath notation into MathJax&#8217;s internal format, where
one of MathJax&#8217;s output processors then displays it in the web page.</p>
<p>The AsciiMath input jax actually includes a copy of Peter Jipsen&#8217;s
<tt class="docutils literal"><span class="pre">ASCIIMathML.js</span></tt> file (see the <a class="reference external" href="http://www1.chapman.edu/~jipsen/mathml/asciimath.html">AsciiMath home page</a> for
details), and is included by permission of the author. This means
that the results of MathJax&#8217;s AsciiMath processing should be the same
as using the actual <tt class="docutils literal"><span class="pre">ASCIIMathML.js</span></tt> package (at least as far as the
MathML that it generates is concerned). Thanks go to David Lippman
for writing the initial version of the AsciiMath preprocessor and
input jax.</p>
<p>The <cite>asciimath2jax</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/asciimath2jax.html#configure-asciimath2jax"><em>asciimath2jax configuration options</em></a> section for
details on how to customize the action of <cite>asciimath2jax</cite>.</p>
<p>The AsciiMath input processor handles conversion of your mathematical
notation into MathJax&#8217;s internal format (which is essentially MathML).
The AsciiMath input processor has few configuration options (see the
<a class="reference internal" href="options/AsciiMath.html#configure-asciimath"><em>AsciiMath options</em></a> section for details).</p>
<p>The AsciiMath input jax handles only the original ASCIIMathML notation
(from ASCIIMathML v1.4.7), not the extened LaTeXMathML notation added
in version 2.0 of ASCIIMathML, though the AsciiMath input jax does
expose the tables that define the symbols that AsciiMath processes,
and so it would be possible to extend them to include additional
symbols. In general, it is probably better to use MathJax&#8217;s <a class="reference internal" href="tex.html#tex-support"><em>TeX
input jax</em></a> to handle LaTeX notation instead.</p>
<div class="section" id="asciimath-delimiters">
<h2>AsciiMath delimiters<a class="headerlink" href="#asciimath-delimiters" title="Permalink to this headline"></a></h2>
<p>By default, the <cite>asciimath2jax</cite> preprocessor defines the back-tick
(<tt class="docutils literal"><span class="pre">`</span></tt>) as the delimiters for mathematics in AsciiMath format. It
does <strong>not</strong> define <tt class="docutils literal"><span class="pre">$...$</span></tt> as math delimiters. 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, &#8221;... the cost is $2.50 for the
first one, and $2.00 for each additional one ...&#8221; would cause the
phrase &#8220;2.50 for the first one, and&#8221; to be treated as mathematics
since it falls between dollar signs. For this reason, if you want to
use single-dollars for AsciiMath notation, you must enable that
explicitly in your configuration:</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">asciimath2jax</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">delimiters</span><span class="o">:</span> <span class="p">[[</span><span class="s1">&#39;$&#39;</span><span class="p">,</span><span class="s1">&#39;$&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;`&#39;</span><span class="p">,</span><span class="s1">&#39;`&#39;</span><span class="p">]]</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>Note that the dollar signs are frequently used as a delimiter for
mathematics in the <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a> format, and you can not enable the
dollar-sign delimiter for both. It is probably best to leave dollar
signs for TeX notation.</p>
<p>See the <tt class="docutils literal"><span class="pre">config/default.js</span></tt> file, or the <a class="reference internal" href="options/asciimath2jax.html#configure-asciimath2jax"><em>asiimath2jax
configuration options</em></a> page, for additional
configuration parameters that you can specify for the <cite>asciimath2jax</cite>
preprocessor, which is the component of MathJax that identifies
AsciiMath notation within the page.</p>
</div>
<div class="section" id="asciimath-in-html-documents">
<h2>AsciiMath in HTML documents<a class="headerlink" href="#asciimath-in-html-documents" title="Permalink to this headline"></a></h2>
<p>The AsciiMath syntax is descibed in the <a class="reference external" href="http://www1.chapman.edu/~jipsen/mathml/asciimathsyntax.html">ASCIIMathML syntax page</a>.</p>
<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">&lt;BR&gt;</span></tt>) as AsciiMath-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&#8217;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">&lt;</span></tt> and <tt class="docutils literal"><span class="pre">&gt;</span></tt>), and
ampersands (<tt class="docutils literal"><span class="pre">&amp;</span></tt>), which have special meaning to the browsers. For
example,</p>
<div class="highlight-html"><pre>... when `x&lt;y` we have ...</pre>
</div>
<p>will cause a problem, because the brower will think <tt class="docutils literal"><span class="pre">&lt;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">&gt;</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 &#8220;<tt class="docutils literal"><span class="pre">we</span>
<span class="pre">have</span> <span class="pre">...</span></tt>&#8221; will not be displayed because the browser thinks it is
part of the tag starting at <tt class="docutils literal"><span class="pre">&lt;y</span></tt>. This is one indication you can
use to spot this problem; 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-html"><pre>... when `x &lt; y` we have ...</pre>
</div>
<p>should work. Alternatively, you can use the HTML entities <tt class="docutils literal"><span class="pre">&amp;lt;</span></tt>,
<tt class="docutils literal"><span class="pre">&amp;gt;</span></tt> and <tt class="docutils literal"><span class="pre">&amp;amp;</span></tt> to encode these characters so that the browser
will not interpret them, but MathJax will. E.g.,</p>
<div class="highlight-html"><div class="highlight"><pre>... when `x <span class="ni">&amp;lt;</span> y` we have ...
</pre></div>
</div>
<p>Keep in mind that the browser interprets your text before MathJax
does.</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 AsciiMath Support</a><ul>
<li><a class="reference internal" href="#asciimath-delimiters">AsciiMath delimiters</a></li>
<li><a class="reference internal" href="#asciimath-in-html-documents">AsciiMath in HTML documents</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="output.html"
title="next chapter">MathJax Output Formats</a></p>
<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="mathml.html" title="MathJax MathML Support"
>previous</a> |</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Using Callbacks &mdash; MathJax v1.1 documentation</title>
<title>Using Callbacks &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="synchronize.html" accesskey="U">Synchronizing your code with MathJax</a> &raquo;</li>
</ul>
</div>
@ -223,10 +223,10 @@ you simply passed the object&#8217;s method to <tt class="docutils literal"><spa
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&#8217;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>
when it is called, some versions of Internet Explorer do not implement
that feature, so you can&#8217;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">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">&quot;x = &quot;</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">&quot;Hello World!&quot;</span><span class="p">]),</span><span class="mi">500</span><span class="p">);</span>
</pre></div>
@ -290,12 +290,12 @@ schedules it to be called in half a second.</p>
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="synchronize.html" >Synchronizing your code with MathJax</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax Community &mdash; MathJax v1.1 documentation</title>
<title>The MathJax Community &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,8 +22,8 @@
<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="Whats New in MathJax v1.1" href="whats-new.html" />
<link rel="top" title="MathJax v2.0 documentation" href="index.html" />
<link rel="next" title="Whats New in MathJax v2.0" href="whats-new-2.0.html" />
<link rel="prev" title="MathJax Output Formats" href="output.html" />
</head>
<body>
@ -35,12 +35,12 @@
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="whats-new.html" title="Whats New in MathJax v1.1"
<a href="whats-new-2.0.html" title="Whats New in MathJax v2.0"
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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -110,8 +110,8 @@ our <a class="reference external" href="http://www.mathjax.org/community/mathjax
<p class="topless"><a href="output.html"
title="previous chapter">MathJax Output Formats</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="whats-new.html"
title="next chapter">What&#8217;s New in MathJax v1.1</a></p>
<p class="topless"><a href="whats-new-2.0.html"
title="next chapter">What&#8217;s New in MathJax v2.0</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
@ -136,16 +136,16 @@ our <a class="reference external" href="http://www.mathjax.org/community/mathjax
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="whats-new.html" title="Whats New in MathJax v1.1"
<a href="whats-new-2.0.html" title="Whats New in MathJax v2.0"
>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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Common Configurations &mdash; MathJax v1.1 documentation</title>
<title>Common Configurations &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="index.html" />
<link rel="next" title="Configuration Objects" href="options/index.html" />
<link rel="prev" title="Loading and Configuring MathJax" href="configuration.html" />
</head>
@ -40,7 +40,7 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -60,32 +60,79 @@ it via</p>
</pre></div>
</div>
<p>where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is the URL to the MathJax directory on your
server or hard disk.</p>
<p>The remaining files are combined configuration files that include not just
configuration parameters but also the files that MathJax would need to
load for those configurations. This means MathJax will have to load fewer
files, and since each file access requires establishing connections over
the network, it can be better to load one larger file than several smaller
ones. See <a class="reference internal" href="configuration.html#loading"><em>Loading and Configuring MathJax</em></a> for more
details about how to load configurations, and how to modify the parameters
for a configuration file.</p>
server or hard disk. If you are using MathJax from the CDN, you can
view the contents of <a class="reference external" href="http://cdn.mathjax.org/mathjax/latest/config/default.js">default.js</a> as a
reference, but you will not be able to edit the CDN copy. It is
possible to use the CDN copy of MathJax with your own configuration
file, however; see <a class="reference internal" href="configuration.html#local-config-files"><em>Using a Local Configuration File with the CDN</em></a> for details.</p>
<p>The remaining files in the <a class="reference external" href="http://cdn.mathjax.org/mathjax/latest/config/">MathJax/config</a> directory are
combined configuration files that include not just configuration
parameters but also the files that MathJax would need to load for
those configurations. This means MathJax will have to load fewer
files, and since each file access requires establishing connections
over the network, it can be faster to load one larger file than
several smaller ones. See <a class="reference internal" href="configuration.html#loading"><em>Loading and Configuring MathJax</em></a> for more details about how to load configurations, and how
to modify the parameters for a configuration file.</p>
<p>The following sections describe the contents of the combined configuration
files. Each comes in two flavors: a standard version and a &#8220;full&#8221; version.
The standard version simply defines the output processor(s) that are part
of the configuration, but doesn&#8217;t load the code that implements the output
processor; the full version loads the complete output processors, so
processor. The full version loads the complete output processors, so
everything that MathJax needs for the page should be loaded up front, and
there will be no delay once the page is ready to be processed. To obtain
the &#8220;full&#8221; version, add <tt class="docutils literal"><span class="pre">-full</span></tt> to the end of the configuration file
name.</p>
<div class="section" id="the-tex-mml-am-htmlormml-configuration-file">
<h2>The <tt class="docutils literal"><span class="pre">TeX-MML-AM_HTMLorMML</span></tt> configuration file<a class="headerlink" href="#the-tex-mml-am-htmlormml-configuration-file" title="Permalink to this headline"></a></h2>
<p>This configuration file is the most general of the pre-defined
configurations. It loads all the main MathJax components, including
the TeX, MathML, and AsciiMath preprocessors and input processors, the
AMSmath, AMSsymbols, noErrors, and noUndefined TeX extensions, both
the native MathML and HTML-with-CSS output processor definitions, and
the MathMenu and MathZoom extensions. It is equivalent to the
following configuration:</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">&quot;MMLorHTML.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;input/MathML&quot;</span><span class="p">,</span><span class="s2">&quot;input/AsciiMath&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">,</span><span class="s2">&quot;output/NativeMML&quot;</span><span class="p">],</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">,</span><span class="s2">&quot;mml2jax.js&quot;</span><span class="p">,</span><span class="s2">&quot;asciimath2jax.js&quot;</span><span class="p">,</span><span class="s2">&quot;MathMenu.js&quot;</span><span class="p">,</span><span class="s2">&quot;MathZoom.js&quot;</span><span class="p">],</span>
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;AMSmath.js&quot;</span><span class="p">,</span><span class="s2">&quot;AMSsymbols.js&quot;</span><span class="p">,</span><span class="s2">&quot;noErrors.js&quot;</span><span class="p">,</span><span class="s2">&quot;noUndefined.js&quot;</span><span class="p">]</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>In addition, it loads the mml Element Jax, the TeX, MathML, and
AsciiMath input jax main code (not just the definition files), as well
as the <cite>toMathML</cite> extension, which is used by the Show Source option
in the MathJax contextual menu. The <cite>-full</cite> version also loads both the
HTML-CSS and NativeMML output jax main code, plus the HTML-CSS
<cite>mtable</cite> extension, which is normally loaded on demand.</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.
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.
See the <a class="reference internal" href="options/asciimath2jax.html#configure-asciimath2jax"><em>asciimath2jax configuration</em></a> section for
other configuration options for the <tt class="docutils literal"><span class="pre">asciimath2jax</span></tt> preprocessor, and the
<a class="reference internal" href="options/AsciiMath.html#configure-asciimath"><em>AsciiMath input jax configuration</em></a> section for
options that control the AsciiMath input processor.
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="the-tex-ams-mml-htmlormml-configuration-file">
<h2>The <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt> configuration file<a class="headerlink" href="#the-tex-ams-mml-htmlormml-configuration-file" title="Permalink to this headline"></a></h2>
<p>This configuration file is the most general of the pre-defined
configurations. It loads all the important MathJax components, including
<p>This configuration file is the most commonly used of the pre-defined
configurations. It loads all the main MathJax components, including
the TeX and MathML preprocessors and input processors, the AMSmath,
AMSsymbols, noErrors, and noUndefined TeX extensions, both the native
MathML and HTML-with-CSS output processor definitions, and the MathMenu and
MathZoom extensions. It is equivalent to the following configuration:</p>
MathML and HTML-with-CSS output processor definitions, and the
MathMenu and MathZoom extensions. It is equivalent to the following
configuration:</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">&quot;MMLorHTML.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;input/MathML&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">,</span><span class="s2">&quot;output/NativeMML&quot;</span><span class="p">],</span>
@ -96,12 +143,12 @@ MathZoom extensions. It is equivalent to the following configuration:</p>
<span class="p">});</span>
</pre></div>
</div>
<p>In addition, it loads the mml Element Jax, the TeX and MathML input jax
main code (not just the definition files), as well as the <cite>toMathML</cite>
extension, which is used by the Show Source option in the MathJax
contextual menu. The full version also loads both the HTML-CSS and
NativeMML output jax main code, plus the HTML-CSS <cite>mtable</cite> extension, which
is normally loaded on demand.</p>
<p>In addition, it loads the mml Element Jax, the TeX and MathML input
jax main code (not just the definition files), as well as the
<cite>toMathML</cite> extension, which is used by the Show Source option in the
MathJax contextual menu. The <tt class="docutils literal"><span class="pre">-full</span></tt> version also loads both the
HTML-CSS and NativeMML output jax main code, plus the HTML-CSS
<cite>mtable</cite> extension, which is normally loaded on demand.</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
@ -138,7 +185,7 @@ extensions. It is equivalent to the following configuration:</p>
</div>
<p>In addition, it loads the mml Element Jax and the TeX input jax main code
(not just the definition file), as well as the <cite>toMathML</cite> extension, which
is used by the Show Source option in the MathJax contextual menu. The full
is used by the Show Source option in the MathJax contextual menu. The <tt class="docutils literal"><span class="pre">-full</span></tt>
version also loads the HTML-CSS output jax main code, plus the HTML-CSS
<cite>mtable</cite> extension, which is normally loaded on demand.</p>
<p>See the <a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration</em></a> section for
@ -152,7 +199,7 @@ information on the HTML-CSS output processor.</p>
<h2>The <tt class="docutils literal"><span class="pre">MML_HTMLorMML</span></tt> configuration file<a class="headerlink" href="#the-mml-htmlormml-configuration-file" title="Permalink to this headline"></a></h2>
<p>This configuration file is for sites that only use MathML format for their
mathematics. It will use MathML output in browsers where that is
supported, and HTML-CSS output otherwise. The user can still use the
supported well, and HTML-CSS output otherwise. The user can still use the
MathJax contextual menu to select the other output format if they desire.</p>
<p>This file includes all the important MathJax components for MathML input
and output, including the <cite>mml2jax</cite> preprocessor and MathML input jax, the
@ -168,7 +215,7 @@ and MathZoom extensions. It is equivalent to the following configuration:</p>
<p>In addition, it loads the mml Element Jax and the MathML input jax main
code (not just the definition file), as well as the <cite>toMathML</cite> extension,
which is used by the Show Source option in the MathJax contextual menu.
The full version also loads both the HTML-CSS and NativeMML output jax main
The <tt class="docutils literal"><span class="pre">-full</span></tt> version also loads both the HTML-CSS and NativeMML output jax main
code files, plus the HTML-CSS <cite>mtable</cite> extension, which is normally loaded
on demand.</p>
<p>See the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration</em></a> section for
@ -180,12 +227,86 @@ 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="the-am-htmlormml-configuration-file">
<h2>The <tt class="docutils literal"><span class="pre">AM_HTMLorMML</span></tt> configuration file<a class="headerlink" href="#the-am-htmlormml-configuration-file" title="Permalink to this headline"></a></h2>
<p>This configuration file is for sites that only use AsciiMath format for their
mathematics. It will use MathML output in browsers where that is
supported well, and HTML-CSS output otherwise. The user can still use the
MathJax contextual menu to select the other output format if they desire.</p>
<p>This file includes all the important MathJax components for AsciiMath
input and output, including the <cite>asciimath2jax</cite> preprocessor and
AsciiMath input jax, the NativeMML and HTML-CSS output processor
definition files, and the MathMenu and MathZoom extensions. It is
equivalent to the following configuration:</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">&quot;MMLorHTML.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/AsciiMath&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">,</span><span class="s2">&quot;output/NativeMML&quot;</span><span class="p">],</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;asciimath2jax.js&quot;</span><span class="p">,</span><span class="s2">&quot;MathMenu.js&quot;</span><span class="p">,</span><span class="s2">&quot;MathZoom.js&quot;</span><span class="p">]</span>
<span class="p">});</span>
</pre></div>
</div>
<p>In addition, it loads the mml Element Jax and the TeX input jax main code
(not just the definition file), as well as the <cite>toMathML</cite> extension, which
is used by the Show Source option in the MathJax contextual menu. The <tt class="docutils literal"><span class="pre">-full</span></tt>
version also loads the HTML-CSS output jax main code, plus the HTML-CSS
<cite>mtable</cite> extension, which is normally loaded on demand.</p>
<p>See the <a class="reference internal" href="options/asciimath2jax.html#configure-asciimath2jax"><em>asciimath2jax configuration</em></a>
section for other configuration options for the <tt class="docutils literal"><span class="pre">asciimath2jax</span></tt>
preprocessor, and the <a class="reference internal" href="options/AsciiMath.html#configure-asciimath"><em>AsciiMath input jax configuration</em></a> section for options that control the AsciiMath
input processor. See <a class="reference internal" href="output.html#output-formats"><em>MathJax Output Formats</em></a>
for more information on the HTML-CSS and NativeMML 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="the-tex-ams-mml-svg-configuration-file">
<h2>The <tt class="docutils literal"><span class="pre">TeX-AMS-MML_SVG</span></tt> configuration file<a class="headerlink" href="#the-tex-ams-mml-svg-configuration-file" title="Permalink to this headline"></a></h2>
<p>This configuration file is the same as <cite>TeX-AMS-MML_HTMLorMML</cite> except
that it uses the SVG output renderer rather than the NativeMML or
HTML-CSS ones. It loads all the main MathJax components, including
the TeX and MathML preprocessors and input processors, the AMSmath,
AMSsymbols, noErrors, and noUndefined TeX extensions, the SVG output
processor definitions, and the MathMenu and MathZoom extensions. It
is equivalent to the following configuration:</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">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;input/MathML&quot;</span><span class="p">,</span><span class="s2">&quot;output/SVG&quot;</span><span class="p">],</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">,</span><span class="s2">&quot;mml2jax.js&quot;</span><span class="p">,</span><span class="s2">&quot;MathMenu.js&quot;</span><span class="p">,</span><span class="s2">&quot;MathZoom.js&quot;</span><span class="p">],</span>
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;AMSmath.js&quot;</span><span class="p">,</span><span class="s2">&quot;AMSsymbols.js&quot;</span><span class="p">,</span><span class="s2">&quot;noErrors.js&quot;</span><span class="p">,</span><span class="s2">&quot;noUndefined.js&quot;</span><span class="p">]</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>In addition, it loads the mml Element Jax, the TeX and MathML input
jax main code (not just the definition files), as well as the
<cite>toMathML</cite> extension, which is used by the Show Source option in the
MathJax contextual menu. The <tt class="docutils literal"><span class="pre">-full</span></tt> version also loads both the
SVG output jax main code, plus the SVG <cite>mtable</cite> extension, which
is normally loaded on demand.</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.
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.
See <a class="reference internal" href="output.html#output-formats"><em>MathJax Output Formats</em></a> for more
information on the SVG output processor.</p>
</div>
<div class="section" id="the-accessible-configuration-file">
<h2>The <tt class="docutils literal"><span class="pre">Accessible</span></tt> configuration file<a class="headerlink" href="#the-accessible-configuration-file" title="Permalink to this headline"></a></h2>
<p>This configuration file is essentially the same as
<tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt> except that it includes options that are
designed for assistive technology, particularly for those with visual
challenges. It is equivalent to the following configuration:</p>
challenged. <em>This file is deprecated</em> since the controls that make
MathJax work with screen readers are now available in the MathJax
contextual menu, and so there is no need to set them in the
configuration file any longer. So you can use any of the other
pre-defined configurations and readers with special needs should be
able to change the MathJax settings themselves to be appropriate for
their software.</p>
<p>The Accessible configuration is equivalent to the following:</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">&quot;MMLorHTML.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;input/MathML&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">,</span><span class="s2">&quot;output/NativeMML&quot;</span><span class="p">],</span>
@ -193,20 +314,24 @@ challenges. It is equivalent to the following configuration:</p>
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;AMSmath.js&quot;</span><span class="p">,</span><span class="s2">&quot;AMSsymbols.js&quot;</span><span class="p">,</span><span class="s2">&quot;noErrors.js&quot;</span><span class="p">,</span><span class="s2">&quot;noUndefined.js&quot;</span><span class="p">]</span>
<span class="p">},</span>
<span class="nx">NativeMML</span><span class="o">:</span> <span class="p">{</span> <span class="nx">showMathMenuMSIE</span><span class="o">:</span> <span class="kc">false</span> <span class="p">},</span>
<span class="nx">menuSettings</span><span class="o">:</span> <span class="p">{</span> <span class="nx">zoom</span><span class="o">:</span> <span class="s2">&quot;Double-Click&quot;</span> <span class="p">},</span>
<span class="nx">menuSettings</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">zoom</span><span class="o">:</span> <span class="s2">&quot;Double-Click&quot;</span><span class="p">,</span>
<span class="nx">mpContext</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nx">mpMouse</span><span class="o">:</span> <span class="kc">true</span>
<span class="p">},</span>
<span class="nx">errorSettings</span><span class="o">:</span> <span class="p">{</span> <span class="nx">message</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;[Math Error]&quot;</span><span class="p">]</span> <span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>This turns off the MathJax contextual menu for Internet Explorer, since
it can interfere with some screen readers. It also sets the zoom trigger
<p>This turns off the MathJax contextual menu for IE when MathPlayer is
active, and passes mouse events on to MathPlayer to allow screen
readers full access to MathPlayer. It also sets the zoom trigger
to double-click, so that readers can see a larger version of the
mathematics but double-clicking on any equation.</p>
<p>In addition, it loads the mml Element Jax, the TeX and MathML input jax
main code (not just the definition files), as well as the <cite>toMathML</cite>
extension, which is used by the Show Source option in the MathJax
contextual menu. The full version also loads both the HTML-CSS and
contextual menu. The <tt class="docutils literal"><span class="pre">-full</span></tt> version also loads both the HTML-CSS and
NativeMML output jax main code, plus the HTML-CSS <cite>mtable</cite> extension, which
is normally loaded on demand.</p>
</div>
@ -221,9 +346,12 @@ is normally loaded on demand.</p>
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Common Configurations</a><ul>
<li><a class="reference internal" href="#the-tex-mml-am-htmlormml-configuration-file">The <tt class="docutils literal"><span class="pre">TeX-MML-AM_HTMLorMML</span></tt> configuration file</a></li>
<li><a class="reference internal" href="#the-tex-ams-mml-htmlormml-configuration-file">The <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt> configuration file</a></li>
<li><a class="reference internal" href="#the-tex-ams-html-configuration-file">The <tt class="docutils literal"><span class="pre">TeX-AMS_HTML</span></tt> configuration file</a></li>
<li><a class="reference internal" href="#the-mml-htmlormml-configuration-file">The <tt class="docutils literal"><span class="pre">MML_HTMLorMML</span></tt> configuration file</a></li>
<li><a class="reference internal" href="#the-am-htmlormml-configuration-file">The <tt class="docutils literal"><span class="pre">AM_HTMLorMML</span></tt> configuration file</a></li>
<li><a class="reference internal" href="#the-tex-ams-mml-svg-configuration-file">The <tt class="docutils literal"><span class="pre">TeX-AMS-MML_SVG</span></tt> configuration file</a></li>
<li><a class="reference internal" href="#the-accessible-configuration-file">The <tt class="docutils literal"><span class="pre">Accessible</span></tt> configuration file</a></li>
</ul>
</li>
@ -264,11 +392,11 @@ is normally loaded on demand.</p>
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Loading and Configuring MathJax &mdash; MathJax v1.1 documentation</title>
<title>Loading and Configuring MathJax &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="index.html" />
<link rel="next" title="Common Configurations" href="config-files.html" />
<link rel="prev" title="Installing and Testing MathJax" href="installation.html" />
</head>
@ -40,7 +40,7 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -89,14 +89,14 @@ typical invocation of MathJax would be</p>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>which loads MathJax with a configuration file that includes everything you
need in order to enter mathematics in either TeX, LaTeX, or MathML
notation, and produces output using MathML if the browser supports that,
or HTML-with-CSS otherwise. If you <strong>don&#8217;t</strong> load an explicit
configuration file, you will need to include an in-line configuration
block in order to tell MathJax how to read and display the mathematics on
your pages. See the section below on <a class="reference internal" href="#inline-config"><em>Using In-line Configuration
Options</em></a> for details.</p>
<p>which loads MathJax with a configuration file that includes everything
you need in order to enter mathematics in either TeX, LaTeX, or MathML
notation, and produces output using MathML if the browser supports
that well enough, or HTML-with-CSS otherwise. If you <strong>don&#8217;t</strong> load
an explicit configuration file, you will need to include an in-line
configuration block in order to tell MathJax how to read and display
the mathematics on your pages. See the section below on <a class="reference internal" href="#inline-config"><em>Using
In-line Configuration Options</em></a> for details.</p>
<p>It is best to load MathJax in the document&#8217;s <tt class="docutils literal"><span class="pre">&lt;head&gt;</span></tt> block, but it
is also possible to load MathJax into the <tt class="docutils literal"><span class="pre">&lt;body&gt;</span></tt> section, if
needed. If you do this, load it as early as possible, as
@ -111,7 +111,7 @@ been prepared, for example, via a <a class="reference external" href="http://www
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="loading-mathjax-from-the-cdn">
<span id="loading-cdn"></span><h2>Loading MathJax from the CDN<a class="headerlink" href="#loading-mathjax-from-the-cdn" title="Permalink to this headline"></a></h2>
<p>MathJax is now available as a web service from <tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt>, so you
<p>MathJax is available as a web service from <tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt>, so you
can obtain MathJax from there without needing to install it on your own
server. The CDN is part of a distributed &#8220;cloud&#8221; network, so it is
handled by servers around the world. That means that you should get access
@ -124,10 +124,11 @@ that your pages always use the same version of MathJax.</p>
get. The CDN has the following directory structure:</p>
<div class="highlight-sh"><div class="highlight"><pre>mathjax/ <span class="c"># project-name</span>
1.0-latest/
1.1-beta/ <span class="c"># temporary</span>
1.1-latest/ <span class="c"># the 1.1 release with any ciritical patches</span>
2.0-beta/ <span class="c"># temporary</span>
2.0-latest/ <span class="c"># the 2.0 release with any ciritical patches</span>
...
latest/ <span class="c"># the most current version (1.1-latest in this case)</span>
latest/ <span class="c"># the most current version (2.0-latest in this case)</span>
</pre></div>
</div>
<p>Each directory corresponds to an official MathJax release; however,
@ -135,9 +136,9 @@ hotfixes (urgent bug fixes) will be applied in each release branch as
necessary, even if new releases are not prepared. In other words,
<tt class="docutils literal"><span class="pre">1.1-latest</span></tt> will initially point to v1.1, but over time may be updated
with patches that would correspond to releases that might be numbers 1.1a,
1.1b, etc., even if such releases are not actually prepared for
distribution (they likely won&#8217;t be).</p>
<p>We may occasionally introduce directories for betas, as indicated above,
1.1b, etc., even if such releases are not actually packaged for
separate distribution (they likely won&#8217;t be).
We may occasionally introduce directories for betas, as indicated above,
but they will be temporary, and will be removed after the official
release.</p>
<p>To load from a particular release, use the directory for that release.
@ -145,13 +146,13 @@ For example,</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/1.1-latest/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>will load the stable v1.1 version, even if we release v1.2 or other later
<p>will load the stable v1.1 version, even after we release v2.0 or other later
versions, while</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>will always be the most current stable release, so it will go from v1.1 to
v1.2 automatically when that is released. Note that all the versions
v2.0 automatically when that is released. Note that all the versions
available on the CDN are stable versions; the development version is not
hosted on the CDN. (If you wish to use the development version of
MathJax, you will need to install your own copy; see <a class="reference internal" href="installation.html#installation"><em>Installing
@ -159,8 +160,8 @@ and Testing MathJax</em></a> for information on how to do that.)</p>
<p>The use of <tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt> is governed by its <a class="reference external" href="http://www.mathjax.org/download/mathjax-cdn-terms-of-service/">terms of service</a>, so be
sure to read that before linking to the MathJax CDN server.</p>
<p>If you wish to use the MathJax CDN but use your own configuration file
rather than one of the pre-defined ones, see the information at the end
of the <a class="reference internal" href="#config-files"><em>Using a configuration file</em></a> section below.</p>
rather than one of the pre-defined ones, see the information at the
end of the <a class="reference internal" href="#local-config-files"><em>Using a Local Configuration File</em></a> section below.</p>
</div>
<div class="section" id="configuring-mathjax">
<h2>Configuring MathJax<a class="headerlink" href="#configuring-mathjax" title="Permalink to this headline"></a></h2>
@ -170,7 +171,7 @@ used independently, or in combination. For example, you can load a main
pre-defined configuration file, but include in-line commands to
adjust the configuration to your needs.</p>
<p>Note that you must use at least one of these two forms of configuration.
Unlike earlier versions of MathJax, version 1.1 does not load a default
Unlike MathJax v1.0, version 1.1 and higher does not load a default
configuration file. If you have been using version 1.0&#8217;s
<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> for your configuration, you will need to load that
configuration file explicitly via a <tt class="docutils literal"><span class="pre">config</span></tt> parameter, as described
@ -191,15 +192,16 @@ describing them, which you can edit to suit your needs.</p>
<dl class="describe">
<dt>
<tt class="descname">TeX-AMS-MML_HTMLorMML.js</tt></dt>
<dd><p>Allows math to be specified in TeX, LaTeX, or MathML notation, with the
<cite>AMSmath</cite> and <cite>AMSsymbols</cite> packages included, producing output using
MathML if the browser supports it, and HTML-with-CSS otherwise.</p>
<dd><p>Allows math to be specified in <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a>, <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a>, or
<a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> notation, with the <cite>AMSmath</cite> and <cite>AMSsymbols</cite>
packages included, producing output using MathML if the browser
supports it sufficiently, and HTML-with-CSS otherwise.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">TeX-AMS_HTML.js</tt></dt>
<dd><p>Allows math to be specified in TeX or LaTeX notation, with the
<dd><p>Allows math to be specified 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> notation, with the
<cite>AMSmath</cite> and <cite>AMSsymbols</cite> packages included, and produces output
using the HTML-CSS output processor.</p>
</dd></dl>
@ -207,18 +209,34 @@ using the HTML-CSS output processor.</p>
<dl class="describe">
<dt>
<tt class="descname">MML_HTMLorMML.js</tt></dt>
<dd><p>Allows math to be specified using MathML notation, and produces MathML
output if the browser supports it, or HTML-CSS output otherwise.</p>
<dd><p>Allows math to be specified using <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> notation, and produces MathML
output if the browser supports it sufficiently, or HTML-CSS output otherwise.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">Accessible.js</tt></dt>
<dd><p>Essentially the same as <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt>, but with some
settings specified to make MathJax work better with assistive
technology (for the visually impaired). This includes setting the
zoom trigger to be a double-click, and removing the MathMenu in
Internet Explorer (which can interfere with some screen readers).</p>
<tt class="descname">AM_HTMLorMML.js</tt></dt>
<dd><p>Allows math to be specified using <a class="reference internal" href="glossary.html#term-asciimath"><em class="xref std std-term">AsciiMath</em></a> notation,
producing output in MathML if the browser supports it
sufficiently, or as HTML-with-CSS otherwise.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">TeX-AMS-MML_SVG.js</tt></dt>
<dd><p>Allows math to be specified in <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a>, <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a>, or
<a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> notation, with the <cite>AMSmath</cite> and <cite>AMSsymbols</cite>
packages included, producing output using SVG.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">TeX-MML-AM_HTMLorMML.js</tt></dt>
<dd><p>Allows math to be specified in <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a>, <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a>,
<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-asciimath"><em class="xref std std-term">AsciiMath</em></a> notation, with the <cite>AMSmath</cite>
and <cite>AMSsymbols</cite> packages included, producing output using MathML
if the browser supports it sufficiently, and HTML-with-CSS
otherwise.</p>
</dd></dl>
<p>The first of these is a file that you can edit to suit your needs. It
@ -241,7 +259,7 @@ the main code, and a &#8220;full&#8221; version, that also includes the complete
output processors. For example, with <tt class="docutils literal"><span class="pre">TeX-AMS_HTML.js</span></tt> and
<tt class="docutils literal"><span class="pre">TeX-AMS_HTML-full.js</span></tt>, the latter includes the complete HTML-CSS output
processor. The &#8220;full&#8221; configuration files are substantially larger (on
the order of 70KB), so you need to decide whether it is worth loading the
the order of 70KB more), so you need to decide whether it is worth loading the
full configuration for your pages.</p>
<p>If most of your pages include mathematics, then it is to your advantage to
load the full version, but if you are including MathJax in a theme file for
@ -278,8 +296,14 @@ can use</p>
</pre></div>
</div>
<p>to first load the main configuration, then the local modifications.</p>
<p>You can also load MathJax from the MathJax CDN server but use a configuration from
your own local server:</p>
</div>
<div class="section" id="using-a-local-configuration-file-with-the-cdn">
<span id="local-config-files"></span><h2>Using a local configuration file with the CDN<a class="headerlink" href="#using-a-local-configuration-file-with-the-cdn" title="Permalink to this headline"></a></h2>
<p>You can load MathJax from the MathJax CDN server but still use a
configuration from your own local server. For example, suppose you
have a configuration file called <tt class="docutils literal"><span class="pre">local.js</span></tt> on your own server, in a
directory called <tt class="docutils literal"><span class="pre">MathJax/config/local</span></tt>. Then you can load MathJax
from the CDN and still use your configuration file as follows:</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
<span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML,http://myserver.com/MathJax/config/local/local.js&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
@ -290,7 +314,7 @@ the complete URL to the local configuration file. Note that you also
have to edit the <a class="reference internal" href="api/ajax.html#loadComplete" title="loadComplete"><tt class="xref py py-meth docutils literal"><span class="pre">loadComplete()</span></tt></a> call that is at the bottom of
the configuration file to change it from
<tt class="docutils literal"><span class="pre">[MathJax]/config/local/local.js</span></tt> to the complete URL as you give it
in the <tt class="docutils literal"><span class="pre">config</span></tt> parameter:</p>
in the <tt class="docutils literal"><span class="pre">config</span></tt> parameter. In the example above, it would be</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">loadComplete</span><span class="p">(</span><span class="s2">&quot;http://myserver.com/MathJax/config/local/local.js&quot;</span><span class="p">);</span>
</pre></div>
</div>
@ -302,22 +326,23 @@ location of your configuration file.</p>
<div class="section" id="using-in-line-configuration-options">
<span id="inline-config"></span><h2>Using in-line configuration options<a class="headerlink" href="#using-in-line-configuration-options" title="Permalink to this headline"></a></h2>
<p>The second way to configure MathJax is through <cite>in-line configuration</cite>,
that puts the configuration options within the web page itself. This
process has changed in version 1.1 to make it compatible with HTML5.
which puts the configuration options within the web page itself. This
process was changed in version 1.1 to make it compatible with HTML5.
Earlier versions of MathJax had in-line configuration included within the
content of the <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tag that loads <tt class="docutils literal"><span class="pre">MathJax.js</span></tt>, but HTML5 makes
it illegal to have content for a script with a <tt class="docutils literal"><span class="pre">src</span></tt> attribute.</p>
<p>MathJax solves this problem by using separate <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tags to perform
configuration for MathJax. Because MathJax starts its configuration
process as soon as it is loaded, the configuration script must come
<strong>before</strong> the script tag that loads <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> itself. You do this
by including a <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> with <tt class="docutils literal"><span class="pre">type=&quot;text/x-mathjax-config&quot;</span></tt>, whose
content will be run when MathJax performs its configuration. Generally,
this script will include a <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call to perform
MathJax configuration, but it can also include other MathJax commands,
such as registering signal actions, or any JavaScript commands that you
want. You can have as many such script tags as you want, and MathJax will
process them in order as they appear in the document.</p>
<p>MathJax solves this problem by using separate <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tags to
perform the configuration for and loading of MathJax. Because MathJax
starts its configuration process as soon as it is loaded, the
configuration script must come <strong>before</strong> the script tag that loads
<tt class="docutils literal"><span class="pre">MathJax.js</span></tt> itself. You do this by including a <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> with
<tt class="docutils literal"><span class="pre">type=&quot;text/x-mathjax-config&quot;</span></tt> whose content will be run when
MathJax performs its configuration. Generally, this script will
include a <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call to perform MathJax
configuration, but it can also include other MathJax commands, such as
registering signal actions, or any JavaScript commands that you want.
You can have as many such script tags as you need, and MathJax will
process them in the order in which they appear in the document.</p>
<p>For instance,</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</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>
@ -340,15 +365,16 @@ the <cite>TeX</cite> input processor and the <cite>HTML-CSS</cite> output proces
HTML-CSS processor to use the TeX fonts rather than 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="options/index.html#configuration"><em>configuration options</em></a> section (or the comments in the <tt class="docutils literal"><span class="pre">config/default.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 this
include in the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. This
configuration does <strong>not</strong> load any pre-defined configuration file.</p>
<p>Note that you can combine in-line configuration with file-based
configuration; simply include <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> scripts as above,
but also include <tt class="docutils literal"><span class="pre">config=filename</span></tt> when you load the <tt class="docutils literal"><span class="pre">MathJax.js</span></tt>
file. For example, the <cite>tex2jax</cite> preprocessor does <strong>not</strong> enable the TeX
single-dollar in-line math delimiters by default. You can load one of the
pre-defined configuration files that include the TeX preprocessor, and use
an in-line configuration block to enable the single-dollar signs:</p>
pre-defined configuration files that includes the TeX preprocessor, and use
an in-line configuration block to enable the single-dollar signs, as
in this example:</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</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">tex2jax</span><span class="o">:</span> <span class="p">{</span>
@ -405,17 +431,21 @@ example, you could use</p>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>in its footer, so that MathJax will delay setting up until the footer is
reached, but will not have to wait until images and other files are
loaded. If you have <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> script tags within the main
body of the document, MathJax will read and process those before
continuing its startup. In this way you can use a default configuration
that can be modified on a page-by-page basis.</p>
<p>in its footer, so that MathJax will delay setting up until the footer
is reached, but will not have to wait until images and other files are
loaded. In this way, if you have <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> script
tags within the main body of the document, MathJax will read and
process those before continuing its startup. In this way you can use
a default configuration that can be modified on a page-by-page basis.</p>
<p>Note that <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Configured()</span></tt> is not called by MathJax;
you must make that call somewhere within the page yourself after the
configuration blocks are set up. If you do not execute this function,
MathJax will not process any of the math on the page.</p>
</div>
<div class="section" id="details-of-the-mathjax-configuration-process">
<h2>Details of the MathJax configuration process<a class="headerlink" href="#details-of-the-mathjax-configuration-process" title="Permalink to this headline"></a></h2>
<p>Since there are a number of different ways to configure MathJax, it is
important to know how they interact. The configuration process is the
important to know how they interact. The configuration actions are the
following:</p>
<ol class="arabic simple">
<li>Process any configuration file explicitly specified as a script parameter.</li>
@ -444,6 +474,7 @@ when MathJax runs, and browser-dependent erratic behavior will result.</p>
<li><a class="reference internal" href="#loading-mathjax-from-the-cdn">Loading MathJax from the CDN</a></li>
<li><a class="reference internal" href="#configuring-mathjax">Configuring MathJax</a></li>
<li><a class="reference internal" href="#using-a-configuration-file">Using a configuration file</a></li>
<li><a class="reference internal" href="#using-a-local-configuration-file-with-the-cdn">Using a local configuration file with the CDN</a></li>
<li><a class="reference internal" href="#using-in-line-configuration-options">Using in-line configuration options</a></li>
<li><a class="reference internal" href="#configuring-mathjax-after-it-is-loaded">Configuring MathJax after it is loaded</a></li>
<li><a class="reference internal" href="#details-of-the-mathjax-configuration-process">Details of the MathJax configuration process</a></li>
@ -486,11 +517,11 @@ when MathJax runs, and browser-dependent erratic behavior will result.</p>
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Loading MathJax Dynamically &mdash; MathJax v1.1 documentation</title>
<title>Loading MathJax Dynamically &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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>
@ -40,7 +40,7 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -53,59 +53,49 @@
<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">&lt;script&gt;</span></tt> tag in the
<tt class="docutils literal"><span class="pre">&lt;head&gt;</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&#8217;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&#8217;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.</p>
part of the original document in that it uses an <tt class="docutils literal"><span class="pre">onload</span></tt> or
<tt class="docutils literal"><span class="pre">DOMContentLoaded</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&#8217;s
<tt class="docutils literal"><span class="pre">onload</span></tt> handler has fired, and prior to version 2.0, MathJax had to
be told not to wait for the page <tt class="docutils literal"><span class="pre">onload</span></tt> event by calling
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Startup.onload()</span></tt> by hand. That is no longer
necessary, as MathJax v2.0 detects whether the page is already
available and when it is, it processes it immediately rather than
waiting for an event that has already happened.</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">&quot;script&quot;</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">&quot;text/javascript&quot;</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">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js&quot;</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">&#39;MathJax.Hub.Config({&#39;</span> <span class="o">+</span>
<span class="s1">&#39;extensions: [&quot;tex2jax.js&quot;],&#39;</span> <span class="o">+</span>
<span class="s1">&#39;jax: [&quot;input/TeX&quot;,&quot;output/HTML-CSS&quot;]&#39;</span> <span class="o">+</span>
<span class="s1">&#39;});&#39;</span> <span class="o">+</span>
<span class="s1">&#39;MathJax.Hub.Startup.onload();&#39;</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="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</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">&quot;head&quot;</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>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 some versions of
Opera don&#8217;t handle setting <tt class="docutils literal"><span class="pre">script.text</span></tt> properly, while Internet
Explorer doesn&#8217;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=filename</span></tt> method to
configure MathJax:</p>
<p>If you need to provide in-line configuration, you can do that using a
MathJax&#8217;s configuration script:</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">&quot;script&quot;</span><span class="p">);</span>
<span class="kd">var</span> <span class="nx">head</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="s2">&quot;head&quot;</span><span class="p">)[</span><span class="mi">0</span><span class="p">],</span> <span class="nx">script</span><span class="p">;</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">&quot;script&quot;</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">&quot;text/x-mathjax-config&quot;</span><span class="p">;</span>
<span class="nx">script</span><span class="p">[(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span> <span class="o">?</span> <span class="s2">&quot;innerHTML&quot;</span> <span class="o">:</span> <span class="s2">&quot;text&quot;</span><span class="p">)]</span> <span class="o">=</span>
<span class="s2">&quot;MathJax.Hub.Config({\n&quot;</span> <span class="o">+</span>
<span class="s2">&quot; tex2jax: { inlineMath: [[&#39;$&#39;,&#39;$&#39;], [&#39;\\\\(&#39;,&#39;\\\\)&#39;]] }\n&quot;</span> <span class="o">+</span>
<span class="s2">&quot;});&quot;</span>
<span class="nx">head</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="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">&quot;script&quot;</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">&quot;text/javascript&quot;</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">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full&quot;</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">&#39;MathJax.Hub.Startup.onload();&#39;</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">&quot;head&quot;</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="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="p">;</span>
<span class="nx">head</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>You can adjust the configuration to your needs, but be careful to get
the commas right, as Internet Explorer 6 and 7 will not tolerate an
extra comma before a closing brace. The <tt class="docutils literal"><span class="pre">window.opera</span></tt> test is
because some versions of Opera don&#8217;t handle setting <tt class="docutils literal"><span class="pre">script.text</span></tt>
properly, while some versions of Internet Explorer don&#8217;t handle
setting <tt class="docutils literal"><span class="pre">script.innerHTML</span></tt>.</p>
<p>Note that the <strong>only</strong> reliable way to configure MathJax is to use an
in-line configuration block 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
@ -148,9 +138,8 @@ IE+MathPlayer.</p>
<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">&quot;http://www.w3.org/1998/Math/MathML&quot;</span><span class="p">,</span><span class="s2">&quot;math&quot;</span><span class="p">).</span><span class="nx">length</span> <span class="o">&gt;</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">&quot;script&quot;</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">&quot;text/javascript&quot;</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">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full&quot;</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">&#39;MathJax.Hub.Startup.onload()&#39;</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">&quot;head&quot;</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>
@ -185,9 +174,8 @@ converting the math images to their original TeX code.</p>
<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">&quot;script&quot;</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">&quot;text/javascript&quot;</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">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full&quot;</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">&#39;MathJax.Hub.Startup.onload()&#39;</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">&quot;head&quot;</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>
@ -246,11 +234,11 @@ converting the math images to their original TeX code.</p>
<li class="right" >
<a href="signals.html" title="Using Signals"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index &mdash; MathJax v1.1 documentation</title>
<title>Index &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="index.html" />
</head>
<body>
@ -32,7 +32,7 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -45,15 +45,17 @@
<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>
<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> | <a href="#Z"><strong>Z</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/callback.html#Add">Add()</a></dt>
<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="glossary.html#term-asciimath">AsciiMath</a></dt>
<dt><a href="api/object.html#Augment">Augment()</a></dt>
</dl></td>
</tr></table>
@ -84,9 +86,10 @@
<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>
<dt><a href="api/callback.html#Execute">Execute()</a></dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/signal.html#ExecuteHook">ExecuteHook()</a></dt>
<dt><a href="api/callback.html#ExecuteHooks">ExecuteHooks()</a></dt>
</dl></td>
</tr></table>
@ -108,10 +111,12 @@
<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>
<dt><a href="api/hub.html#getJaxByType">getJaxByType()</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>
<dt><a href="api/outputjax.html#getJaxFromMath">getJaxFromMath()</a></dt>
<dt><a href="api/html.html#getScript">getScript()</a></dt>
</dl></td>
</tr></table>
@ -119,6 +124,7 @@
<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>
<dt><a href="api/callback.html#Hooks">Hooks()</a></dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="glossary.html#term-html-css">HTML-CSS</a></dt>
@ -163,6 +169,7 @@
<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-markdown">Markdown</a></dt>
<dt><a href="glossary.html#term-mathml">MathML</a></dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
@ -172,6 +179,9 @@
<h2 id="N">N</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/elementjax.html#needsUpdate">needsUpdate()</a></dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/signal.html#NoInterest">NoInterest()</a></dt>
</dl></td>
@ -181,10 +191,13 @@
<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/outputjax.html#postTranslate">postTranslate()</a></dt>
<dt><a href="api/ajax.html#Preloading">Preloading()</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/outputjax.html#preProcess">preProcess()</a></dt>
<dt><a href="api/outputjax.html#preTranslate">preTranslate()</a></dt>
<dt><a href="api/hub.html#Process">Process()</a></dt>
<dt><a href="api/queue.html#Push">Push()</a></dt>
</dl></td>
@ -203,9 +216,10 @@
<dt><a href="api/jax.html#Register">Register()</a></dt>
<dt><a href="api/message.html#Remove">Remove()</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/ajax.html#Require">Require()</a></dt>
<dt><a href="api/hub.html#Rerender">Rerender()</a></dt>
<dt><a href="api/callback.html#reset">reset()</a></dt>
<dt><a href="api/queue.html#Resume">Resume()</a></dt>
</dl></td>
@ -215,6 +229,7 @@
<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/hub.html#setRenderer">setRenderer()</a></dt>
<dt><a href="api/html.html#setScript">setScript()</a></dt>
<dt><a href="api/callback.html#Signal">Signal()</a></dt>
<dt><a href="api/elementjax.html#SourceElement">SourceElement()</a></dt>
@ -225,6 +240,7 @@
<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>
<dt><a href="glossary.html#term-svg">SVG</a></dt>
</dl></td>
</tr></table>
@ -255,6 +271,13 @@
</dl></td>
</tr></table>
<h2 id="Z">Z</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/outputjax.html#Zoom">Zoom()</a></dt>
</dl></td>
</tr></table>
</div>
@ -288,11 +311,11 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Glossary &mdash; MathJax v1.1 documentation</title>
<title>Glossary &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="index.html" />
<link rel="prev" title="CSS Style Objects" href="CSS-styles.html" />
</head>
<body>
@ -36,7 +36,7 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -48,6 +48,16 @@
<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-asciimath">AsciiMath</dt>
<dd><p class="first">A notation for mathematics that uses characters commonly
available on all computer keyboards to represent the math in
an algebra-like syntax that should be intuitive and easily
read.</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://www1.chapman.edu/~jipsen/mathml/asciimath.html">AsciiMath home page</a></p>
</div>
</dd>
<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
@ -79,6 +89,18 @@ its internal format manager. The code for the jax are in the
<p class="last"><a class="reference external" href="http://en.wikipedia.org/wiki/LaTeX">LaTeX Wikipedia entry</a></p>
</div>
</dd>
<dt id="term-markdown">Markdown</dt>
<dd><p class="first">A text format commonly used in blogs and wikis for creating
web pages without the need for complicated markup notation.
It is intended to be an easy-to-read and easy-to-write format
that still gives you the ability to specify a rich text result
(including things like bold, italics, bullet lists, and so
on).</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://daringfireball.net/projects/markdown/">Markdown home page</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
@ -97,6 +119,18 @@ package. A comprehensive set of scientific glyphs.</p>
<p class="last"><a class="reference external" href="http://stixfonts.org/">STIX project</a></p>
</div>
</dd>
<dt id="term-svg">SVG</dt>
<dd><p class="first">Acronym for <cite>Scalable Vector Graphics</cite>. SVG is a graphics
format that allows images to be described as a collection of
graphics objects (like lines, rectangles, etc) rather than as
a bitmap of colored pixels. MathJax can use this format to
display mathematics as an alterantive to its HTML-CSS or
NativeMML output.</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/Scalable_Vector_Graphics">SVG Wilipedia entry</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&#8217;s, but still in
@ -146,11 +180,11 @@ formats for mathematical journals, articles, and books.</p>
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MathJax Documentation &mdash; MathJax v1.1 documentation</title>
<title>MathJax Documentation &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="#" />
<link rel="next" title="What is MathJax?" href="mathjax.html" />
</head>
<body>
@ -36,7 +36,7 @@
<li class="right" >
<a href="mathjax.html" title="What is MathJax?"
accesskey="N">next</a> |</li>
<li><a href="#">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="#">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -47,8 +47,8 @@
<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>
<p>MathJax is an open-source JavaScript display engine for LaTeX,
MathML, and AsciiMath notaion 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">
@ -66,6 +66,7 @@ MathML that works in all modern browsers.</p>
<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="asciimath.html">MathJax AsciiMath Support</a></li>
<li class="toctree-l1"><a class="reference internal" href="output.html">MathJax Output Formats</a></li>
</ul>
</div>
@ -79,7 +80,8 @@ MathML that works in all modern browsers.</p>
<span id="id1"></span><h2>Upgrading MathJax<a class="headerlink" href="#upgrading-mathjax" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="whats-new.html">What&#8217;s New in MathJax v1.1</a></li>
<li class="toctree-l1"><a class="reference internal" href="whats-new-2.0.html">What&#8217;s New in MathJax v2.0</a></li>
<li class="toctree-l1"><a class="reference internal" href="whats-new-1.1.html">What&#8217;s New in MathJax v1.1</a></li>
<li class="toctree-l1"><a class="reference internal" href="upgrade.html">Migrating from MathJax v1.0 to v1.1</a></li>
<li class="toctree-l1"><a class="reference internal" href="jsMath.html">Converting to MathJax from jsMath</a></li>
</ul>
@ -121,7 +123,7 @@ MathML that works in all modern browsers.</p>
</li>
</ul>
<hr class="docutils" />
<p>This version of the documentation was built July 20, 2011.</p>
<p>This version of the documentation was built February 23, 2012.</p>
</div>
</div>
@ -179,11 +181,11 @@ MathML that works in all modern browsers.</p>
<li class="right" >
<a href="mathjax.html" title="What is MathJax?"
>next</a> |</li>
<li><a href="#">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="#">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Installing and Testing MathJax &mdash; MathJax v1.1 documentation</title>
<title>Installing and Testing MathJax &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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>
@ -40,7 +40,7 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -55,20 +55,21 @@
distributed network service (see <a class="reference internal" href="start.html#mathjax-cdn"><em>Using the MathJax CDN</em></a>). In that case, there is no need to install MathJax
yourself, and you can begin using MathJax right away; skip this document on
installation and go directly to <a class="reference internal" href="configuration.html#loading"><em>Configuring MathJax</em></a>.</p>
<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>
<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. 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 <tt class="docutils literal"><span class="pre">git</span></tt> or <tt class="docutils literal"><span class="pre">svn</span></tt>, 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 command</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>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, as there was in v1.0, 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
@ -134,12 +135,12 @@ git pull origin v1.1-latest
<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&#8217;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 command</p>
<div class="highlight-sh"><div class="highlight"><pre>svn checkout http://svn.github.com/mathjax/MathJax.git MathJax
<div class="highlight-sh"><div class="highlight"><pre>svn checkout http://github.com/mathjax/MathJax/trunk 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>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 as of v1.1, 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
@ -158,26 +159,25 @@ latest bug fixes and new features as they become available.</p>
that contains all the latest changes to MathJax. Although we try to make
sure this version is a stable and usable version of MathJax, it is under
active development, and at times it may be less stable than the &#8220;release&#8221;
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
version. If you prefer to use one of the tagged releases instead,
then use</p>
<div class="highlight-sh"><div class="highlight"><pre>svn checkout http://github.com/mathjax/MathJax/branch/<span class="o">[</span>name<span class="o">]</span> 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&#8217;s
<tt class="docutils literal"><span class="pre">svn</span></tt> service doesn&#8217;t appear to allow you to specify a particular
tagged version.</p>
<p>where <tt class="docutils literal"><span class="pre">[name]</span></tt> is replaced by the name of the branch you want to
check out; e.g., <tt class="docutils literal"><span class="pre">2.0-latest</span></tt>. The branch names can be found on the
<a class="reference external" href="http://github.com/mathjax/MathJax/">GitHub MathJax page</a> under the
<a class="reference external" href="https://github.com/mathjax/MathJax/branches">branches</a> tab.</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
<a class="reference external" href="http://github.com/mathjax/mathjax/">MathJax GitHub page</a> (via the
&#8220;zip&#8221; button, or the &#8220;downloads&#8221; tab), 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&#8217;s are
<p>You should download the v2.0 archive (which will get you a file with a
name like <tt class="docutils literal"><span class="pre">mathjax-MathJax-v2.0-X-XXXXXXXX.zip</span></tt>, where the X&#8217;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
@ -185,20 +185,18 @@ it locally rather then through a web server). One natural location is
to put it at the top level of your web server&#8217;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 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 development version of
MathJax that contains all the latest changes and bug-fixes. You can
also get older tagged versions (if there are any).</p>
<p>From the <a class="reference external" href="http://github.com/mathjax/mathjax/downloads">MathJax GitHub download link</a>, 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 development version of MathJax that contains all the
latest changes and bug-fixes.</p>
<p>If a packaged release receives any important updates, then those
updates will be part of the <cite>branch</cite> for that version. The link to
the <tt class="docutils literal"><span class="pre">.zip</span></tt> file in the download list will be the original release
version, not the patched version. To obtain the patched version, use
the <cite>Branches</cite> drop down menu (at the far left of the menus within the
page) to select the release branch that you want (for example
<tt class="docutils literal"><span class="pre">v1.1-latest</span></tt>), and then use the download button and 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> button to get the latest patched
version of that release.</p>
<tt class="docutils literal"><span class="pre">v2.0-latest</span></tt>), and then use the &#8220;zip&#8221; button just above it to get
the latest patched version of that release.</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>
@ -207,7 +205,8 @@ 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>
sample.html # Sample page with lots of pretty equations
examples.html # Page with links to all sample pages</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
@ -248,7 +247,7 @@ MathJax is installed, and if that server is running the <a class="reference exte
server</a>. In the remote server&#8217;s
<tt class="docutils literal"><span class="pre">MathJax/fonts/</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>&lt;FilesMatch "\.(ttf|otf|eot)$"&gt;
<div class="highlight-python"><pre>&lt;FilesMatch "\.(ttf|otf|eot|woff)$"&gt;
&lt;IfModule mod_headers.c&gt;
Header set Access-Control-Allow-Origin "*"
&lt;/IfModule&gt;
@ -301,7 +300,7 @@ directory and restart your browser (see the <a class="reference external" href="
<p>IE9&#8217;s same-origin policy affects its ability to load web-based fonts, as
described above. This has implications not ony to cross-domain loading of
MathJax, but also to the case where you view a local page (with a
<tt class="docutils literal"><span class="pre">file://</span></tt> URL) that accesses MathJax from a remote site, like the MathJax
<tt class="docutils literal"><span class="pre">file://</span></tt> URL) that accesses MathJax from a remote site such as the MathJax
CDN service. In this case, IE9 does <strong>not</strong> honor the
<tt class="docutils literal"><span class="pre">Access-Control-Allow-Origin</span></tt> setting of the remote server (as it would
if the web page came from an <tt class="docutils literal"><span class="pre">http://</span></tt> URL), and so it <strong>never</strong> allows the
@ -368,11 +367,11 @@ fonts help page</a> for details).</p>
<li class="right" >
<a href="start.html" title="Getting Started"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Converting to MathJax from jsMath &mdash; MathJax v1.1 documentation</title>
<title>Converting to MathJax from jsMath &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="index.html" />
<link rel="next" title="The MathJax Processing Model" href="model.html" />
<link rel="prev" title="Migrating from MathJax v1.0 to v1.1" href="upgrade.html" />
</head>
@ -40,7 +40,7 @@
<li class="right" >
<a href="upgrade.html" title="Migrating from MathJax v1.0 to v1.1"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -130,11 +130,11 @@ page</em></a> for more details.</p>
<li class="right" >
<a href="upgrade.html" title="Migrating from MathJax v1.0 to v1.1"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>What is MathJax? &mdash; MathJax v1.1 documentation</title>
<title>What is MathJax? &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="index.html" />
<link rel="next" title="Getting Started" href="start.html" />
<link rel="prev" title="MathJax Documentation" href="index.html" />
</head>
@ -40,7 +40,7 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -51,16 +51,17 @@
<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 is an open-source JavaScript display engine for LaTeX, MathML,
and AsciiMath notation 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, including those
on mobile devices. It requires no setup on the part of the user (no
plugins to download 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
@ -69,11 +70,12 @@ 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 Consortium 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 paste it into other programs.</p>
notation, <a class="reference external" href="http://www.w3.org/TR/MathML3">MathML</a>, a World Wide Web
Consortium standard for representing mathematics in XML format, or
<a class="reference external" href="http://www1.chapman.edu/~jipsen/mathml/asciimath.html">AsciiMath</a>
notation. 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 paste 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
@ -123,11 +125,11 @@ mathematics on your web pages interactive and dynamic.</p>
<li class="right" >
<a href="index.html" title="MathJax Documentation"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MathJax MathML Support &mdash; MathJax v1.1 documentation</title>
<title>MathJax MathML Support &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,8 +22,8 @@
<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="top" title="MathJax v2.0 documentation" href="index.html" />
<link rel="next" title="MathJax AsciiMath Support" href="asciimath.html" />
<link rel="prev" title="MathJax TeX and LaTeX Support" href="tex.html" />
</head>
<body>
@ -35,12 +35,12 @@
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="output.html" title="MathJax Output Formats"
<a href="asciimath.html" title="MathJax AsciiMath Support"
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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -66,10 +66,10 @@ displayed as MathML. Or you could use the <cite>mml2jax</cite> preprocessor and
MathML input processor with the HTML-CSS output processor to make
MathML available in browsers that don&#8217;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&#8217;t. See the <a class="reference internal" href="config-files.html#common-configurations"><em>common
configurations</em></a> section for details and
examples.</p>
you so that MathML is used in those browsers that support it well
enough, while HTML-CSS is used for those that don&#8217;t. See the
<a class="reference internal" href="config-files.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
@ -85,7 +85,7 @@ even with 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 preprocessor, you should not use
the named MathML entities, but rather use the numeric entities like
named MathML entities, but rather use numeric entities like
<tt class="docutils literal"><span class="pre">&amp;#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
@ -103,12 +103,16 @@ tags. That is, use</p>
</pre></div>
</div>
<p>rather than <tt class="docutils literal"><span class="pre">&lt;mspace</span> <span class="pre">width=&quot;thinmathspace</span> <span class="pre">/&gt;</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">&lt;mspace</span> <span class="pre">width=&quot;1em&quot;</span> <span class="pre">/&gt;</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">&lt;mspace&gt;</span></tt> tag; but
since <tt class="docutils literal"><span class="pre">&lt;mspace&gt;</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>
(prior to HTML5) 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">&lt;mspace</span> <span class="pre">width=&quot;1em&quot;</span> <span class="pre">/&gt;</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">&lt;mspace&gt;</span></tt> tag; but since <tt class="docutils literal"><span class="pre">&lt;mspace&gt;</span></tt> should have no content, the
rest of the mathematics will not be displayed. This is a common error
that should be avoided. Modern browsers that support HTML5 should be
able to handle self-closing tags, but older browsers have problems
with them, so if you want your mathematics to be visible to the widest
audience, do not use the self-closing form in HTML documents.</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>
@ -121,10 +125,10 @@ coming.</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 alignment groups in tables.</li>
<li>No support for right-to-left rendering.</li>
<li>Not all attributes are supported for tables. E.g., <tt class="docutils literal"><span class="pre">columnspan</span></tt>
and <tt class="docutils literal"><span class="pre">rowspan</span></tt> are not implemented yet.</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>
@ -149,8 +153,8 @@ children of <tt class="docutils literal"><span class="pre">mrow</span></tt> or i
<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>
<p class="topless"><a href="asciimath.html"
title="next chapter">MathJax AsciiMath Support</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
@ -175,16 +179,16 @@ children of <tt class="docutils literal"><span class="pre">mrow</span></tt> or i
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="output.html" title="MathJax Output Formats"
<a href="asciimath.html" title="MathJax AsciiMath Support"
>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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathJax Processing Model &mdash; MathJax v1.1 documentation</title>
<title>The MathJax Processing Model &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="index.html" />
<link rel="next" title="The MathJax Startup Sequence" href="startup.html" />
<link rel="prev" title="Converting to MathJax from jsMath" href="jsMath.html" />
</head>
@ -40,7 +40,7 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -54,7 +54,7 @@
<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
<a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a>, <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a>, or <a class="reference internal" href="glossary.html#term-asciimath"><em class="xref std std-term">AsciiMath</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
@ -81,17 +81,19 @@ 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>
notation</em></a>, <a class="reference internal" href="asciimath.html#asciimath-support"><em>AsciiMath 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 programmatically, 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&#8217;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,
mathematics, since the extra preprocessing step would not be needed.
It also avoids the conflict between the use of the less-than sign,
<tt class="docutils literal"><span class="pre">&lt;</span></tt>, in mathematics and as an HTML special character (that starts
an HTML tag).</p>
an HTML tag), and several other issues involved in having the
mathematics directly in the text of the page (see the documentation on
the various input jax for more details on this).</p>
<div class="section" id="how-mathematics-is-stored-in-the-page">
<span id="mathjax-script-tags"></span><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
@ -107,8 +109,9 @@ kind of script that the tag contains. The usual (and default) value
is <tt class="docutils literal"><span class="pre">type=&quot;text/javascript&quot;</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
and LaTeX notation, <cite>math/mml</cite> for mathematics in MathML notation, and
<cite>math/asciimath</cite> for mathematics in AsciiMath notation. When the
<cite>tex2jax</cite>, <cite>mml2jax</cite>, or <cite>asciimath2jax</cite> preprocessors run, they
create <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tags with these types so that MathJax can process
them when it runs its main typesetting pass.</p>
<p>For example,</p>
@ -214,16 +217,24 @@ 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 don&#8217;t
understand MathML. Output jax could be produced that render the
mathematics using SVG, for example, or that speak an equation for
blind users. The MathJax contextual menu can be used to switch
between the output jax that are available.</p>
understand MathML. MathJax also has an <a class="reference internal" href="glossary.html#term-svg"><em class="xref std std-term">SVG</em></a> output jax that
will render the mathematics using scalable vector grtaphics. Output
jax could be produced that render the mathematics using HTML5 canvas
elements, for example, or that speak an equation for 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
the first time the jax is needed by MathJax to process some
mathematics.</p>
functionality of that particular jax. The latter file is loaded the
first time the jax is needed by MathJax to process some mathematics.
Most of the combined configuration files include only the small
configuration portion for the input and output jax, making the
configuraiton file smaller and faster to load for those pages that
don&#8217;t actually incldue mathematics; the combined configurations that
end in <tt class="docutils literal"><span class="pre">-full</span></tt> include both parts of the jax, so there is no delay
when the math is to be rendered, but at the expense of a larger
initial download.</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
@ -291,11 +302,11 @@ dynamic as the rest of the page.</p>
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -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 AsciiMath input processor &mdash; MathJax v2.0 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: '2.0',
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 v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The HTML-CSS output processor" href="HTML-CSS.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="HTML-CSS.html" title="The HTML-CSS 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 v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="the-asciimath-input-processor">
<span id="configure-asciimath"></span><h1>The AsciiMath input processor<a class="headerlink" href="#the-asciimath-input-processor" title="Permalink to this headline"></a></h1>
<p>The options below control the operation of the AsciiMath input
processor that is run when you include <tt class="docutils literal"><span class="pre">&quot;input/AsciiMath&quot;</span></tt> in the
<cite>jax</cite> array of your configuration or load a combined configuration
file that includes the AsciiMath input jax. They are listed with
their default values. To set any of these options, include a
<tt class="docutils literal"><span class="pre">AsciiMath</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">AsciiMath</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">displaystyle</span><span class="o">:</span> <span class="kc">false</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>would set the <tt class="docutils literal"><span class="pre">displaystyle</span></tt> configuration option so that the limits
for operators like summation symbols will appear next to them rather
than above and below.</p>
<dl class="describe">
<dt>
<tt class="descname">displaystyle: true</tt></dt>
<dd><p>Determines whether operators like summation symbols will have
their limits above and below the operators (true) or to their
right (false). The former is how they would appear in displayed
equations that appear on their own lines, while the latter is
better suited to in-line equations so that they don&#8217;t interfere
with the line spacing so much.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">decimal: &quot;.&quot;</tt></dt>
<dd><p>This is the character to be used for decimal points in numbers.
if you change this to <tt class="docutils literal"><span class="pre">&quot;,&quot;</span></tt>, then you need to be careful about
entering points or intervals. E.g., use <tt class="docutils literal"><span class="pre">(1,</span> <span class="pre">2)</span></tt> rather than
<tt class="docutils literal"><span class="pre">(1,2)</span></tt> in that case.</p>
</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="HTML-CSS.html"
title="next chapter">The HTML-CSS output processor</a></p>
<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="MathML.html" title="The MathML input processor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The FontWarnings extension &mdash; MathJax v1.1 documentation</title>
<title>The FontWarnings extension &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,10 +22,10 @@
<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="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.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" />
<link rel="prev" title="The MathEvents extension" href="MathEvents.html" />
</head>
<body>
@ -39,9 +39,9 @@
<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"
<a href="MathEvents.html" title="The MathEvents extension"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -189,14 +189,17 @@ override the ones that are there with your own text.</p>
<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>
milliseconds. The default is 12 seconds. Setting this value
to zero means that the message will not fade out (the user must
close it manually).</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>
FontWarning message. More steps make for a smoother fade-out.
Set to zero to cause the message to be removed without fading.</p>
</dd></dl>
<dl class="describe">
@ -215,8 +218,8 @@ The default is 1.5 seconds.</p>
<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>
<p class="topless"><a href="MathEvents.html"
title="previous chapter">The MathEvents 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>
@ -247,14 +250,14 @@ The default is 1.5 seconds.</p>
<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"
<a href="MathEvents.html" title="The MathEvents extension"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The HTML-CSS output processor &mdash; MathJax v1.1 documentation</title>
<title>The HTML-CSS output processor &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,10 +22,10 @@
<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="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The NativeMML output processor" href="NativeMML.html" />
<link rel="prev" title="The MathML input processor" href="MathML.html" />
<link rel="prev" title="The AsciiMath input processor" href="AsciiMath.html" />
</head>
<body>
@ -39,9 +39,9 @@
<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"
<a href="AsciiMath.html" title="The AsciiMath input processor"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -55,10 +55,12 @@
<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">&quot;output/HTML-CSS&quot;</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">&quot;HTML-CSS&quot;</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>
<cite>jax</cite> array of your configuration or load a combined configuration
file that includes the HTML-CSS output jax. They are listed with
their default values. To set any of these options, include a
<tt class="docutils literal"><span class="pre">&quot;HTML-CSS&quot;</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">&quot;HTML-CSS&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">preferredFont</span><span class="o">:</span> <span class="s2">&quot;STIX&quot;</span>
@ -72,7 +74,7 @@ dash, you need to enclose the name in quotes. For example</p>
<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
the ex-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>
@ -145,6 +147,74 @@ will stop looking after the first font that exists on the system
carefully.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">mtextFontInherit: false</tt></dt>
<dd><p>This setting controls whether <tt class="docutils literal"><span class="pre">&lt;mtext&gt;</span></tt> elements will be typeset
using the math fonts or the font of the surrounding text. When
<tt class="docutils literal"><span class="pre">false</span></tt>, the font for <tt class="docutils literal"><span class="pre">mathvariant=&quot;normal&quot;</span></tt> will be used;
when <tt class="docutils literal"><span class="pre">true</span></tt>, the font will be inherited from the surrounding
paragraph.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">EqnChunk: 50</tt></dt>
<dt>
<tt class="descname">EqnChunkFactor: 1.5</tt></dt>
<dt>
<tt class="descname">EqnChunkDelay: 100</tt></dt>
<dd><p>These values control how &#8220;chunky&#8221; the display of mathematical
expressions will be; that is, how often the equations will be
updated as they are processed.</p>
<p><tt class="docutils literal"><span class="pre">EqnChunk</span></tt> is the number of equations that will be typeset before
they appear on screen. Larger values make for less visual flicker
as the equations are drawn, but also mean longer delays before the
reader sees anything.</p>
<p><tt class="docutils literal"><span class="pre">EqChunkFactor</span></tt> is the factor by which the <tt class="docutils literal"><span class="pre">EqnChunk</span></tt> will
grow after each chunk is displayed.</p>
<p><tt class="docutils literal"><span class="pre">EqChunkDelay</span></tt> is the time (in milliseconds) to delay between
chunks (to allow the browser to respond to other user
interaction).</p>
<p>Set <tt class="docutils literal"><span class="pre">EqnChunk</span></tt> to 1, <tt class="docutils literal"><span class="pre">EqnChunkFactor</span></tt> to 1, and
<tt class="docutils literal"><span class="pre">EqnChunkDelay</span></tt> to 10 to get the behavior from MathJax v1.1 and
below.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">linebreaks: {}</tt></dt>
<dd><p>This is an object that configures automatic linebreaking in the
HTML-CSS output. In order to be backward compatible with earlier
versions of MathJax, only explicit line breaks are performed by
default, so you must enable line breaks if you want automatic
ones. The object contains the following values:</p>
<dl class="describe">
<dt>
<tt class="descname">automatic: false</tt></dt>
<dd><p>This controls the automatic breaking of expressions: when
<tt class="docutils literal"><span class="pre">false</span></tt>, only <tt class="docutils literal"><span class="pre">linebreak=&quot;newline&quot;</span></tt> is processed; when
<tt class="docutils literal"><span class="pre">true</span></tt>, line breaks are inserted automatically in long
expressions.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">width: &quot;container&quot;</tt></dt>
<dd><p>This controls how wide the lines of mathematics can be.</p>
<p>Use an explicit width like <tt class="docutils literal"><span class="pre">&quot;30em&quot;</span></tt> for a fixed width.
Use <tt class="docutils literal"><span class="pre">&quot;container&quot;</span></tt> to compute the size from the containing
element.
Use <tt class="docutils literal"><span class="pre">&quot;nn%</span> <span class="pre">container&quot;</span></tt> for a portion of the container.
Use <tt class="docutils literal"><span class="pre">&quot;nn%&quot;</span></tt> for a portion of the window size.</p>
<p>The container-based widths may be slower, and may not produce
the expected results if the layout width changes due to the
removal of previews or inclusion of mathematics during
typesetting.</p>
</dd></dl>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">styles: {}</tt></dt>
@ -158,17 +228,9 @@ CSS style in a JavaScript object.</p>
<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><p>This value has been moved to the core configuration block, since
it applies to all output jax, but it will still be honored (for
now) if it is set here. See the <a class="reference internal" href="hub.html#configure-hub"><em>Core configuration options</em></a> for more details.</p>
</dd></dl>
<dl class="describe">
@ -195,7 +257,9 @@ after the mouse moves out of the <tt class="docutils literal"><span class="pre">
<dl class="describe">
<dt>
<tt class="descname">offsetX: 10 and offsetY: 5</tt></dt>
<tt class="descname">offsetX: 10</tt></dt>
<dt>
<tt class="descname">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>
@ -211,8 +275,8 @@ where the tooltip will be placed.</p>
<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>
<p class="topless"><a href="AsciiMath.html"
title="previous chapter">The AsciiMath input processor</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="NativeMML.html"
title="next chapter">The NativeMML output processor</a></p>
@ -243,14 +307,14 @@ where the tooltip will be placed.</p>
<a href="NativeMML.html" title="The NativeMML output processor"
>next</a> |</li>
<li class="right" >
<a href="MathML.html" title="The MathML input processor"
<a href="AsciiMath.html" title="The AsciiMath input processor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MMLorHTML configuration options &mdash; MathJax v1.1 documentation</title>
<title>The MMLorHTML configuration options &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,10 +22,10 @@
<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="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The MathMenu extension" href="MathMenu.html" />
<link rel="prev" title="The NativeMML output processor" href="NativeMML.html" />
<link rel="prev" title="The SVG output processor" href="SVG.html" />
</head>
<body>
@ -39,9 +39,9 @@
<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"
<a href="SVG.html" title="The SVG output processor"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -55,9 +55,11 @@
<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">&quot;MMLorHTML.js&quot;</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>
array of your configuration, or when you use one of the combined
configuration files that ends with <tt class="docutils literal"><span class="pre">_HTMLorMML</span></tt>. 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>
@ -75,14 +77,34 @@ browsers unchanged).</p>
configuration; <cite>MMLorHTML</cite> will fill that in for you.</p>
<dl class="describe">
<dt>
<tt class="descname">prefer: { MSIE: &quot;MML&quot;, Firefox: &quot;MML&quot;, Opera: &quot;HTML&quot;, other: &quot;HTML&quot; }</tt></dt>
<tt class="descname">prefer: {</tt></dt>
<dt>
<tt class="descname">MSIE: &quot;MML&quot;,</tt></dt>
<dt>
<tt class="descname">Firefox: &quot;HTML&quot;,</tt></dt>
<dt>
<tt class="descname">Safari: &quot;HTML&quot;,</tt></dt>
<dt>
<tt class="descname">Chrome: &quot;HTML&quot;,</tt></dt>
<dt>
<tt class="descname">Opera: &quot;HTML&quot;,</tt></dt>
<dt>
<tt class="descname">other: &quot;HTML&quot;</tt></dt>
<dt>
<tt class="descname">}</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">&quot;MML&quot;</span></tt> or <tt class="docutils literal"><span class="pre">&quot;HTML&quot;</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">&quot;HTML&quot;</span></tt> by default.</p>
output processor. Note that although Opera and Safari do process some MathML
natively, their support is not sufficient to handle the more
complicated output generated by MathJax, so their settings are
<tt class="docutils literal"><span class="pre">&quot;HTML&quot;</span></tt> by default. Although Firefox does support a large
subset of MathJax, it does not implement all the features needed by
MathJax, and so it is also set to <tt class="docutils literal"><span class="pre">&quot;HTML&quot;</span></tt> by default (this is
new in v2.0).</p>
<p>Note that users can still use the MathJax contextual menu to select
a different renderer after the default one has been chosen by
<tt class="docutils literal"><span class="pre">MMLorHTML.js</span></tt>.</p>
</dd></dl>
</div>
@ -94,8 +116,8 @@ complicated output generated by MathJax, so its setting is
<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>
<p class="topless"><a href="SVG.html"
title="previous chapter">The SVG output processor</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="MathMenu.html"
title="next chapter">The MathMenu extension</a></p>
@ -126,14 +148,14 @@ complicated output generated by MathJax, so its setting is
<a href="MathMenu.html" title="The MathMenu extension"
>next</a> |</li>
<li class="right" >
<a href="NativeMML.html" title="The NativeMML output processor"
<a href="SVG.html" title="The SVG output processor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -0,0 +1,141 @@
<!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 MathEvents extension &mdash; MathJax v2.0 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: '2.0',
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 v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The FontWarnings extension" href="FontWarnings.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="FontWarnings.html" title="The FontWarnings extension"
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 v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="the-mathevents-extension">
<span id="configure-mathevents"></span><h1>The MathEvents extension<a class="headerlink" href="#the-mathevents-extension" title="Permalink to this headline"></a></h1>
<p>The options below control the operation of the MathEvents component that
allows handles mouse and menu events attached to 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">MathEvents</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">MathEvents</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">hover</span><span class="o">:</span> <span class="mi">400</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>would set the required delay for hovering over a math element to
400 milliseconds.</p>
<dl class="describe">
<dt>
<tt class="descname">hover: 500</tt></dt>
<dd><p>This value is the time (in milliseconds) that a user must hold the
mouse still over a math element before it is considered to be
hovering over the math.</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/MathEvents.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="MathZoom.html"
title="previous chapter">The MathZoom extension</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="FontWarnings.html"
title="next chapter">The FontWarnings extension</a></p>
<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="MathZoom.html" title="The MathZoom extension"
>previous</a> |</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathML input processor &mdash; MathJax v1.1 documentation</title>
<title>The MathML input processor &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,9 +22,9 @@
<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="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The HTML-CSS output processor" href="HTML-CSS.html" />
<link rel="next" title="The AsciiMath input processor" href="AsciiMath.html" />
<link rel="prev" title="The TeX input processor" href="TeX.html" />
</head>
<body>
@ -36,12 +36,12 @@
<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"
<a href="AsciiMath.html" title="The AsciiMath input 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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -55,7 +55,8 @@
<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">&quot;input/MathML&quot;</span></tt> in the <cite>jax</cite> array of
your configuration. They are listed with their default values. To
your configuration or load a combined configuration file that includes
the MathML input jax. 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>
@ -86,8 +87,8 @@ spacing would be used (rather than TeX spacing rules).</p>
<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>
<p class="topless"><a href="AsciiMath.html"
title="next chapter">The AsciiMath input processor</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -112,17 +113,17 @@ spacing would be used (rather than TeX spacing rules).</p>
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="HTML-CSS.html" title="The HTML-CSS output processor"
<a href="AsciiMath.html" title="The AsciiMath input 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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathMenu extension &mdash; MathJax v1.1 documentation</title>
<title>The MathMenu extension &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The MathZoom extension" href="MathZoom.html" />
<link rel="prev" title="The MMLorHTML configuration options" href="MMLorHTML.html" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -85,38 +85,48 @@ selects that item, the browser opens a new window with this URL.</p>
<dl class="describe">
<dt>
<tt class="descname">showRenderer: true</tt></dt>
<dd><p>This controls whether the &#8220;Math Renderer&#8221; item will be displayed in
the &#8220;Settings&#8221; 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 &#8220;Contextual Menu&#8221; item will be displayed
in the &#8220;Settings&#8221; submenu of the mathematics contextual menu.
It allows the user to decide whether the MathJax menu or the
browser&#8217;s default contextual menu will be shown when the context
menu click occurs over mathematics typeset by MathJax. (The main
reason to allow pass-through to the browser&#8217;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><p>This controls whether the &#8220;Math Renderer&#8221; item will be displayed
in the &#8220;Math Settings&#8221; submenu of the MathJax contextual menu.
It allows the user to change between the <cite>HTML-CSS</cite>, <cite>NativeMML</cite>,
and <cite>SVG</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">showFontMenu: false</tt></dt>
<dd><p>This controls whether the &#8220;Font Preference&#8221; item will be displayed
in the &#8220;Settings&#8221; submenu of the mathematics contextual menu.
in the &#8220;Math Settings&#8221; submenu of the MathJax 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">showMathPlayer: true</tt></dt>
<dd><p>This controls whether the &#8220;MathPlayer&#8221; item will be displayed in
the &#8220;Math Settings&#8221; submenu of the MathJax contextual menu. This
submenu lets the user select what events should be passed on to
the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer plugin</a>, when it is
present. Mouse events can be passed on (so that clicks will be
processed by MathPlayer rather than MathJax), and emnu events can
be passed on (to allow the user access to the MathPlayer menu).
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 &#8220;Contextual Menu&#8221; item will be displayed
in the &#8220;Math Settings&#8221; submenu of the MathJax contextual menu.
It allows the user to decide whether the MathJax menu or the
browser&#8217;s default contextual menu will be shown when the context
menu click occurs over mathematics typeset by MathJax. 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>
@ -179,12 +189,12 @@ style in a JavaScript object.</p>
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The MathZoom extension &mdash; MathJax v1.1 documentation</title>
<title>The MathZoom extension &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,9 +22,9 @@
<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="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The FontWarnings extension" href="FontWarnings.html" />
<link rel="next" title="The MathEvents extension" href="MathEvents.html" />
<link rel="prev" title="The MathMenu extension" href="MathMenu.html" />
</head>
<body>
@ -36,12 +36,12 @@
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="FontWarnings.html" title="The FontWarnings extension"
<a href="MathEvents.html" title="The MathEvents 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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -60,23 +60,28 @@ default values. To set any of these options, include a <tt class="docutils lite
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="nx">styles</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;#MathJax_Zoom&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;background-color&quot;</span><span class="o">:</span> <span class="s2">&quot;#0000F0&quot;</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">delay</span></tt> option to 600 milliseconds.</p>
<p>would set the background color of the Zoom box to a very light blue.</p>
<p>Mathematics is zoomed when the user &#8220;triggers&#8221; the zoom by an action,
either clicking on the mathematics, double-clicking on it, or holding
the mouse still over it (i.e., &#8220;hovering&#8221;). 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>
the <tt class="docutils literal"><span class="pre">menuSettings</span></tt> configuration section of the <cite>core configuration
options &lt;configure-hub&gt;</cite>).</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>
<tt class="descname">delay: 500</tt></dt>
<dd><p>This value is now stored as the <tt class="docutils literal"><span class="pre">hover</span></tt> parameter in the
<a class="reference internal" href="MathEvents.html#configure-mathevents"><em>MathEvents</em></a> configuration options, and
will have no effect if given here.</p>
</dd></dl>
<dl class="describe">
@ -101,8 +106,8 @@ style in a JavaScript object.</p>
<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>
<p class="topless"><a href="MathEvents.html"
title="next chapter">The MathEvents extension</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -127,17 +132,17 @@ style in a JavaScript object.</p>
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="FontWarnings.html" title="The FontWarnings extension"
<a href="MathEvents.html" title="The MathEvents 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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The NativeMML output processor &mdash; MathJax v1.1 documentation</title>
<title>The NativeMML output processor &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,9 +22,9 @@
<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="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The MMLorHTML configuration options" href="MMLorHTML.html" />
<link rel="next" title="The SVG output processor" href="SVG.html" />
<link rel="prev" title="The HTML-CSS output processor" href="HTML-CSS.html" />
</head>
<body>
@ -36,12 +36,12 @@
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="MMLorHTML.html" title="The MMLorHTML configuration options"
<a href="SVG.html" title="The SVG output processor"
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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -55,9 +55,11 @@
<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">&quot;output/NativeMML&quot;</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>
<cite>jax</cite> array of your configuration or load a combined configuration
file taht includes the NativeMML output jax. 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>
@ -70,43 +72,35 @@ in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.H
<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&#8217;s native 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>
surrounding text. The <cite>NativeMML</cite> output processor tries to match
the ex-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">minScaleAdjust: 50</tt></dt>
<dd><p>This gives a minimum scale (as a percent) for the scaling used by
MathJax to match the equation to the surrounding text. This will
prevent MathJax from making the mathematics too small.</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 turning off the
menu support in other browsers.</p>
<dd><p>These values have been moved to the core configuration block, since
it applies to all output jax, but they will still be honored (for
now) if it is set here. See the <a class="reference internal" href="hub.html#configure-hub"><em>Core configuration options</em></a> for more details.</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
<dd><p>This is a list of CSS declarations for styling the NativeMML
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
@ -125,8 +119,8 @@ CSS style in a JavaScript object.</p>
<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>
<p class="topless"><a href="SVG.html"
title="next chapter">The SVG output processor</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -151,17 +145,17 @@ CSS style in a JavaScript object.</p>
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="MMLorHTML.html" title="The MMLorHTML configuration options"
<a href="SVG.html" title="The SVG output processor"
>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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

291
docs/html/options/SVG.html Normal file
View File

@ -0,0 +1,291 @@
<!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 SVG output processor &mdash; MathJax v2.0 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: '2.0',
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 v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The MMLorHTML configuration options" href="MMLorHTML.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="MMLorHTML.html" title="The MMLorHTML configuration options"
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 v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="the-svg-output-processor">
<span id="configure-svg"></span><h1>The SVG output processor<a class="headerlink" href="#the-svg-output-processor" title="Permalink to this headline"></a></h1>
<p>The options below control the operation of the SVG output
processor that is run when you include <tt class="docutils literal"><span class="pre">&quot;output/SVG&quot;</span></tt> in the
<cite>jax</cite> array of your configuration or load a combined configuration
file that includes the SVG output jax. They are listed with their default
values. To set any of these options, include an <tt class="docutils literal"><span class="pre">SVG</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">&quot;SVG&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">scale</span><span class="o">:</span> <span class="mi">120</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>would set the <tt class="docutils literal"><span class="pre">scale</span></tt> option to 120%.</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>SVG</cite> output processor tries to match
the ex-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">minScaleAdjust: 50</tt></dt>
<dd><p>This gives a minimum scale (as a percent) for the scaling used by
MathJax to match the equation to the surrounding text. This will
prevent MathJax from making the mathematics too small.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">font: &quot;TeX&quot;</tt></dt>
<dd><p>This is the font to use for rendering the mathematics. Note that
currently only the <cite>TeX</cite> font is available.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">blacker: 10</tt></dt>
<dd><p>This is the stroke width to use for all character paths (1em =
1000 units). This is a cheap way of getting slightly lighter or
darker characters, but remember that not all displays will act the
same, so a value that is good for you may not be good for everyone.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">undefinedFamily: &quot;STIXGeneral, 'Arial Unicode MS', serif&quot;</tt></dt>
<dd><p>This is the font-family CSS value used for characters that are not
in the selected font (e.g., this is where to look for characters
not included in the MathJax TeX fonts). IE will stop looking
after the first font that exists on the system (even if it doesn&#8217;t
contain the needed character), so order these carefully.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">mtextFontInherit: false</tt></dt>
<dd><p>This setting controls whether <tt class="docutils literal"><span class="pre">&lt;mtext&gt;</span></tt> elements will be typeset
using the math fonts or the font of the surrounding text. When
<tt class="docutils literal"><span class="pre">false</span></tt>, the font for <tt class="docutils literal"><span class="pre">mathvariant=&quot;normal&quot;</span></tt> will be used;
when <tt class="docutils literal"><span class="pre">true</span></tt>, the font will be inherited from the surrounding
paragraph.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">addMMLclasses: false</tt></dt>
<dd><p>This controls whether the MathML structure is retained and CSS
classes are added to mark the original MathML elements (as in the
output from the <cite>HTML-CSS</cite> output jax). By default, the SVG
output jax removes unneeded nesting in order to produce a more
efficient markup, but if you want to use CSS to style the elements
as if they were MathML, you might need to set this to true.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">EqnChunk: 50</tt></dt>
<dt>
<tt class="descname">EqnChunkFactor: 1.5</tt></dt>
<dt>
<tt class="descname">EqnChunkDelay: 100</tt></dt>
<dd><p>These values control how &#8220;chunky&#8221; the display of mathematical
expressions will be; that is, how often the equations will be
updated as they are processed.</p>
<p><tt class="docutils literal"><span class="pre">EqnChunk</span></tt> is the number of equations that will be typeset before
they appear on screen. Larger values make for less visual flicker
as the equations are drawn, but also mean longer delays before the
reader sees anything.</p>
<p><tt class="docutils literal"><span class="pre">EqChunkFactor</span></tt> is the factor by which the <tt class="docutils literal"><span class="pre">EqnChunk</span></tt> will
grow after each chunk is displayed.</p>
<p><tt class="docutils literal"><span class="pre">EqChunkDelay</span></tt> is the time (in milliseconds) to delay between
chunks (to allow the browser to respond to other user
interaction).</p>
<p>Set <tt class="docutils literal"><span class="pre">EqnChunk</span></tt> to 1, <tt class="docutils literal"><span class="pre">EqnChunkFactor</span></tt> to 1, and
<tt class="docutils literal"><span class="pre">EqnChunkDelay</span></tt> to 10 to get the behavior from MathJax v1.1 and
below.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">linebreaks: {}</tt></dt>
<dd><p>This is an object that configures automatic linebreaking in the
SVG output. In order to be backward compatible with earlier
versions of MathJax, only explicit line breaks are performed by
default, so you must enable line breaks if you want automatic
ones. The object contains the following values:</p>
<dl class="describe">
<dt>
<tt class="descname">automatic: false</tt></dt>
<dd><p>This controls the automatic breaking of expressions: when
<tt class="docutils literal"><span class="pre">false</span></tt>, only <tt class="docutils literal"><span class="pre">linebreak=&quot;newline&quot;</span></tt> is processed; when
<tt class="docutils literal"><span class="pre">true</span></tt>, line breaks are inserted automatically in long
expressions.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">width: &quot;container&quot;</tt></dt>
<dd><p>This controls how wide the lines of mathematics can be.</p>
<p>Use an explicit width like <tt class="docutils literal"><span class="pre">&quot;30em&quot;</span></tt> for a fixed width.
Use <tt class="docutils literal"><span class="pre">&quot;container&quot;</span></tt> to compute the size from the containing
element.
Use <tt class="docutils literal"><span class="pre">&quot;nn%</span> <span class="pre">container&quot;</span></tt> for a portion of the container.
Use <tt class="docutils literal"><span class="pre">&quot;nn%&quot;</span></tt> for a portion of the window size.</p>
<p>The container-based widths may be slower, and may not produce
the expected results if the layout width changes due to the
removal of previews or inclusion of mathematics during
typesetting.</p>
</dd></dl>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">styles: {}</tt></dt>
<dd><p>This is a list of CSS declarations for styling the SVG output.
See the definitions in <tt class="docutils literal"><span class="pre">jax/output/SVG/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">tooltip: { ... }</tt></dt>
<dd><p>This sets the configuration options for <tt class="docutils literal"><span class="pre">&lt;maction&gt;</span></tt> elements
with <tt class="docutils literal"><span class="pre">actiontype=&quot;tooltip&quot;</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/SVG/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</tt></dt>
<dt>
<tt class="descname">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="NativeMML.html"
title="previous chapter">The NativeMML output processor</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="MMLorHTML.html"
title="next chapter">The MMLorHTML configuration options</a></p>
<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="NativeMML.html" title="The NativeMML output processor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The TeX input processor &mdash; MathJax v1.1 documentation</title>
<title>The TeX input processor &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The MathML input processor" href="MathML.html" />
<link rel="prev" title="The jsMath2jax Preprocessor" href="jsMath2jax.html" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -55,7 +55,8 @@
<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">&quot;input/TeX&quot;</span></tt> in the <cite>jax</cite> array of
your configuration. They are listed with their default values. To
your configuration or load a combined configuration file that includes
the TeX input jax. 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>
@ -94,17 +95,78 @@ 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">equationNumbers: {}</tt></dt>
<dd><p>This object controls the automatic equation numbering and the
equation referencing. It contains the following values:</p>
<dl class="describe">
<dt>
<tt class="descname">autoNumber: &quot;none&quot;</tt></dt>
<dd><p>This controls whether equations are numbered and how. By
default it is set to <tt class="docutils literal"><span class="pre">&quot;none&quot;</span></tt> to be compatible with earlier
versions of MathJax where auto-numbering was not performed (so
pages will not change their appearance). You can change
this to <tt class="docutils literal"><span class="pre">&quot;AMS&quot;</span></tt> for equations numbered as the <cite>AMSmath</cite>
package would do, or <tt class="docutils literal"><span class="pre">&quot;all&quot;</span></tt> to get an equation number for
every displayed equation.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">formatNumber: function (n) {return n}</tt></dt>
<dd><p>A function that tells MathJax what tag to use for equation
number <tt class="docutils literal"><span class="pre">n</span></tt>. This could be used to have the equations labeled
by a sequence of symbols rather than numbers, or to use section
and subsection numbers instead.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">formatTag: function (n) {return '('+n+')'}</tt></dt>
<dd><p>A function that tells MathJax how to format an equation number
for displaying as a tag for an equation. This is what appears
in the margin of a tagged or numbered equation.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">formatID: function {return 'mjx-eqn-'+String(n).replace(/[:'&quot;&lt;&gt;&amp;]/g,&quot;&quot;)}</tt></dt>
<dd><p>A function that rells MathJax what ID to use as an anchor for
the equation (so that it can be used in URL references).</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">formatURL: function (id) {return '#'+escape(id)}</tt></dt>
<dd><p>A function that takes an equation ID and returns the URL to
link to it.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">useLabelIds: true</tt></dt>
<dd><p>This controls whether element ID&#8217;s use the <tt class="docutils literal"><span class="pre">\label</span></tt> name or
the equation number. When <tt class="docutils literal"><span class="pre">true</span></tt>, use the label, when
<tt class="docutils literal"><span class="pre">false</span></tt>, use the equation number.</p>
</dd></dl>
<p>See the <a class="reference external" href="http://cdn.mathjax.org/mathjax/latest/test/examples.html">MathJax examples page</a> for
some examples of equation numbering.</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> can be 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>
These are <cite>name:value</cite> 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> can be 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">&#39;{\\bf R}&#39;</span><span class="p">,</span>
@ -178,12 +240,12 @@ be sufficient for any reasonable equation.</p>
<li class="right" >
<a href="jsMath2jax.html" title="The jsMath2jax Preprocessor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -0,0 +1,213 @@
<!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 asciimath2jax Preprocessor &mdash; MathJax v2.0 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: '2.0',
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 v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The jsMath2jax Preprocessor" href="jsMath2jax.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="jsMath2jax.html" title="The jsMath2jax Preprocessor"
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 v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="the-asciimath2jax-preprocessor">
<span id="configure-asciimath2jax"></span><h1>The asciimath2jax Preprocessor<a class="headerlink" href="#the-asciimath2jax-preprocessor" title="Permalink to this headline"></a></h1>
<p>The options below control the operation of the <cite>asciimath2jax</cite> preprocessor
that is run when you include <tt class="docutils literal"><span class="pre">&quot;asciimath2jax.js&quot;</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">asciimath2jax</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">asciimath2jax</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">delimiters</span><span class="o">:</span> <span class="p">[[</span><span class="s1">&#39;`&#39;</span><span class="p">,</span><span class="s1">&#39;`&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;$&#39;</span><span class="p">,</span><span class="s1">&#39;$&#39;</span><span class="p">]]</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>would set the ASCIIMath delimiters for the <cite>asciimath2jax</cite>
preprocessor to include dollar signs as well as back-ticks.</p>
<dl class="describe">
<dt>
<tt class="descname">delimiters: [['`','`']]</tt></dt>
<dd><p>Array of pairs of strings that are to be used as math
delimiters. 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">&#39;$&#39;</span><span class="p">,</span><span class="s1">&#39;$&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;`&#39;</span><span class="p">,</span><span class="s1">&#39;`&#39;</span><span class="p">]</span> <span class="p">]</span>
</pre></div>
</div>
<p>would cause <cite>asciimath2jax</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&#8217;t look like HTML tags (i.e., can&#8217;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">preview: &quot;AsciiMath&quot;</tt></dt>
<dd><p>This controls whether <cite>asciimath2jax</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">&quot;AsciiMath&quot;</span></tt>, which means use the ASCIIMath code as
the preview (which will be visible until it is processed by
MathJax). Set to <tt class="docutils literal"><span class="pre">&quot;none&quot;</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">&quot;[math]&quot;</span><span class="p">],</span> <span class="c1">// insert the text &quot;[math]&quot; 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">&quot;img&quot;</span><span class="p">,{</span><span class="nx">src</span><span class="o">:</span> <span class="s2">&quot;/images/mypic.jpg&quot;</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: [&quot;script&quot;,&quot;noscript&quot;,&quot;style&quot;,&quot;textarea&quot;,&quot;pre&quot;,&quot;code&quot;]</tt></dt>
<dd><p>This array lists the names of the tags whose contents should not
be processed by <cite>asciimath2jax</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: &quot;asciimath2jax_ignore&quot;</tt></dt>
<dd><p>This is the class name used to mark elements whose contents should
not be processed by asciimath2jax (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 inserted into one that
requires your pattern to match a complete word, so setting
<tt class="docutils literal"><span class="pre">ignoreClass:</span> <span class="pre">&quot;class2&quot;</span></tt> would cause it to match an element with
<tt class="docutils literal"><span class="pre">class=&quot;class1</span> <span class="pre">class2</span> <span class="pre">class3&quot;</span></tt> but not <tt class="docutils literal"><span class="pre">class=&quot;myclass2&quot;</span></tt>.
Note that you can assign several classes by separating them by the
vertical line character (<tt class="docutils literal"><span class="pre">|</span></tt>). For instance, with
<tt class="docutils literal"><span class="pre">ignoreClass:</span> <span class="pre">&quot;class1|class2&quot;</span></tt> any element assigned a class of
either <tt class="docutils literal"><span class="pre">class1</span></tt> or <tt class="docutils literal"><span class="pre">class2</span></tt> will be skipped.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">processClass: &quot;asciimath2jax_process&quot;</tt></dt>
<dd><p>This is the class name used to mark elements whose contents
<em>should</em> be processed by <cite>asciimath2jax</cite>. This is used to restart
processing within tags that have been marked as ignored via the
<tt class="docutils literal"><span class="pre">ignoreClass</span></tt> or to cause a tag that appears in the <tt class="docutils literal"><span class="pre">skipTags</span></tt>
list to be processed rather than skipped. 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 inserted into one
that requires your pattern to match a complete word, so setting
<tt class="docutils literal"><span class="pre">processClass:</span> <span class="pre">&quot;class2&quot;</span></tt> would cause it to match an element with
<tt class="docutils literal"><span class="pre">class=&quot;class1</span> <span class="pre">class2</span> <span class="pre">class3&quot;</span></tt> but not <tt class="docutils literal"><span class="pre">class=&quot;myclass2&quot;</span></tt>.
Note that you can assign several classes by separating them by the
vertical line character (<tt class="docutils literal"><span class="pre">|</span></tt>). For instance, with
<tt class="docutils literal"><span class="pre">processClass:</span> <span class="pre">&quot;class1|class2&quot;</span></tt> any element assigned a class of
either <tt class="docutils literal"><span class="pre">class1</span></tt> or <tt class="docutils literal"><span class="pre">class2</span></tt> will have its contents processed.</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="jsMath2jax.html"
title="next chapter">The jsMath2jax Preprocessor</a></p>
<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="mml2jax.html" title="The mml2jax Preprocessor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The Core Configuration Options &mdash; MathJax v1.1 documentation</title>
<title>The Core Configuration Options &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The tex2jax Preprocessor" href="tex2jax.html" />
<link rel="prev" title="Configuration Objects" href="index.html" />
@ -41,7 +41,7 @@
<li class="right" >
<a href="index.html" title="Configuration Objects"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -70,8 +70,7 @@ directory.</p>
<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">mml2jax</span></tt> preprocessors can be listed here, as well as 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>
@ -84,7 +83,9 @@ improve their experience of your site.</p>
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>
configuration is one such configuration file, and there are a
number of other pre-defined configurations (see <a class="reference internal" href="../configuration.html#config-files"><em>Using a
configuration file</em></a> for more details).</p>
</dd></dl>
<dl class="describe">
@ -98,8 +99,8 @@ directory.</p>
<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><p>CSS styles to be defined dynamically at startup time. These are
in the form <cite>selector:rules</cite> (see <a class="reference internal" href="../CSS-styles.html#css-style-objects"><em>CSS Style Objects</em></a> for complete details).</p>
</dd></dl>
<dl class="describe">
@ -116,20 +117,21 @@ MathJax inserts the typeset mathematics, this means there will be
no space before it and the preceding text. In order to avoid
this, you should include some &#8220;guard characters&#8221; 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">&quot;\\[&quot;</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">&quot;\\\\&quot;</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>
Note that these are used as part of a regular expression, 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">&quot;\\[&quot;</span></tt> represents the
pattern <tt class="docutils literal"><span class="pre">\[</span></tt> in the regular expression, or <tt class="docutils literal"><span class="pre">[</span></tt> in the text of
the web page. That means that if you want an actual backslash in
your guard characters, you need to use <tt class="docutils literal"><span class="pre">&quot;\\\\&quot;</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 <tt class="docutils literal"><span class="pre">preJax</span></tt> and <tt class="docutils literal"><span class="pre">postJax</span></tt> 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">&quot;\\\\\\\\\&quot;</span></tt> makes a double backslash the preJax text</p>
<div><p><tt class="docutils literal"><span class="pre">preJax:</span> <span class="pre">&quot;\\\\\\\\\&quot;</span></tt> makes a double backslash the <tt class="docutils literal"><span class="pre">preJax</span></tt> text</p>
<p><tt class="docutils literal"><span class="pre">preJax:</span> <span class="pre">&quot;\\[\\[&quot;,</span> <span class="pre">postJax:</span> <span class="pre">&quot;\\]\\]&quot;</span></tt> makes it so jax
scripts must be enclosed in double brackets.</p>
</div></blockquote>
@ -212,14 +214,53 @@ yourself by hand, set this value to <tt class="docutils literal"><span class="pr
<dt>
<tt class="descname">elements: []</tt></dt>
<dd><p>This is a list of DOM element ID&#8217;s that are the ones to process for
mathematics when any of the Hub typesetting calls (Typeset, Process,
Update, etc.) are called with no element specified, and during
mathematics when any of the Hub typesetting calls (<tt class="docutils literal"><span class="pre">Typeset()</span></tt>, <tt class="docutils literal"><span class="pre">Process()</span></tt>,
<tt class="docutils literal"><span class="pre">Update()</span></tt>, etc.) are called with no element specified, and during
MathJax&#8217;s initial typesetting run when it starts up. This lets you
restrict the processing to particular containers rather than scanning
the entire document for mathematics. If none are supplied, the complete
document is processed.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">positionToHash: true</tt></dt>
<dd><p>Since typesetting usually changes the vertical dimensions of the
page, if the URL contains an anchor position, then after the page
is typeset, you may no longer be positioned at the correct
position on the page. MathJax can reposition to that location
after it completes its initial typesetting of the page. This
value controls whether MathJax will reposition the browser to the
<tt class="docutils literal"><span class="pre">#hash</span></tt> location from the page URL after typesetting for the page.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">showMathMenu: true</tt></dt>
<dt>
<tt class="descname">showMathMenuMSIE: true</tt></dt>
<dd><p>These control whether to attach the MathJax contextual menu to the
expressions typeset by MathJax. Since the code for handling
MathPlayer in Internet Explorer is somewhat delicate, it is
controlled separately via <tt class="docutils literal"><span class="pre">showMathMenuMSIE</span></tt>, but the latter is
now deprecated in favor of the MathJax contextual menu settings
for MathPlayer (see below).</p>
<p>If <tt class="docutils literal"><span class="pre">showMathMenu</span></tt> is <tt class="docutils literal"><span class="pre">true</span></tt>, then right-clicking (on Windows
or Linux) or control-clicking (on Mac OS X) 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>
<p>These values used to be listed in the separate output jax, but
have been moved to this more central location since they are
shared by all output jax. MathJax will still honor their values
from their original positions, if they are set there.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">menuSettings: { ... }</tt></dt>
@ -267,9 +308,21 @@ to <tt class="docutils literal"><span class="pre">&quot;Browser&quot;</span></tt
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>
<dl class="describe">
<dt>
<tt class="descname">texHints: true</tt></dt>
<dd><p>This controls whether the &#8220;Show Source&#8221; menu item includes
special class names that help MathJax to typeset the
mathematics that was produced by the TeX input jax. If these
are included, then you can take the output from &#8220;Show Source&#8221;
and put it into a page that uses MathJax&#8217;s MathML input jax
and expect to get the same results as the original TeX.
(Without this, there may be some spacing differences.)</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>, <tt class="docutils literal"><span class="pre">font</span></tt>,
<tt class="docutils literal"><span class="pre">mpContext</span></tt>, and <tt class="docutils literal"><span class="pre">mpMouse</span></tt>, but these are maintained by
MathJax and should not be set by the page author.</p>
</dd></dl>
<dl class="describe">
@ -353,12 +406,12 @@ does <strong>not</strong> cause a default configuration file to be loaded.</p>
<li class="right" >
<a href="index.html" title="Configuration Objects"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Configuration Objects &mdash; MathJax v1.1 documentation</title>
<title>Configuration Objects &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="next" title="The Core Configuration Options" href="hub.html" />
<link rel="prev" title="Common Configurations" href="../config-files.html" />
</head>
@ -40,7 +40,7 @@
<li class="right" >
<a href="../config-files.html" title="Common Configurations"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -59,15 +59,15 @@ will see that <tt class="docutils literal"><span class="pre">config/default.js</
<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/default.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
JavaScript object that includes <cite>name:value</cite> 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 a configuration object as its value. The object is itself
a configuration object made up of name-value pairs that give the
sections in the configuration object labeled by the component name,
and using an object as its value. That object is itself
a configuration object made up of <cite>name:value</cite> 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>
@ -106,6 +106,7 @@ are categorized by the component they affect.</p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="tex2jax.html">The tex2jax preprocessor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="mml2jax.html">The mml2jax preprocessor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="asciimath2jax.html">The asciimath2jax preprocessor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="jsMath2jax.html">The jsMath2jax preprocessor options</a></li>
</ul>
</div>
@ -113,8 +114,10 @@ are categorized by the component they affect.</p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="TeX.html">The TeX input processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="MathML.html">The MathML input processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="AsciiMath.html">The AsciiMath input processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="HTML-CSS.html">The HTML-CSS output processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="NativeMML.html">The NativeMML output processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="SVG.html">The SVG output processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="MMLorHTML.html">The MMLorHTML configuration options</a></li>
</ul>
</div>
@ -122,6 +125,7 @@ are categorized by the component they affect.</p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="MathMenu.html">The MathMenu options</a></li>
<li class="toctree-l1"><a class="reference internal" href="MathZoom.html">The MathZoom options</a></li>
<li class="toctree-l1"><a class="reference internal" href="MathEvents.html">The MathEvents options</a></li>
<li class="toctree-l1"><a class="reference internal" href="FontWarnings.html">The FontWarnings options</a></li>
</ul>
</div>
@ -179,11 +183,11 @@ are categorized by the component they affect.</p>
<li class="right" >
<a href="../config-files.html" title="Common Configurations"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The jsMath2jax Preprocessor &mdash; MathJax v1.1 documentation</title>
<title>The jsMath2jax Preprocessor &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,10 +22,10 @@
<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="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The TeX input processor" href="TeX.html" />
<link rel="prev" title="The mml2jax Preprocessor" href="mml2jax.html" />
<link rel="prev" title="The asciimath2jax Preprocessor" href="asciimath2jax.html" />
</head>
<body>
@ -39,9 +39,9 @@
<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"
<a href="asciimath2jax.html" title="The asciimath2jax Preprocessor"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -98,8 +98,8 @@ details on how to represent HTML code in this way.</p>
<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>
<p class="topless"><a href="asciimath2jax.html"
title="previous chapter">The asciimath2jax Preprocessor</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="TeX.html"
title="next chapter">The TeX input processor</a></p>
@ -130,14 +130,14 @@ details on how to represent HTML code in this way.</p>
<a href="TeX.html" title="The TeX input processor"
>next</a> |</li>
<li class="right" >
<a href="mml2jax.html" title="The mml2jax Preprocessor"
<a href="asciimath2jax.html" title="The asciimath2jax Preprocessor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The mml2jax Preprocessor &mdash; MathJax v1.1 documentation</title>
<title>The mml2jax Preprocessor &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,9 +22,9 @@
<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="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The jsMath2jax Preprocessor" href="jsMath2jax.html" />
<link rel="next" title="The asciimath2jax Preprocessor" href="asciimath2jax.html" />
<link rel="prev" title="The tex2jax Preprocessor" href="tex2jax.html" />
</head>
<body>
@ -36,12 +36,12 @@
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="jsMath2jax.html" title="The jsMath2jax Preprocessor"
<a href="asciimath2jax.html" title="The asciimath2jax 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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -101,8 +101,8 @@ details on how to represent HTML code in this way.</p>
<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>
<p class="topless"><a href="asciimath2jax.html"
title="next chapter">The asciimath2jax Preprocessor</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -127,17 +127,17 @@ details on how to represent HTML code in this way.</p>
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="jsMath2jax.html" title="The jsMath2jax Preprocessor"
<a href="asciimath2jax.html" title="The asciimath2jax 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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The tex2jax Preprocessor &mdash; MathJax v1.1 documentation</title>
<title>The tex2jax Preprocessor &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 documentation" href="../index.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The mml2jax Preprocessor" href="mml2jax.html" />
<link rel="prev" title="The Core Configuration Options" href="hub.html" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -101,6 +101,21 @@ 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">balanceBraces: true,</tt></dt>
<dd><p>This value determines whether <cite>tex2jax</cite> requires braces to be
balanced within math delimiters (which allows for nested dollar
signs). Set to <tt class="docutils literal"><span class="pre">false</span></tt> to get pre-v2.0 compatibility. When
<tt class="docutils literal"><span class="pre">true</span></tt>,</p>
<div class="highlight-latex"><div class="highlight"><pre><span class="s">$</span><span class="nb">y </span><span class="o">=</span><span class="nb"> x^</span><span class="m">2</span><span class="nb"> </span><span class="nv">\hbox</span><span class="nb">{ when </span><span class="s">$</span>x &gt; 2<span class="s">$</span><span class="nb">}</span><span class="s">$</span>.
</pre></div>
</div>
<p>will be properly handled as a single expression. When <tt class="docutils literal"><span class="pre">false</span></tt>,
it would be interpreted as two searpate expressions, each with
improperly balanced braces.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">processEscapes: false</tt></dt>
@ -163,25 +178,33 @@ contexts.</p>
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>
special characters. The pattern is inserted into one that
requires your pattern to match a complete word, so setting
<tt class="docutils literal"><span class="pre">ignoreClass:</span> <span class="pre">&quot;class2&quot;</span></tt> would cause it to match an element with
<tt class="docutils literal"><span class="pre">class=&quot;class1</span> <span class="pre">class2</span> <span class="pre">class3&quot;</span></tt> but not <tt class="docutils literal"><span class="pre">class=&quot;myclass2&quot;</span></tt>.
Note that you can assign several classes by separating them by the
vertical line character (<tt class="docutils literal"><span class="pre">|</span></tt>). For instance, with
<tt class="docutils literal"><span class="pre">ignoreClass:</span> <span class="pre">&quot;class1|class2&quot;</span></tt> any element assigned a class of
either <tt class="docutils literal"><span class="pre">class1</span></tt> or <tt class="docutils literal"><span class="pre">class2</span></tt> will be skipped.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">processClass: &quot;tex2jax_process&quot;</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>
<em>should</em> be processed by <cite>tex2jax</cite>. This is used to restart
processing within tags that have been marked as ignored via the
<tt class="docutils literal"><span class="pre">ignoreClass</span></tt> or to cause a tag that appears in the <tt class="docutils literal"><span class="pre">skipTags</span></tt>
list to be processed rather than skipped. 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 inserted into one
that requires your pattern to match a complete word, so setting
<tt class="docutils literal"><span class="pre">processClass:</span> <span class="pre">&quot;class2&quot;</span></tt> would cause it to match an element with
<tt class="docutils literal"><span class="pre">class=&quot;class1</span> <span class="pre">class2</span> <span class="pre">class3&quot;</span></tt> but not <tt class="docutils literal"><span class="pre">class=&quot;myclass2&quot;</span></tt>.
Note that you can assign several classes by separating them by the
vertical line character (<tt class="docutils literal"><span class="pre">|</span></tt>). For instance, with
<tt class="docutils literal"><span class="pre">processClass:</span> <span class="pre">&quot;class1|class2&quot;</span></tt> any element assigned a class of
either <tt class="docutils literal"><span class="pre">class1</span></tt> or <tt class="docutils literal"><span class="pre">class2</span></tt> will have its contents processed.</p>
</dd></dl>
</div>
@ -227,12 +250,12 @@ been marked as ignored above.</p>
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MathJax Output Formats &mdash; MathJax v1.1 documentation</title>
<title>MathJax Output Formats &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,9 +22,9 @@
<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="top" title="MathJax v2.0 documentation" href="index.html" />
<link rel="next" title="The MathJax Community" href="community.html" />
<link rel="prev" title="MathJax MathML Support" href="mathml.html" />
<link rel="prev" title="MathJax AsciiMath Support" href="asciimath.html" />
</head>
<body>
@ -38,9 +38,9 @@
<a href="community.html" title="The MathJax Community"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="mathml.html" title="MathJax MathML Support"
<a href="asciimath.html" title="MathJax AsciiMath Support"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -51,65 +51,88 @@
<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>
<p>Currently, MathJax can render math in three ways:</p>
<ul class="simple">
<li>Using HTML-with-CSS to lay out the mathematics, or</li>
<li>Using HTML-with-CSS to lay out the mathematics,</li>
<li>Using <a class="reference internal" href="glossary.html#term-svg"><em class="xref std std-term">SVG</em></a> to lay out the mathematics, or</li>
<li>Using a browser&#8217;s native MathML support.</li>
</ul>
<p>These are implemented by the <cite>HTML-CSS</cite> and <cite>NativeMML</cite> output
<p>These are implemented by the <cite>HTML-CSS</cite>, <cite>SVG</cite> and <cite>NativeMML</cite> output
processors.</p>
<p>If you are using one of the combined configuration files, then this will
select one of these output processors for you. If the config file ends in
<tt class="docutils literal"><span class="pre">_HTML</span></tt>, then it is the HTML-CSS output processor, and if it ends in
<tt class="docutils literal"><span class="pre">_SVG</span></tt> then the SVG output processor will be used. If it ends in
<tt class="docutils literal"><span class="pre">_HTMLorMML</span></tt>, then the NativeMML output processor will be chosen if the
browser supports it, otherwise HTML-CSS output will be used.</p>
<p>If you are performing your own in-line or file-based configuration, you
select which one you want to use by including either <tt class="docutils literal"><span class="pre">&quot;output/HTML-CSS&quot;</span></tt>
or <tt class="docutils literal"><span class="pre">&quot;output/NativeMML&quot;</span></tt> in the <cite>jax</cite> array of your MathJax configuration.
For example</p>
browser supports it well enough, otherwise HTML-CSS output will be used.</p>
<p>If you are performing your own in-line or file-based configuration,
you select which one you want to use by including either
<tt class="docutils literal"><span class="pre">&quot;output/HTML-CSS&quot;</span></tt>, <tt class="docutils literal"><span class="pre">&quot;output/SVG&quot;</span></tt>, or <tt class="docutils literal"><span class="pre">&quot;output/NativeMML&quot;</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">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</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
<p>The <strong>HTML-CSS output processor</strong> produces high-quality output in all
major browsers, with results that are consistent across browsers and
operating systems. This is MathJax&#8217;s primary output mode. Its major
advantage is its quality and consistency; its drawback is that it is
slower than 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 &#8220;IE8
standards mode&#8221; 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&#8217;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
slower than the NativeMML mode at rendering the mathematics.
Historically, the performance in Internet Explorer (and IE8 in
particular) was quite poor, with the page getting slower and slower as
more math is processed. MathJax version 2.0 includes a number of
optimizations to improve the display performance in IE, and it is now
more comparable to other browsers. The HTML-CSS output uses web-based
fonts so that users don&#8217;t have to have math fonts installed on their
computers; but this does introduce some printing issues in some
browsers.</p>
<p>The <strong>SVG output processor</strong> is new in MathJax version 2.0, and it uses
<cite>Scalable Vector Graphics</cite> to render the mathematics on the page. SVG
is supported in all the major browsers and most mobile devices; note,
however, that Internet Explorer prior to IE9 does not support SVG, and
IE9 only does in &#8220;IE9 standards mode&#8221;, not its emulation modes for
earlier versions. The SVG output mode is high quality and slightly
faster than HTML-CSS, and it does not suffer from some of the
font-related issues that HTML-CSS does, so prints well in all
browsers. This format also works well in some ebook readers (e.g.,
iBooks). The disadvantage of this mode is that it does not take
advantage of STIX fonts, and so only has access to the characters in
the web-based fonts, and it variable-width tables become fixed size
once they are typeset, and don&#8217;t rescale if the window size changes
(for example). Since equation numbers are handled through
variable-width tables, that means equation numbers may not stay at the
edge of the window if it is resized.</p>
<p>The <strong>NativeMML output processor</strong> uses the browser&#8217;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&#8217;t recommend using the NativeMML output processor with Opera. Safari,
don&#8217;t recommend using the NativeMML output processor with Opera.
Safari has some support for MathML since version 5.1, but the quality
is not as high as either Firefox&#8217;s implementation or IE with MathPlayer.
Chrome, Konqueror, and most other browsers don&#8217;t support MathML
natively, but may in the future, since MathML is part of the HTML5
specification.</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, as the HTML-CSS output processor does. The disadvantage
is that you are dependent on the browser&#8217;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&#8217;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&#8217;s control.</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, as the HTML-CSS output processor does.
The disadvantage is that you are dependent on the browser&#8217;s MathML
implementation for your rendering, and these vary in quality of output
and completeness of implementation. MathJax relies on features that
are not available in some renderers (for example, Firefox&#8217;s MathML
support does not implement the features needed for labeled equations).
The results using the NativeMML output processor may have spacing or
other rendering problems that are outside of MathJax&#8217;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&#8217;s browser capabilities. MathJax can help with that, however,
since a number of its combined configuration files will select NativeMML
output when the browser supports it, and HTML-CSS output otherwise. These
are the configuration files that end in <tt class="docutils literal"><span class="pre">_HTMLorMML</span></tt>.</p>
since a number of its combined configuration files will select
NativeMML output when the browser supports it well enough, and
HTML-CSS output otherwise. These are the configuration files that end
in <tt class="docutils literal"><span class="pre">_HTMLorMML</span></tt>.</p>
<p>If you are doing your own configuration, there is a special configuration
file that you can include 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">&quot;MMLorHTML.js&quot;</span></tt> to
@ -120,14 +143,22 @@ the abilities of your user&#8217;s browser.</p>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</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/default.js</span></tt> file or the
<p>By default, MathJax will choose HTML-CSS in all browsers except for
one case: Internet Explorer when the MathPlayer plugin is present.
In the past, MathJax selected NativeMML output for Firefox as well,
but we have found that there are too many rendering issues with
Firefox&#8217;s native MathML implementation, and so MathJax now selects
HTML-CSS output for Firefox by default as well. Users can still use
the Mathjax contextual menu to select the NativeMML renderer if they
wish to choose greater speed at the expense of some quality.</p>
<p>You can customize which choice MathJax makes on a browser-by-browser
basis or a global basis. See the <tt class="docutils literal"><span class="pre">config/default.js</span></tt> file or the
<a class="reference internal" href="options/MMLorHTML.html#configure-mmlorhtml"><em>Configuring MMLorHTML</em></a> section for further
details. As an example, this configuration tells MathJax to use HTML-CSS
output rather than native MathML support for Firefox:</p>
details. As an example, this configuration tells MathJax to use
native MathML support rather than HTML-CSS output for Firefox:</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</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">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">Firefox</span><span class="o">:</span> <span class="s2">&quot;HTML&quot;</span> <span class="p">}</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">Firefox</span><span class="o">:</span> <span class="s2">&quot;MML&quot;</span> <span class="p">}</span> <span class="p">}</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
@ -135,11 +166,10 @@ output rather than native MathML support for Firefox:</p>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>With this configuration, MathML output will be used only for IE with the
MathPlayer plugin (Firefox is the only other browser to have native MathML
support that is sufficient for use with MathJax). Note, however, that a
user can employ the MathJax contextual menu to select the other renderer if
he or she wishes.</p>
<p>With this configuration, MathML output will be used for both Firefox
and IE with the MathPlayer plugin. Note, however, that a user can
employ the MathJax contextual menu to select the other renderer if he
or she wishes.</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
@ -147,37 +177,91 @@ 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.</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
it can operate, and that are triggered by the <cite>DOCTYPE</cite> of the document
being viewed. Its &#8220;quirks&#8221; mode is its fastest mode, and its &#8220;IE8
standards&#8221; 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 &#8220;standards&#8221; 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, on the sample
equations page in <tt class="docutils literal"><span class="pre">test/sample.html</span></tt>.</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">&lt;meta</span> <span class="na">http-equiv=</span><span class="s">&quot;X-UA-Compatible&quot;</span> <span class="na">content=</span><span class="s">&quot;IE=EmulateIE7&quot;</span><span class="nt">&gt;</span>
<div class="section" id="automatic-line-breaking">
<span id="automatic-linebreaking"></span><h2>Automatic Line Breaking<a class="headerlink" href="#automatic-line-breaking" title="Permalink to this headline"></a></h2>
<p>The HTML-CSS and SVG output processors implement (most of) the MathML3
automatic line-breaking specification. (The NativeMML output
processor relies on the browser&#8217;s native MathML support to handle line
breaking when it is used.) Since line-breaking takes extra processing
and so can slow down the mathematical output, it is off by default,
but you can enable it by adding</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</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="s2">&quot;HTML-CSS&quot;</span><span class="o">:</span> <span class="p">{</span> <span class="nx">linebreaks</span><span class="o">:</span> <span class="p">{</span> <span class="nx">automatic</span><span class="o">:</span> <span class="kc">true</span> <span class="p">}</span> <span class="p">},</span>
<span class="nx">SVG</span><span class="o">:</span> <span class="p">{</span> <span class="nx">linebreaks</span><span class="o">:</span> <span class="p">{</span> <span class="nx">automatic</span><span class="o">:</span> <span class="kc">true</span> <span class="p">}</span> <span class="p">}</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>at the top of the <tt class="docutils literal"><span class="pre">&lt;head&gt;</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 performance from Internet Explorer
8. Note that this line must come at the beginning of the <tt class="docutils literal"><span class="pre">&lt;head&gt;</span></tt>,
before any stylesheets or other content are loaded.</p>
<p>Alternatively, 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>
<p>It appears that IE9 in IE9 standards mode may perform better than IE8, but
since IE9 is still in beta testing as of this writing, we have yet to see
exactly what the performance of MathJax in IE9 will be like.</p>
<p>to your page just before the <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tag that loads
<tt class="docutils literal"><span class="pre">MathJax.js</span></tt> itself.</p>
<p>Note that line breaking only applies to displayed equations, not
in-line equations (unless the in-line euqation is itself longer than a
line), and that the line-breaks are only computed once when the
equation is initially typeset, and do not change if the user changes
the window size, or if the container changes size for some other
reason.</p>
<p>You can control what width is used to determine where the line breaks
shoud occur using the <tt class="docutils literal"><span class="pre">container</span></tt> parameter of the <tt class="docutils literal"><span class="pre">linebreaks</span></tt>
block. By default it is the width of the containing element, but you
can make it a fixed width, or make it a percentage of the container.
See the <a class="reference internal" href="options/HTML-CSS.html#configure-html-css"><em>HTML-CSS configuration</em></a> or
<a class="reference internal" href="options/SVG.html#configure-svg"><em>SVG configuration</em></a> pages for more details.</p>
<p>The linbe-breaking algorithm uses the nesting depth, the type of
operator, the size of spaces, and other factors to decide on the
breakpoints, but it does not know the meaning of the mathematics, and
may not choose the optimal breakpoints. We will continue to work on
the algorithm as we gain information from its actual use in the field.
If you are using <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> as your input format, you can use the
<tt class="docutils literal"><span class="pre">linebreak=&quot;goodbreak&quot;</span></tt> and <tt class="docutils literal"><span class="pre">linebreak=&quot;badbreak&quot;</span></tt> attributes on
<tt class="docutils literal"><span class="pre">&lt;mo&gt;</span></tt> elements to help MathJax pick the best breakpoints for your
mathematics.</p>
</div>
<div class="section" id="html-css-with-ie">
<span id="html-css-with-ie8"></span><h2>HTML-CSS with IE<a class="headerlink" href="#html-css-with-ie" title="Permalink to this headline"></a></h2>
<p>The performance of MathJax in Internet Explorer 8 and 9 has been
substantially improved in version 2.0. The HTML-CSS output processing
was redesigned to avoid the page reflows that were the main source of
the speed problem in I8 and IE9. For test pages having between 20 and
50 typeset expressions, we see an 80% reduction in output processing
time for IE8, a 50% reduction for IE9, and between 15% and 25%
reduction for most other browsers over the v1.1a times. Since the
processing time in v1.1a grows non-linearly in IE, you should see even
larger savings for pages with more equations when using v2.0.</p>
<p>In the past, we recommended forcing IE8 and IE9 into IE7-emulation
mode in order to get better performance. That is no longer necessary.
Indeed, the fastest modes in IE8 and IE9 now are their IE8 standards
and IE9 standards modes, so it is best to force the highest mode
possible. That can be accomplished by adding</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;meta</span> <span class="na">http-equiv=</span><span class="s">&quot;X-UA-Compatible&quot;</span> <span class="na">content=</span><span class="s">&quot;IE=edge&quot;</span><span class="nt">&gt;</span>
</pre></div>
</div>
<p>at the top of the <tt class="docutils literal"><span class="pre">&lt;head&gt;</span></tt> section of your HTML documents. Note
that this line must come at the beginning of the <tt class="docutils literal"><span class="pre">&lt;head&gt;</span></tt>, before
any stylesheets, scripts, or other content are loaded.</p>
</div>
<div class="section" id="html-css-extensions">
<span id="id1"></span><h2>HTML-CSS Extensions<a class="headerlink" href="#html-css-extensions" title="Permalink to this headline"></a></h2>
<p>The HTML-CSS output jax uses elements with width set to 100% when it
typesets displayed equations. If there are floating elements on the
left or right, this can mean that displayed mathematics isn&#8217;t properly
centered, and can cause equation numbers to overlap the floating
content. To avoid this, you can specify the <cite>handle-floats</cite> extension
in the <cite>extensions</cite> array of your <cite>HTML-CSS</cite> configuration block.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="s2">&quot;HTML-CSS&quot;</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;handle-floats.js&quot;</span><span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This will use CSS that puts the displayed equations into elements that
work like tabel cells, and won&#8217;t overlap the floaring content.
Because this is somewhat of a misuse of CSS, it is not used by
default, but it has proved successful in most situations, so you may
consider using it in pages that include material that floats to the
left or right of text containing displayed mathematics, especially
when equation numbers or tags are used.</p>
<p>See the <a class="reference internal" href="options/HTML-CSS.html#configure-html-css"><em>HTML-CSS configuration options</em></a> for
other options of the HTML-CSS output jax.</p>
</div>
</div>
@ -191,14 +275,16 @@ exactly what the performance of MathJax in IE9 will be like.</p>
<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>
<li><a class="reference internal" href="#automatic-line-breaking">Automatic Line Breaking</a></li>
<li><a class="reference internal" href="#html-css-with-ie">HTML-CSS with IE</a></li>
<li><a class="reference internal" href="#html-css-extensions">HTML-CSS Extensions</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="mathml.html"
title="previous chapter">MathJax MathML Support</a></p>
<p class="topless"><a href="asciimath.html"
title="previous chapter">MathJax AsciiMath Support</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="community.html"
title="next chapter">The MathJax Community</a></p>
@ -229,13 +315,13 @@ exactly what the performance of MathJax in IE9 will be like.</p>
<a href="community.html" title="The MathJax Community"
>next</a> |</li>
<li class="right" >
<a href="mathml.html" title="MathJax MathML Support"
<a href="asciimath.html" title="MathJax AsciiMath Support"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Using MathJax in popular web platforms &mdash; MathJax v1.1 documentation</title>
<title>Using MathJax in popular web platforms &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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>
@ -40,7 +40,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -51,13 +51,14 @@
<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>MathJax plugins are available for a growing number of wikis, blogs, and
other content-management systems. These include WordPress, Blogger,
Sphinx, TiddlyWiki, and MathEL-Wiki. A list of these is available in the
<a class="reference external" href="http://www.mathjax.org/community/mathjax-in-use/#web-apps">web applications and integrations</a> list of the
<p>MathJax plugins are available for a growing number of wikis, blogs,
and other content-management systems. These include WordPress,
Blogger, Sphinx, TiddlyWiki, and MathEL-Wiki. A list of these is
available in the <a class="reference external" href="http://www.mathjax.org/community/mathjax-in-use">web applications</a> list of the
<a class="reference external" href="http://www.mathjax.org">MathJax web site</a>.</p>
<p>If the program you are using is not one of these, you may still be able to
use MathJax by modifying the theme or template for your wiki or blog.</p>
use MathJax by modifying the theme or template for your wiki or blog,
as explained below.</p>
<div class="section" id="using-mathjax-in-a-theme-file">
<h2>Using MathJax in a Theme File<a class="headerlink" href="#using-mathjax-in-a-theme-file" title="Permalink to this headline"></a></h2>
<p>Most web-based content-management systems include a theme or template
@ -164,11 +165,11 @@ instructions for these are given via the links below.</p>
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Using MathJax in Movable Type &mdash; MathJax v1.1 documentation</title>
<title>Using MathJax in Movable Type &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Using MathJax in popular web platforms</a> &raquo;</li>
</ul>
</div>
@ -129,12 +129,12 @@ your pages. If you need to adjust the configuration, see
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Using MathJax in popular web platforms</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Installing MathJax in WordPress &mdash; MathJax v1.1 documentation</title>
<title>Installing MathJax in WordPress &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Using MathJax in popular web platforms</a> &raquo;</li>
</ul>
</div>
@ -131,12 +131,12 @@ your pages. If you need to adjust the configuration, see
<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> &raquo;</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="index.html" >Using MathJax in popular web platforms</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Using Queues &mdash; MathJax v1.1 documentation</title>
<title>Using Queues &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -22,7 +22,7 @@
<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="top" title="MathJax v2.0 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" />
@ -41,7 +41,7 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="synchronize.html" accesskey="U">Synchronizing your code with MathJax</a> &raquo;</li>
</ul>
</div>
@ -319,12 +319,12 @@ finishes everything it has queued when it was loaded. For example,</p>
<li class="right" >
<a href="callbacks.html" title="Using Callbacks"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
<li><a href="synchronize.html" >Synchronizing your code with MathJax</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search &mdash; MathJax v1.1 documentation</title>
<title>Search &mdash; MathJax v2.0 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',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -23,7 +23,7 @@
<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" />
<link rel="top" title="MathJax v2.0 documentation" href="index.html" />
<script type="text/javascript">
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>
@ -38,7 +38,7 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -86,11 +86,11 @@
<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> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>

Some files were not shown because too many files have changed in this diff Show More