First pass at updating documentation for v2.0. Added docs for AsciiMath input and SVG output, plus some examples. Still need to go through configuration options to update those, and advanced topics, particularly the API documents.

This commit is contained in:
Davide P. Cervone 2012-02-15 11:06:00 -05:00
parent 9d1480b1c9
commit 3e5c8181f7
98 changed files with 4954 additions and 1336 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

@ -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

@ -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

@ -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::

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
@ -263,7 +261,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 +326,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

@ -0,0 +1,40 @@
.. _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 use a combined configuration file
that includes AsciiMath input. 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

@ -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"``. 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"``. 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

@ -21,7 +21,7 @@ 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
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.
@ -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,6 +78,7 @@ 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 MMLorHTML configuration options <MMLorHTML>

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
@ -34,35 +36,57 @@ 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
@ -119,41 +153,29 @@ be taken lightly.
.. _html-css-with-ie8:
HTML-CSS with IE8
=================
HTML-CSS with IE8 and IE9
=========================
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``.
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.
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
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=EmulateIE7">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
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.
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.
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.
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.

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

@ -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

@ -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,151 @@ 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-extensions:
@ -165,7 +310,53 @@ 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).
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
----------------------
@ -208,6 +399,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: ["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.
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 +710,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)
}
@ -358,6 +839,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 +917,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 +987,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 +1016,8 @@ C
\class [HTML] non-standard
\clubsuit
\colon
\color
\color color
\colorbox color
\complement AMSsymbols
\cong
\coprod
@ -603,12 +1098,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 +1123,7 @@ F
\fallingdotseq AMSsymbols
\fbox
\fcolorbox color
\Finv AMSsymbols
\flat
\forall
@ -642,6 +1141,7 @@ G
\Gamma
\gamma
\gcd
\gdef begingroup
\ge
\genfrac AMSmath
\geq
@ -652,6 +1152,7 @@ G
\ggg AMSsymbols
\gggtr AMSsymbols
\gimel AMSsymbols
\global begingroup
\gnapprox AMSsymbols
\gneq AMSsymbols
\gneqq AMSsymbols
@ -774,6 +1275,7 @@ L
\lesseqqgtr AMSsymbols
\lessgtr AMSsymbols
\lesssim AMSsymbols
\let [newcommand]
\lfloor
\lg
\lgroup
@ -843,6 +1345,7 @@ M
\mathscr
\mathsf
\mathstrut
\mathtip action non-standard
\mathtt
\matrix
\max
@ -850,9 +1353,11 @@ M
\measuredangle AMSsymbols
\mho AMSsymbols
\mid
\middle
\min
\mit
\mkern
\mmlToken non-standard
\mod
\models
\moveleft
@ -880,6 +1385,7 @@ N
\neq
\newcommand [newcommand]
\newenvironment [newcommand]
\Newextarrow extpfeil
\newline
\nexists AMSsymbols
\ngeq AMSsymbols
@ -1007,7 +1513,9 @@ R
\rbrack
\rceil
\Re
\ref [AMSmath]
\renewcommand [newcommand]
\renewenvironment [newcommand]
\require non-standard
\restriction AMSsymbols
\rfloor
@ -1130,6 +1638,7 @@ T
\textit
\textrm
\textstyle
\texttip action non-standard
\tfrac AMSmath
\therefore AMSsymbols
\Theta
@ -1142,6 +1651,7 @@ T
\tiny
\Tiny non-standard
\to
\toggle action non-standard
\top
\triangle
\triangledown AMSsymbols
@ -1250,8 +1760,14 @@ X
\Xi
\xi
\xcancel cancel
\xleftarrow AMSmath
\xlongequal extpfeil
\xmapsto extpfeil
\xrightarrow AMSmath
\xtofrom extpfeil
\xtwoheadleftarrow extpfeil
\xtwoheadrightarrow extpfeil
Y
-

View File

@ -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

@ -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>
@ -420,12 +420,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>
@ -271,12 +271,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>
@ -300,12 +300,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>
@ -685,12 +685,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>
@ -210,12 +210,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>
@ -313,12 +313,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>
@ -228,12 +228,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>
@ -205,12 +205,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>
@ -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,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="Whats New in MathJax v1.1" href="whats-new.html" />
<link rel="prev" title="MathJax Output Formats" href="output.html" />
</head>
@ -40,7 +40,7 @@
<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>
@ -141,11 +141,11 @@ our <a class="reference external" href="http://www.mathjax.org/community/mathjax
<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>
@ -246,11 +246,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>
@ -54,6 +54,7 @@
<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>
@ -163,6 +164,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>
@ -225,6 +227,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>
@ -288,11 +291,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>
@ -121,7 +122,7 @@ MathML that works in all modern browsers.</p>
</li>
</ul>
<hr class="docutils" />
<p>This version of the documentation was built July 27, 2011.</p>
<p>This version of the documentation was built February 15, 2012.</p>
</div>
</div>
@ -179,11 +180,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>
@ -248,7 +246,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 +299,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 +366,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>
@ -291,11 +291,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,145 @@
<!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 use a combined configuration file
that includes AsciiMath input. 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,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="Using MathJax in popular web platforms" href="../platforms/index.html" />
<link rel="prev" title="The MathZoom extension" href="MathZoom.html" />
@ -41,7 +41,7 @@
<li class="right" >
<a href="MathZoom.html" title="The MathZoom extension"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &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>
@ -252,12 +252,12 @@ The default is 1.5 seconds.</p>
<li class="right" >
<a href="MathZoom.html" title="The MathZoom 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>
@ -211,8 +211,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 +243,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,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 MathMenu extension" href="MathMenu.html" />
<link rel="prev" title="The NativeMML output processor" href="NativeMML.html" />
@ -41,7 +41,7 @@
<li class="right" >
<a href="NativeMML.html" title="The NativeMML output processor"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &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>
@ -128,12 +128,12 @@ complicated output generated by MathJax, so its setting is
<li class="right" >
<a href="NativeMML.html" title="The NativeMML output processor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &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 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>
@ -86,8 +86,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 +112,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>
@ -179,12 +179,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,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 FontWarnings extension" href="FontWarnings.html" />
<link rel="prev" title="The MathMenu extension" href="MathMenu.html" />
@ -41,7 +41,7 @@
<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>
@ -132,12 +132,12 @@ style in a JavaScript object.</p>
<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,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 MMLorHTML configuration options" href="MMLorHTML.html" />
<link rel="prev" title="The HTML-CSS output processor" href="HTML-CSS.html" />
@ -41,7 +41,7 @@
<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>
@ -156,12 +156,12 @@ CSS style in a JavaScript object.</p>
<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>

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>
@ -178,12 +178,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>. 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>. 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>
@ -354,12 +354,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>
@ -66,7 +66,7 @@ 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
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.</p>
<p>For example,</p>
@ -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,6 +114,7 @@ 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="MMLorHTML.html">The MMLorHTML configuration options</a></li>
@ -179,11 +181,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>
@ -235,12 +235,12 @@ have its contents processed.</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,22 +51,24 @@
<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>
@ -76,40 +78,61 @@ in your document.</p>
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 SVG output processor 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 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
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,28 @@ 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="html-css-with-ie8-and-ie9">
<span id="html-css-with-ie8"></span><h2>HTML-CSS with IE8 and IE9<a class="headerlink" href="#html-css-with-ie8-and-ie9" 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. 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>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>
@ -191,14 +212,14 @@ 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="#html-css-with-ie8-and-ie9">HTML-CSS with IE8 and IE9</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 +250,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>

File diff suppressed because one or more lines are too long

View File

@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Using Signals &mdash; MathJax v1.1 documentation</title>
<title>Using Signals &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="Loading MathJax Dynamically" href="dynamic.html" />
<link rel="prev" title="Using Queues" href="queues.html" />
@ -41,7 +41,7 @@
<li class="right" >
<a href="queues.html" title="Using Queues"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &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>
@ -242,12 +242,12 @@ structure and methods of the signal object.</p>
<li class="right" >
<a href="queues.html" title="Using Queues"
>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>Getting Started &mdash; MathJax v1.1 documentation</title>
<title>Getting Started &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 and Testing MathJax" href="installation.html" />
<link rel="prev" title="What is MathJax?" href="mathjax.html" />
</head>
@ -40,7 +40,7 @@
<li class="right" >
<a href="mathjax.html" title="What is MathJax?"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -52,14 +52,14 @@
<div class="section" id="getting-started">
<span id="id1"></span><h1>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline"></a></h1>
<p>MathJax allows you to include mathematics in your web pages, either
using TeX and LaTeX notation, or as MathML, and you can even use both
in the same document.</p>
using TeX and LaTeX notation, MathML, or AsciiMath notation, and you
can even use all three in the same document.</p>
<p>There are two ways to access MathJax: the easiest way is to use the
copy of MathJax available from our distributed network service at
<tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt>, 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.</p>
@ -82,12 +82,12 @@ it.</li>
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&#8217;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
<a class="reference internal" href="configuration.html#loading"><em>Loading and Configuring MathJax</em></a> instructions.</p>
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&#8217;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 <a class="reference internal" href="configuration.html#loading"><em>Loading and Configuring MathJax</em></a> instructions.</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>To see how to enter mathematics in your web pages, see <a class="reference internal" href="#putting-mathematics-in-a-web-page">Putting
@ -101,7 +101,7 @@ possible a hostile 3rd party could intercept the MathJax program data,
and replace it. This is sometimes called a
<a class="reference external" href="http://en.wikipedia.org/wiki/Man-in-the-middle_attack">man-in-the-middle</a> attack.</p>
<p>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 <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tag instead of the one listed above:</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;https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="nt">&gt;</span>
@ -109,8 +109,9 @@ following <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></
</pre></div>
</div>
<p>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.</p>
not support the use of a human-friendly name like <tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt>
for secure connections; however, the address given above is stable and
safe to use.</p>
</div>
</div>
<div class="section" id="installing-your-own-copy-of-mathjax">
@ -118,8 +119,9 @@ secure connections. However, this address is stable and safe to use.</p>
<p>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:</p>
<ol class="arabic simple">
<li>Obtain a copy of MathJax and make it available on your server.</li>
<p>1. Obtain a copy of MathJax and make it available on your server or
hard disk.</p>
<ol class="arabic simple" start="2">
<li>Configure MathJax to suit the needs of your site.</li>
<li>Link MathJax into the web pages that are to include mathematics.</li>
<li>Put mathematics into your web pages so that MathJax can display
@ -133,52 +135,53 @@ should obtain a file named something like
<tt class="docutils literal"><span class="pre">mathjax-MathJax-v1.1-X-XXXXXXXX.zip</span></tt>, where the X&#8217;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.</p>
need. Note that this is different from v1.0 and earlier releases,
which had the fonts separate from the rest of the code.</p>
<p>Unpack the archive and place the resulting MathJax folder onto your
web server at a convenient location where you can include it into your
web pages. For example, making <tt class="docutils literal"><span class="pre">MathJax</span></tt> a top-level directory on
your server would be one natural way to do this. That would let you
refer to the main MathJax file via the URL <tt class="docutils literal"><span class="pre">/MathJax/MathJax.js</span></tt>
from within any page on your server.</p>
<p>Note: While this is the easiest way to set up MathJax initially, there
<p><strong>Note:</strong> 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 <a class="reference external" href="http://git-scm.com/">Git</a> version
control system, and is described in the <a class="reference internal" href="installation.html#getting-mathjax-git"><em>Installing MathJax</em></a> document. If you prefer using <a class="reference external" href="http://subversion.apache.org/">Subversion</a>, you can also use that to get a copy
of MathJax (see <a class="reference internal" href="installation.html#getting-mathjax-svn"><em>Installing MathJax via SVN</em></a>).</p>
<p>Once you have MathJax set up on your server, you can test it using the
files in the <tt class="docutils literal"><span class="pre">MathJax/test</span></tt> directory. Load them in your browser
using its web address rather than opening them locally (i.e., use an
<tt class="docutils literal"><span class="pre">http://</span></tt> URL rather than a <tt class="docutils literal"><span class="pre">file://</span></tt> URL). When you view the
<tt class="docutils literal"><span class="pre">index.html</span></tt> file, after a few moments you should see a message
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&#8217;s permissions as well.) Check the server log files for any
errors that pertain to the MathJax installation; this may help locate
problems in the permission or locations of files.</p>
files in the <tt class="docutils literal"><span class="pre">MathJax/test</span></tt> 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 <tt class="docutils literal"><span class="pre">http://</span></tt> URL rather
than a <tt class="docutils literal"><span class="pre">file://</span></tt> URL). When you view the <tt class="docutils literal"><span class="pre">index.html</span></tt> file, after
a few moments you should see a message 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&#8217;s permissions as well.) Check
the server log files for any errors that pertain to the MathJax
installation; this may help locate problems in the permission or
locations of files.</p>
</div>
<div class="section" id="configuring-your-copy-of-mathjax">
<h3>Configuring your copy of MathJax<a class="headerlink" href="#configuring-your-copy-of-mathjax" title="Permalink to this headline"></a></h3>
<p>When you include MathJax into your web pages as described below, it
will load the file <tt class="docutils literal"><span class="pre">config/TeX-AMS-MML_HTMLorMML.js</span></tt> (i.e., the file
named <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML.js</span></tt> in the <tt class="docutils literal"><span class="pre">config</span></tt> folder of the
main <tt class="docutils literal"><span class="pre">MathJax</span></tt> folder). This file 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&#8217;s browser supports that, and will use
HTML-with-CSS to render the mathematics otherwise.</p>
main <tt class="docutils literal"><span class="pre">MathJax</span></tt> 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&#8217;s browser supports
that sufficiently, and will use HTML-with-CSS to render the
mathematics otherwise.</p>
<p>There are a number of other prebuilt configuration files that you can
choose from as well, or you could use the <tt class="docutils literal"><span class="pre">config/default.js</span></tt> file and
customize the settings yourself. The combined configuration files are
described more fully in <a class="reference internal" href="config-files.html#common-configurations"><em>Common Configurations</em></a>, and the configuration options are described in
<a class="reference internal" href="options/index.html#configuration"><em>Configuration Options</em></a>.</p>
<p>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 <a class="reference internal" href="installation.html#installation"><em>Installing and Configuring MathJax</em></a> for more
details.</p>
<p>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 <a class="reference internal" href="installation.html#installation"><em>Installing and Configuring MathJax</em></a> for more details.</p>
</div>
<div class="section" id="linking-your-copy-of-mathjax-into-a-web-page">
<h3>Linking your copy of MathJax into a web page<a class="headerlink" href="#linking-your-copy-of-mathjax-into-a-web-page" title="Permalink to this headline"></a></h3>
@ -215,13 +218,15 @@ of MathJax.</p>
</div>
<div class="section" id="putting-mathematics-in-a-web-page">
<h2>Putting mathematics in a web page<a class="headerlink" href="#putting-mathematics-in-a-web-page" title="Permalink to this headline"></a></h2>
<p>To put mathematics in your web page, you can use either <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a>
and <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a> notation or <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> 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.</p>
<p>To put mathematics in your web page, you can use <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a> and
<a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a> notation, <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> notation, <a class="reference internal" href="glossary.html#term-asciimath"><em class="xref std std-term">AsciiMath</em></a>
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.</p>
<div class="section" id="tex-and-latex-input">
<span id="id2"></span><h3>TeX and LaTeX input<a class="headerlink" href="#tex-and-latex-input" title="Permalink to this headline"></a></h3>
<p>Mathematics that is written in <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a> or <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a> format is
@ -255,9 +260,12 @@ options</em></a> page, for additional configuration
parameters that you can specify for the <cite>tex2jax</cite> preprocessor,
which is the component of MathJax that identifies TeX notation within
the page. See the <a class="reference internal" href="tex.html#tex-support"><em>TeX and LaTeX</em></a> page for
more on MathJax&#8217;s support for TeX.</p>
<p>Here is a complete sample page containing TeX mathematics (also available
in the <tt class="docutils literal"><span class="pre">test/sample-tex.html</span></tt> file):</p>
more on MathJax&#8217;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.</p>
<p>Here is a complete sample page containing TeX mathematics (also
available in the <a class="reference external" href="http://cdn.mathjax.org/mathjax/2.0-latest/test/sample-tex.html">test/sample-tex.html</a>
file):</p>
<div class="highlight-html"><div class="highlight"><pre><span class="cp">&lt;!DOCTYPE html&gt;</span>
<span class="nt">&lt;html&gt;</span>
<span class="nt">&lt;head&gt;</span>
@ -282,6 +290,15 @@ In particular, you need to be careful about the use of less-than
signs, since those are what the browser uses to indicate the start of
a tag in HTML. Putting a space on both sides of the less-than sign
should be sufficient, but see <a class="reference internal" href="tex.html#tex-support"><em>TeX and LaTeX support</em></a> for details.</p>
<p>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 <a class="reference internal" href="glossary.html#term-markdown"><em class="xref std std-term">Markdown</em></a> 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 <a class="reference internal" href="tex.html#tex-support"><em>TeX
and LaTeX support</em></a> for some suggestions about how to
deal with the problem.</p>
<p>There are a number of extensions for the TeX input processor that are
loaded by the <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt> configuration. These include:</p>
<ul class="simple">
@ -294,10 +311,12 @@ an error message when there is a problem processing the TeX, and</li>
<li><cite>TeX/noUndefined.js</cite>, which prevents undefined macros from
producing an error message, and instead shows the macro name in red.</li>
</ul>
<p>Other extensions may be loaded automatically when needed.</p>
<p>Other extensions may be loaded automatically when needed. See
<a class="reference internal" href="tex.html#tex-support"><em>TeX and LaTeX support</em></a> for details on the other
TeX extensions that are available.</p>
</div>
<div class="section" id="mathml-input">
<h3>MathML input<a class="headerlink" href="#mathml-input" title="Permalink to this headline"></a></h3>
<span id="id3"></span><h3>MathML input<a class="headerlink" href="#mathml-input" title="Permalink to this headline"></a></h3>
<p>For mathematics written in <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> notation, you mark your
mathematics using standard <tt class="docutils literal"><span class="pre">&lt;math&gt;</span></tt> tags, where <tt class="docutils literal"><span class="pre">&lt;math</span>
<span class="pre">display=&quot;block&quot;&gt;</span></tt> represents displayed mathematics and <tt class="docutils literal"><span class="pre">&lt;math</span>
@ -307,9 +326,18 @@ works with both), and that the web page need not be served with any
special MIME-type. Also note that, unless you are using XHTML rather
than HTML, you should not include a namespace prefix for your
<tt class="docutils literal"><span class="pre">&lt;math&gt;</span></tt> tags; for example, you should not use <tt class="docutils literal"><span class="pre">&lt;m:math&gt;</span></tt> except
in a file where you have tied the <tt class="docutils literal"><span class="pre">m</span></tt> namespace to the MathML DTD.</p>
in a file where you have tied the <tt class="docutils literal"><span class="pre">m</span></tt> namespace to the MathML DTD by
adding the <tt class="docutils literal"><span class="pre">xmlns:m=&quot;http://www.w3.org/1998/Math/MathML&quot;</span></tt> attribtue
to your file&#8217;s <tt class="docutils literal"><span class="pre">&lt;html&gt;</span></tt> tag.</p>
<p>Although it is not required, it is recommended that you include the
<tt class="docutils literal"><span class="pre">xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;</span></tt> attribute on all
<tt class="docutils literal"><span class="pre">&lt;math&gt;</span></tt> tags in your document (and this is preferred to the use of
a namespace prefix like <tt class="docutils literal"><span class="pre">m:</span></tt> above, since those are deprecated in
HTML5) in order to make your MathML work in the widest range of
situations.</p>
<p>Here is a complete sample page containing MathML mathematics (also
available in the <tt class="docutils literal"><span class="pre">test/sample-mml.html</span></tt> file):</p>
available in the <a class="reference external" href="http://cdn.mathjax.org/mathjax/2.0-latest/test/sample-mml.html">test/sample-mml.html</a>
file):</p>
<div class="highlight-html"><div class="highlight"><pre><span class="cp">&lt;!DOCTYPE html&gt;</span>
<span class="nt">&lt;html&gt;</span>
<span class="nt">&lt;head&gt;</span>
@ -320,13 +348,19 @@ available in the <tt class="docutils literal"><span class="pre">test/sample-mml.
<span class="nt">&lt;/head&gt;</span>
<span class="nt">&lt;body&gt;</span>
When <span class="nt">&lt;math&gt;&lt;mi&gt;</span>a<span class="nt">&lt;/mi&gt;&lt;mo&gt;</span><span class="ni">&amp;#x2260;</span><span class="nt">&lt;/mo&gt;&lt;mn&gt;</span>0<span class="nt">&lt;/mn&gt;&lt;/math&gt;</span>,
there are two solutions to <span class="nt">&lt;math&gt;</span>
<span class="nt">&lt;p&gt;</span>
When
<span class="nt">&lt;math</span> <span class="na">xmlns=</span><span class="s">&quot;http://www.w3.org/1998/Math/MathML&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;mi&gt;</span>a<span class="nt">&lt;/mi&gt;&lt;mo&gt;</span><span class="ni">&amp;#x2260;</span><span class="nt">&lt;/mo&gt;&lt;mn&gt;</span>0<span class="nt">&lt;/mn&gt;</span>
<span class="nt">&lt;/math&gt;</span>,
there are two solutions to
<span class="nt">&lt;math</span> <span class="na">xmlns=</span><span class="s">&quot;http://www.w3.org/1998/Math/MathML&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;mi&gt;</span>a<span class="nt">&lt;/mi&gt;&lt;msup&gt;&lt;mi&gt;</span>x<span class="nt">&lt;/mi&gt;&lt;mn&gt;</span>2<span class="nt">&lt;/mn&gt;&lt;/msup&gt;</span>
<span class="nt">&lt;mo&gt;</span>+<span class="nt">&lt;/mo&gt;</span> <span class="nt">&lt;mi&gt;</span>b<span class="nt">&lt;/mi&gt;&lt;mi&gt;</span>x<span class="nt">&lt;/mi&gt;</span>
<span class="nt">&lt;mo&gt;</span>+<span class="nt">&lt;/mo&gt;</span> <span class="nt">&lt;mi&gt;</span>c<span class="nt">&lt;/mi&gt;</span> <span class="nt">&lt;mo&gt;</span>=<span class="nt">&lt;/mo&gt;</span> <span class="nt">&lt;mn&gt;</span>0<span class="nt">&lt;/mn&gt;</span>
<span class="nt">&lt;/math&gt;</span> and they are
<span class="nt">&lt;math</span> <span class="na">mode=</span><span class="s">&quot;display&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/math&gt;</span>
and they are
<span class="nt">&lt;math</span> <span class="na">xmlns=</span><span class="s">&quot;http://www.w3.org/1998/Math/MathML&quot;</span> <span class="na">display=</span><span class="s">&quot;block&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;mi&gt;</span>x<span class="nt">&lt;/mi&gt;</span> <span class="nt">&lt;mo&gt;</span>=<span class="nt">&lt;/mo&gt;</span>
<span class="nt">&lt;mrow&gt;</span>
<span class="nt">&lt;mfrac&gt;</span>
@ -345,6 +379,7 @@ there are two solutions to <span class="nt">&lt;math&gt;</span>
<span class="nt">&lt;/mrow&gt;</span>
<span class="nt">&lt;mtext&gt;</span>.<span class="nt">&lt;/mtext&gt;</span>
<span class="nt">&lt;/math&gt;</span>
<span class="nt">&lt;/p&gt;</span>
<span class="nt">&lt;/body&gt;</span>
<span class="nt">&lt;/html&gt;</span>
@ -354,18 +389,57 @@ there are two solutions to <span class="nt">&lt;math&gt;</span>
page), you should <strong>not</strong> use self-closing tags, but should use explicit
open and close tags for all your math elements. For example, you
should use</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;mspace</span> <span class="na">width=</span><span class="s">&quot;thinmathspace&quot;</span><span class="nt">&gt;&lt;/mspace&gt;</span>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;mspace</span> <span class="na">width=</span><span class="s">&quot;5pt&quot;</span><span class="nt">&gt;&lt;/mspace&gt;</span>
</pre></div>
</div>
<p>rather than <tt class="docutils literal"><span class="pre">&lt;mspace</span> <span class="pre">width=&quot;5pt&quot;</span> <span class="pre">/&gt;</span></tt> 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.</p>
<p>The component of MathJax that recognizes MathML notation is called the
<cite>mml2jax</cite> extension, and it has only a few configuration options; see the
<tt class="docutils literal"><span class="pre">config/default.js</span></tt> file or the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration options</em></a> page for more details. See the <a class="reference internal" href="mathml.html#mathml-support"><em>MathML</em></a> page for more on MathJax&#8217;s MathML support.</p>
<p>rather than <tt class="docutils literal"><span class="pre">&lt;mspace</span> <span class="pre">width=&quot;5pt&quot;</span> <span class="pre">/&gt;</span></tt> 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.</p>
<p>The component of MathJax that recognizes MathML notation within the
page is called the <cite>mml2jax</cite> extension, and it has only a few
configuration options; see the <tt class="docutils literal"><span class="pre">config/default.js</span></tt> file or the
<a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration options</em></a> page for more
details. See the <a class="reference internal" href="mathml.html#mathml-support"><em>MathML</em></a> page for more on
MathJax&#8217;s MathML support.</p>
</div>
<div class="section" id="asciimath-input">
<span id="id4"></span><h3>AsciiMath input<a class="headerlink" href="#asciimath-input" title="Permalink to this headline"></a></h3>
<p>MathJax v2.0 includes a new input format: <a class="reference internal" href="glossary.html#term-asciimath"><em class="xref std std-term">AsciiMath</em></a> notation.
For mathematics written in this form, you mark your mathematical
expressions by surrounding them in &#8220;back-ticks&#8221;, i.e., <tt class="docutils literal"><span class="pre">`...`</span></tt>.</p>
<p>Here is a complete sample page containing AsciiMath notation (also
available in the <a class="reference external" href="http://cdn.mathjax.org/mathjax/2.0-latest/test/sample-asciimath.html">test/sample-asciimath.html</a>
file):</p>
<div class="highlight-html"><div class="highlight"><pre><span class="cp">&lt;!DOCTYPE html&gt;</span>
<span class="nt">&lt;html&gt;</span>
<span class="nt">&lt;head&gt;</span>
<span class="nt">&lt;title&gt;</span>MathJax AsciiMath Test Page<span class="nt">&lt;/title&gt;</span>
<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;../MathJax.js?config=AM_HTMLorMML-full&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
<span class="nt">&lt;/head&gt;</span>
<span class="nt">&lt;body&gt;</span>
<span class="nt">&lt;p&gt;</span>When `a != 0`, there are two solutions to `ax^2 + bx + c = 0` and
they are<span class="nt">&lt;/p&gt;</span>
<span class="nt">&lt;p</span> <span class="na">style=</span><span class="s">&quot;text-align:center&quot;</span><span class="nt">&gt;</span>
`x = (-b +- sqrt(b^2-4ac))/(2a) .`
<span class="nt">&lt;/p&gt;</span>
<span class="nt">&lt;/body&gt;</span>
<span class="nt">&lt;/html&gt;</span>
</pre></div>
</div>
<p>The component of MathJax that recognizes asciimath notation within the
page is called the <cite>asciimath2jax</cite> extension, and it has only a few
configuration options; 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>asciimath2jax configuration options</em></a> page for more
details. See the <a class="reference internal" href="asciimath.html#asciimath-support"><em>AsciiMath support</em></a> page for more on
MathJax&#8217;s AsciiMath support.</p>
</div>
</div>
<div class="section" id="where-to-go-from-here">
@ -413,6 +487,7 @@ MathJax, you could visit the <a class="reference internal" href="community.html#
<li><a class="reference internal" href="#putting-mathematics-in-a-web-page">Putting mathematics in a web page</a><ul>
<li><a class="reference internal" href="#tex-and-latex-input">TeX and LaTeX input</a></li>
<li><a class="reference internal" href="#mathml-input">MathML input</a></li>
<li><a class="reference internal" href="#asciimath-input">AsciiMath input</a></li>
</ul>
</li>
<li><a class="reference internal" href="#where-to-go-from-here">Where to go from here?</a></li>
@ -455,11 +530,11 @@ MathJax, you could visit the <a class="reference internal" href="community.html#
<li class="right" >
<a href="mathjax.html" title="What is 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>The MathJax Startup Sequence &mdash; MathJax v1.1 documentation</title>
<title>The MathJax Startup Sequence &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="Synchronizing your code with MathJax" href="synchronize.html" />
<link rel="prev" title="The MathJax Processing Model" href="model.html" />
</head>
@ -40,7 +40,7 @@
<li class="right" >
<a href="model.html" title="The MathJax Processing Model"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -237,11 +237,11 @@ complete, however, before 7 will be performed.</p>
<li class="right" >
<a href="model.html" title="The MathJax Processing Model"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &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>Synchronizing your code with MathJax &mdash; MathJax v1.1 documentation</title>
<title>Synchronizing your code with 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="Using Callbacks" href="callbacks.html" />
<link rel="prev" title="The MathJax Startup Sequence" href="startup.html" />
</head>
@ -40,7 +40,7 @@
<li class="right" >
<a href="startup.html" title="The MathJax Startup Sequence"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -146,11 +146,11 @@ directory for a working example of using signals.</p>
<li class="right" >
<a href="startup.html" title="The MathJax Startup Sequence"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &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 TeX and LaTeX Support &mdash; MathJax v1.1 documentation</title>
<title>MathJax TeX and LaTeX 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,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="MathJax MathML Support" href="mathml.html" />
<link rel="prev" title="Using MathJax in Movable Type" href="platforms/movable-type.html" />
</head>
@ -40,7 +40,7 @@
<li class="right" >
<a href="platforms/movable-type.html" title="Using MathJax in Movable Type"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -115,7 +115,7 @@ the page.</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 TeX-formatted math does not include HTML tags.
than <tt class="docutils literal"><span class="pre">&lt;br&gt;</span></tt>) as TeX-formatted math does not include HTML tags.
Also, since the mathematics is initially given as text on the page,
you need to be careful that your mathematics doesn&#8217;t look like HTML
tags to the browser (which parses the page before MathJax gets to see
@ -153,6 +153,126 @@ easier to enter <tt class="docutils literal"><span class="pre">&lt;</span></tt>
</div>
<p>Keep in mind that the browser interprets your text before MathJax
does.</p>
<p>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 <a class="reference internal" href="glossary.html#term-markdown"><em class="xref std std-term">Markdown</em></a> 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&#8217;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 <tt class="docutils literal"><span class="pre">&lt;i&gt;</span></tt> tags into your mathematics, which will
cause MathJax to ignore the math).</p>
<p>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
<a class="reference external" href="http://www.mathjax.org/community/mathjax-in-use/">MathJax-In-Use page</a> page.</p>
<p>If there is no plugin for your system, or if it doesn&#8217;t handle the
subtleties of issolating the mathematics from the other markup that it
supports, then you may have to &#8220;trick&#8221; it into leaving your
mathematics untouched. Most content-management systems provide some
means of indicating text that should not be modified (&#8220;verbatim&#8221;
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 (<tt class="docutils literal"><span class="pre">`</span></tt>) is used to mark verbatim text, so</p>
<div class="highlight-latex"><div class="highlight"><pre>... we have `<span class="s">\(</span><span class="nb">x_</span><span class="m">1</span><span class="nb"> </span><span class="o">=</span><span class="nb"> </span><span class="m">132</span><span class="s">\)</span>` and `<span class="s">\(</span><span class="nb">x_</span><span class="m">2</span><span class="nb"> </span><span class="o">=</span><span class="nb"> </span><span class="m">370</span><span class="s">\)</span>` and so ...
</pre></div>
</div>
<p>may be able to protect the underscores from being processed by
Markdown.</p>
<p>Some content-management systems use the backslash (<tt class="docutils literal"><span class="pre">\</span></tt>) as a special
character for &#8220;escaping&#8221; 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</p>
<div class="highlight-latex"><div class="highlight"><pre><span class="k">\\</span>begin<span class="nb">{</span>array<span class="nb">}{</span>cc<span class="nb">}</span>
a <span class="nb">&amp;</span> b <span class="k">\\\\</span>
c <span class="nb">&amp;</span> c
<span class="k">\\</span>end<span class="nb">{</span>array<span class="nb">}</span>
</pre></div>
</div>
<p>to get an array with the four entries <em>a</em>, <em>b</em>, <em>c</em>, and <em>d</em>. Note in
particular that if you want <tt class="docutils literal"><span class="pre">\\</span></tt> you will have to double <em>both</em>
backslashes, giving <tt class="docutils literal"><span class="pre">\\\\</span></tt>.</p>
<p>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&#8217;t represent a math delimiter), you will need to prevent
MathJax from using it as a math delimiter. If you also enable the
<tt class="docutils literal"><span class="pre">processEscapes</span></tt> configuration parameter, then you can use <tt class="docutils literal"><span class="pre">\$</span></tt> in
the text of your page to get a dollar sign (without the backslash) in
the end. Alternatively, you use something like
<tt class="docutils literal"><span class="pre">&lt;span&gt;$&lt;/span&gt;</span></tt> to isolate the dollar sign so that
MathJax will not use it as a delimiter.</p>
</div>
<div class="section" id="defining-tex-macros">
<span id="tex-macros"></span><h2>Defining TeX macros<a class="headerlink" href="#defining-tex-macros" title="Permalink to this headline"></a></h2>
<p>You can use the <tt class="docutils literal"><span class="pre">\def</span></tt>, <tt class="docutils literal"><span class="pre">\newcommand</span></tt>, <tt class="docutils literal"><span class="pre">\renewcommand</span></tt>,
<tt class="docutils literal"><span class="pre">\newenvironment</span></tt>, <tt class="docutils literal"><span class="pre">\renewenvironment</span></tt>, and <tt class="docutils literal"><span class="pre">\let</span></tt> 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</p>
<div class="highlight-latex"><div class="highlight"><pre><span class="s">\(</span><span class="nb"></span>
<span class="nb"> </span><span class="nv">\def\RR</span><span class="nb">{</span><span class="nv">\bf</span><span class="nb"> R}</span>
<span class="nb"> </span><span class="nv">\def\bold</span><span class="nb">#</span><span class="m">1</span><span class="nb">{</span><span class="nv">\bf</span><span class="nb"> #</span><span class="m">1</span><span class="nb">}</span>
<span class="s">\)</span>
</pre></div>
</div>
<p>would define <tt class="docutils literal"><span class="pre">\RR</span></tt> to produce a bold-faced &#8220;R&#8221;, and <tt class="docutils literal"><span class="pre">\bold{...}</span></tt>
to put its argument into bold face. Both definitions would be
available throughout the rest of the page.</p>
<p>You can include macro definitions in the <cite>Macros</cite> section of the <cite>TeX</cite>
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</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">Macros</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">RR</span><span class="o">:</span> <span class="s2">&quot;{\\bf R}&quot;</span><span class="p">,</span>
<span class="nx">bold</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;{\\bf #1}&quot;</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>Here you give the macro as a <cite>name:value</cite> pair, where the <cite>name</cite>
is the name of the control sequence (without the backslash) that you
are defining, and <cite>value</cite> 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.</p>
<p>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.</p>
<p>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 <tt class="docutils literal"><span class="pre">MathJax/config/local</span></tt> called <tt class="docutils literal"><span class="pre">local.js</span></tt> that
contains your macro definitions:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">Macros</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">RR</span><span class="o">:</span> <span class="s2">&quot;{\\bf R}&quot;</span><span class="p">,</span>
<span class="nx">bold</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;{\\bf #1}&quot;</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">});</span>
<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;[MathJax]/config/local/local.js&quot;</span><span class="p">);</span>
</pre></div>
</div>
<p>and then load it along with your main configuration file on the script
that loads <tt class="docutils literal"><span class="pre">MathJax.js</span></tt>:</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js?config=TeX-AMS_HTML,local/local.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>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 <a class="reference internal" href="configuration.html#local-config-files"><em>Using a Local
Configuration File with the CDN</em></a> for details.</p>
</div>
<div class="section" id="tex-and-latex-extensions">
<span id="tex-extensions"></span><h2>TeX and LaTeX extensions<a class="headerlink" href="#tex-and-latex-extensions" title="Permalink to this headline"></a></h2>
@ -182,7 +302,50 @@ script prior to loading MathJax. For example</p>
</div>
<p>will load the <cite>autobold</cite> TeX extension in addition to those already
included in the <tt class="docutils literal"><span class="pre">TeX-AMS_HTML</span></tt> configuration file.</p>
<p>You can also load these extensions from within a math expresion using
the non-standard <tt class="docutils literal"><span class="pre">\require{extension}</span></tt> macro. For example</p>
<div class="highlight-latex"><div class="highlight"><pre><span class="s">\(</span><span class="nv">\require</span><span class="nb">{color}</span><span class="s">\)</span>
</pre></div>
</div>
<p>would load the <cite>color</cite> extension into the page. This way you you can
load extensions into pages that didn&#8217;t load them in their
configurations (and prevents you from having to load all the
extensions into all pages even if they aren&#8217;t used).</p>
<p>The main extensions are described below.</p>
<div class="section" id="action">
<h3>Action<a class="headerlink" href="#action" title="Permalink to this headline"></a></h3>
<p>The <cite>action</cite> extension gives you access to the MathML <tt class="docutils literal"><span class="pre">&lt;maction&gt;</span></tt>
element. It defines three new non-standard macros:</p>
<dl class="describe">
<dt>
<tt class="descname">\mathtip{math}{tip}</tt></dt>
<dd><p>Use <tt class="docutils literal"><span class="pre">tip</span></tt> (in math mode) as tooltip for <tt class="docutils literal"><span class="pre">math</span></tt>.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">\texttip{math}{tip}</tt></dt>
<dd><p>Use <tt class="docutils literal"><span class="pre">tip</span></tt> (in text mode) as tooltip for <tt class="docutils literal"><span class="pre">math</span></tt>.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">\toggle{math1}{math2}...\endtoggle</tt></dt>
<dd><p>Show <tt class="docutils literal"><span class="pre">math1</span></tt>, and when clicked, show <tt class="docutils literal"><span class="pre">math2</span></tt>, and so on.
When the last one is clicked, go back to math1.</p>
</dd></dl>
<p>To use this extension in your own configurations, add it to the
<cite>extensions</cite> array in the TeX block.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;action.js&quot;</span><span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This extension is <strong>not</strong> 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.</p>
</div>
<div class="section" id="amsmath-and-amssymbols">
<h3>AMSmath and AMSsymbols<a class="headerlink" href="#amsmath-and-amssymbols" title="Permalink to this headline"></a></h3>
<p>The <cite>AMSmath</cite> extension implements AMS math environments and macros, and
@ -215,6 +378,268 @@ appears in a section of an HTML page that is in bold.</p>
</div>
<p>This extension is <strong>not</strong> loaded by the combined configuration files.</p>
</div>
<div class="section" id="bbox">
<h3>BBox<a class="headerlink" href="#bbox" title="Permalink to this headline"></a></h3>
<p>The <cite>bbox</cite> extension defines a new macro for adding background colors,
borders, and padding to your math expressions.</p>
<dl class="describe">
<dt>
<tt class="descname">\bbox[options]{math}</tt></dt>
<dd><p>puts a bounding box around <tt class="docutils literal"><span class="pre">math</span></tt> using the provided <tt class="docutils literal"><span class="pre">options</span></tt>.
The options can be one of the following:</p>
<ol class="arabic simple">
<li>A color name used for the background color.</li>
<li>A dimension (e.g., <tt class="docutils literal"><span class="pre">2px</span></tt>) to be used as a padding around the
mathematics (on all sides).</li>
<li>Style attributes to be applied to the mathematics (e.g.,
<tt class="docutils literal"><span class="pre">border:1px</span> <span class="pre">solid</span> <span class="pre">red</span></tt>).</li>
<li>A combination of these separated by commas.</li>
</ol>
</dd></dl>
<p>Here are some examples:</p>
<div class="highlight-latex"><div class="highlight"><pre><span class="k">\bbox</span><span class="na">[red]</span><span class="nb">{</span>x+y<span class="nb">}</span> <span class="c">% a red box behind x+y</span>
<span class="k">\bbox</span><span class="na">[2pt]</span><span class="nb">{</span>x+1<span class="nb">}</span> <span class="c">% an invisible box around x+y with 2pt of extra space</span>
<span class="k">\bbox</span><span class="na">[red,2pt]</span><span class="nb">{</span>x+1<span class="nb">}</span> <span class="c">% a red box around x+y with 2pt of extra space</span>
<span class="k">\bbox</span><span class="na">[5px,border:2px solid red]</span>
<span class="c">% a 2px red border around the math 5px away</span>
</pre></div>
</div>
<p>This extension is <strong>not</strong> included in any of the combined configurations,
but it will be loaded automatically, so you do not need to include it
in your <cite>extensions</cite> array.</p>
</div>
<div class="section" id="begingroup">
<h3>Begingroup<a class="headerlink" href="#begingroup" title="Permalink to this headline"></a></h3>
<p>The <cite>begingroup</cite> 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&#8217;t affect later comments.</p>
<p>It defines two new non-standard macros, <tt class="docutils literal"><span class="pre">\begingroup</span></tt> and
<tt class="docutils literal"><span class="pre">\endgroup</span></tt>, that are used to start and stop a local namespace for
macros. Any macros that are defined between the <tt class="docutils literal"><span class="pre">\begingroup</span></tt> and
<tt class="docutils literal"><span class="pre">\endgroup</span></tt> will be removed after the <tt class="docutils literal"><span class="pre">\endgroup</span></tt> is executed.
For example, if you put <tt class="docutils literal"><span class="pre">\(\begingroup\)</span></tt> at the top of each reader&#8217;s
comments and <tt class="docutils literal"><span class="pre">\(\endgroup\)</span></tt> at the end, then any macros they define
within their response will be removed after it is processed.</p>
<p>In addition to these two macros, the <cite>begingroup</cite> extension defines
the standard <tt class="docutils literal"><span class="pre">\global</span></tt> and <tt class="docutils literal"><span class="pre">\gdef</span></tt> control sequences from TeX.
(The <tt class="docutils literal"><span class="pre">\let</span></tt>, <tt class="docutils literal"><span class="pre">\def</span></tt>, <tt class="docutils literal"><span class="pre">\newcommand</span></tt>, and <tt class="docutils literal"><span class="pre">\newenvironment</span></tt>
control sequences are already defined in the core TeX input jax.)</p>
<p>To use this extension in your own configurations, add it to the
<cite>extensions</cite> array in the TeX block.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;begingroup.js&quot;</span><span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This extension is <strong>not</strong> 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.</p>
</div>
<div class="section" id="cancel">
<h3>Cancel<a class="headerlink" href="#cancel" title="Permalink to this headline"></a></h3>
<p>The <cite>cancel</cite> extension defines the following macros:</p>
<dl class="describe">
<dt>
<tt class="descname">\cancel{math}</tt></dt>
<dd><p>Strikeout <tt class="docutils literal"><span class="pre">math</span></tt> from lower left to upper right.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">\bcancel{math}</tt></dt>
<dd><p>Strikeout <tt class="docutils literal"><span class="pre">math</span></tt> from upper left to lower right.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">\xcancel{math}</tt></dt>
<dd><p>Strikeout <tt class="docutils literal"><span class="pre">math</span></tt> with an &#8220;X&#8221;.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">\cancelto{value}{math}</tt></dt>
<dd><p>Strikeout <tt class="docutils literal"><span class="pre">math</span></tt> with an arrow going to <tt class="docutils literal"><span class="pre">value</span></tt>.</p>
</dd></dl>
<p>To use this extension in your own configurations, add it to the
<cite>extensions</cite> array in the TeX block.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;cancel.js&quot;</span><span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This extension is <strong>not</strong> 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.</p>
</div>
<div class="section" id="color">
<h3>Color<a class="headerlink" href="#color" title="Permalink to this headline"></a></h3>
<p>The <tt class="docutils literal"><span class="pre">\color</span></tt> 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 <tt class="docutils literal"><span class="pre">\color</span></tt> command is a switch that changes the
color of everything that follows it.</p>
<p>The <cite>color</cite> extension changes the <tt class="docutils literal"><span class="pre">\color</span></tt> command to be compatible
with the LaTeX implementation, and also defines <tt class="docutils literal"><span class="pre">\colorbox</span></tt>,
<tt class="docutils literal"><span class="pre">\fcolorbox</span></tt>, and <tt class="docutils literal"><span class="pre">\DefineColor</span></tt>, 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.</p>
<p>To use this extension in your own configurations, add it to the
<cite>extensions</cite> array in the TeX block.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;color.js&quot;</span><span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This extension is <strong>not</strong> 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 <tt class="docutils literal"><span class="pre">\color</span></tt> be compatible with LaTeX usage.</p>
</div>
<div class="section" id="enclose">
<h3>Enclose<a class="headerlink" href="#enclose" title="Permalink to this headline"></a></h3>
<p>The <cite>enclose</cite> extension gives you access to the MathML <tt class="docutils literal"><span class="pre">&lt;menclose&gt;</span></tt>
element for adding boxes, ovals, strikethroughs, and other marks over
your mathematics. It defines the following non-standard macro:</p>
<dl class="describe">
<dt>
<tt class="descname">\enclose{notation}[attributes]{math}</tt></dt>
<dd><p>Where <tt class="docutils literal"><span class="pre">notation</span></tt> is a comma-separated list of MathML
<tt class="docutils literal"><span class="pre">&lt;menclose&gt;</span></tt> notations (e.g., <tt class="docutils literal"><span class="pre">circle</span></tt>, <tt class="docutils literal"><span class="pre">left</span></tt>,
<tt class="docutils literal"><span class="pre">updiagonalstrike</span></tt>, <tt class="docutils literal"><span class="pre">longdiv</span></tt>, etc.), <tt class="docutils literal"><span class="pre">attributes</span></tt> are
MathML attribute values allowed on the <tt class="docutils literal"><span class="pre">&lt;menclose&gt;</span></tt> element
(e.g., <tt class="docutils literal"><span class="pre">mathcolor=&quot;red&quot;</span></tt>, <tt class="docutils literal"><span class="pre">mathbackground=&quot;yellow&quot;</span></tt>), and
<tt class="docutils literal"><span class="pre">math</span></tt> is the mathematics to be enclosed.</p>
</dd></dl>
<p>For example</p>
<div class="highlight-latex"><div class="highlight"><pre><span class="k">\enclose</span><span class="nb">{</span>circle<span class="nb">}</span>[mathcolor=&quot;red&quot;]<span class="nb">{</span>x<span class="nb">}</span>
<span class="k">\enclose</span><span class="nb">{</span>circle<span class="nb">}</span>[mathcolor=&quot;red&quot;]<span class="nb">{</span><span class="k">\color</span><span class="nb">{</span>black<span class="nb">}{</span>x<span class="nb">}}</span>
<span class="k">\enclose</span><span class="nb">{</span>circle,box<span class="nb">}{</span>x<span class="nb">}</span>
<span class="k">\enclose</span><span class="nb">{</span>circle<span class="nb">}{</span><span class="k">\enclose</span><span class="nb">{</span>box<span class="nb">}{</span>x<span class="nb">}}</span>
</pre></div>
</div>
<p>To use this extension in your own configurations, add it to the
<cite>extensions</cite> array in the TeX block.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;action.js&quot;</span><span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This extension is <strong>not</strong> 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.</p>
</div>
<div class="section" id="extpfeil">
<h3>Extpfeil<a class="headerlink" href="#extpfeil" title="Permalink to this headline"></a></h3>
<p>The <cite>extpfeil</cite> extension adds more macros for producing extensible
arrows, including <tt class="docutils literal"><span class="pre">\xtwoheadrightarrow</span></tt>, <tt class="docutils literal"><span class="pre">\xtwoheadleftarrow</span></tt>,
<tt class="docutils literal"><span class="pre">\xmapsto</span></tt>, <tt class="docutils literal"><span class="pre">\xlongequal</span></tt>, <tt class="docutils literal"><span class="pre">\xtofrom</span></tt>, and a non-standard
<tt class="docutils literal"><span class="pre">\Newextarrow</span></tt> for creating your own extensible arrows. The latter
has the form</p>
<dl class="describe">
<dt>
<tt class="descname">\Newextarrow{\cs}{lspace,rspace}{unicode-char}</tt></dt>
<dd><p>where <tt class="docutils literal"><span class="pre">\cs</span></tt> is the new control sequence name to be defined,
<tt class="docutils literal"><span class="pre">lspace</span></tt> and <tt class="docutils literal"><span class="pre">rspace</span></tt> 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 <tt class="docutils literal"><span class="pre">unicode-char</span></tt>
is a number representing a unicode character position in either
decimal or hexadecimal notation.</p>
</dd></dl>
<p>For example</p>
<div class="highlight-latex"><div class="highlight"><pre><span class="k">\Newextarrow</span><span class="nb">{</span><span class="k">\xrightharpoonup</span><span class="nb">}{</span>5,10<span class="nb">}{</span>0x21C0<span class="nb">}</span>
</pre></div>
</div>
<p>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.</p>
<p>To use this extension in your own configurations, add it to the
<cite>extensions</cite> array in the TeX block.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;extpfeil.js&quot;</span><span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This extension is <strong>not</strong> 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.</p>
</div>
<div class="section" id="html">
<h3>HTML<a class="headerlink" href="#html" title="Permalink to this headline"></a></h3>
<p>The <cite>HTML</cite> extension gives you access to some HTML features like
styles, classes, element ID&#8217;s and clickable links. It defines the
following non-standard macros:</p>
<dl class="describe">
<dt>
<tt class="descname">\href{url}{math}</tt></dt>
<dd><p>Makes <tt class="docutils literal"><span class="pre">math</span></tt> be a link to the page given by <tt class="docutils literal"><span class="pre">url</span></tt>.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">\class{name}{math}</tt></dt>
<dd><p>Attaches the CSS class <tt class="docutils literal"><span class="pre">name</span></tt> to the output associated with
<tt class="docutils literal"><span class="pre">math</span></tt> when it is included in the HTML page. This allows your
CSS to style the element.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">\cssId{id}{math}</tt></dt>
<dd><p>Attaches an id attribute with value <tt class="docutils literal"><span class="pre">id</span></tt> to the output
associated with <tt class="docutils literal"><span class="pre">math</span></tt> 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.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">\style{css}{math}</tt></dt>
<dd><p>Adds the give <tt class="docutils literal"><span class="pre">css</span></tt> declarations to the element associated with
<tt class="docutils literal"><span class="pre">math</span></tt>.</p>
</dd></dl>
<p>For example:</p>
<div class="highlight-latex"><div class="highlight"><pre>x <span class="k">\href</span><span class="nb">{</span>why-equal.html<span class="nb">}{</span>=<span class="nb">}</span> y<span class="nb">^</span>2 + 1
(x+1)<span class="nb">^</span>2 = <span class="k">\class</span><span class="nb">{</span>hidden<span class="nb">}{</span>(x+1)(x+1)<span class="nb">}</span>
(x+1)<span class="nb">^</span>2 = <span class="k">\cssId</span><span class="nb">{</span>step1<span class="nb">}{</span><span class="k">\style</span><span class="nb">{</span>visibility:hidden<span class="nb">}{</span>(x+1)(x+1)<span class="nb">}}</span>
</pre></div>
</div>
<p>This extension is <strong>not</strong> 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.</p>
</div>
<div class="section" id="mhchem">
<h3>mhchem<a class="headerlink" href="#mhchem" title="Permalink to this headline"></a></h3>
<p>The <cite>mhchem</cite> extensions implements the <tt class="docutils literal"><span class="pre">\ce</span></tt>, <tt class="docutils literal"><span class="pre">\cf</span></tt>, and <tt class="docutils literal"><span class="pre">\cee</span></tt>
chemical equation macros of the LaTeX <cite>mhchem</cite> package. See the
<a class="reference external" href="http://www.ctan.org/pkg/mhchem">mhchem CPAN page</a> for more
information and a link to the documentation for <cite>mhchem</cite>.</p>
<p>For example</p>
<div class="highlight-latex"><div class="highlight"><pre><span class="k">\ce</span><span class="nb">{</span>C6H5-CHO<span class="nb">}</span>
<span class="k">\ce</span><span class="nb">{</span><span class="s">$</span><span class="nb">A</span><span class="s">$</span> -&gt;[<span class="k">\ce</span><span class="nb">{</span>+H2O<span class="nb">}</span>] <span class="s">$</span><span class="nb">B</span><span class="s">$</span><span class="nb">}</span>
<span class="k">\ce</span><span class="nb">{</span>SO4<span class="nb">^</span>2- + Ba<span class="nb">^</span>2+ -&gt; BaSO4 v<span class="nb">}</span>
</pre></div>
</div>
<p>To use this extension in your own configurations, add it to the
<cite>extensions</cite> array in the TeX block.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;mhchem.js&quot;</span><span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This extension is <strong>not</strong> 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.</p>
</div>
<div class="section" id="noerrors">
<h3>noErrors<a class="headerlink" href="#noerrors" title="Permalink to this headline"></a></h3>
<p>The <cite>noErrors</cite> extension prevents TeX error messages from being
@ -232,9 +657,10 @@ following to your <tt class="xref py py-meth docutils literal"><span class="pre"
<span class="nx">inlineDelimiters</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;&quot;</span><span class="p">,</span><span class="s2">&quot;&quot;</span><span class="p">],</span> <span class="c1">// or [&quot;$&quot;,&quot;$&quot;] or [&quot;\\(&quot;,&quot;\\)&quot;]</span>
<span class="nx">multiLine</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span> <span class="c1">// false for TeX on all one line</span>
<span class="nx">style</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&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-size&quot;</span><span class="o">:</span> <span class="s2">&quot;80%&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;text-align&quot;</span><span class="o">:</span> <span class="s2">&quot;left&quot;</span><span class="p">,</span>
<span class="s2">&quot;color&quot;</span><span class="o">:</span> <span class="s2">&quot;black&quot;</span><span class="p">,</span>
<span class="s2">&quot;padding&quot;</span><span class="o">:</span> <span class="s2">&quot;1px 3px&quot;</span><span class="p">,</span>
<span class="s2">&quot;border&quot;</span><span class="o">:</span> <span class="s2">&quot;1px solid&quot;</span>
<span class="c1">// add any additional CSS styles that you want</span>
<span class="c1">// (be sure there is no extra comma at the end of the last item)</span>
@ -340,6 +766,9 @@ array. You can configure the extension as follows:</p>
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.</p>
<p>More complete details about how to use these macros, with examples and
explanations, is available at Carol Fisher&#8217;s <a class="reference external" href="http://www.onemathematicalcat.org/MathJaxDocumentation/TeXSyntax.htm">TeX Commands Available
in MathJax</a> page.</p>
<div class="section" id="symbols">
<h3>Symbols<a class="headerlink" href="#symbols" title="Permalink to this headline"></a></h3>
<div class="highlight-latex"><div class="highlight"><pre>#
@ -408,8 +837,11 @@ be loaded automatically when the macro or environment is first used.</p>
<span class="k">\barwedge</span> AMSsymbols
<span class="k">\Bbb</span>
<span class="k">\Bbbk</span> AMSsymbols
<span class="k">\bbox</span> [bbox]
<span class="k">\bcancel</span> cancel
<span class="k">\because</span> AMSsymbols
<span class="k">\begin</span>
<span class="k">\begingroup</span> begingroup non-standard
<span class="k">\beta</span>
<span class="k">\beth</span> AMSsymbols
<span class="k">\between</span> AMSsymbols
@ -474,13 +906,18 @@ be loaded automatically when the macro or environment is first used.</p>
<div class="section" id="c">
<h3>C<a class="headerlink" href="#c" title="Permalink to this headline"></a></h3>
<div class="highlight-latex"><div class="highlight"><pre><span class="k">\cal</span>
<span class="k">\cancel</span> cancel
<span class="k">\cancelto</span> cancel
<span class="k">\cap</span>
<span class="k">\Cap</span> AMSsymbols
<span class="k">\cases</span>
<span class="k">\cdot</span>
<span class="k">\cdotp</span>
<span class="k">\cdots</span>
<span class="k">\ce</span> mhchem
<span class="k">\cee</span> mhchem
<span class="k">\centerdot</span> AMSsymbols
<span class="k">\cf</span> mhchem
<span class="k">\cfrac</span> AMSmath
<span class="k">\check</span>
<span class="k">\checkmark</span> AMSsymbols
@ -498,7 +935,8 @@ be loaded automatically when the macro or environment is first used.</p>
<span class="k">\class</span> [HTML] non-standard
<span class="k">\clubsuit</span>
<span class="k">\colon</span>
<span class="k">\color</span>
<span class="k">\color</span> color
<span class="k">\colorbox</span> color
<span class="k">\complement</span> AMSsymbols
<span class="k">\cong</span>
<span class="k">\coprod</span>
@ -577,12 +1015,15 @@ be loaded automatically when the macro or environment is first used.</p>
<h3>E<a class="headerlink" href="#e" title="Permalink to this headline"></a></h3>
<div class="highlight-latex"><div class="highlight"><pre><span class="k">\ell</span>
<span class="k">\emptyset</span>
<span class="k">\enclose</span> enclose non-standard
<span class="k">\end</span>
<span class="k">\endgroup</span> begingroup non-standard
<span class="k">\enspace</span>
<span class="k">\epsilon</span>
<span class="k">\eqalign</span>
<span class="k">\eqalignno</span>
<span class="k">\eqcirc</span> AMSsymbols
<span class="k">\eqref</span> [AMSmath]
<span class="k">\eqsim</span> AMSsymbols
<span class="k">\eqslantgtr</span> AMSsymbols
<span class="k">\eqslantless</span> AMSsymbols
@ -598,6 +1039,7 @@ be loaded automatically when the macro or environment is first used.</p>
<h3>F<a class="headerlink" href="#f" title="Permalink to this headline"></a></h3>
<div class="highlight-latex"><div class="highlight"><pre><span class="k">\fallingdotseq</span> AMSsymbols
<span class="k">\fbox</span>
<span class="k">\fcolorbox</span> color
<span class="k">\Finv</span> AMSsymbols
<span class="k">\flat</span>
<span class="k">\forall</span>
@ -614,6 +1056,7 @@ be loaded automatically when the macro or environment is first used.</p>
<span class="k">\Gamma</span>
<span class="k">\gamma</span>
<span class="k">\gcd</span>
<span class="k">\gdef</span> begingroup
<span class="k">\ge</span>
<span class="k">\genfrac</span> AMSmath
<span class="k">\geq</span>
@ -624,6 +1067,7 @@ be loaded automatically when the macro or environment is first used.</p>
<span class="k">\ggg</span> AMSsymbols
<span class="k">\gggtr</span> AMSsymbols
<span class="k">\gimel</span> AMSsymbols
<span class="k">\global</span> begingroup
<span class="k">\gnapprox</span> AMSsymbols
<span class="k">\gneq</span> AMSsymbols
<span class="k">\gneqq</span> AMSsymbols
@ -741,6 +1185,7 @@ be loaded automatically when the macro or environment is first used.</p>
<span class="k">\lesseqqgtr</span> AMSsymbols
<span class="k">\lessgtr</span> AMSsymbols
<span class="k">\lesssim</span> AMSsymbols
<span class="k">\let</span> [newcommand]
<span class="k">\lfloor</span>
<span class="k">\lg</span>
<span class="k">\lgroup</span>
@ -809,6 +1254,7 @@ be loaded automatically when the macro or environment is first used.</p>
<span class="k">\mathscr</span>
<span class="k">\mathsf</span>
<span class="k">\mathstrut</span>
<span class="k">\mathtip</span> action non-standard
<span class="k">\mathtt</span>
<span class="k">\matrix</span>
<span class="k">\max</span>
@ -816,9 +1262,11 @@ be loaded automatically when the macro or environment is first used.</p>
<span class="k">\measuredangle</span> AMSsymbols
<span class="k">\mho</span> AMSsymbols
<span class="k">\mid</span>
<span class="k">\middle</span>
<span class="k">\min</span>
<span class="k">\mit</span>
<span class="k">\mkern</span>
<span class="k">\mmlToken</span> non-standard
<span class="k">\mod</span>
<span class="k">\models</span>
<span class="k">\moveleft</span>
@ -845,6 +1293,7 @@ be loaded automatically when the macro or environment is first used.</p>
<span class="k">\neq</span>
<span class="k">\newcommand</span> [newcommand]
<span class="k">\newenvironment</span> [newcommand]
<span class="k">\Newextarrow</span> extpfeil
<span class="k">\newline</span>
<span class="k">\nexists</span> AMSsymbols
<span class="k">\ngeq</span> AMSsymbols
@ -968,7 +1417,9 @@ be loaded automatically when the macro or environment is first used.</p>
<span class="k">\rbrack</span>
<span class="k">\rceil</span>
<span class="k">\Re</span>
<span class="k">\ref</span> [AMSmath]
<span class="k">\renewcommand</span> [newcommand]
<span class="k">\renewenvironment</span> [newcommand]
<span class="k">\require</span> non-standard
<span class="k">\restriction</span> AMSsymbols
<span class="k">\rfloor</span>
@ -1089,6 +1540,7 @@ be loaded automatically when the macro or environment is first used.</p>
<span class="k">\textit</span>
<span class="k">\textrm</span>
<span class="k">\textstyle</span>
<span class="k">\texttip</span> action non-standard
<span class="k">\tfrac</span> AMSmath
<span class="k">\therefore</span> AMSsymbols
<span class="k">\Theta</span>
@ -1101,6 +1553,7 @@ be loaded automatically when the macro or environment is first used.</p>
<span class="k">\tiny</span>
<span class="k">\Tiny</span> non-standard
<span class="k">\to</span>
<span class="k">\toggle</span> action non-standard
<span class="k">\top</span>
<span class="k">\triangle</span>
<span class="k">\triangledown</span> AMSsymbols
@ -1205,8 +1658,14 @@ be loaded automatically when the macro or environment is first used.</p>
<h3>X<a class="headerlink" href="#x" title="Permalink to this headline"></a></h3>
<div class="highlight-latex"><div class="highlight"><pre><span class="k">\Xi</span>
<span class="k">\xi</span>
<span class="k">\xcancel</span> cancel
<span class="k">\xleftarrow</span> AMSmath
<span class="k">\xlongequal</span> extpfeil
<span class="k">\xmapsto</span> extpfeil
<span class="k">\xrightarrow</span> AMSmath
<span class="k">\xtofrom</span> extpfeil
<span class="k">\xtwoheadleftarrow</span> extpfeil
<span class="k">\xtwoheadrightarrow</span> extpfeil
</pre></div>
</div>
</div>
@ -1277,9 +1736,19 @@ vmatrix
<li><a class="reference internal" href="#">MathJax TeX and LaTeX Support</a><ul>
<li><a class="reference internal" href="#tex-and-latex-math-delimiters">TeX and LaTeX math delimiters</a></li>
<li><a class="reference internal" href="#tex-and-latex-in-html-documents">TeX and LaTeX in HTML documents</a></li>
<li><a class="reference internal" href="#defining-tex-macros">Defining TeX macros</a></li>
<li><a class="reference internal" href="#tex-and-latex-extensions">TeX and LaTeX extensions</a><ul>
<li><a class="reference internal" href="#action">Action</a></li>
<li><a class="reference internal" href="#amsmath-and-amssymbols">AMSmath and AMSsymbols</a></li>
<li><a class="reference internal" href="#autobold">Autobold</a></li>
<li><a class="reference internal" href="#bbox">BBox</a></li>
<li><a class="reference internal" href="#begingroup">Begingroup</a></li>
<li><a class="reference internal" href="#cancel">Cancel</a></li>
<li><a class="reference internal" href="#color">Color</a></li>
<li><a class="reference internal" href="#enclose">Enclose</a></li>
<li><a class="reference internal" href="#extpfeil">Extpfeil</a></li>
<li><a class="reference internal" href="#html">HTML</a></li>
<li><a class="reference internal" href="#mhchem">mhchem</a></li>
<li><a class="reference internal" href="#noerrors">noErrors</a></li>
<li><a class="reference internal" href="#noundefined">noUndefined</a></li>
<li><a class="reference internal" href="#unicode-support">Unicode support</a></li>
@ -1355,11 +1824,11 @@ vmatrix
<li class="right" >
<a href="platforms/movable-type.html" title="Using MathJax in Movable Type"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &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>Modifying Math on the Page &mdash; MathJax v1.1 documentation</title>
<title>Modifying Math on the Page &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 API" href="api/index.html" />
<link rel="prev" title="Loading MathJax Dynamically" href="dynamic.html" />
</head>
@ -40,7 +40,7 @@
<li class="right" >
<a href="dynamic.html" title="Loading MathJax Dynamically"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -310,11 +310,11 @@ You typed: ${}$
<li class="right" >
<a href="dynamic.html" title="Loading MathJax Dynamically"
>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>Migrating from MathJax v1.0 to v1.1 &mdash; MathJax v1.1 documentation</title>
<title>Migrating from MathJax v1.0 to v1.1 &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="Converting to MathJax from jsMath" href="jsMath.html" />
<link rel="prev" title="Whats New in MathJax v1.1" href="whats-new.html" />
</head>
@ -40,7 +40,7 @@
<li class="right" >
<a href="whats-new.html" title="Whats New in MathJax 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>
@ -315,11 +315,11 @@ retired in favor of the GitHub site.</p>
<li class="right" >
<a href="whats-new.html" title="Whats New in MathJax 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>Whats New in MathJax v1.1 &mdash; MathJax v1.1 documentation</title>
<title>Whats New in MathJax v1.1 &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="Migrating from MathJax v1.0 to v1.1" href="upgrade.html" />
<link rel="prev" title="The MathJax Community" href="community.html" />
</head>
@ -40,7 +40,7 @@
<li class="right" >
<a href="community.html" title="The MathJax Community"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
@ -70,7 +70,7 @@ and speeds up typesetting of the mathematics on the page.</li>
<li>Improved responsiveness to mouse events during typesetting.</li>
<li>Parallel downloading of files needed by MathJax, for faster startup
times.</li>
<li>Shorter timeout for web fonts, so if they can&#8217;t be downlaoded, you don&#8217;t
<li>Shorter timeout for web fonts, so if they can&#8217;t be downloaded, you don&#8217;t
have to wait so long.</li>
<li>Rollover to image fonts if a web font fails to load (so you don&#8217;t have
to wait for <em>every</em> font to fail.</li>
@ -252,11 +252,11 @@ font menu (since Opera can&#8217;t display many of the characters).</li>
<li class="right" >
<a href="community.html" title="The MathJax Community"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &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

127
docs/source/asciimath.rst Normal file
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

@ -38,16 +38,16 @@ master_doc = 'index'
# General information about the project.
project = u'MathJax'
copyright = u'2011 Design Science'
copyright = u'2012 Design Science'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.1'
version = '2.0'
# The full version, including alpha/beta/rc tags.
release = '1.1'
release = '2.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

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

@ -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::

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
@ -263,7 +261,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 +326,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

@ -0,0 +1,40 @@
.. _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 use a combined configuration file
that includes AsciiMath input. 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

@ -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"``. 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"``. 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

@ -21,7 +21,7 @@ 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
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.
@ -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,6 +78,7 @@ 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 MMLorHTML configuration options <MMLorHTML>

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
@ -34,35 +36,57 @@ 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
@ -119,41 +153,29 @@ be taken lightly.
.. _html-css-with-ie8:
HTML-CSS with IE8
=================
HTML-CSS with IE8 and IE9
=========================
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``.
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.
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
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=EmulateIE7">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
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.
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.
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.
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.

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

@ -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

@ -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,151 @@ 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-extensions:
@ -165,7 +310,53 @@ 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).
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
----------------------
@ -208,6 +399,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: ["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.
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 +710,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)
}
@ -358,6 +839,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 +917,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 +987,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 +1016,8 @@ C
\class [HTML] non-standard
\clubsuit
\colon
\color
\color color
\colorbox color
\complement AMSsymbols
\cong
\coprod
@ -603,12 +1098,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 +1123,7 @@ F
\fallingdotseq AMSsymbols
\fbox
\fcolorbox color
\Finv AMSsymbols
\flat
\forall
@ -642,6 +1141,7 @@ G
\Gamma
\gamma
\gcd
\gdef begingroup
\ge
\genfrac AMSmath
\geq
@ -652,6 +1152,7 @@ G
\ggg AMSsymbols
\gggtr AMSsymbols
\gimel AMSsymbols
\global begingroup
\gnapprox AMSsymbols
\gneq AMSsymbols
\gneqq AMSsymbols
@ -774,6 +1275,7 @@ L
\lesseqqgtr AMSsymbols
\lessgtr AMSsymbols
\lesssim AMSsymbols
\let [newcommand]
\lfloor
\lg
\lgroup
@ -843,6 +1345,7 @@ M
\mathscr
\mathsf
\mathstrut
\mathtip action non-standard
\mathtt
\matrix
\max
@ -850,9 +1353,11 @@ M
\measuredangle AMSsymbols
\mho AMSsymbols
\mid
\middle
\min
\mit
\mkern
\mmlToken non-standard
\mod
\models
\moveleft
@ -880,6 +1385,7 @@ N
\neq
\newcommand [newcommand]
\newenvironment [newcommand]
\Newextarrow extpfeil
\newline
\nexists AMSsymbols
\ngeq AMSsymbols
@ -1007,7 +1513,9 @@ R
\rbrack
\rceil
\Re
\ref [AMSmath]
\renewcommand [newcommand]
\renewenvironment [newcommand]
\require non-standard
\restriction AMSsymbols
\rfloor
@ -1130,6 +1638,7 @@ T
\textit
\textrm
\textstyle
\texttip action non-standard
\tfrac AMSmath
\therefore AMSsymbols
\Theta
@ -1142,6 +1651,7 @@ T
\tiny
\Tiny non-standard
\to
\toggle action non-standard
\top
\triangle
\triangledown AMSsymbols
@ -1250,8 +1760,14 @@ X
\Xi
\xi
\xcancel cancel
\xleftarrow AMSmath
\xlongequal extpfeil
\xmapsto extpfeil
\xrightarrow AMSmath
\xtofrom extpfeil
\xtwoheadleftarrow extpfeil
\xtwoheadrightarrow extpfeil
Y
-

View File

@ -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,22 @@
<!DOCTYPE html>
<html>
<head>
<title>MathJax AsciiMath Test Page</title>
<!-- Copyright (c) 2012 Design Science, Inc. -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<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>

View File

@ -2,9 +2,9 @@
<html>
<head>
<title>MathJax MathML Test Page</title>
<!-- Copyright (c) 2010-2011 Design Science, Inc. -->
<!-- Copyright (c) 2010-2012 Design Science, Inc. -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script type="text/javascript" src="../MathJax.js?config=MML_HTMLorMML-full"></script>
@ -12,14 +12,18 @@
<body>
<p>
When <math><mi>a</mi><mo>&#x2260;</mo><mn>0</mn></math>,
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>
<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>
<mo>+</mo> <mi>c</mi> <mo>=</mo> <mn>0</mn>
</math>
and they are
<math mode="display">
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mi>x</mi> <mo>=</mo>
<mrow>
<mfrac>

View File

@ -2,9 +2,9 @@
<html>
<head>
<title>MathJax TeX Test Page</title>
<!-- Copyright (c) 2010-2011 Design Science, Inc. -->
<!-- Copyright (c) 2010-2012 Design Science, Inc. -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script type="text/x-mathjax-config">
MathJax.Hub.Config({