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
@@ -73,25 +73,27 @@ quotation marks as well.
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
selectors must be unique (e.g., you can’t use two definitions for
@@ -159,11 +161,11 @@ samples. In particular, the exte
diff --git a/docs/html/_sources/CSS-styles.txt b/docs/html/_sources/CSS-styles.txt
index bf014f5c2..b7b8b0bbb 100644
--- a/docs/html/_sources/CSS-styles.txt
+++ b/docs/html/_sources/CSS-styles.txt
@@ -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
diff --git a/docs/html/_sources/asciimath.txt b/docs/html/_sources/asciimath.txt
new file mode 100644
index 000000000..bbfccea88
--- /dev/null
+++ b/docs/html/_sources/asciimath.txt
@@ -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
+`_ 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 ` 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 ` 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 ` 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 ` 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
+`_.
+
+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 `` ``) 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`` 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 ``
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
+`_ 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
+` 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 ` 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
+`_ 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
+` 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 ` section for
+other configuration options for the ``tex2jax`` preprocessor, and the
+:ref:`TeX input jax configuration ` section for options
+that control the TeX input processor.
+See the :ref:`mml2jax configuration ` section for
+other configuration options for the ``mml2jax`` preprocessor, and the
+:ref:`MathML input jax configuration ` section for
+options that control the MathML input processor.
+See the :ref:`asciimath2jax configuration ` section for
+other configuration options for the ``asciimath2jax`` preprocessor, and the
+:ref:`AsciiMath input jax configuration ` section for
+options that control the AsciiMath input processor.
+See :ref:`MathJax Output Formats ` for more
+information on the NativeMML and HTML-CSS output processors. See the
+:ref:`MMLorHTML configuration ` 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 ` 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 `
+section for other configuration options for the ``asciimath2jax``
+preprocessor, and the :ref:`AsciiMath input jax configuration
+` section for options that control the AsciiMath
+input processor. See :ref:`MathJax Output Formats `
+for more information on the HTML-CSS and NativeMML output processors.
+See the :ref:`MMLorHTML configuration ` 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 ` section for
+other configuration options for the ``tex2jax`` preprocessor, and the
+:ref:`TeX input jax configuration ` section for options
+that control the TeX input processor.
+See the :ref:`mml2jax configuration ` section for
+other configuration options for the ``mml2jax`` preprocessor, and the
+:ref:`MathML input jax configuration ` section for
+options that control the MathML input processor.
+See :ref:`MathJax 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.
diff --git a/docs/html/_sources/configuration.txt b/docs/html/_sources/configuration.txt
index 290fbf48c..5685d7876 100644
--- a/docs/html/_sources/configuration.txt
+++ b/docs/html/_sources/configuration.txt
@@ -52,14 +52,14 @@ typical invocation of MathJax would be
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
-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 ` 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 ` for details.
It is best to load MathJax in the document's ```` block, but it
is also possible to load MathJax into the ```` 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,
-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
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 ` section below.
+rather than one of the pre-defined ones, see the information at the
+end of the :ref:`Using a Local Configuration File
+` 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 ``
-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.
diff --git a/docs/html/_sources/glossary.txt b/docs/html/_sources/glossary.txt
index 14e18cc93..6325bd82c 100644
--- a/docs/html/_sources/glossary.txt
+++ b/docs/html/_sources/glossary.txt
@@ -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 `_
+
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 `_
+ 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 `_
+
MathML
An XML specification created to describe mathematical
notations and capture both its structure and content. MathML
@@ -62,6 +84,18 @@ Glossary
`STIX project `_
+ 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 `_
+
TeX
A document markup language with robust math markup commands
developed by Donald Knuth in the late 1970's, but still in
diff --git a/docs/html/_sources/index.txt b/docs/html/_sources/index.txt
index 80df118de..6c940b0ae 100644
--- a/docs/html/_sources/index.txt
+++ b/docs/html/_sources/index.txt
@@ -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
MathJax MathML Support
+ MathJax AsciiMath Support
MathJax Output Formats
The support for 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 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
+asciimath2jax configuration options 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
+AsciiMath options 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 TeX
+input jax to handle LaTeX notation instead.
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:
Note that the dollar signs are frequently used as a delimiter for
+mathematics in the 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 asiimath2jax
+configuration options 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.
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,
+
... 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
+
... when `x < y` we have ...
+
+
should work. Alternatively, you can use the HTML entities <,
+> and & to encode these characters so that the browser
+will not interpret them, but MathJax will. E.g.,
+
... when `x < y` we have ...
+
+
+
Keep in mind that the browser interprets your text before MathJax
+does.
where path-to-MathJax is the URL to the MathJax directory on your
-server or hard disk.
-
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 Loading and Configuring MathJax for more
-details about how to load configurations, and how to modify the parameters
-for a configuration file.
+server or hard disk. If you are using MathJax from the CDN, you can
+view the contents of 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 Using a Local Configuration File with the CDN for details.
+
The remaining files in the MathJax/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 Loading and Configuring MathJax 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.
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:
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 tex2jax configuration section for
+other configuration options for the tex2jax preprocessor, and the
+TeX input jax configuration section for options
+that control the TeX input processor.
+See the mml2jax configuration section for
+other configuration options for the mml2jax preprocessor, and the
+MathML input jax configuration section for
+options that control the MathML input processor.
+See the asciimath2jax configuration section for
+other configuration options for the asciimath2jax preprocessor, and the
+AsciiMath input jax configuration section for
+options that control the AsciiMath input processor.
+See MathJax Output Formats for more
+information on the NativeMML and HTML-CSS output processors. See the
+MMLorHTML configuration section for
+details on the options that control the MMLorHTML configuration.
This configuration file is the most general of the pre-defined
-configurations. It loads all the important MathJax components, including
+
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:
MathJax.Hub.Config({config:["MMLorHTML.js"],jax:["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML"],
@@ -96,12 +143,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 tex2jax configuration section for
other configuration options for the tex2jax preprocessor, and the
TeX input jax configuration section for options
@@ -138,7 +185,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.
See the tex2jax configuration section for
@@ -152,7 +199,7 @@ information on the HTML-CSS output processor.
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
and output, including the mml2jax preprocessor and MathML input jax, the
@@ -168,7 +215,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.
See the mml2jax configuration section for
@@ -180,12 +227,86 @@ information on the NativeMML and HTML-CSS output processors. See the
MMLorHTML configuration section for
details on the options that control the MMLorHTML configuration.
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:
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 asciimath2jax configuration
+section for other configuration options for the asciimath2jax
+preprocessor, and the AsciiMath input jax configuration section for options that control the AsciiMath
+input processor. See MathJax Output Formats
+for more information on the HTML-CSS and NativeMML output processors.
+See the MMLorHTML configuration section
+for details on the options that control the MMLorHTML
+configuration.
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:
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.
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:
MathJax.Hub.Config({config:["MMLorHTML.js"],jax:["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML"],
@@ -193,20 +314,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.
@@ -221,9 +346,12 @@ is normally loaded on demand.
@@ -89,14 +89,14 @@ typical invocation of MathJax would be
</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 Using In-line Configuration
-Options 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 Using
+In-line Configuration Options 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
needed. If you do this, load it as early as possible, as
@@ -111,7 +111,7 @@ been prepared, for example, via a Loading MathJax Dynamically for more details.
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
@@ -124,10 +124,11 @@ that your pages always use the same version of MathJax.
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,
@@ -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,
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).
-
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’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.
To load from a particular release, use the directory for that release.
@@ -145,13 +146,13 @@ For example,
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 Installing
@@ -159,8 +160,8 @@ and Testing MathJax for information on how to do that.)
The use of cdn.mathjax.org is governed by its terms of service, so be
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 Using a configuration file section below.
+rather than one of the pre-defined ones, see the information at the
+end of the Using a Local Configuration File section below.
@@ -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.
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
@@ -191,15 +192,16 @@ describing them, which you can edit to suit your needs.
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 TeX, LaTeX, or
+MathML notation, with the AMSmath and AMSsymbols
+packages included, producing output using MathML if the browser
+supports it sufficiently, and HTML-with-CSS otherwise.
TeX-AMS_HTML.js
-
Allows math to be specified in TeX or LaTeX notation, with the
+
Allows math to be specified in TeX or LaTeX notation, with the
AMSmath and AMSsymbols packages included, and produces output
using the HTML-CSS output processor.
@@ -207,18 +209,34 @@ using the HTML-CSS output processor.
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 MathML notation, and produces MathML
+output if the browser supports it sufficiently, or HTML-CSS output otherwise.
-Accessible.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).
+AM_HTMLorMML.js
+
Allows math to be specified using AsciiMath notation,
+producing output in MathML if the browser supports it
+sufficiently, or as HTML-with-CSS otherwise.
+
+
+
+
+TeX-AMS-MML_SVG.js
+
Allows math to be specified in TeX, LaTeX, or
+MathML notation, with the AMSmath and AMSsymbols
+packages included, producing output using SVG.
+
+
+
+
+TeX-MML-AM_HTMLorMML.js
+
Allows math to be specified in TeX, LaTeX,
+MathML, or 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
@@ -241,7 +259,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
load the full version, but if you are including MathJax in a theme file for
@@ -278,8 +296,14 @@ 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:
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:
<script type="text/javascript"src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML,http://myserver.com/MathJax/config/local/local.js"></script>
@@ -290,7 +314,7 @@ the complete URL to the local configuration file. Note that you also
have to edit the 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
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 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 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,
<script type="text/x-mathjax-config">MathJax.Hub.Config({
@@ -340,15 +365,16 @@ the TeX input processor and the HTML-CSS output proces
HTML-CSS processor to use the TeX fonts rather than other locally installed
fonts (e.g., STIX fonts). See the configuration options section (or the comments in the config/default.js
file) for more information about the configuration options that you can
-include in the MathJax.Hub.Config() call. Note that this
+include in the 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
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:
<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax:{
@@ -405,17 +431,21 @@ example, you could use
</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 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.
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:
Process any configuration file explicitly specified as a script parameter.
@@ -444,6 +474,7 @@ when MathJax runs, and browser-dependent erratic behavior will result.
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.
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
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).
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.
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.
A document markup language with robust math markup commands
developed by Donald Knuth in the late 1970’s, but still in
@@ -146,11 +180,11 @@ formats for mathematical journals, articles, and books.
@@ -55,20 +55,21 @@
distributed network service (see Using the MathJax CDN). 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 Configuring MathJax.
-
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.
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
cd MathJax
git remote show origin
@@ -134,12 +135,12 @@ git pull origin v1.1-latest
If you are more comfortable with the subversion source control system, you may want
to use GitHub’s svn service to obtain MathJax. If you want to get the
latest revision using svn, use the command
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
cd MathJax
svn status -u
@@ -158,26 +159,25 @@ latest bug fixes and new features as they become available.
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
-
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
+
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 under the
+branches tab.
Release versions of MathJax are available in archive files from the
MathJax download page or the
-GitHub downloads (click the
-big download button on the right), where you can download the archive
+MathJax GitHub page (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
@@ -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’s hierarchy. That would
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 (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).
+
From the MathJax GitHub download link, 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
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.
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
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 MathML, 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, a World Wide Web
+Consortium standard for representing mathematics in XML format, or
+AsciiMath
+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
highly configurable, allowing authors to customize it for the special
@@ -123,11 +125,11 @@ mathematics on your web pages interactive and dynamic.
@@ -66,10 +66,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 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
+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
MathML in the end, but this is actually what makes it possible to view
@@ -85,7 +85,7 @@ even with a pure MathML workflow.
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
√ 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
rather than <mspacewidth="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
-<mspacewidth="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 <mspacewidth="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.
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 MathJax.Hub.Config() call. For example
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.
+
+
+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.
+
+
+
+
+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.
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
+MathJax.Hub.Config() call. For example
would set the ASCIIMath delimiters for the asciimath2jax
+preprocessor to include dollar signs as well as back-ticks.
+
+
+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,
+
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.
+
+
+
+
+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:
+
preview:["[math]"],// insert the text "[math]" as the preview
+
+
+
preview:[["img",{src:"/images/mypic.jpg"}]],// insert an image as the preview
+
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.
+
+
+
+
+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="class1class2class3". 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.
+
+
+
+
+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="class1class2class3". 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.
@@ -66,7 +66,7 @@ browsers (namely Internet Explorer) will fail to process the
configuration if you do.
The MathJax components, like the TeX input processor, have their own
sections in the configuration object, labeled by the component name,
-and using a configuration object as its value. The object is itself
+and using an object as its value. That object is itself
a configuration object made up of name-value pairs that give the
configuration options for the component.
For example,
@@ -106,6 +106,7 @@ are categorized by the component they affect.
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
+_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.
-
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
+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", "output/SVG", or "output/NativeMML" in
+the jax array of your MathJax configuration. For example
jax:["input/TeX","output/HTML-CSS"]
@@ -76,40 +78,61 @@ in your document.
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
-HTML-CSS with IE8 below for some strategies
-to deal with this.)
-
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 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’t have to have math fonts installed on their
+computers; but this does introduce some printing issues in some
+browsers.
+
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 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
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.
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
depending on the browser in use. To invoke it, add "MMLorHTML.js" to
@@ -120,14 +143,22 @@ the abilities of your user’s browser.
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
Configuring 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:
<script type="text/x-mathjax-config">MathJax.Hub.Config({
- MMLorHTML:{prefer:{Firefox:"HTML"}}
+ MMLorHTML:{prefer:{Firefox:"MML"}}});</script><script type="text/javascript"
@@ -135,11 +166,10 @@ output rather than native MathML support for Firefox:
</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
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.
Internet Explorer 8 has at least eight different rendering modes in which
-it can operate, and that are triggered by the DOCTYPE of the document
-being viewed. Its “quirks” mode is its fastest mode, and its “IE8
-standards” mode is its slowest. This is the mode triggered by strict HTML
-document types, and since most modern content management systems now
-include a DOCTYPE that activates “standards” mode, IE8 will operate in
-its slowest manner. This is particularly apparent when MathJax is used,
-since IE8 in standards mode runs 20 to 30 times slower than it does in its
-IE7 emulation mode, and 60 times slower than in quirks mode, on the sample
-equations page in test/sample.html.
-
Most users find this speed reduction unacceptable when there is much
-mathematics on the page. To overcome this problem, you may wish to
-tell IE8 to use its IE7 emulation mode rather than its IE8 standards
-mode. You can accomplish this by including the line
The performance of MathJax in Internet Explorer 8 and 9 has been
+substantially improved in version 2.0. The HTML-CSS output processing
+was redesigned to avoid the page reflows that were the main source of
+the speed problem in I8 and IE9. For test pages having between 20 and
+50 typeset expressions, we see an 80% reduction in output processing
+time for IE8, a 50% reduction for IE9, and between 15% and 25%
+reduction for most other browsers over the v1.1a times. Since the
+processing time in v1.1a grows non-linearly in IE, you should see even
+larger savings for pages with more equations when using v2.0.
+
In the past, we recommended forcing IE8 and IE9 into IE7-emulation
+mode in order to get better performance. That is no longer necessary.
+Indeed, the fastest modes in IE8 and IE9 now are their IE8 standards
+and IE9 standards modes, so it is best to force the highest mode
+possible. That can be accomplished by adding
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, 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.
@@ -191,14 +212,14 @@ exactly what the performance of MathJax in IE9 will be like.
diff --git a/docs/html/platforms/index.html b/docs/html/platforms/index.html
index efae5122c..e809a5368 100644
--- a/docs/html/platforms/index.html
+++ b/docs/html/platforms/index.html
@@ -6,13 +6,13 @@
- Using MathJax in popular web platforms — MathJax v1.1 documentation
+ Using MathJax in popular web platforms — MathJax v2.0 documentation
-
+
@@ -40,7 +40,7 @@
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 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 list of the
MathJax web site.
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.
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.
@@ -82,12 +82,12 @@ it.
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
-Loading and Configuring MathJax 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 Loading and Configuring MathJax instructions.
The use of cdn.mathjax.org is governed by its terms of service, so be
sure to read that before linking to the MathJax CDN server.
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:
<script type="text/javascript"src="https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
@@ -109,8 +109,9 @@ following <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.
@@ -118,8 +119,9 @@ secure connections. However, this address is stable and safe to use.
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:
-
-
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.
+
Configure MathJax to suit the needs of your site.
Link MathJax into the web pages that are to include mathematics.
Put mathematics into your web pages so that MathJax can display
@@ -133,52 +135,53 @@ 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
web pages. For example, making MathJax 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 /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 version
control system, and is described in the Installing MathJax document. If you prefer using Subversion, you can also use that to get a copy
of MathJax (see Installing MathJax via 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.
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
customize the settings yourself. The combined configuration files are
described more fully in Common Configurations, and the configuration options are described in
Configuration Options.
-
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 Installing and Configuring MathJax 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 Installing and Configuring MathJax for more details.
To put mathematics in your web page, you can use either TeX
-and LaTeX notation or 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 TeX and
+LaTeX notation, MathML notation, 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.
Mathematics that is written in TeX or LaTeX format is
@@ -255,9 +260,12 @@ options 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 TeX and LaTeX page for
-more on MathJax’s support for TeX.
-
Here is a complete sample page containing TeX mathematics (also available
-in the test/sample-tex.html file):
+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):
<!DOCTYPE html><html><head>
@@ -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 TeX and LaTeX 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 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 TeX
+and LaTeX 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:
@@ -294,10 +311,12 @@ an error message when there is a problem processing the TeX, and
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
+TeX and LaTeX support for details on the other
+TeX extensions that are available.
For mathematics written in MathML notation, you mark your
mathematics using standard <math> tags, where <mathdisplay="block"> represents displayed mathematics and <math
@@ -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
<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.
+
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 file):
<!DOCTYPE html><html><head>
@@ -320,13 +348,19 @@ available in the test/sample-mml.
</head><body>
-When <math><mi>a</mi><mo>≠</mo><mn>0</mn></math>,
-there are two solutions to <math>
+<p>
+When
+<mathxmlns="http://www.w3.org/1998/Math/MathML">
+ <mi>a</mi><mo>≠</mo><mn>0</mn>
+</math>,
+there are two solutions to
+<mathxmlns="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
-<mathmode="display">
+</math>
+and they are
+<mathxmlns="http://www.w3.org/1998/Math/MathML"display="block"><mi>x</mi><mo>=</mo><mrow><mfrac>
@@ -345,6 +379,7 @@ there are two solutions to <math></mrow><mtext>.</mtext></math>
+</p></body></html>
@@ -354,18 +389,57 @@ there are two solutions to <math>
page), you should not use self-closing tags, but should use explicit
open and close tags for all your math elements. For example, you
should use
-
<mspacewidth="thinmathspace"></mspace>
+
<mspacewidth="5pt"></mspace>
-
rather than <mspacewidth="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.
-
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 mml2jax configuration options page for more details. See the MathML page for more on MathJax’s MathML support.
+
rather than <mspacewidth="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
+mml2jax configuration options page for more
+details. See the MathML page for more on
+MathJax’s MathML support.
MathJax v2.0 includes a new input format: 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
+file):
+
<!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>
+<pstyle="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
+asciimath2jax configuration options page for more
+details. See the AsciiMath support page for more on
+MathJax’s AsciiMath support.
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
@@ -153,6 +153,126 @@ easier to enter <
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 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 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
+
... 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
+
\\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.
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
+
\(
+\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
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:
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 Using a Local
+Configuration File with the CDN for details.
@@ -182,7 +302,50 @@ 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.
+
You can also load these extensions from within a math expresion using
+the non-standard \require{extension} macro. For example
+
\(\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 action extension gives you access to the MathML <maction>
+element. It defines three new non-standard macros:
+
+
+\mathtip{math}{tip}
+
Use tip (in math mode) as tooltip for math.
+
+
+
+
+\texttip{math}{tip}
+
Use tip (in text mode) as tooltip for math.
+
+
+
+
+\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.
+
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.
The bbox extension defines a new macro for adding background colors,
+borders, and padding to your math expressions.
+
+
+\bbox[options]{math}
+
puts a bounding box around math using the provided options.
+The options can be one of the following:
+
+
A color name used for the background color.
+
A dimension (e.g., 2px) to be used as a padding around the
+mathematics (on all sides).
+
Style attributes to be applied to the mathematics (e.g.,
+border:1pxsolidred).
+
A combination of these separated by commas.
+
+
+
+
Here are some examples:
+
\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.
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.
+
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.
The cancel extension defines the following macros:
+
+
+\cancel{math}
+
Strikeout math from lower left to upper right.
+
+
+
+
+\bcancel{math}
+
Strikeout math from upper left to lower right.
+
+
+
+
+\xcancel{math}
+
Strikeout math with an “X”.
+
+
+
+
+\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.
+
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.
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.
+
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.
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:
+
+
+\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.
To use this extension in your own configurations, add it to the
+extensions array in the TeX block.
+
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.
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
+
+
+\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
+
\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.
+
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.
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:
+
+
+\href{url}{math}
+
Makes math be a link to the page given by url.
+
+
+
+
+\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.
+
+
+
+
+\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.
+
+
+
+
+\style{css}{math}
+
Adds the give css declarations to the element associated with
+math.
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.
The mhchem extensions implements the \ce, \cf, and \cee
+chemical equation macros of the LaTeX mhchem package. See the
+mhchem CPAN page for more
+information and a link to the documentation for mhchem.
To use this extension in your own configurations, add it to the
+extensions array in the TeX block.
+
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.
The noErrors extension prevents TeX error messages from being
@@ -232,9 +657,10 @@ following to your inlineDelimiters:["",""],// or ["$","$"] or ["\\(","\\)"]multiLine:true,// false for TeX on all one linestyle:{
- "font-family":"serif",
- "font-size":"80%",
+ "font-size":"90%",
+ "text-align":"left","color":"black",
+ "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)
@@ -340,6 +766,9 @@ array. You can configure the extension as follows:
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 page.
#
@@ -408,8 +837,11 @@ be loaded automatically when the macro or environment is first used.
\barwedge AMSsymbols
\Bbb\Bbbk AMSsymbols
+\bbox [bbox]
+\bcancel cancel
\because AMSsymbols
\begin
+\begingroup begingroup non-standard
\beta\beth AMSsymbols
\between AMSsymbols
@@ -474,13 +906,18 @@ be loaded automatically when the macro or environment is first used.
\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
@@ -498,7 +935,8 @@ be loaded automatically when the macro or environment is first used.
\class [HTML] non-standard
\clubsuit\colon
-\color
+\color color
+\colorbox color
\complement AMSsymbols
\cong\coprod
@@ -577,12 +1015,15 @@ be loaded automatically when the macro or environment is first used.
\fallingdotseq AMSsymbols
\fbox
+\fcolorbox color
\Finv AMSsymbols
\flat\forall
@@ -614,6 +1056,7 @@ be loaded automatically when the macro or environment is first used.
\Gamma\gamma\gcd
+\gdef begingroup
\ge\genfrac AMSmath
\geq
@@ -624,6 +1067,7 @@ be loaded automatically when the macro or environment is first used.
\ggg AMSsymbols
\gggtr AMSsymbols
\gimel AMSsymbols
+\global begingroup
\gnapprox AMSsymbols
\gneq AMSsymbols
\gneqq AMSsymbols
@@ -741,6 +1185,7 @@ be loaded automatically when the macro or environment is first used.
\lesseqqgtr AMSsymbols
\lessgtr AMSsymbols
\lesssim AMSsymbols
+\let [newcommand]
\lfloor\lg\lgroup
@@ -809,6 +1254,7 @@ be loaded automatically when the macro or environment is first used.
\mathscr\mathsf\mathstrut
+\mathtip action non-standard
\mathtt\matrix\max
@@ -816,9 +1262,11 @@ be loaded automatically when the macro or environment is first used.
\measuredangle AMSsymbols
\mho AMSsymbols
\mid
+\middle\min\mit\mkern
+\mmlToken non-standard
\mod\models\moveleft
@@ -845,6 +1293,7 @@ be loaded automatically when the macro or environment is first used.
\neq\newcommand [newcommand]
\newenvironment [newcommand]
+\Newextarrow extpfeil
\newline\nexists AMSsymbols
\ngeq AMSsymbols
@@ -968,7 +1417,9 @@ be loaded automatically when the macro or environment is first used.
\rbrack\rceil\Re
+\ref [AMSmath]
\renewcommand [newcommand]
+\renewenvironment [newcommand]
\require non-standard
\restriction AMSsymbols
\rfloor
@@ -1089,6 +1540,7 @@ be loaded automatically when the macro or environment is first used.
\textit\textrm\textstyle
+\texttip action non-standard
\tfrac AMSmath
\therefore AMSsymbols
\Theta
@@ -1101,6 +1553,7 @@ be loaded automatically when the macro or environment is first used.
\tiny\Tiny non-standard
\to
+\toggle action non-standard
\top\triangle\triangledown AMSsymbols
@@ -1205,8 +1658,14 @@ be loaded automatically when the macro or environment is first used.
diff --git a/docs/source/CSS-styles.rst b/docs/source/CSS-styles.rst
index bf014f5c2..b7b8b0bbb 100644
--- a/docs/source/CSS-styles.rst
+++ b/docs/source/CSS-styles.rst
@@ -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
diff --git a/docs/source/asciimath.rst b/docs/source/asciimath.rst
new file mode 100644
index 000000000..bbfccea88
--- /dev/null
+++ b/docs/source/asciimath.rst
@@ -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
+`_ 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 ` 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 ` 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 ` 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 ` 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
+`_.
+
+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 `` ``) 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`` 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 ``
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
+`_ 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
+` 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 ` 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
+`_ 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
+` 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 ` section for
+other configuration options for the ``tex2jax`` preprocessor, and the
+:ref:`TeX input jax configuration ` section for options
+that control the TeX input processor.
+See the :ref:`mml2jax configuration ` section for
+other configuration options for the ``mml2jax`` preprocessor, and the
+:ref:`MathML input jax configuration ` section for
+options that control the MathML input processor.
+See the :ref:`asciimath2jax configuration ` section for
+other configuration options for the ``asciimath2jax`` preprocessor, and the
+:ref:`AsciiMath input jax configuration ` section for
+options that control the AsciiMath input processor.
+See :ref:`MathJax Output Formats ` for more
+information on the NativeMML and HTML-CSS output processors. See the
+:ref:`MMLorHTML configuration ` 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 ` 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 `
+section for other configuration options for the ``asciimath2jax``
+preprocessor, and the :ref:`AsciiMath input jax configuration
+` section for options that control the AsciiMath
+input processor. See :ref:`MathJax Output Formats `
+for more information on the HTML-CSS and NativeMML output processors.
+See the :ref:`MMLorHTML configuration ` 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 ` section for
+other configuration options for the ``tex2jax`` preprocessor, and the
+:ref:`TeX input jax configuration ` section for options
+that control the TeX input processor.
+See the :ref:`mml2jax configuration ` section for
+other configuration options for the ``mml2jax`` preprocessor, and the
+:ref:`MathML input jax configuration ` section for
+options that control the MathML input processor.
+See :ref:`MathJax 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.
diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst
index 290fbf48c..5685d7876 100644
--- a/docs/source/configuration.rst
+++ b/docs/source/configuration.rst
@@ -52,14 +52,14 @@ typical invocation of MathJax would be
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
-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 ` 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 ` for details.
It is best to load MathJax in the document's ```` block, but it
is also possible to load MathJax into the ```` 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,
-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
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 ` section below.
+rather than one of the pre-defined ones, see the information at the
+end of the :ref:`Using a Local Configuration File
+` 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 ``
-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.
diff --git a/docs/source/glossary.rst b/docs/source/glossary.rst
index 14e18cc93..6325bd82c 100644
--- a/docs/source/glossary.rst
+++ b/docs/source/glossary.rst
@@ -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 `_
+
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 `_
+ 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 `_
+
MathML
An XML specification created to describe mathematical
notations and capture both its structure and content. MathML
@@ -62,6 +84,18 @@ Glossary
`STIX project `_
+ 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 `_
+
TeX
A document markup language with robust math markup commands
developed by Donald Knuth in the late 1970's, but still in
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 80df118de..6c940b0ae 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -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
MathJax MathML Support
+ MathJax AsciiMath Support
MathJax Output Formats