Skip to content

Commit

Permalink
Merge pull request #83 from mathjax/v2.5-latest
Browse files Browse the repository at this point in the history
v2.5-latest update
  • Loading branch information
pkra committed Jan 30, 2015
2 parents b741d53 + 234106e commit 9f85118
Show file tree
Hide file tree
Showing 14 changed files with 492 additions and 80 deletions.
12 changes: 5 additions & 7 deletions asciimath.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ later processing by MathJax. The AsciiMath input processor is what
converts the AsciiMath notation into MathJax's internal format, where
one of MathJax's output processors then displays it in the web page.

The AsciiMath input jax actually includes a copy of Peter Jipsen's
``ASCIIMathML.js`` file (see the `AsciiMath home page
<http://www1.chapman.edu/~jipsen/mathml/asciimath.html>`_ for
details), and is included by permission of the author. This means
that the results of MathJax's AsciiMath processing should be the same
as using the actual ``ASCIIMathML.js`` package (at least as far as the
The AsciiMath input jax actually includes a copy of ``ASCIIMathML.js`` itselt
(see the `AsciiMath home page <http://asciimath.org>`_ for details).
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.
input jax and for the ongoing improvements from the AsciiMath community.

The `asciimath2jax` preprocessor can be configured to look for whatever
markers you want to use for your math delimiters. See the
Expand Down
6 changes: 3 additions & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@

# General information about the project.
project = u'MathJax'
copyright = u'2014 The MathJax Consortium'
copyright = u'2015 The MathJax Consortium'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '2.4'
version = '2.5'
# The full version, including alpha/beta/rc tags.
release = '2.4'
release = '2.5'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
70 changes: 35 additions & 35 deletions config-files.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.. _common-configurations:

*********************
Common Configurations
*********************
***********************
Combined Configurations
***********************

MathJax comes with a number of pre-defined configuration files in the
``MathJax/config`` directory. The ``default.js`` file contains nearly all
the possible configuration options together with comments explaining them,
MathJax comes with a number of pre-defined and pre-compiled configuration files
in the ``MathJax/config`` directory. The ``default.js`` file contains nearly
all the possible configuration options together with comments explaining them,
so you can use that file to customize MathJax to your needs. Simply load
it via

Expand Down Expand Up @@ -60,8 +60,8 @@ following configuration:
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"],
jax: ["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS","output/NativeMML", "output/CommonHTML"],
extensions: ["tex2jax.js","mml2jax.js","asciimath2jax.js","MathMenu.js","MathZoom.js", "CHTML-preview.js"],
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
}
Expand All @@ -70,8 +70,8 @@ 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
in the MathJax contextual menu. The `-full` version also loads the HTML-CSS,
CommonHTML, and NativeMML output jax main code, plus the HTML-CSS
`mtable` extension, which is normally loaded on demand.

See the :ref:`tex2jax configuration <configure-tex2jax>` section for
Expand Down Expand Up @@ -107,8 +107,8 @@ configuration:
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: ["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML"],
extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js"],
jax: ["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML", "output/CommonHTML"],
extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js", "CHTML-preview.js"],
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
}
Expand All @@ -117,8 +117,8 @@ 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
MathJax contextual menu. The ``-full`` version also loads the HTML-CSS,
CommonHTML, and NativeMML output jax main code, plus the HTML-CSS
`mtable` extension, which is normally loaded on demand.

See the :ref:`tex2jax configuration <configure-tex2jax>` section for
Expand Down Expand Up @@ -153,8 +153,8 @@ extensions. It is equivalent to the following configuration:
.. code-block:: javascript
MathJax.Hub.Config({
jax: ["input/TeX","output/HTML-CSS"],
extensions: ["tex2jax.js","MathMenu.js","MathZoom.js"],
jax: ["input/TeX","output/HTML-CSS", "output/CommonHTML"],
extensions: ["tex2jax.js","MathMenu.js","MathZoom.js", "CHTML-preview.js"],
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
}
Expand All @@ -163,8 +163,8 @@ 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.
version also loads the HTML-CSS and CommonHTML output jax main code, plus the
HTML-CSS `mtable` extension, which is normally loaded on demand.

See the :ref:`tex2jax configuration <configure-tex2jax>` section for
other configuration options for the ``tex2jax`` preprocessor, and the
Expand All @@ -191,16 +191,16 @@ and MathZoom extensions. It is equivalent to the following configuration:
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: ["input/MathML","output/HTML-CSS","output/NativeMML"],
extensions: ["mml2jax.js","MathMenu.js","MathZoom.js"]
jax: ["input/MathML","output/HTML-CSS","output/NativeMML", "output/CommonHTML"],
extensions: ["mml2jax.js","MathMenu.js","MathZoom.js", "CHTML-preview.js"]
});
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
code files, plus the HTML-CSS `mtable` extension, which is normally loaded
on demand.
The ``-full`` version also loads the HTML-CSS, CommonHTML, and NativeMML output
jax main code files, plus the HTML-CSS `mtable` extension, which is normally
loaded on demand.

See the :ref:`mml2jax configuration <configure-mml2jax>` section for
other configuration options for the ``mml2jax`` preprocessor, and the
Expand Down Expand Up @@ -230,15 +230,15 @@ equivalent to the following configuration:
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: ["input/AsciiMath","output/HTML-CSS","output/NativeMML"],
extensions: ["asciimath2jax.js","MathMenu.js","MathZoom.js"]
jax: ["input/AsciiMath","output/HTML-CSS","output/NativeMML", "output/CommonHTML"],
extensions: ["asciimath2jax.js","MathMenu.js","MathZoom.js", "CHTML-preview.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.
version also loads the HTML-CSS and CommonHTML output jax main code, plus the
HTML-CSS `mtable` extension, which is normally loaded on demand.

See the :ref:`asciimath2jax configuration <configure-asciimath2jax>`
section for other configuration options for the ``asciimath2jax``
Expand All @@ -265,8 +265,8 @@ 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"],
jax: ["input/TeX","input/MathML","output/SVG", "output/CommonHTML"],
extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js", "CHTML-preview.js"],
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
}
Expand All @@ -275,8 +275,8 @@ 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
MathJax contextual menu. The ``-full`` version also loads the SVG and
CommonHTML output jax main code, plus the SVG `mtable` extension, which
is normally loaded on demand.

See the :ref:`tex2jax configuration <configure-tex2jax>` section for
Expand Down Expand Up @@ -311,8 +311,8 @@ The Accessible configuration is equivalent to the following:
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: ["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML"],
extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js"],
jax: ["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML", "output/CommonHTML"],
extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js", "CHTML-preview.js"],
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
},
Expand All @@ -333,7 +333,7 @@ mathematics by 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
NativeMML output jax main code, plus the HTML-CSS `mtable` extension, which
contextual menu. The ``-full`` version also loads the HTML-CSS, CommomHTML,
and NativeMML output jax main code, plus the HTML-CSS `mtable` extension, which
is normally loaded on demand.

16 changes: 15 additions & 1 deletion index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Basic Usage
Getting Started with MathJax <start>
Installing and Testing MathJax <installation>
Loading and Configuring MathJax <configuration>
Common MathJax Configurations <config-files>
Combined MathJax Configurations <config-files>

.. toctree::
:maxdepth: 1
Expand Down Expand Up @@ -67,11 +67,24 @@ MathJax Configuration Options
The TeX input processor options <options/TeX>
The MathML input processor options <options/MathML>
The AsciiMath input processor options <options/AsciiMath>

.. toctree::
:maxdepth: 1

The HTML-CSS output processor options <options/HTML-CSS>
The NativeMML output processor options <options/NativeMML>
The SVG output processor options <options/SVG>
The CommonHTML output processor options <options/CommonHTML>
The MMLorHTML configuration options <options/MMLorHTML>

.. toctree::
:maxdepth: 1

The HTML-CSS floats extension <options/handle-floats>
The CHTML-preview options <options/CHTML-preview>
The Content MathML options <options/Content-MathML>
The experimental MML3 extension <options/MML3>

.. toctree::
:maxdepth: 1

Expand Down Expand Up @@ -131,6 +144,7 @@ Upgrading MathJax
.. toctree::
:maxdepth: 1

What's New in MathJax v2.5 <whats-new-2.5>
What's New in MathJax v2.4 <whats-new-2.4>
What's New in MathJax v2.3 <whats-new-2.3>
What's New in MathJax v2.2 <whats-new-2.2>
Expand Down
6 changes: 6 additions & 0 deletions installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ on your system, just execute the following command:
bower install MathJax
Obtaining MathJax via Composer
==============================

Starting with version 2.5, it is possible to use `Composer
<http://getcomposer.org//>`_ to install MathJax. See the `Composer
documentation <https://getcomposer.org/doc/00-intro.md>`_ to get started.

Testing your installation
=========================
Expand Down
81 changes: 53 additions & 28 deletions mathml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
MathJax MathML Support
**********************

The support for :term:`MathML` in MathJax consists of three parts: the
The support for :term:`MathML` in MathJax comes in three parts: the
`mml2jax` preprocessor, the `MathML` input processor, and the `NativeMML`
output processor. The first of these looks for ``<math>`` tags within
your document and marks them for later processing by MathJax. The
Expand All @@ -22,16 +22,18 @@ 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 well
enough, while HTML-CSS is used for those that don't. See the
:ref:`common configurations <common-configurations>` section for
:ref:`combined configurations <common-configurations>` section for
details and examples.

Of course it is also possible to use all three components together.
It may seem strange to go through an internal format just to return to
MathML in the end, but this is actually what makes it possible to view
MathML within an HTML page (rather than an XHTML page), without
the complications of handling special MIME-types for the document, or
any of the other setup issues that make using native MathML
difficult. MathJax handles the setup and properly marks the
MathML within an HTML4 page (rather than an XHTML page), in particular in older
browsers, without the complications of handling special MIME-types for the
document, or any of the other setup issues that make using native MathML
difficult.

MathJax handles the setup and properly marks the
mathematics so that the browser will render it as MathML. In
addition, MathJax provides its contextual menu for the MathML, which
lets the user zoom the mathematics for easier reading, get and copy
Expand All @@ -54,7 +56,7 @@ browsers, so you should avoid the named entities whenever possible.
If you must use named entities, you may need to declare them in the
`DOCTYPE` declaration by hand.

When you use MathML in an HTML document rather than an XHTML one
When you use MathML in an HTML4 document rather than an XHTML one
(MathJax will work with both), you should not use the "self-closing"
form for tags with no content, but should use separate open and close
tags. That is, use
Expand All @@ -75,15 +77,37 @@ able to handle self-closing tags, but older browsers have problems
with them, so if you want your mathematics to be visible to the widest
audience, do not use the self-closing form in HTML documents.


Supported MathML commands
=========================

MathJax supports the `MathML3.0 <http://www.w3.org/TR/MathML3/>`_
mathematics tags, with some limitations. The MathML
support is still under active development, so some tags are not yet
implemented, and some features are not fully developed, but are
coming.

The deficiencies include:

- No support for alignment groups in tables.

- Not all attributes are supported for tables. E.g., ``columnspan``
and ``rowspan`` are not implemented yet.

- Experimental support for the elementary math tags: ``mstack``, ``mlongdiv``,
``msgroup``, ``msrow``, ``mscarries``, and ``mscarry``.

- Experimental support for bidirectional mathematics.

See the `results of the MathML3.0 test suite
<http://www.w3.org/Math/testsuite/results/tests.html>`_ for details.


.. _content-mathml:

Content MathML
==============

New in version 2.2 is experimental support for Content MathML. This
uses an XSL style sheet developed by David Carlisle to convert Content
MathML to Presentation MathML, which is then processed by MathJax.

To use Content MathML in your documents, simply include
``"content-mathml.js"`` in the ``extensions`` array of your MathML
configuration block. For example
Expand All @@ -101,31 +125,32 @@ configuration block. For example
Note that this script tag must come *before* the script that loads
``MathJax.js`` itself.

For more information, see :doc:`options/Content-MathML`.

Supported MathML commands
=========================

MathJax supports the `MathML3.0 <http://www.w3.org/TR/MathML3/>`_
presentation mathematics tags, with some limitations. The MathML
support is still under active development, so some tags are not yet
implemented, and some features are not fully developed, but are
coming.

The deficiencies include:
.. _experimental-mathml:

- No support for the elementary math tags: ``mstack``, ``mlongdiv``,
``msgroup``, ``msrow``, ``mscarries``, and ``mscarry``.
Experimental mml3 extension
===========================

- No support for alignment groups in tables.
To activate experimental features in your documents, simply include
``"mml3.js"`` in the ``extensions`` array of your MathML
configuration block. For example

- No support for right-to-left rendering.
.. code-block:: html

- Not all attributes are supported for tables. E.g., ``columnspan``
and ``rowspan`` are not implemented yet.
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
MathML: {
extensions: ["mml3.js"]
}
});
</script>

See the `results of the MathML3.0 test suite
<http://www.w3.org/Math/testsuite/results/tests.html>`_ for details.
Note that this script tag must come *before* the script that loads
``MathJax.js`` itself.

For more information, see :doc:`options/MML3`.

Semantics and Annotations
=========================
Expand Down
Loading

0 comments on commit 9f85118

Please sign in to comment.