Update the html output

This commit is contained in:
Davide P. Cervone 2011-03-07 20:46:57 -05:00
parent b6d16ccd10
commit f0a8d82f57
94 changed files with 4207 additions and 1851 deletions

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="Glossary" href="glossary.html" />
<link rel="prev" title="Describing HTML snippets" href="HTML-snippets.html" />
@ -130,11 +130,6 @@ samples. In particular, the <tt class="docutils literal"><span class="pre">exte
<h4>Next topic</h4>
<p class="topless"><a href="glossary.html"
title="next chapter">Glossary</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/CSS-styles.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -21,10 +21,10 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="CSS Style Objects" href="CSS-styles.html" />
<link rel="prev" title="Converting to MathJax from jsMath" href="jsMath.html" />
<link rel="prev" title="The MathJax Object-Oriented Programming Model" href="api/object.html" />
</head>
<body>
@ -38,7 +38,7 @@
<a href="CSS-styles.html" title="CSS Style Objects"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="jsMath.html" title="Converting to MathJax from jsMath"
<a href="api/object.html" title="The MathJax Object-Oriented Programming Model"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
</ul>
@ -122,16 +122,11 @@ This is bold text shown in red
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="jsMath.html"
title="previous chapter">Converting to MathJax from jsMath</a></p>
<p class="topless"><a href="api/object.html"
title="previous chapter">The MathJax Object-Oriented Programming Model</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="CSS-styles.html"
title="next chapter">CSS Style Objects</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/HTML-snippets.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
@ -159,7 +154,7 @@ This is bold text shown in red
<a href="CSS-styles.html" title="CSS Style Objects"
>next</a> |</li>
<li class="right" >
<a href="jsMath.html" title="Converting to MathJax from jsMath"
<a href="api/object.html" title="The MathJax Object-Oriented Programming Model"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
</ul>

View File

@ -35,7 +35,7 @@ Properties
Number of milliseconds to wait for a file to load before
it is considered to have failed to load.
*Default:* 20 seconds
*Default:* 15 seconds
.. describe:: STATUS.OK
@ -60,6 +60,12 @@ Properties
callbacks that are to be run when they load or timeout, and
additional internal data.
.. describe:: loadHooks
An object containing the load hooks for the various files, set up by
the :meth:`loadHook()` method, or by the
:meth:`MathJax.Hub.Register.LoadHook()` method.
Methods
=======
@ -106,9 +112,9 @@ Methods
file has been completely loaded and initialized. The `file`
parameter is the name of the file that has been loaded. This
routine will cause any callback functions registered for the file
or included in the :meth:``MathJax.Ajax.Require()`` calls to be
or included in the :meth:`MathJax.Ajax.Require()` calls to be
executed, passing them the status or the load
(`MathJax.Ajax.STATUS.OK`` or ``MathJax.Ajax.STATUS.ERROR``) as
(``MathJax.Ajax.STATUS.OK`` or ``MathJax.Ajax.STATUS.ERROR``) as
their last parameter.
:Parameters:
@ -148,6 +154,18 @@ Methods
- **callback** --- the callback specification
:Returns: the callback object
.. method:: Preloading(file1[,file2...])
Used withing combined configuration files to indicate what files are
in the configuration file. Marks the files are loading (since there
will never be an explicit :meth:`Load()` or :meth:`Require()` call for
then), so that load-hooks and other load-related events can be
properly processed.
:Parameters:
- **file1, file2, ...** --- the names of the files in the combined file
:Returns: ``null``
.. method:: Styles(styles[,callback])
Creates a stylesheet from the given style data. `styles` can

View File

@ -24,7 +24,7 @@ that class.
Class Properties
================
.. describe:: name
.. describe:: id
The name of the jax.
@ -42,11 +42,13 @@ Instance Properties
.. describe:: inputJax
A reference to the input jax that created the element.
A reference to the input jax that created the element. (In the
future, this will be changed to the name of the input jax.)
.. describe:: outputJax
A reference to the output jax that has processed this element.
A reference to the output jax that has processed this element. (In
the future, this will be changed to the name of the output jax.)
.. describe:: inputID
@ -61,7 +63,8 @@ Instance Properties
.. describe:: originalText
A string indicating the original input text that was processed for
this element.
this element. (In the future, this may be managed by the input jax
rather than ``MathJax.Hub``.)
.. describe:: mimeType

View File

@ -81,6 +81,17 @@ Methods
- **text** --- the text for the new node
:Returns: the new text node
.. method:: setText(script,text)
Sets the contents of the ``script`` element to be the given
``text``, properly taking into account the browser limitations and
bugs.
:Parameters:
- **script** --- the script whose content is to be set
- **text** --- the text that is to be the script's new content
:Returns: ``null``
.. describe:: Cookie.Set(name,data)
Creates a MathJax cookie using the ``MathJax.HTML.Cookie.prefix``
@ -91,7 +102,7 @@ Methods
MathJax.HTML.Cookie.Set("test",{x:42, y:"It Works!"});
will create a cookie named "mjx:test" that stores the values of
will create a cookie named "mjx.test" that stores the values of
``x`` and ``y`` provided in the `data` object. This data can be
retrieved using the :meth:`MathJax.HTML.Cookie.Get()` method
discussed below.

View File

@ -28,7 +28,7 @@ Properties
options and their default values are given in the :ref:`Core
Options <configure-hub>` reference page.
.. describe:: processUpdateTime: 500
.. describe:: processUpdateTime: 250
The minimum time (in milliseconds) between updates of the
"Processing Math" message.
@ -38,6 +38,11 @@ Properties
The hub processing signal (tied to the
:meth:`MathJax.Hub.Register.MessageHook()` method).
.. describe:: queue
MathJax's main processing queue. Use :meth:`MathJax.Hub.Queue()` to push
callbacks onto this queue.
.. describe:: Browser
The name of the browser as determined by MathJax. It will be one
@ -106,6 +111,15 @@ Methods
- **options** --- object containing options to be set
:Returns: ``null``
.. describe:: Configured()
When ``delayStartupUntil`` is specified in the configuration file or
in the script that loads ``MathJax.js``, MathJax's startup sequence is
delayed until this routine is called. See :ref:`Configuring MathJax
<configuration>` for details on how this is used.
:Returns: ``null``
.. describe:: Register.PreProcessor(callback)
Used by preprocessors to register themselves with MathJax so that

View File

@ -35,7 +35,7 @@ that class.
Properties
==========
.. describe:: name
.. describe:: id
The name of the jax.
@ -47,6 +47,11 @@ Properties
The directory where the jax files are stored (e.g., ``"[MathJax]/jax/input/TeX"``);
.. describe:: elementJax
The name of the ElementJax class that this input jax will produce
(typically ``mml``, as that is the only ElementJax at the moment).
Methods
=======
@ -54,15 +59,12 @@ Methods
.. Method:: Translate(script)
:noindex:
This is the main routine called by MathJax when a ``<script>`` of
the appropriate type is found. The default :meth:`Translate()`
method simply loads the ``jax.js`` file and returns that callback
for that load function so that MathJax will know when to try
the :meth:`Translate()` action again. When the ``jax.js`` file
loads, it should override the default :meth:`Translate()` with its
own version that does the actual translation; that way, when the
second Translate call is made, it will be to the actual
translation routine rather than the default loader.
This is the main routine called by MathJax when a ``<script>`` of the
appropriate type is found. The default :meth:`Translate()` method
throws an error indicating that :meth:`Translate()` hasn't been
redefined, so when the ``jax.js`` file loads, it should override the
default :meth:`Translate()` with its own version that does the actual
translation.
The translation process should include the creation of an
:ref:`Element Jax <api-element-jax>` that stores the data needed
@ -84,3 +86,4 @@ Methods
:Parameters:
- **mimetype** --- the MIME-type of the input this jax processes
:Returns: ``null``

View File

@ -15,7 +15,7 @@ Unlike most MathJax.Object classes, calling the class object creates a
.. code-block:: javascript
MathJax.InputJax.MyInputJax = MathJax.InputJax({
name: "MyInputJax",
id: "MyInputJax",
version: "1.0",
...
});
@ -40,7 +40,7 @@ Class Properties
Instance Properties
===================
.. describe:: name
.. describe:: id
The name of the jax.
@ -67,35 +67,41 @@ Instance Properties
Methods
=======
.. Method:: Translate(script)
.. Method:: Process(script)
:noindex:
This is the method that the ``MathJax.Hub`` calls when it needs
the input or output jax to process the given math ``<script>``
call. Its default action is to start loading the jax's ``jax.js``
file, and redefine the :meth:`Translate()` method to be the
:meth:`noTranslate()` method below. The ``jax.js`` file should
redefine the :meth:`Translate()` method to perform the translation
operation for the specific jax. For an input jax, it should
return the `ElementJax` object that it created.
This is the method that the ``MathJax.Hub`` calls when it needs the
input or output jax to process the given math ``<script>``. Its
default action is to start loading the jax's ``jax.js`` file, and
redefine itself to simplu return the callback for the laod operation
(so that further calls to it will cause the processing to wait for the
callback). Once the ``jax.js`` file has loaded, this method is
replaced by the jax's :meth:`Translate()` method, so that subsequent calls
to :meth:`Process()` will perform the appropriate translation.
:Parameters:
- **script** --- reference to the DOM ``<script>`` object for
the mathematics to be translated
:Returns: an `ElementJax` object, or ``null``
.. Method:: noTranslate(script)
.. Method:: Translate(script)
This is a temporary routine that is used while the ``jax.js`` file
is loading. It throws an error indicating the the
:meth:`Translate()` method hasn't been redefined. That way, if
the ``jax.js`` file failes to load for some reason, you will
receive an error trying to process mathematics with this input
jax.
This is a stub for a routine that should be defined by the jax's
``jax.js`` file when it is loaded. It should perform the translation
action for the specific jax. For an input jax, it should return the
`ElementJax` object that it created. The :meth:`Translate()` mehtod is
never called directly by MathJax; during the :meth:`loadComplete()`
call, this funciton is copied to the :meth:`Process()` method, and is
called via that name. The default :meth:`Translate()` method throws an
error indicating that the :meth:`Translate()` meth was not been
redefined. That way, if the ``jax.js`` file fails to load for some
reason, you will receive an error trying to process mathematics with
this jax.
:Parameters:
- **script** --- reference to the DOM ``<script>`` object for
the mathematics to be translated
:Returns: ``null``
:Returns: an `ElementJax` object, or ``null``
.. Method:: Register(mimetype)
@ -136,13 +142,16 @@ Methods
1. Post the "[name] Jax Config" message to the startup signal.
2. Perform the jax's :meth:`Config()` method.
3. Post the "[name] Jax Require" message to the startup signal.
4. Load the files from the jax's ``require`` array (which may
have been modified during the configuration process).
4. Load the files from the jax's ``require`` and
``config.extensions`` arrays.
5. Post the "[name] Jax Startup" message to the startup signal.
6. Perform the jax's :meth:`Startup()` method.
7. Post the "[name] Jax Ready" message to the startup signal.
8. perform the :meth:`MathJax.Ajax.loadComplete()` call for the
``jax.js`` file.
Note that the configuration process (the :meth:`Config()` call) can
modify the ``require`` or ``config.extensions`` arrays to add more
files that need to be loaded, and that the :meth:`Startup()` method
isn't called until those files are completely loaded.

View File

@ -66,7 +66,7 @@ Methods
- **message** --- the text to display in the message area
- **n** --- the message id number
- **delay** --- amout of time to display the message
:Returns: the message id nuber for this message.
:Returns: the message id number for this message.
.. method:: Clear(n[,delay])
@ -78,9 +78,42 @@ Methods
- **delay** --- the delay before removing the message
:Returns: ``null``
.. method:: Remove()
This removes the message frame from the window (it will reappear when
future messages are set, however).
:Returns: ``null``
.. method:: File(file)
This sets the message area to a "Loading *file*" message, where *file*
is the name of the file (with ``[MathJax]`` representing the root
directory).
:Parameters:
- **file** --- the name of the file being loaded.
:Returns: the message id number for the message created.
.. method:: filterText(text,n)
This method is called on each message before it is displayed. It can
be used to modify (e.g., shorten) the various messages before they are
displayed. The default action is to check of the ``messageStyle``
configuration parameter is ``simple``, and if so, convert loading and
processing messages to a simpler form. This method can be overridden
to perform other sanitization of the message strings.
:Parameters:
- **text** --- the text of the message to be posted
- **n** --- the id number of the message to be posted
:Returns: the modified message text
.. method:: Log()
Returns a string of all the messages issued so far, separated by
newlines. This is used in debugging MathJax operations.
:Returns: string of all messages so far

View File

@ -36,7 +36,7 @@ that class.
Properties
==========
.. describe:: name
.. describe:: id
The name of the jax.
@ -57,16 +57,13 @@ Methods
This is the main routine called by MathJax when an element jax is
to be converted to output. The default :meth:`Translate()`
method simply loads the ``jax.js`` file and returns that callback
for that load function so that MathJax will know when to try
the :meth:`Translate()` action again. When the ``jax.js`` file
loads, it should override the default :meth:`Translate()` with its
own version that does the actual translation; that way, when the
second Translate call is made, it will be to the actual
translation routine rather than the default loader.
method throws an error indicating that :meth:`Translate()` hasn't been
redefined, so when the ``jax.js`` file loads, it should override the
default :meth:`Translate()` with its own version that does the actual
translation.
You should use ``MathJax.Hub.getJaxFor(script)`` to obtain the
element jax for the given script. The translation process may add
element jax for the given script. The translation process may
modify the element jax (e.g., if it has data that needs to be
stored with the jax), and may insert DOM elements into the
document near the jax's ``<script>`` tag.

View File

@ -40,12 +40,12 @@ Issue tracking
==============
Found a bug or want to suggest an improvement? Post it to our `issue tracker
<http://github.com/mathjax/mathjax/issues>`_. We monitor the tracker closely,
<http://github.com/mathjax/MathJax/issues>`_. We monitor the tracker closely,
and work hard to respond to problems quickly.
Before you create a new issue, however, please search the issues to see if it
has already been reported. You could also be using an outdated version of
MathJax, so be sure to :ref:`upgrade your copy <getting-mathjax-svn>` to verify
MathJax, so be sure to :ref:`upgrade your copy <getting-mathjax-git>` to verify
that the problem persists in the lastest version.

View File

@ -0,0 +1,192 @@
.. _common-configurations:
*********************
Common 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,
so you can use that file to customize MathJax to your needs. Simply load
it via
.. code-block:: html
<script type="text/javascript" src="path-to-MathJax/MathJax.js?config=default"></script>
where ``path-to-MathJax`` is the URL to the MathJax directory on your
server or hard disk.
The remaining files are combined configuration files that include not just
configuration parameters but also the files that MathJax would need to
load for those configurations. This means MathJax will have to load fewer
files, and since each file access requires establishing connections over
the network, it can be better to load one larger file than several smaller
ones. See :ref:`Loading and Configuring MathJax <loading>` for more
details about how to load configurations, and how to modify the parameters
for a configuration file.
The 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
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
================================================
This configuration file is the most general of the pre-defined
configurations. It loads all the important 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:
.. code-block:: javascript
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"],
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 HTML-CSS and
NativeMML output jax main code, plus the HTML-CSS `mtable` extension, which
is normally loaded on demand.
See the :ref:`tex2jax configuration <configure-tex2jax>` section for
other configuration options for the ``tex2jax`` preprocessor, and the
:ref:`TeX input jax configuration <configure-TeX>` section for options
that control the TeX input processor.
See the :ref:`mml2jax configuration <configure-mml2jax>` section for
other configuration options for the ``mml2jax`` preprocessor, and the
:ref:`MathML input jax configuration <configure-MathML>` section for
options that control the MathML input processor.
See :ref:`MathJax Output Formats <output-formats>` for more
information on the NativeMML and HTML-CSS output processors. See the
:ref:`MMLorHTML configuration <configure-MMLorHTML>` section for
details on the options that control the ``MMLorHTML`` configuration.
The ``TeX-AMS_HTML`` configuration file
================================================
This configuration file is for sites that only use TeX format for their
mathematics, and that want the output to be as close to TeX output as
possible. This uses the HTML-CSS output jax (even when the user's browser
understands MathML). The user can still use the MathJax contextual menu
to select the NativeMML output jax if they desire.
This file includes all the important MathJax components for TeX input and
output, including the `tex2jax` preprocessor and TeX input jax, the
AMSmath, AMSsymbols, noErrors, and noUndefined TeX extensions, the
HTML-with-CSS output processor definition, and the MathMenu and MathZoom
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"],
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.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:`tex2jax configuration <configure-tex2jax>` section for
other configuration options for the ``tex2jax`` preprocessor, and the
:ref:`TeX input jax configuration <configure-TeX>` section for options
that control the TeX input processor.
See :ref:`MathJax Output Formats <output-formats>` for more
information on the HTML-CSS output processor.
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
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
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/MathML","output/HTML-CSS","output/NativeMML"],
extensions: ["mml2jax.js","MathMenu.js","MathZoom.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.
See the :ref:`mml2jax configuration <configure-mml2jax>` section for
other configuration options for the ``mml2jax`` preprocessor, and the
:ref:`MathML input jax configuration <configure-MathML>` section for
options that control the MathML input processor.
See :ref:`MathJax Output Formats <output-formats>` for more
information on the NativeMML and HTML-CSS output processors. See the
:ref:`MMLorHTML configuration <configure-MMLorHTML>` section for
details on the options that control the ``MMLorHTML`` configuration.
The ``Accessible`` configuration file
================================================
This configuration file is essentially the same as
``TeX-AMS-MML_HTMLorMML`` except that it includes configuration that is
designed for assitive technology, particularly for those with visual
challenges. It is equivalent to the following configuration:
.. code-block:: javascript
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"],
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
},
NativeMML: { showMathMenuMSIE: false },
menuSettings: { zoom: "Double-Click" },
errorSettings: { message: ["[Math Error]"] }
});
This turns off the MathJax contextual Message for Internet Explorer, since
it can interfere with some screen readers. 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
NativeMML output jax main code, plus the HTML-CSS `mtable` extension, which
is normally loaded on demand.

View File

@ -6,18 +6,28 @@ Loading and Configuring MathJax
You load MathJax into a web page by including its main JavaScript file
into the page. That is done via a ``<script>`` tag that links to the
``MathJax.js`` file. Place the following line in the ``<head>``
``MathJax.js`` file. To do that, place the following line in the ``<head>``
section of your document:
.. code-block:: html
<script type="text/javascript" src="path-to-MathJax/MathJax.js"></script>
where ``path-to-MathJax`` is replaced by the URL of the MathJax
directory on your server, or (if you are using MathJax locally rather
than through a server) the location of that directory on your hard
disk. For example, if the MathJax directory is at the top level of
your web server's directory hierarchy, you might use
where ``path-to-MathJax`` is replaced by the URL of the copy of MathJax
that you are loading. For example, if you are using the MathJax
distributed network service, the tag might be
.. code-block:: html
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js">
</script>
If you have installed MathJax yourself, ``path-to-MathJax`` will be the
location of MathJax on your server, or (if you are using MathJax locally
rather than through a server) the location of that directory on your hard
disk. For example, if the MathJax directory is at the top level of your
web server's directory hierarchy, you might use
.. code-block:: html
@ -25,15 +35,29 @@ your web server's directory hierarchy, you might use
to load MathJax.
Although it is possible to load MathJax from a site other than your
own web server, there are issues involved in doing so that you need to
take into consideration. See the :ref:`Notes About Shared Servers
<cross-domain-linking>` for more details. Please do **not** link to
the copy of MathJax at ``www.mathjax.org``, as we do not have the
resources to act as a web service for all the sites on the web that
would like to display mathematics. If you are able to run MathJax
from your own server, please do so (this will probably give you better
response time in any case).
If you install MathJax on a server in a domain that is different from the
one containing the page that will load MathJax, then there are issues
involved in doing so that you need to take into consideration. See the
:ref:`Notes About Shared Servers <cross-domain-linking>` for more details.
When you load MathJax, it is common to include additional parameters for
MathJax as part of the URL. These control MathJax's configuration, and are
discussed in the :ref:`Configuration Objects <configuration>` section. A
typical invocation of MathJax would be
.. code-block:: html
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
which loads MathJax with a configuration file that includes everything you
need in order to enter mathematics in either TeX, LaTeX, or MathML
notation, and produces output using MathML if the browser supports that,
or HTML-with-CSS otherwise. If you **don't** load an explicit
configuration file, you will need to include an in-line configuration
block in order to tell MathJax how to read and display the mathematics on
your pages. See the section below 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
@ -51,325 +75,344 @@ been prepared, for example, via a `GreaseMonkey
advanced topic, however; see :ref:`Loading MathJax Dynamically
<ajax-mathjax>` for more details.
.. _loading-CDN:
Loading MathJax from the CDN
============================
MathJax is now 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 acces
to a server geographically near you, for a fast, reliable connection.
The CDN hosts the most current version of MathJax, as well as older
versions, so you can either link to a version that stays up-to-date as
Mathjax is improved, or you can stay with one of the release versions so
that you pages always use the same version of MathJax.
The URL that you use to obtain MathJax determines the version that you
get. The CDN has the following directory structure:
.. code-block:: sh
mathjax/ # project-name
1.0-latest/
1.1-beta/ # temporary
1.1-latest/ # the 1.1 release with any ciritical patches
...
latest/ # the most current version (1.1-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).
We may occasionally introduce directories for betas, as indicated above,
but they will be temprorary, and will be removed after the official
release.
To load from a particular release, use the directory for that release.
For example,
.. code-block:: html
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/1.1-latest/MathJax.js"></script>
will load the stable v1.1 version, even if we release v1.2 or other later
versions, while
.. code-block:: html
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
will always be the most current stable release, so it will go from v1.1 to
v1.2 autmatically 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.
The use of ``cdn.mathjax.org`` is governed by its `terms of service
<http://www.mathjax.org/download/mathjax-cdn-terms-of-service/>`_, so be
sure to read that before linked to the MathJax CDN server.
Configuring MathJax
===================
There are several ways to configure MathJax, but the easiest is to use
the ``config/MathJax.js`` file that comes with MathJax. See the
comments in that file, or the :ref:`configuration details
<configuration>` section, for explanations of the meanings of the various
configuration options. You can edit the ``config/MathJax.js`` file to
change any of the settings that you want to customize. When you
include MathJax in your page via
There are two ways to configure MathJax: via a configuration file, or by
including configuration commands wthin the web page itself. These can be
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
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
below.
.. _config-files:
Using a configuration file
==========================
The first way to configure MathJax is to use a configuration file.
MathJax comes with a number of pre-defined configuration files, which are
stored in the ``MathJax/config`` directory. Among these are the following
.. describe:: default.js
A file that contains nearly all the configuration options with comments
describing them, which you can edit to suit your needs.
.. 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.
.. describe:: TeX-AMS_HTML.js
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.
.. 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.
.. describe:: 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).
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
comments explaining them. The others are what are called `combined
configuration files`, which not only configure MathJax, but also pre-load the
various files that the configuration requires. (The contents of these
files are explained in more detail in the `Common Configurations
<common-configurations>`_ section.)
Usually, MathJax loads its components only when they are needed, but each
component will require a separate file to be loaded, and that can cause
delays before the mathematics is displayed. The combined configuration
files load the majority of the needed files all as one large file, reducing
the number of network requests that are needed. That means you will
probably be getting the componets that MathJax needs faster than you would
without the combined file, but you may be loading components that are never
actually used; that is the trade off.
Each of the combined configuration files comes in two flavors: the ones
listed above, which only configure the output processors but don't include
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
full configuraiton 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
a blog or wiki that only includes mathematics occasionally, then perhaps it
is better to use the standard configuration instead, in which case the
output processors are only loaded when they are actually needed, saving the
loading of 70KB for pages that don't. Of course, if your server is
configured to compress the files it sends, the difference between the two
is considerably reduced. Furthermore, most browsers will cache the
javascript they receive, so the download cost should only occur on the
first page a user views, so it may be best to use the "full" version after
all. Note, however, that mobile devices sometimes have limits on the size
of files that they cache, so they may be forced to download the
configuration on every page. You need to keep these issues in mind as you
decide on which configuration to use.
To load a configuration file, use ``config=filename`` (where ``filename``
is one of the names above without the ``.js``) as a parameter to the URL of
the ``MathJax.js`` file. For example
.. code-block:: html
<script type="text/javascript" src="path-to-MathJax/MathJax.js"></script>
it will load ``config/MathJax.js`` automatically as one of its
first actions.
Alternatively, you can configure MathJax efficiently by calling
:meth:`MathJax.Hub.Config()` when you include MathJax in your page, as
follows:
.. code-block:: html
<script type="text/javascript" src="path-to-MathJax/MathJax.js">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
},
"HTML-CSS": { availableFonts: ["TeX"] }
});
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
This example includes the ``tex2jax`` preprocessor and configures it
to use both the standard TeX and LaTeX math delimiters. It uses the
TeX input processor and the HTML-CSS output processor, and forces the
HTML-CSS processor to use the TeX fonts rather that other locally
installed fonts (e.g., :term:`STIX` fonts). See the
:ref:`configuration options <configuration>` section (or the comments
in the ``config/MathJax.js`` file) for more information about the
configuration options that you can include in the
:meth:`MathJax.Hub.Config()` call. Note that if you configure MathJax
using this in-line approach, the ``config/MathJax.js`` file is **not**
loaded.
loads the ``config/TeX-AMS-MML_HTMLorMML.js`` configuration file from the
MathJax distributed network service.
Finally, if you would like to use several different configuration
files (like ``config/MathJax.js``, but with different settings in each
one), you can copy ``config/MathJax.js`` to ``config/MathJax-2.js``,
or some other convenient name, and use
You can include more than one configuration file by separating them with
commas. For example, if you have a locally defined configuration file
called ``MathJax/config/local/local.js`` that modifies the settings for the
``TeX-AMS_HML`` configuration, defines some new TeX macros, and so on, you
can use
.. code-block:: html
<script type="text/javascript" src="path-to-MathJax/MathJax.js">
MathJax.Hub.Config({ config: "MathJax-2.js" });
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML,local/local.js">
</script>
to load the alternative configuration file ``config/MathJax-2.js``
from the MathJax ``config`` directory. In this way, you can have as
many distinct configuration files as you need.
to first load the main configuraiton, then the local modifications.
.. _common-configurations:
Using in-line configuration options
===================================
Common Configurations
=====================
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.
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.
The following examples show configurations that are useful for some
common situations. This is certainly not an exhaustive list, and
there are variations possible for any of them. Again, the comments in
the ``config/MathJax.js`` file can help you decide what settings to
include, even if you are using the in-line configuration method.
MathJax solves this problem by using separate ``<script>`` tags to perform
configuration for MathJax. Because MathJax starts its configuration
process as soon as it is loaded, the configuration script must come
**before** the script tag that loads ``MathJax.js`` itself. You do this
by including a ``<script>`` with ``type="text/x-mathjax-config"``, whose
content will be run when MathJax performs its configuration. Generally,
this script will include a :meth:`MathJax.Hub.Config()` call to perform
MathJax configuration, but it can also include other MathJax commands,
such as registering signal actions, or any JavaScript commands that you
want. You can have as many such script tags as you want, and MathJax will
process them in order as they appear in the document.
The TeX setup
-------------
For instance,
This example calls the ``tex2jax`` preprocessor to identify
mathematics in the page by looking for TeX and LaTeX math delimiters.
It uses ``$...$`` and ``\(...\)`` for in-line mathematics, while
``$$...$$`` and ``\[...\]`` mark displayed equations. Because dollar
signs are used to mark mathematics, if you want to produce an actual
dollar sign in your document, you must "escape" it using a slash:
``\$``. This configuration also loads the ``AMSmath`` and
``AMSsymbols`` extensions so that the macros and environments they
provide are defined for use on the page.
.. code-block:: html
.. code-block:: javascript
MathJax.Hub.Config({
extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
tex2jax: {
inlineMath: [['$','$'],["\\(","\\)"]],
processEscapes: true,
},
});
Other extensions that you may consider adding to the `extensions`
array include: ``TeX/noErrors.js``, which shows the original TeX code
if an error occurs while processing the mathematics (rather than an
error message), ``TeX/noUndefined.js``, which shows undefined
macros names in red (rather than producing an error), and
``TeX/autobold.js``, which automatically inserts ``\boldsymbol{...}``
around your mathematics when it appears in a section of your page that
is in bold. Most of the other TeX extensions are loaded automatically
when needed, and so do not need to be included explicitly in your
`extensions` array.
See the :ref:`tex2jax configuration <configure-tex2jax>` section for
other configuration options for the ``tex2jax`` preprocessor, and the
:ref:`TeX input jax configuration <configure-TeX>` section for options
that control the TeX input processor.
The MathML setup
----------------
This example calls the ``mml2jax`` preprocessor to identify
mathematics in the page that is in :term:`MathML` format, which uses
``<math display="block">`` to indicate displayed equations, and
``<math display="inline">`` or simply ``<math>`` to mark in-line
formulas.
.. code-block:: javascript
MathJax.Hub.Config({
extensions: ["mml2jax.js"],
jax: ["input/MathML","output/HTML-CSS"]
});
Note that this will work in HTML files, not just XHTML files (MathJax
works with both), and that the web page need not be served with any
special MIME-type. Also note that, unless you are using XHTML rather
than HTML, you should not include a namespace prefix for your
``<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.
See the :ref:`mml2jax configuration <configure-mml2jax>` section for
other configuration options for the ``mml2jax`` preprocessor, and the
:ref:`MathML input jax configuration <configure-MathML>` section for
options that control the MathML input processor.
Both TeX and MathML
-------------------
This example provides for both TeX and MathML input in the same file.
It calls on both the ``tex2jax`` and ``mml2jax`` preprocessors and the
TeX and MathML input jax to do the job.
.. code-block:: javascript
MathJax.Hub.Config({
extensions: ["tex2jax.js", "mml2jax.js"],
jax: ["input/TeX", "input/MathML", "output/HTML-CSS"],
});
Notice that no ``tex2jax`` configuration section is included, so it
uses its default options (no single dollar signs for in-line math).
The majority of the code for the TeX and MathML input processors are
not loaded until they are actually needed by the mathematics on the
page, so if this configuration is used on a page that include only
MathML, the TeX input processor will not be loaded. Thus it is
reasonably efficient to specify both input processors even if only one
(or neither one) is used.
TeX input with MathML output
----------------------------
This example configures MathJax to use the ``tex2jax`` preprocessor
and TeX input processor, but the choice of output format is determined
by MathJax depending on the capabilities of the user's browser. The
is performed by the ``MMLorHTML.js`` configuration file that is loaded
in the `config`` array.
.. code-block:: javascript
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX"]
});
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true
},
"HTML-CSS": { availableFonts: ["TeX"] }
});
</script>
<script type="text/javascript" src="path-to-MathJax/MathJax.js">
With this setup, Firefox or Internet Explorer with the `MathPlayer
plugin <http://www.dessci.com/en/products/mathplayer/>`_ installed
will use the NativeMML output processor, while all other browsers will
use the HTML-CSS output processor. Since native MathML support is
faster than MathJax's HTML-CSS processor, this will mean that the web
pages will display faster for Firefox and IE than they would
otherwise. This speed comes at the cost, however, as you are now
relying on the native MathML support to render the mathematics, and
that is outside of MathJax's control. There may be spacing or other
display differences (compared to MathJax's HTML-CSS output) when the
NativeMML output processor is used.
This example includes the `tex2jax` preprocessor and configures it to use
both the standard :term:`TeX` and :term:`LaTeX` math delimiters. It uses
the `TeX` input processor and the `HTML-CSS` output processor, and forces the
HTML-CSS processor to use the TeX fonts rather that other locally installed
fonts (e.g., :term:`STIX` fonts). See the :ref:`configuration options
<configuration>` section (or the comments in the ``config/default.js``
file) for more information about the configuration options that you can
include in the :meth:`MathJax.Hub.Config()` call. Note that this
configuration does **not** load any pre-defined configuration file.
See :ref:`MathJax Output Formats <output-formats>` for more
information on the NativeMML and HTML-CSS output processors. See the
:ref:`MMLorHTML configuration <configure-MMLorHTML>` section for
details on the options that control the ``MMLorHTML`` configuration.
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** 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:
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true
}
});
</script>
<script type="text/javascript" src="path-to-MathJax/MathJax.js?config=TeX-AMS_HTML">
</script>
MathML input and output in all browsers
---------------------------------------
.. _delayStartupUntil:
This example configures MathJax to look for MathML within your page,
and to display it using the browser's native MathML support, if
possible, or its HTML-CSS output if not.
Configuring MathJax after it is loaded
======================================
.. code-block:: javascript
Because MathJax begins its configuration process immediately after it is
loaded (so that it can start loading files as quickly as it can), the
configuration blocks for MathJax must come before ``MathJax.js`` is loaded,
so they will be available to MathJax when it starts up. There are
situations, however, when you might want to put off configuring MathJax
until later in the page.
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
extensions: ["mml2jax.js"],
jax: ["input/MathML"]
});
One such situation is when you have a site that loads MathJax as part of a
theme or template, but want to be able to modify the configuration on
specific pages of the site. To accomplish this, you need to ask MathJax
to delay its startup configuration until some later time. MathJax uses
the ``delayStartupUntil`` parameter to control the timing of the startup
sequence. By default, it is set to ``none``, meaning there is no delay
and MathJax starts configuration right away.
Using this configuration, MathJax finally makes MathML available in
all modern browsers.
You can set ``delayStartupUntil=onload`` in order to prevent MathJax from
continuing its startup process until the page's onLoad handler fires. This
allows MathJax to find the ``text/x-mathjax-config`` blocks that occur
anywhere on the page, not just the ones that appear above the ``<script>``
that loads ``MathJax.js``. It also means that MathJax will not begin
loading any of the files that it needs until then as well, which may delay
the displaying of your mathematics, since the onLoad handler doesn't
execute until all the images and other media are available. (If you have
used a combined configuration file, however, it already includes all the
main files that MathJax needs, so there is not much loss in delaying the
startup.)
See the :ref:`MMLorHTML configuration <configure-MMLorHTML>` section
for details on the options that control the ``MMLorHTML``
configuration file, the :ref:`MathML configuration <configure-MathML>`
section for the options that control the MathML output processor, and
the :ref:`mml2jax configuration <configure-mml2jax>` section for the
options that control the ``mml2jax`` preprocessor.
You can set ``delayStartupUntil=configured`` in order to delay the startup
configuration until the :meth:`MathJax.Hub.Configured()` method is
called. This allows you to delay startup until later on the page, but
then restart MathJax configuration process as soon as possible rather than
waiting for the entire page to load. For example, you could use
.. code-block:: html
<script type="text/javascript"
src="path-to-MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML&delayStartupUntil=configured">
</script>
in your theme's header file, and
.. code-block:: html
<script type="text/javascript">
MathJax.Hub.Configured()
</script>
in its footer, so that MathJax will delay setting up until the footer is
reached, but will not have to wait until images and other files are
laoded. 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.
.. _configuration:
Details of the MathJax configuration process
============================================
Configuration Objects
=====================
Since there are a number of different ways to configure MathJax, it is
important to know how they interact. The configuration process is the
following:
The various components of MathJax, including its input and output
processors, its preprocessors, its extensions, and the MathJax core,
all can be configured through the ``config/MathJax.js`` file, or via a
:meth:`MathJax.Hub.Config()` call (indeed, if you look closely, you
will see that ``config/MathJax.js`` is itself one big call to
:meth:`MathJax.Hub.Config()`). Anything that is in
``config/MathJax.js`` can be included in-line to configure MathJax.
1. Process any configuration file explicitly specified as a script parameter.
2. Process the in-line script body (deprecated), if present.
3. If delayed startup is requested, wait for the indicated signal.
4. Process ``text/x-mathjax-config`` config blocks.
5. Process any config files queued in the configuration's `config` array
by earlier config code.
The structure that you pass to :meth:`MathJax.Hub.Config()` is a
JavaScript object that includes name-value pairs giving the names of
parameters and their values, with pairs separated by commas. Be
careful not to include a comma after the last value, however, as some
browsers (namely Internet Explorer) will fail to process the
configuration if you do.
The MathJax components, like the TeX input processor, have their own
sections in the configuration object, labeled by the component name,
and using an configuration object as its value. The object is itself
a configuration object made up of name-value pairs that give the
configuration options for the component.
For example,
.. code-block:: javascript
MathJax.Hub.Config({
showProcessingMessages: false,
jax: ["input/TeX", "output/HTML-CSS"],
TeX: {
TagSide: "left",
Macros: {
RR: '{\\bf R}',
bold: ['{\\bf #1}',1]
}
}
});
is a configuration that includes two settings for the MathJax Hub (one
for `showProcessingMessages` and one of the `jax` array), and a
configuration object for the TeX input processor. The latter includes
a setting for the TeX input processor's `TagSide` option (to set tags
on the left rather than the right) and a setting for `Macros`, which
defines new TeX macros (in this case, two macros, one called ``\RR``
that produces a bold "R", and one called ``\bold`` that puts is
argument in bold face).
The ``config/MathJax.js`` file is another example that shows nearly
all the configuration options for all of MathJax's components.
Note that ``text/x-mathjax-config`` script blocks must either precede the
``MathJax.js`` script element, or startup must be delayed. Otherwise, blocks
that follow the ``MathJax.js`` script element may or may not be available
when MathJax runs, and browser-dependent erratic behavior will result.
Configuration Options by Component
==================================
The individual options are explained in the following sections, which
are categorized by the component they affect.
.. toctree::
:maxdepth: 1
The core options <options/hub>
.. toctree::
:maxdepth: 1
The tex2jax preprocessor options <options/tex2jax>
The mml2jax preprocessor options <options/mml2jax>
The jsMath2jax preprocessor options <options/jsMath2jax>
.. toctree::
:maxdepth: 1
The TeX input processor options <options/TeX>
The MathML input processor options <options/MathML>
The HTML-CSS output processor options <options/HTML-CSS>
The NativeMML output processor options <options/NativeMML>
The MMLorHTML configuration options <options/MMLorHTML>
.. toctree::
:maxdepth: 1
The MathMenu options <options/MathMenu>
The MathZoom options <options/MathZoom>
The FontWarnings options <options/FontWarnings>

View File

@ -20,9 +20,7 @@ handler yourself, to let it know that it is OK to typeset the
mathematics on the page. You accomplish this by calling the
:meth:`MathJax.Hub.Startup.onload()` method as part of your MathJax
startup script. To do this, you will need to give MathJax an in-line
configuration, so you will not be able to use the
``config/MathJax.js`` file (though you can add it to your in-line
configuration's `config` array).
configuration.
Here is an example of how to load and configure MathJax dynamically:
@ -31,7 +29,7 @@ Here is an example of how to load and configure MathJax dynamically:
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "/MathJax/MathJax.js"; // use the location of your MathJax
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js";
var config = 'MathJax.Hub.Config({' +
'extensions: ["tex2jax.js"],' +
@ -45,13 +43,12 @@ Here is an example of how to load and configure MathJax dynamically:
document.getElementsByTagName("head")[0].appendChild(script);
})();
Be sure to set the ``src`` to the correct URL for your copy of
MathJax. You can adjust the ``config`` variable to your needs, but be
careful to get the commas right. The ``window.opera`` test is because
You can adjust the ``config`` variable to your needs, but be careful to get
the commas right. The ``window.opera`` test is because some versions of
Opera doesn't handle setting ``script.text`` properly, while Internet
Explorer doesn't handle setting the ``innerHTML`` of a script tag.
Here is a version that uses the ``config/MathJax.js`` file to
Here is a version that uses the ``config=filename`` method to
configure MathJax:
.. code-block:: javascript
@ -59,10 +56,9 @@ configure MathJax:
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "/MathJax/MathJax.js"; // use the location of your MathJax
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full";
var config = 'MathJax.Hub.Config({ config: "MathJax.js" }); ' +
'MathJax.Hub.Startup.onload();';
var config = 'MathJax.Hub.Startup.onload();';
if (window.opera) {script.innerHTML = config}
else {script.text = config}
@ -71,13 +67,12 @@ configure MathJax:
})();
Note that the **only** reliable way to configure MathJax is to use an
in-line configuration of the type discussed above. You should **not**
call :meth:`MathJax.Hub.Config()` directly in your code, as it will
not run at the correct time --- it will either run too soon, in which
case ``MathJax`` may not be defined and the function will throw an
error, or it will run too late, after MathJax has already finished its
configuration process, so your changes will not have the desired
effect.
in-line configuration block of the type discussed above. You should
**not** call :meth:`MathJax.Hub.Config()` directly in your code, as it will
not run at the correct time --- it will either run too soon, in which case
``MathJax`` may not be defined and the function will throw an error, or it
will run too late, after MathJax has already finished its configuration
process, so your changes will not have the desired effect.
MathJax and GreaseMonkey
@ -97,8 +92,7 @@ Note, however, that most browsers don't allow you to insert a script
that loads a ``file://`` URL into a page that comes from the web (for
security reasons). That means that you can't have your GreaseMonkey
script load a local copy of MathJax, so you have to refer to a
server-based copy. In the scripts below, you need to insert the URL
of a copy of MathJax from your own server.
server-based copy. The MathJax CDN works nicely for this.
----
@ -122,12 +116,8 @@ IE+MathPlayer.
(document.getElementsByTagNameNS == null ? false :
(document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) {
var script = document.createElement("script");
script.src = "http://www.yoursite.edu/MathJax/MathJax.js"; // put your URL here
var config = 'MathJax.Hub.Config({' +
'extensions:["mml2jax.js"],' +
'jax:["input/MathML","output/HTML-CSS"]' +
'});' +
'MathJax.Hub.Startup.onload()';
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full";
var config = 'MathJax.Hub.Startup.onload()';
if (window.opera) {script.innerHTML = config} else {script.text = config}
document.getElementsByTagName("head")[0].appendChild(script);
}
@ -153,29 +143,25 @@ converting the math images to their original TeX code.
//
// Replace the images with MathJax scripts of type math/tex
//
var images = document.getElementsByTagName('img');
var images = document.getElementsByTagName('img'), count = 0;
for (var i = images.length - 1; i >= 0; i--) {
var img = images[i];
if (img.className === "tex") {
var script = document.createElement("script"); script.type = "math/tex";
if (window.opera) {script.innerHTML = img.alt} else {script.text = img.alt}
img.parentNode.replaceChild(script,img);
img.parentNode.replaceChild(script,img); count++;
}
}
//
// Load MathJax and have it process the page
//
var script = document.createElement("script");
script.src = "http://www.yoursite.edu/MathJax/MathJax.js"; // put your URL here
var config = 'MathJax.Hub.Config({' +
'config: ["MMLorHTML.js"],' +
'extensions:["TeX/noErrors.js","TeX/noUndefined.js",' +
'"TeX/AMSmath.js","TeX/AMSsymbols.js"],' +
'jax:["input/TeX"]' +
'});' +
'MathJax.Hub.Startup.onload()';
if (window.opera) {script.innerHTML = config} else {script.text = config}
document.getElementsByTagName("head")[0].appendChild(script);
if (count) {
//
// Load MathJax and have it process the page
//
var script = document.createElement("script");
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full";
var config = 'MathJax.Hub.Startup.onload()';
if (window.opera) {script.innerHTML = config} else {script.text = config}
document.getElementsByTagName("head")[0].appendChild(script);
}
}
**Source**: `mathjax_wikipedia.user.js <_static/mathjax_wikipedia.user.js>`_

View File

@ -15,6 +15,8 @@ Basic Usage
Getting Started with MathJax <start>
Installing and Testing MathJax <installation>
Loading and Configuring MathJax <configuration>
Common MathJax Configurations <config-files>
MathJax Configuration Options <options/index>
Using MathJax in Web Platforms <platforms/index>
.. toctree::
@ -30,6 +32,19 @@ Basic Usage
The MathJax Community <community>
.. _upgrading-MathJax:
Upgrading MathJax
=================
.. toctree::
:maxdepth: 1
What's New in MathJax v1.1 <whats-new>
Migrating from MathJax v1.0 to v1.1 <upgrade>
Converting to MathJax from jsMath <jsMath>
.. _advanced-topics:
Advanced Topics
@ -49,10 +64,6 @@ Advanced Topics
Details of the MathJax API<api/index>
.. toctree::
:maxdepth: 1
Converting to MathJax from jsMath <jsMath>
Reference Pages
===============
@ -66,6 +77,12 @@ Reference Pages
* :ref:`Search <search>`
* `User Help Pages <http://www.mathjax.org/help/user>`_:
+ `MathJax Font Help <http://www.mathjax.org/help/fonts>`_
+ `MathJax Contextual Menu <http://www.mathjax.org/help/menu>`_
+ `MathJax Zoom Feature <http://www.mathjax.org/help/zoom>`_
--------
This version of the documentation was built |today|.

View File

@ -4,6 +4,12 @@
Installing and Testing MathJax
******************************
The easiest way to use MathJax is to link directly to the MathJax
distributed network service (see :ref:`Using the MathJax CDN
<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 :ref:`Configuring MathJax <loading>`.
MathJax can be loaded from a public web server or privately from your hard drive
or other local media. To use MathJax in either way, you will need to obtain a
copy of MathJax and its font package. There are three ways to do this: via
@ -18,11 +24,11 @@ Obtaining MathJax via Git
The easiest way to get MathJax and keep it up to date is to use the `Git
<http://git-scm.com/>`_ version control system to access our `GitHub repository
<http://github.com/mathjax/mathjax>`_. Use the commands
<http://github.com/mathjax/mathjax>`_. Use the command
.. code-block:: sh
git clone git://github.com/mathjax/MathJax.git mathjax
git clone git://github.com/mathjax/MathJax.git MathJax
to obtain and set up a copy of MathJax. Note that there is no longer
a ``fonts.zip`` file, and that the ``fonts`` directory is now part of
@ -32,7 +38,7 @@ Whenever you want to update MathJax, you can now use
.. code-block:: sh
cd mathjax
cd MathJax
git remote show origin
to check if there are updates to MathJax (this will print several
@ -41,21 +47,22 @@ date or out of date). If MathJax needs updating, use
.. code-block:: sh
cd mathjax
cd MathJax
git pull origin
to udpate your copy of MathJax to the current release version. If you
keep MathJax updated in this way, you will be sure that you have the
latest bug fixes and new features as they become available.
This gets you the current development copy of MathJax, which is the
"bleeding-edge" version that contains all the latest changes to
MathJax. At times, however, these may be less stable than the
"release" version. If you prefer to use the most stable version (that
may not include all the latest patches and features), use ``git tag
-l`` to see all versions and use ``git checkout <tag_name>`` to
checkout that version of MathJax. When you want to upgrade to a new
release, you will need to repeat this for the latest release tag.
This gets you the current development copy of MathJax, which is the version
that contains all the latest changes to MathJax. Although we try to make
sure this version is a stable and usable version of MathJax, it is under
active development, and at times it may be less stable than the "release"
version. If you prefer to use the most stable version (that may not
include all the latest patches and features), use ``git tag -l`` to see all
versions and use ``git checkout <tag_name>`` to checkout that version of
MathJax. When you want to upgrade to a new release, you will need to
repeat this for the latest release tag.
.. _getting-mathjax-svn:
@ -66,11 +73,11 @@ Obtaining MathJax via SVN
If you are more comfortable with the `subversion
<http://subversion.apache.org/>`_ 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 commands
latest revision using ``svn``, use the command
.. code-block:: sh
svn checkout http://svn.github.com/mathjax/MathJax.git mathjax
svn checkout http://svn.github.com/mathjax/MathJax.git MathJax
to obtain and set up a copy of MathJax. Note that there is no longer
a ``fonts.zip`` file, and that the ``fonts`` directory is now part of
@ -80,7 +87,7 @@ Whenever you want to update MathJax, you can now use
.. code-block:: sh
cd mathjax
cd MathJax
svn status -u
to check if there are updates to MathJax. If MathJax needs updating,
@ -88,19 +95,20 @@ use
.. code-block:: sh
cd mathjax
cd MathJax
svn update
to udpate your copy of MathJax to the current release version. If you
keep MathJax updated in this way, you will be sure that you have the
latest bug fixes and new features as they become available.
This gets you the current development copy of MathJax, which is the
"bleeding-edge" version that contains all the latest changes to
MathJax. At times, however, these may be less stable than the
"release" version. If you prefer to use one of the tagged releases
instead, then either use ``git`` as described above, or one of the
archive files as described below. You can use
This gets you the current development copy of MathJax, which is the version
that contains all the latest changes to MathJax. Although we try to make
sure this version is a stable and usable version of MathJax, it is under
active development, and at times it may be less stable than the "release"
version. If you prefer to use one of the tagged releases instead, then
either use ``git`` as described above, or one of the archive files as
described below. You can use
.. code-block:: sh
@ -134,10 +142,19 @@ let you refer to the main MathJax file as ``/MathJax/MathJax.js`` from
within any page on your server.
From the `MathJax GitHub download link
<http://github.com/mathjax/mathjax/>`_ (the big download button at the
<http://github.com/mathjax/mathjax/>`_ (the download button at the
right), you can also select the ``Download .tar.gz`` or ``Download
.zip`` buttons to get a copy of the current "bleeding-edge" version of
MathJax that contains all the latest changes and bug-fixes.
.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 recevies 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 the
release branch, and then use the downlaod button and the ``Downlaod
.tar.gz`` or ``Download .zip`` button to get the latest patched version of
that release.
Testing your installation
@ -156,8 +173,7 @@ properly. If you have installed MathJax on a server, use the web
address for those files rather than opening them locally. When you
view the ``index.html`` file, you should see (after a few moments) a
message that MathJax appears to be working. If not, you should check
that the files have been transferred to the server completely, that
the fonts archive has been unpacked in the correct location, and that
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). Checking the server logs may help
@ -177,29 +193,27 @@ a different site. For example, a departmental server at
installation at ``www.yourcollege.edu`` rather than installing a
separate copy on the departmental machine. MathJax can certainly
be loaded from another server, but there is one imporant caveat ---
Firefox's same-origin security policy for cross-domain scripting.
Firefox's and IE9's same-origin security policy for cross-domain scripting.
Firefoxs interpretation of the same-origin policy is more strict than
most other browsers, and it affects how fonts are loaded with the
`@font-face` CSS directive. MathJax uses this directive to load
web-based math fonts into a page when the user doesn't have them
installed locally on their own computer. Firefox's security policy,
however, only allows this when the fonts come from the same server as
the web page itself, so if you load MathJax (and hence its web fonts)
from a different server, Firefox won't be able to access those web
fonts. In this case, MathJax will pause while waiting for the font to
download (which will never happen) and will time out after about 15
seconds for each font it tries to access. Typically that is three or
four fonts, so your Firefox users will experience a minute or so
delay before mathematics is displayed, and then it will probably
display incorrectly because the browser doesn't have access to the
correct fonts.
Firefox's interpretation of the same-origin policy is more strict than most
other browsers, and it affects how fonts are loaded with the `@font-face`
CSS directive. MathJax uses this directive to load web-based math fonts
into a page when the user doesn't have them installed locally on their own
computer. Firefox's security policy, however, only allows this when the
fonts come from the same server as the web page itself, so if you load
MathJax (and hence its web fonts) from a different server, Firefox won't be
able to access those web fonts. In this case, MathJax will pause while
waiting for the font to download (which will never happen); it will time
out after about 5 seconds and switch to image fonts as a fallback.
Similarly, IE9 has a similar same-origin policy in its `IE9 standards
mode`, so it exhibits this same behavior.
There is a solution to this, however, if you manage the server where
MathJax is installed, and if that server is running the `Apache web
server <http://www.apache.org/>`_. In the remote server's
``MathJax/fonts/HTML-CSS/TeX/otf`` folder, create a file called
``.htaccess`` that contains the following lines: ::
``.htaccess`` that contains the following lines:
::
<FilesMatch "\.(ttf|otf|eot)$">
<IfModule mod_headers.c>
@ -207,18 +221,17 @@ server <http://www.apache.org/>`_. In the remote server's
</IfModule>
</FilesMatch>
and make sure the permissions allow the server to read this file.
(The file's name starts with a period, which causes it to be an
"invisible" file on unix-based operating systems. Some systems,
particularly graphic user interfaces, may not allow you to create such
files, so you might need to use the command-line interface to
accomplish this.)
and make sure the permissions allow the server to read this file. (The
file's name starts with a period, which causes it to be an "invisible" file
on unix-based operating systems. Some systems, particularly those with
graphical user interfaces, may not allow you to create such files, so you
might need to use the command-line interface to accomplish this.)
This file should make it possible for pages at other sites to load
MathJax from this server in such a way that Firefox will be able to
download the web-based fonts. If you want to restrict the sites that
can access the web fonts, change the ``Access-Control-Allow-Origin``
line to something like::
This file should make it possible for pages at other sites to load MathJax
from this server in such a way that Firefox and IE9 will be able to
download the web-based fonts. If you want to restrict the sites that can
access the web fonts, change the ``Access-Control-Allow-Origin`` line to
something like::
Header set Access-Control-Allow-Origin "http://www.math.yourcollege.edu"
@ -231,7 +244,7 @@ for more details.
.. _ff-local-fonts:
Forefox and Local Fonts
Firefox and local fonts
=======================
Firefox's same-origin security policy affects its ability to load
@ -252,3 +265,28 @@ containing the page that uses MathJax. This is an unfortunate
restriction, but it is a limitiation imposed by Firefox's security
model that MathJax can not circumvent. Currently, this is not a
problem for other browsers.
One solution to this problem is to install the MathJax fonts locally, so
that Firefox will not have to use web-based fonts in the first place. To
do that, either install the `STIX fonts <http://stixfonts.org>`_, or copy
the fonts from ``MathJax/fonts/HTML-CSS/TeX/otf`` into your systems fonts
directory and restart your browser (see the `MathJax fonts help page
<http://www.mathjax.org/help/fonts>`_ for details).
IE9 and remote fonts
====================
IE9's same-origin policy affects its ability to load web-based fonts, as
described above. This has implications not ony to cross-domain loading of
MathJax, but also to the case where you view a local page (with a
``file://`` URL) that accesses MathJax from a remote site, like the MathJax
CDN service. In this case, IE9 does **not** honor the
``Access-Control-Allow-Origin`` setting of the remote server (as it would
if the web page came from an ``http://`` URL), and so it **never** allows the
font to be accessed.
One solution to this problem is to install the MathJax fonts locally so
that MathJax doesn't have to use web-based fonts in the first place. Your
best bet is to install the `STIX fonts`_ on your system (see the `MathJax
fonts help page`_ for details).

View File

@ -11,21 +11,39 @@ processing the mathematics within the webpage once it has been loaded
in the browser by a user viewing your web pages. If you are using
jsMath with its ``tex2math`` preprocessor, then switching to MathJax
should be easy, and is simply a matter of configuring MathJax
appropriately. See the section on :ref:`Configuring MathJax
<configuration>` for details about loading and configuring MathJax.
appropriately. See the section on :ref:`Loading and Configuring MathJax
<loading>` for details.
On the other hand, if you are using jsMath's ``<span
class="math">...</span>`` and ``<div class="math">...</div>`` tags to
mark the mathematics in your document, then you should use MathJax's
``jsMath2jax`` preprocessor when you switch to MathJax. To do this,
include ``"jsMath2jax.js"`` in the `extensions` array of your
configuration, with the `jax` array set to include ``"input/TeX"``.
configuration, with the `jax` array set to include ``"input/TeX"``. For
example,
.. code-block:: javascript
.. code-block:: html
extensions: ["jsMath2jax.js"],
jax: ["input/TeX", ...]
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["jsMath2jax.js"]
});
</script>
<script
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
</script>
would load the ``jsMath2jax`` preprocessor, along with a configuration
file that processes TeX input and produces HTML-with-CSS output.
There are a few configuration options for ``jsMath2jax``, which you
can find in the ``config/MathJax.js`` file, or in the :ref:`jsMath
can find in the ``config/default.js`` file, or in the :ref:`jsMath
configuration options <configure-jsMath2jax>` section.
If you are generating your jsMath documents programmatically, it would be
better to convert from generating the jsMath ``<span>`` and ``<div>`` tags
to producing the corresponding MathJax ``<script>`` tags. You would use
``<script type="math/tex">`` in place of ``<span class="math">`` and
``<script type="math/tex; mode=display">`` in place of ``<div
class="math">``. See the section on :ref:`How mathematics is stored in the
page <mathjax-script-tags>` for more details.

View File

@ -5,7 +5,7 @@ MathJax MathML Support
**********************
The support for :term:`MathML` in MathJax consists of three parts: the
`mml2jax` preprocessor, the MathML input processor, and the NativeMML
`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
second converts the MathML to the internal format used by MathJax, and
@ -34,9 +34,9 @@ any of the other setup issues that make using native MathML
difficult. MathJax handles the setup and properly marks the
mathematics so that the browser will render it as MathML. In
addition, MathJax provides its contextual menu for the MathML, which
lets the user zoom the mathematics for easier reading, get the copy
lets the user zoom the mathematics for easier reading, get and copy
the source markup, and so on, so there is added value to using MathJax
even whith a pure MathML workflow.
even with a pure MathML workflow.
MathML in HTML pages

View File

@ -50,6 +50,8 @@ and it also avoids the conflict between the use of the less-than sign,
an HTML tag).
.. _mathjax-script-tags:
How mathematics is stored in the page
=====================================

View File

@ -30,6 +30,12 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
factor. The user can also adjust this value using the contextual
menu item associated with the typeset mathematics.
.. describe:: minScaleAdjust: 50
This gives a minimum scale (as a percent) for the scaling used my
MathJax to match the equation to the surrounding text. This will
prevent MathJax from making the mathematics too small.
.. describe:: availableFonts: ["STIX","TeX"]
This is a list of the fonts to look for on a user's computer in

View File

@ -20,7 +20,7 @@ options, include a ``MathMenu`` section in your
would set the ``delay`` option to 600 milliseconds.
.. describe:: delay: 400
.. describe:: delay: 150
This is the hover delay for the display (in milliseconds) for
submenus in the contextual menu: when the mouse is over a submenu

View File

@ -65,3 +65,17 @@ to be defined within the TeX input processor.
would ask the TeX processor to define two new macros: ``\RR``,
which produces a bold-face "R", and ``\bold{...}``, which takes one
parameter and set it in the bold-face font.
.. describe:: MAXMACROS: 10000
Because a definition of the form ``\def\x{\x} \x`` would cause MathJax
to loop infinitely, the `MAXMACROS` constant will limit the nuber of
macro substitutions allowed in any expression processed by MathJax.
.. describe:: MAXBUFFER: 5*1024
Because a definition of the form ``\def\x{\x aaa} \x`` would loop
infinitely, and at the same time stack up lots of a's in MathJax's
equation buffer, the `MAXBUFFER` constant is used to limit the size of
the string being processed by MathJax. It is set to 5KB, which should
be sufficient for any reasonable equation.

View File

@ -132,7 +132,11 @@ behavior of MathJax. They are given with their default values.
configuration, styles, jax, and so on) as soon as it can. If you
expect to be doing additional configuration on the page, however,
you may want to have it wait until the page's onload hander is
called. If so, set this to ``"onload"``.
called. If so, set this to ``"onload"``. You can also set this to
``"configured"``, in which case, MathJax will delay its startup until
you explicitly call :meth:`MathJax.Hub.Configured()`. See
:ref:`Configuring MathJax after it is loaded <delayStartupUntil>` for more
details.
.. describe:: skipStartupTypeset: false
@ -207,3 +211,10 @@ behavior of MathJax. They are given with their default values.
on :ref:`CSS style objects <css-style-objects>` for details on
how these are specified in JavaScript.
.. describe:: v1.0-compatible: true
This controls whether MathJax issues the warning about not having an
explicit configuration in the event that the `jax` array is empty
after configuration is complete. If you really intend that array to
be empty, set this flag to ``false``. Note that setting this to false
does **not** cause a default configuration file to be loaded.

View File

@ -0,0 +1,91 @@
.. _configuration:
*********************
Configuration Objects
*********************
The various components of MathJax, including its input and output
processors, its preprocessors, its extensions, and the MathJax core,
all can be configured through the ``config/default.js`` file, or via a
:meth:`MathJax.Hub.Config()` call (indeed, if you look closely, you
will see that ``config/default.js`` is itself one big call to
:meth:`MathJax.Hub.Config()`). Anything that is in
``config/default.js`` can be included in-line to configure MathJax.
The structure that you pass to :meth:`MathJax.Hub.Config()` is a
JavaScript object that includes name-value pairs giving the names of
parameters and their values, with pairs separated by commas. Be
careful not to include a comma after the last value, however, as some
browsers (namely Internet Explorer) will fail to process the
configuration if you do.
The MathJax components, like the TeX input processor, have their own
sections in the configuration object, labeled by the component name,
and using a configuration object as its value. The object is itself
a configuration object made up of name-value pairs that give the
configuration options for the component.
For example,
.. code-block:: javascript
MathJax.Hub.Config({
showProcessingMessages: false,
jax: ["input/TeX", "output/HTML-CSS"],
TeX: {
TagSide: "left",
Macros: {
RR: '{\\bf R}',
bold: ['{\\bf #1}',1]
}
}
});
is a configuration that includes two settings for the MathJax Hub (one
for `showProcessingMessages` and one of the `jax` array), and a
configuration object for the TeX input processor. The latter includes
a setting for the TeX input processor's `TagSide` option (to set tags
on the left rather than the right) and a setting for `Macros`, which
defines new TeX macros (in this case, two macros, one called ``\RR``
that produces a bold "R", and one called ``\bold`` that puts is
argument in bold face).
The ``config/MathJax.js`` file is another example that shows nearly
all the configuration options for all of MathJax's components.
Configuration Options by Component
==================================
The individual options are explained in the following sections, which
are categorized by the component they affect.
.. toctree::
:maxdepth: 1
The core options <hub>
.. toctree::
:maxdepth: 1
The tex2jax preprocessor options <tex2jax>
The mml2jax preprocessor options <mml2jax>
The jsMath2jax preprocessor options <jsMath2jax>
.. toctree::
:maxdepth: 1
The TeX input processor options <TeX>
The MathML input processor options <MathML>
The HTML-CSS output processor options <HTML-CSS>
The NativeMML output processor options <NativeMML>
The MMLorHTML configuration options <MMLorHTML>
.. toctree::
:maxdepth: 1
The MathMenu options <MathMenu>
The MathZoom options <MathZoom>
The FontWarnings options <FontWarnings>

View File

@ -10,9 +10,18 @@ Currently, MathJax can render math in two ways:
- Using a browser's native MathML support.
These are implemented by the `HTML-CSS` and `NativeMML` output
processors. 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
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
``_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
.. code-block:: javascript
@ -25,7 +34,7 @@ The HTML-CSS output processor produces high-quality output in all
major browsers, with results that are consistent across browsers and
operating systems. This is MathJax's primary output mode. It's major
advantage is its quality and consistency; it's drawback is that it is
slower that the NativeMML mode at rendering the mathematics. (The
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
@ -41,20 +50,19 @@ MathML. Opera has some built-in support for MathML that works well
with simple equations, but fails with more complex formulas, so we
don't recommend using the NativeMML output processor with Opera. Safari,
Chrome, Konqueror, and most other browsers don't support MathML
natively.
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 via an interpreted language like JavaScript
(as the HTML-CSS output processor does). The disadvantage is that you
are dependent on the browser's MathML implementation for your
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.
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.
Automatic Selection of the Output Processor
===========================================
@ -62,11 +70,16 @@ Automatic Selection of the Output Processor
Since not all browsers support MathML natively, it would be unwise to
choose the NativeMML output processor unless you are sure of your
audience's browser capabilities. MathJax can help with that, however,
since there is a special configuration file that will choose between
NativeMML and HTML-CSS depending on the browser in use. To invoke it,
add ``"MMLorHTML.js"`` to your configurations `config` array, and **do
not** include an output processor in your `jax` array; MathJax will
fill that in for you based on the abilities of your user's browser.
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``.
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
your configurations `config` array, and **do not** include an output
processor in your `jax` array; MathJax will fill that in for you based on
the abilities of your user's browser.
.. code-block:: javascript
@ -74,18 +87,34 @@ fill that in for you based on 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/MathJax.js`` file or the
:ref:`Configuring MathJax <configuration>` section for futher
details.
or a global basis. See the ``config/default.js`` file or the
:ref:`Configuring MMLorHTML <configure-MMLorHTML>` section for futher
details. As an example, this configuration tells MathJax to use HTML-CSS
output rather than native MathML support for Firefox:
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
MMLorHTML: { prefer: { Firefox: "HTML" } }
});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
With this configuration, MathML output will be used only for IE with the
MathPlayer plugin (Firefox is the only other browser to have native MathML
support that is sufficient for use with MathJax). Note, however, that a
user can employ the MathJax contectual 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
NativeMML output processor, you are making a trade-off: gaining speed
at the expense of quality and reliability, a decision that should not
be taken lightly. Note, however, that a user can employ the MathJax
contectual menu to select the other other renderer if he or she
wishes.
be taken lightly.
.. _html-css-with-ie8:
@ -93,16 +122,16 @@ wishes.
HTML-CSS with IE8
=================
Internet Explorer 8 has at least eight different rendering modes in
which 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.
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
@ -124,3 +153,7 @@ described above to select NativeMML output when possible, and request
that your users install the `MathPlayer plugin
<http://www.dessci.com/en/products/mathplayer/>`_, which will render
the mathematics much more quickly.
It appears that IE9 in IE9 standards mode may perform better than IE8, but
since IE9 is still in beta testing as of this writing, we have yet to see
exactly what the performance of MathJax in IE9 will be like.

View File

@ -4,6 +4,20 @@
Using MathJax in popular web platforms
======================================
MathJax plugins are available for a growing number of wikis, blogs, and
other content-management systems. These include WordPress, Blogger,
Sphinx, TiddlyWiki, and MathEL-Wiki. A list of these is available in the
`web applications and integrations
<http://www.mathjax.org/community/mathjax-in-use/#web-apps>`_ list of the
`MathJax web site <http://www.mathjax.org>`_.
If the program you are using is not one of these, you may still be able to
use MathJax by modifying the theme or template for your wiki or blog.
Using MathJax in a Theme File
=============================
Most web-based content-management systems include a theme or template
layer that determines how the pages look, and that loads information
common to all pages. Such theme files provide one popular way to
@ -16,12 +30,11 @@ you.
To enable MathJax in your web platform, add the line::
<script type="text/javascript" src="path-to-MathJax/MathJax.js"></script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
(where ``path-to-MathJax`` is the web-address of the main MathJax
directory for your server) either just before the ``</head>`` tag in
your theme file, or at the end of the file if it contains no
``</head>``.
either just before the ``</head>`` tag in your theme file, or at the end of
the file if it contains no ``</head>``.
The theme files for various popular platforms are:

View File

@ -4,9 +4,6 @@
Using MathJax in Movable Type
=============================
These instructions assume you already have placed the MathJax files on
your server (see :ref:`Installing and Testing MathJax <installation>`).
1. Open Moveable Type Admin interface for the site on which you want to enable
MathJax.
@ -25,17 +22,17 @@ your server (see :ref:`Installing and Testing MathJax <installation>`).
.. code-block:: html
<script type="text/javascript" src="path-to-MathJax/MathJax.js"></script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
where ``path-to-MathJax`` is replaced by the web-address of the
main MathJax dorectory on your server.
to load MathJax from our distributed netowrk service.
.. image:: ../images/mt_head.png
5. Save the file. This should enable MathJax, so you should be able
to start adding mathematical content to your pages. Use the
``config/MathJas.js`` file in the MathJax directory to configure
MathJax to your needs (see :ref:`Configuring MathJax
<configuration>` for details).
5. Save the file. This will enable MathJax with both TeX and MathML
input, so you should be able to start adding mathematical content to
your pages. If you need to adjust the configuraiton, see
:ref:`Configuring MathJax <loading>` for more details.

View File

@ -4,8 +4,9 @@
Installing MathJax in WordPress
===============================
These instructions assume you already have placed the MathJax files on
your server (see :ref:`Installing MathJax <installation>`).
Note that there is a `WordPress plugin for MathJax
<http://wordpress.org/extend/plugins/mathjax-latex/>`_, so that may be a
better choice than editing the theme directly.
1. Open the WordPress admin interface.
@ -28,15 +29,14 @@ your server (see :ref:`Installing MathJax <installation>`).
.. code-block:: html
<script type="text/javascript" src="path-to-MathJax/MathJax.js"></script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
just before that. Otherwise, insert the same code at the very
bottom of the file. Here, ``path-to-MathJax`` should be replaced
by the web-address of the main MathJax directory on your server,
e.g., ``src="/mathjax/MathJax.js"``.
bottom of the file.
4. Save the file. This should enable MathJax, so you should be able to
start adding mathematical content to your pages. Use the
``config/MathJas.js`` file in the MathJax directory to configure
MathJax to your needs (see :ref:`Configuring MathJax
<configuration>` for details).
4. Save the file. This will enable MathJax with both TeX and MathML
input, so you should be able to start adding mathematical content to
your pages. If you need to adjust the configuraiton, see
:ref:`Configuring MathJax <loading>` for more details.

View File

@ -5,8 +5,63 @@ Getting Started
***************
MathJax allows you to include mathematics in your web pages, either
using TeX and LaTeX notation, or as MathML. To use MathJax, you will
need to do the following things:
using TeX and LaTeX notation, or as MathML, and you can even use both
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
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.
.. _mathjax-CDN:
Using the MathJax Content Delivery Network (CDN)
================================================
To use MathJax from our server, you need to do two things:
1. Link MathJax into the web pages that are to include mathematics.
2. Put mathematics into your web pages so that MathJax can display
it.
You accomplish the first step by putting
.. code-block:: html
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
into the ``<head>`` block of your document. (It can also go in the
``<body>`` if necessary, but the head is to be preferred.) This will
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 confiogurations to your needs. More details can be found in the
:ref:`Loading and Configuring MathJax <loading>` instructions.
The use of ``cdn.mathjax.org`` is governed by its `terms of service
<http://www.mathjax.org/download/mathjax-cdn-terms-of-service/>`_, so be
sure to read that before linked to the MathJax CDN server.
To see how to enter mathematics in your web pages, see `Putting
mathematics in a web page`_ below.
Installing Your Own Copy of MathJax
===================================
We recommend using the CDN service if you can, but you can also install
MathJax on your own server, or locally on your own hard disk. To do
so you will need to do the following things:
1. Obtain a copy of MathJax and make it available on your server.
@ -17,23 +72,18 @@ need to do the following things:
4. Put mathematics into your web pages so that MathJax can display
it.
Each of these steps is described briefly below, with links to more
detailed explanations. This page gives the quickest and easiest ways
to get MathJax up and running on your web site, but you may want to
read the details in order to customize the setup for your pages.
Obtaining and Installing MathJax
================================
--------------------------------
The easiest way to set up MathJax is to obtain the v1.1 archive from
the `MathJax download page <http://www.mathjax.org/download/>`_ (you
should obtain a file names something like
``mathjax-MathJax-v1.0-X-XXXXXXXX.zip``, where the X's are
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. (This is different from the beta releases, which had the fonts
separate from the rest of the code).
need. Note that this is different from 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
@ -44,56 +94,61 @@ from within any page on your server.
Note: While this is the easiest way to set up MathJax initially, there
is a better way to do it if you want to be able to keep your copy of
MathJax up-to-date easily. That uses the `Git <http://git-scm.com/>`_
version control system, and is described in the :ref:`Installing
MathJax <getting-mathjax-git>` document. If you prefer using
`Subversion <http://subversion.apache.org/>`_, you can also use that
to get a copy of MathJax (see :ref:`Installing MathJax via SVN
MathJax up-to-date. That uses the `Git <http://git-scm.com/>`_ version
control system, and is described in the :ref:`Installing MathJax
<getting-mathjax-git>` document. If you prefer using `Subversion
<http://subversion.apache.org/>`_, you can also use that to get a copy
of MathJax (see :ref:`Installing MathJax via SVN
<getting-mathjax-svn>`).
Once you have MathJax set up on your server, you can test it using the
files in the ``MathJax/test`` directory. Load them in your browser
using its web address rather than opening them locally (i.e., use an
``http://`` URL rather than a ``file://`` URL). When you view the
``index.html`` file, after a few moments you should see a message 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.
``index.html`` file, after a few moments you should see a message
indicating that MathJax appears to be working. If not, check that the
files have been transferred to the server completely and that the
permissions allow the server to access the files and folders that are
part of the MathJax directory. (Be sure to verify the MathJax
folder's permissions as well.) Check the server log files for any
errors that pertain to the MathJax installation; this may help locate
problems in the permission or locations of files.
Configuring MathJax
===================
Configuring your copy of MathJax
--------------------------------
When you include MathJax into your web pages as described below, it
will load the file ``config/MathJax.js`` (i.e., the file named
``MathJax.js`` in the ``config`` folder of the main ``MathJax``
folder). This file contains the configuration parameters that
control how MathJax operates. There are comments in it that
explain each of the parameters, and you can edit the file to suit
your needs.
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 comply-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.
The default settings are appropriate for pages that use TeX as the
input language, but you might still want to adjust some settings; for
example, you might want to include some additional extensions such as
the ``AMSmath`` and ``AMSsymbols`` extensions. The comments in the
file should help you do this, but more detailed instructions are
included in the :ref:`Configuring MathJax <configuration>` document.
There are also ways to configure MathJax other than by using the
``config/MathJax.js`` file; these are descibed on that page as well.
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 :ref:`Common Configurations
<common-configurations>`, and the configuration options are described in
:ref:`Configuration Options <configuration>`.
Note: The configuration process has changed in MathJax v1.1, so if you have
existing pages that use MathJax, you may need to modify the tag that
loads MathJax so that is conforms with the new configuration process.
See :ref:`Installing and Configuring MathJax <installation>` for more
details.
Linking MathJax into a web page
===============================
Linking your copy of MathJax into a web page
--------------------------------------------
You can include MathJax in your web page by putting
.. code-block:: html
<script type="text/javascript" src="path-to-MathJax/MathJax.js"></script>
<script type="text/javascript" src="path-to-MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
in your document's ``<head>`` block. Here, ``path-to-MathJax`` should
be replaced by the URL for the main MathJax directory, so if you have
@ -102,7 +157,7 @@ site, you could use
.. code-block:: html
<script type="text/javascript" src="/MathJax/MathJax.js"></script>
<script type="text/javascript" src="/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
to load MathJax in your page. For example, your page could look like
@ -111,32 +166,31 @@ to load MathJax in your page. For example, your page could look like
<html>
<head>
...
<script type="text/javascript" src="/MathJax/MathJax.js"></script>
<script type="text/javascript" src="/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</head>
<body>
...
</body>
</html>
Although it is possible to load MathJax from a site other than your
own web server, there are issues involved in doing so that you need to
take into consideration. See the :ref:`Notes About Shared Servers
<cross-domain-linking>` for more details. Please do **not** link to
the copy of MathJax at ``www.mathjax.org``, as we do not have the
resources to act as a web service for all the sites on the web that
would like to display mathematics. If you are able to run MathJax
from your own server, please do so (this will probably give you better
response time in any case).
If you have installed MathJax on a server that is in a different
domain from the one serving the page that loads MathJax, be sure to
read the :ref:`Notes About Shared Servers <cross-domain-linking>` for
more details. In that case, you may wish to consider using the
:ref:`MathJax CDN <mathjax-cdn>` rather than installing your own copy
of MathJax.
Putting mathematics in a web page
=================================
To put mathematics in your web page, you can use either TeX and LaTeX
notation, or MathML notation (or both); the configuration file tells
MathJax which you want to use, and how you plan to indicate the
mathematics when you are using TeX notation. The following sections
tell you how to use each of these formats.
To put mathematics in your web page, you can use either :term:`TeX`
and :term:`LaTeX` notation or :term:`MathML` notation or both within
the same page; the MathJax configuration tells MathJax which you want
to use, and how you plan to indicate the mathematics when you are
using TeX notation. The configuration file used in the examples above
tells MathJax to look for both TeX and MathML notation within your
pages. These two formats are described in more detail below.
.. _tex-and-latex-input:
@ -144,21 +198,18 @@ tell you how to use each of these formats.
TeX and LaTeX input
-------------------
To process mathematics that is written in :term:`TeX` or :term:`LaTeX`
format, include ``"input/TeX"`` in your configuration's `jax` array,
and add ``"tex2jax.js"`` to the `extensions` array so that MathJax
will look for TeX-style math delimiters to identify the mathematics on
the page.
Mathematics that is written in :term:`TeX` or :term:`LaTeX` format is
indicated using *math delimiters* that surround the mathematics,
telling MathJax what part of your page represents mathematics and what
is normal text. There are two types of equations: ones that occur
within a paragraph (in-line mathematics), and larger equations that
appear separated from the rest of the text on lines by themselves
(displayed mathematics).
.. code-block:: javascript
extensions: ["tex2math.js"],
jax: ["input/TeX", "output/HTML-CSS"]
Note that the default math delimiters are ``$$...$$`` and ``\[...\]``
for displayed mathematics, and ``\(...\)`` for in-line mathematics.
In particular, the ``$...$`` in-line delimiters are **not** used by
default. That is because dollar signs appear too often in
The default math delimiters are ``$$...$$`` and ``\[...\]`` for
displayed mathematics, and ``\(...\)`` for in-line mathematics. Note
in particular that the ``$...$`` in-line delimiters are **not** used
by default. That is because dollar signs appear too often in
non-mathematical settings, which could cause some text to be treated
as mathematics unexpectedly. For example, with single-dollar
delimiters, "... the cost is $2.50 for the first one, and $2.00 for
@ -167,38 +218,60 @@ one, and" to be treated as mathematics since it falls between dollar
signs. For this reason, if you want to use single-dollars for in-line
math mode, you must enable that explicitly in your configuration:
.. code-block:: javascript
.. code-block:: html
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script type="text/javascipt" src="path-to-mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
See the ``config/MathJax.js`` file, or the :ref:`tex2jax configuration
See the ``config/default.js`` file, or the :ref:`tex2jax configuration
options <configure-tex2jax>` page, for additional configuration
parameters that you can specify for the ``tex2jax`` preprocessor.
parameters that you can specify for the `tex2jax` preprocessor,
which is the component of MathJax that identifies TeX notation within
the page). See the :ref:`TeX and LaTeX <TeX-support>` page for
more on MathJax's support for TeX.
Here is a complete sample page containing TeX mathematics (which
assumes that ``config/MathJax.js`` is configured as described above):
Here is a complete sample page containing TeX mathematics (also available
in the ``test/sample-tex.html`` file):
.. code-block:: html
<!DOCTYPE html>
<html>
<head>
<title>MathJax TeX Test Page</title>
<script type="text/javascript" src="/MathJax/MathJax.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</head>
<body>
When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
</body>
</html>
There are a number of extensions for the TeX input processor that you
might want to add to the `extensions` array. These include:
Since the TeX notation is part of the text of the page, there are some
caveats that you must keep in mind when you enter your mathematics.
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 :ref:`TeX and LaTeX support
<TeX-support>` for details.
There are a number of extensions for the TeX input processor that are
loaded by the ``TeX-AMS-MML_HTMLorMML`` configuration. These include:
- `TeX/AMSmath.js`, which defines the AMS math environments and
macros,
- `TeX/AMSsymbols.js`, which defines the macros for the symbols in
the msam10 and msbm10 fonts,
the `msam10` and `msbm10` fonts,
- `TeX/noErrors.js`, which shows the original TeX code rather than
an error message when there is a problem processing the TeX, and
@ -206,34 +279,16 @@ might want to add to the `extensions` array. These include:
- `TeX/noUndefined.js`, which prevents undefined macros from
producing an error message, and instead shows the macro name in red.
For example,
.. code-block:: javascript
extensions: ["tex2math.js","TeX/noErrors.js","TeX/noUndefined.js",
"TeX/AMSmath.js","TeX/AMSsymbols.js"]
loads all four extensions, in addition to the ``tex2math``
preprocessor.
Other extensions may be loaded automatically when needed.
MathML input
------------
To process mathematics written in :term:`MathML`, include
``"input/MathML"`` in your configuration's `jax` array, and add
``"mml2jax.js"`` to the `extensions` array so that MathJax will
locate the ``<math>`` elements in the page automatically.
.. code-block:: javascript
extensions: ["mml2jax.js"],
jax: ["input/MathML", "output/HTML-CSS"]
With this configuration, you would mark your mathematics using
standard ``<math>`` tags, where ``<math display="block">`` represents
displayed mathematics and ``<math display="inline">`` or just
``<math>`` represents in-line mathematics.
For mathematics written in :term:`MathML` notation, you mark your
mathematics using standard ``<math>`` tags, where ``<math
display="block">`` represents displayed mathematics and ``<math
display="inline">`` or just ``<math>`` represents in-line mathematics.
Note that this will work in HTML files, not just XHTML files (MathJax
works with both), and that the web page need not be served with any
@ -242,15 +297,18 @@ 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.
Here is a complete sample page containing MathML mathematics (which
assumes that ``config/MathJax.js`` is configured as described above):
Here is a complete sample page containing MathML mathematics (also
available in the ``test/sample-mml.html`` file):
.. code-block:: html
<!DOCTYPE html>
<html>
<head>
<title>MathJax MathML Test Page</title>
<script type="text/javascript" src="/MathJax/MathJax.js"></script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</head>
<body>
@ -283,9 +341,27 @@ assumes that ``config/MathJax.js`` is configured as described above):
</body>
</html>
The ``mml2jax`` has only a few configuration options; see the
``config/MathJax.js`` file or the :ref:`mml2jax configuration options
<configure-mml2jax>` page for more details.
When entering MathML notation in an HTML page (rather than an XHTML
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
.. code-block:: html
<mspace width="thinmathspace"></mspace>
rather than ``<mspace width="5pt" />`` in an HTML document. If you use the
self-closing form, some browsers will not build the math tree properly, and
MathJax will receive a damaged math structure, which will not be rendered
as the original notation would have been. Unfortunately, there is nothing
MathJax can do about that, since the browser has incorrectly interpreted
the tags long before MathJax has a chance to work with them.
The component of MathJax that recognizes MathML notation is called the
`mml2jax` extension, and it has only a few configuration options; see the
``config/default.js`` file or the :ref:`mml2jax configuration options
<configure-mml2jax>` page for more details. See the :ref:`MathML
<MathML-support>` page for more on MathJax's MathML support.
Where to go from here?
@ -297,7 +373,7 @@ able to use it to write web pages that include mathematics. At this
point, you can start making pages that contain mathematical content!
You could also read more about the details of how to :ref:`customize
MathJax <configuration>`.
MathJax <loading>`.
If you are trying to use MathJax in blog or wiki software or in some
other content-management system, you might want to read about :ref:`using

View File

@ -63,11 +63,10 @@ pushed into the queue:
2. Perform the configuration actions:
- Post the ``Begin Config`` startup signal
- Execute the content of the ``<script>`` that loaded MathJax,
or load the ``config/MathJax.js`` file if the ``<script>``
is empty
- If the ``MathJax.Hub.config.delayStartupUntil`` value is set,
wait until its condition is met
- Load any configuration files specified via ``config=`` as a script parameter
- Execute the content of the ``<script>`` that loaded MathJax, if it is not empty
- Wait for the ``delayStartupUntil`` condition to be met, if one was specified
- Execute any ``text/x-mathjax-config`` script blocks
- load the files listed in the ``MathJax.Hub.config.config`` array
- Post the ``End Config`` startup signal
@ -115,15 +114,20 @@ pushed into the queue:
..
7. Wait for the onload handler to fire
7. Set the MathJax menu's renderer value based on the jax that have been
loaded
..
8. Set ``MathJax.isReady`` to ``true``
8. Wait for the onload handler to fire
..
9. Perform the typesetting pass (preprocessors and processors)
9. Set ``MathJax.isReady`` to ``true``
..
10. Perform the typesetting pass (preprocessors and processors)
- Post the ``Begin Typeset`` startup signal
- Post the ``Begin PreProcess`` hub signal
@ -141,12 +145,16 @@ pushed into the queue:
..
10. Post the ``End`` startup signal
11. Post the ``End`` startup signal
The loading of the jax and extensions in steps 5 and 6 are now done in
parallel, rather than sequentially. That is, all the jax and extensions
are requested simultaneously, so they load concurrently. That means they
can load in any order, and that the begin and end signals for the jax and
extensions can be intermixed. (In general, you will get `Begin Jax`
followed by `Begin Extensions`, but the order of `End Jax` and `End
Extensions` will depend on the file sbeing loaded.) Both 5 and 6 must
complete, however, before 7 will be performed.
See the ``test/sample-signals.html`` file to see the signals in action.

View File

@ -37,20 +37,19 @@ queues for actions that need to be synchronized with each other, but
not to MathJax as a whole. See the :ref:`Queue Object <api-queue>`
reference page for more details.
**Signals** are another means of synchronizing your own code with
MathJax. Many of the important actions that MathJax takes (like
typesetting new math on the page, or loading an external component)
are "announced" by posting a message to a special object called a
`Signal`. Your code can register an interest in receiving one or more
of these signals by providing a callback to be called when the signal
is posted. When the signal arrives, MathJax will call your code.
This works somewhat like an event handler, except that many different
types of events can go through the same signal, and the signals have a
"memory", meaning that if you register an interest in a particular
type of signal and that signal has already occurred, you will be told
about the past occurrances as well as any future ones. See the
:ref:`Signal Object <api-signal>` reference page for more details.
See also the ``test/sample-signals.html`` file in the MathJax ``test``
**Signals** are another means of synchronizing your own code with MathJax.
Many of the important actions that MathJax takes (like typesetting new math
on the page, or loading an external component) are "announced" by posting a
message to a special object called a `Signal`. Your code can register an
interest in receiving one or more of these signals by providing a callback
to be called when the signal is posted. When the signal arrives, MathJax
will call your code. This works somewhat like an event handler, except
that many different types of events can go through the same signal, and the
signals have a "memory", meaning that if you register an interest in a
particular type of signal and that signal has already occurred, you will be
told about the past occurrances as well as any future ones. See the
:ref:`Signal Object <api-signal>` reference page for more details. See
also the ``test/sample-signals.html`` file in the MathJax ``test``
directory for a working example of using signals.
Each of these is explained in more detail in the links below:

View File

@ -4,13 +4,13 @@
MathJax TeX and LaTeX Support
*****************************
The support for TeX and LaTeX in MathJax consists of two parts: the
`tex2jax` preprocessor, and the TeX input processor. The first of
these looks for mathematics within your web page (indicated by math
delimiters like ``$$...$$``) and marks the mathematics for later
processing by MathJax. The TeX input processor is what converts the
TeX notation into MathJax's internal format, where one of MathJax's
output processors then displays it in the web page.
The support for :term:`TeX` and :term:`LaTeX` in MathJax consists of two
parts: the `tex2jax` preprocessor, and the `TeX` input processor. The
first of these looks for mathematics within your web page (indicated by
math delimiters like ``$$...$$``) and marks the mathematics for later
processing by MathJax. The TeX input processor is what converts the TeX
notation into MathJax's internal format, where one of MathJax's output
processors then displays it in the web page.
The `tex2jax` preprocessor can be configured to look for whatever
markers you want to use for your math delimiters. See the
@ -36,6 +36,45 @@ you need a LaTeX-to-HTML converter, you should consider `other options
<http://www.google.com/search?q=latex+to+html+converter>`_.
TeX and LaTeX math delimiters
=============================
By default, the `tex2jax` preprocesor defines the LaTeX math delimiters,
which are ``\(...\)`` for in-line math, and ``\[...\]`` for displayed
equations. It also defines the TeX delimiters ``$$...$$`` for displayed
equations, but it does **not** define ``$...$`` as in-line 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 in-line
math mode, you must enable that explicitly in your configuration:
.. code-block:: javascript
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
processEscapes: true
}
});
Note that if you do this, you may want to also set ``processEscapes`` to
``true``, as in the example above, so that you can use ``\$`` to prevent a
dollar sign from being treated as a math delimiter within the text of your
web page. (Note that within TeX mathematics, ``\$`` always has this
meaning; ``processEscapes`` only affects the treatment of the *opening*
math delimiter.)
See the ``config/default.js`` file, or the :ref:`tex2jax configuration
options <configure-tex2jax>` page, for additional configuration
parameters that you can specify for the `tex2jax` preprocessor,
which is the component of MathJax that identifies TeX notation within
the page).
TeX and LaTeX in HTML documents
===============================
@ -97,40 +136,61 @@ TeX and LaTeX extensions
========================
While MathJax includes nearly all of the Plain TeX math macros, and
many of the LaTeX macros and environments, note everything is
many of the LaTeX macros and environments, not everything is
implemented in the core TeX input processor. Some less-used commands
are defined in extensions to the TeX processor. MathJax will load
some extensions automatically when you first use the commands they
implement (for example, the ``\def`` and ``\newcommand`` macros are
implemented in the ``TeX/newcommand.js`` extension, but MathJax loads
implemented in the ``newcommand.js`` extension, but MathJax loads
this extension itself when you use those macros). Not all extensions
are set up to load automatically, however, so you may need to request
some extensions explicitly yourself.
To enable any of the TeX extensions, simply add the appropriate string
(e.g., `"TeX/AMSmath.js"`) to your config's `extensions` array. The
main extensions are described below.
(e.g., ``"AMSmath.js"``) to the `extensions` array in the ``TeX`` block
of your configuration. If you use one of the combined configuration files,
like ``TeX-AMS_HTML``, this will already include several of the extensions
automatically, but you can include others using a mathjax configuration
script prior to loading MathJax. For example
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ TeX: { extensions: ["autobold.js"] }});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
</script>
will load the `autobold` TeX extension in addition to those already
included in the ``TeX-AMS_HTML`` configuration file.
The main extensions are described below.
AMSmath and AMSsymbol
---------------------
The `AMSmath` extension implements AMS math environments and macros,
and the `AMSsymbol` extension implements macros for accessing the AMS
symbol fonts. To use these extensions, add them to your `extensions` array.
The `AMSmath` extension implements AMS math environments and macros, and
the `AMSsymbol` extension implements macros for accessing the AMS symbol
fonts. These are already included in the combined configuration files that
load the TeX input processor. To use these extensions in your own
configurations, add them to the `extensions` array in the TeX block.
.. code-block:: javascript
extensions: ["TeX/AMSmath.js", "TeX/AMSsymbol.js", ...]
TeX: {
extensions: ["AMSmath.js", "AMSsymbol.js", ...]
}
See the list of commands at the end of this document for details about
what commands are implemented in these extensions.
See the list of control sequences at the end of this document for details
about what commands are implemented in these extensions.
The `AMSmath` extension will be loaded automatically when you first
use one of the math environments it defines, but you will have to load
it explicitly if you want to use the other macros that it defines.
The `AMSsymbols` extension is not loaded automatically, so you must
include it explicitly if you want to use the macros it defines.
If you are not using one of the combined configuration files, the `AMSmath`
extension will be loaded automatically when you first use one of the math
environments it defines, but you will have to load it explicitly if you
want to use the other macros that it defines. The `AMSsymbols` extension
is not loaded automatically, so you must include it explicitly if you want
to use the macros it defines.
Autobold
@ -141,7 +201,11 @@ appears in a section of an HTML page that is in bold.
.. code-block:: javascript
extensions: ["TeX/autobold.js"]
TeX: {
extensions: ["autobold.js"]
}
This extension is **not** loaded by the combined configuration files.
noErrors
@ -153,24 +217,27 @@ whether the dollar signs are shown or not for in-line math, and
whether to put all the TeX on one line or use multiple lines (if the
original text contained line breaks).
To enable the `noErrors` extension and configure it, use
This extension is loaded by all the combined configuration files that
include the TeX input processor. To enable the `noErrors` extension in
your own configuration, or to modify its parameters, add something like the
following to your :meth:`MathJax.Hub.Config()` call:
.. code-block:: javascript
extensions: ["TeX/noErrors.js", ...],
TeX: {
noErrors: {
inlineDelimiters: ["",""], // or ["$","$"] or ["\\(","\\)"]
multiLine: true, // false for TeX on all one line
style: {
"font-family": "serif",
"font-size": "80%",
"color": "black",
"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)
}
extensions: ["noErrors.js"],
noErrors: {
inlineDelimiters: ["",""], // or ["$","$"] or ["\\(","\\)"]
multiLine: true, // false for TeX on all one line
style: {
"font-family": "serif",
"font-size": "80%",
"color": "black",
"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)
}
}
}
Display-style math is always shown in multi-line format, and without
@ -184,14 +251,14 @@ the paragraph, use
.. code-block:: javascript
TeX: {
noErrors: {
inlineDelimiters: ["$","$"], // or ["",""] or ["\\(","\\)"]
multiLine: false,
style: {
"font-size": "normal",
"border": ""
}
noErrors: {
inlineDelimiters: ["$","$"], // or ["",""] or ["\\(","\\)"]
multiLine: false,
style: {
"font-size": "normal",
"border": ""
}
}
}
You may also wish to set the font family, as the default is "serif"
@ -201,28 +268,31 @@ noUndefined
-----------
The `noUndefined` extension causes undefined control sequences to be
shown as their macro names rather than produce an error message. So
shown as their macro names rather than generating error messages. So
``$X_{\xxx}$`` would display as an "X" with a subscript consiting of the
text ``\xxx`` in red.
To enable and configure this extension, use for example
This extension is loaded by all the combined configuration files that
include the TeX input processor. To enable the `noUndefined` extension
in your own configuration, or to modify its parameters, add something like
the following ro your :meth:`MathJax.Hub.Config()` call:
.. code-block:: javascript
extensions: ["TeX/noUndefined.js", ...],
TeX: {
noUndefined: {
attributes: {
mathcolor: "red",
mathbackground: "#FFEEEE",
mathsize: "90%"
}
extensions: ["noUndefined.js"],
noUndefined: {
attributes: {
mathcolor: "red",
mathbackground: "#FFEEEE",
mathsize: "90%"
}
}
}
}
The ``attributes`` setting specifies attributes to apply to the
``mtext`` element that encodes the name of the undefined macro. The
default settings set ``mathcolor`` to ``"red"``, but do not set any
default values set ``mathcolor`` to ``"red"``, but do not set any
other attributes. This example sets the background to a light pink,
and reduces the font size slightly.
@ -272,9 +342,9 @@ array. You can configure the extension as follows:
.. code-block:: javascript
TeX: {
unicode: {
fonts: "STIXGeneral, 'Arial Unicode MS'"
}
unicode: {
fonts: "STIXGeneral, 'Arial Unicode MS'"
}
}
@ -949,6 +1019,7 @@ the macro name.
\subset
\subseteq
\subseteqq AMSsymbols
\subsetneq AMSsymbols
\substack AMSmath
\succ
\succapprox AMSsymbols
@ -964,6 +1035,7 @@ the macro name.
\supset
\supseteq
\supseteqq AMSsymbols
\supsetneq AMSsymbols
\surd
\swarrow

View File

@ -172,7 +172,8 @@ then you can use
to change the student's answer to be the typeset version of whatever
is in the ``studentAnswer`` variable.
Here is a complete example that illustrates this approach
Here is a complete example that illustrates this approach (available in a
more full-featured version as ``test/sample-dynamic.html``):
.. code-block:: html
@ -180,13 +181,16 @@ Here is a complete example that illustrates this approach
<head>
<title>MathJax Dynamic Math Test Page</title>
<script src="/MathJax/MathJax.js">
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
tex2jax: {
inlineMath: [["$","$"],["\\(","\\)"]]
}
});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full">
</script>
</head>
<body>

View File

@ -0,0 +1,234 @@
.. _upgrade:
***********************************
Migrating from MathJax v1.0 to v1.1
***********************************
MathJax v1.1 fixes a number of bugs in v1.0, and improves support for
new versions of browsers and mobile devices. It includes changes to
increase its performance, and to make it more compliant with HTML5. It
has more flexible configuration options, and the ability to load
configuration files that combine multiple files into a single one to
increase loading speed when MathJax starts up. Finally, MathJax.org now
offers MathJax as a web service through a distributed "cloud" server.
This document describes the changes you may need to make to your MathJax
configurations in order to take advantage of these improvements.
Configuration Changes
=====================
The main changes that you will see as a page author are in the way that
MathJax can be loaded and configured. If you have been using in-line
configuration by putting a :meth:`MathJax.Hub.Config()` call in the body of
the ``<script>`` tag that loads MathJax, then your site should work
unchanged with version 1.1 of MathJax. You may wish to consider moving to
the new HTML5-compliant method of configuring MathJax, however, which uses
a separate ``<script>`` tag to specify the configuration. That tag should
come **before** the one that loads ``Mathjax.js``, and should have
``type="text/x-mathjax-config"`` rather than ``type="text/javascript"``.
For example,
.. code-block:: html
<script type="text/javascript" src="/MathJax/MathJax.js">
MathJax.Hub.Config({
jax: ["input/TeX","output/HTML-CSS"],
extensions: ["tex2jax.js"]
});
</script>
would become
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
jax: ["input/TeX","output/HTML-CSS"],
extensions: ["tex2jax.js"]
});
</script>
<script type="text/javascript" src="/MathJax/MathJax.js"></script>
instead. This will make sure your pages pass HTML5 validation. Be sure
that you put the configuration block **before** the script that loads
MathJax. See :ref:`Loading and Configuring MathJax <loading>` for more
details.
If your page simply loads ``MathJax.js`` and relies on
``config/MathJax.js``, then you will need to modify your ``<script>`` tag
in order to use MathJax v1.1. This is because MathJax no longer loads a
default configuration file; you are required to explicity specify the
configuration file if you use one. Furthermore, the name of the
``config/MathJax.js`` file was a source of confusion, so it has been
renamed ``config/default.js`` instead. Thus, if you used
.. code-block:: html
<script type="text/javascript" src="/MathJax/MathJax.js"></script>
in the past, you should replace it with
.. code-block:: html
<script type="text/javascript" src="/MathJax/MathJax.js?config=default"></script>
instead. If you don't do this, you will receive a warning message that
directs you to a page that explains how to update your script tags to use
the new configuration format.
Combined Configurations
=======================
New with version 1.1 is the ability to combine several files into a single
configuration file, and to load that via the same script that loads
MathJax. This should make configuring MathJax easier, and also helps to
speed up the initial loading of MathJax's components, since only one file
needs to be downloaded.
MathJax comes with four pre-built configurations, and our hope is that one
of these will suit your needs. They are described in more detail in the
:ref:`Using a Configuration File <config-files>` section. To load one,
add ``?config=filename`` (where ``filename`` is the name of the
configuration file without the ``.js``) to the URL that loads
``MathJax.js``. For example
.. code-block:: html
<script type="text/javascript" src="/MathJax/MathJax.js">
MathJax.Hub.Config({
jax: ["input/TeX","output/HTML-CSS"],
extensions: ["tex2jax.js","AMSmath.js","AMSsymbols.js"]
});
</script>
could be replaced by the single line
.. code-block:: html
<script type="text/javascript" src="/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>
In this way, you don't have to include the in-line configuration, and all
the needed files will be downloaded when MathJax starts up. For complete
details about the contents of the combined configuration files, see the
:ref:`Common Configurations <common-configurations>` section.
If you want to use a pre-defined configuration file, but want to modify some
of the configuration parameters, you can use both a
``text/x-mathjax-config`` block and a ``config=filename`` parameter in
combination. For example,
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
inlineMath: [ ['$','$'], ['\\(','\\)'] ],
processEscapes: true
}
});
</script>
<script type="text/javascript" src="/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>
would load the ``TeX-AMS_HTML`` configuration file, but would reconfigure
the inline math delimiters to include ``$...$`` in addition to
``\(...\)``, and would set the ``processEscapes`` parameter to ``true``.
Loading MathJax from the CDN
============================
The MathJax installation is fairly substantial (due to the large number of
images needed for the image fonts), and so you may not want to (or be able
to) store MathJax on your own server. Keeping MathJax up to date can also
be a maintenance problem, and you might prefer to let others handle that
for you. In either case, using the MathJax distributed network service may be
the best way for you to obtain MathJax. That way you can be sure you are
using an up-to-date version of MathJax, and that the server will be fast
and reliable.
To use the MathJax CDN service, simply load MathJax as follows:
.. code-block:: html
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</scrip>
Of course, you can load any configuration file that you wish, or use a
``text/x=mathajx-config`` block to configure MathJax in-line.
:ref:`More details <loading-CDN>` are available, if you need them.
The use of ``cdn.mathjax.org`` is governed by its `terms of service
<http://www.mathjax.org/download/mathjax-cdn-terms-of-service/>`_, so be
sure to read that before linked to the MathJax CDN server.
Change in default TeX delimiters
================================
In addition to the fact that MathJax v1.1 no longer loads a default
configuration file, there is a second configuration change that could
affect your pages. The ``config/MathJax.js`` file properly configured the
`tex2jax` preprocessor to use only ``\(...\)`` and not ``$...$`` for in-line
math delimiters, but the `tex2jax` preprocessor itself incorrectly
defaulted to including ``$...$`` as in-line math delimiters. The result
was that if you used in-line configuration to specify the ``tex2jax``
preprocessor, single-dollar delimiters were enabled by default, while if
you used file-based configuration, they weren't.
This inconsistency was an error, and the correct behavior was supposed to
have the single-dollar delimiters disabled in both cases. This is now
true in v1.1 of MathJax. This means that if you used in-line
configuration to specify the `tex2jax` preprocessor, you will need to
change your configuration to explicitly enable the single-dollar
delimiters if you want to use them.
For example, if you had
.. code-block:: html
<script type="text/javascript" src="/MathJax/MathJax.js">
MathJax.Hub.Config({
jax: ["input/TeX","output/HTML-CSS"],
extensions: ["tex2jax.js"]
});
</script>
and you want to use single-dollar delimiters for in-line math, then you
should replace this with
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
jax: ["input/TeX","output/HTML-CSS"],
extensions: ["tex2jax.js"],
tex2jax: {
inlineMath: [ ['$','$'], ['\\(','\\)'] ],
processEscapes: true
}
});
</script>
<script type="text/javascript" src="/MathJax/MathJax.js"></script>
The same technique can be used in conjunction with a combined
configuration file. For example
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ['\\(','\\)'] ],
processEscapes: true
}
});
</script>
<script type="text/javascript" src="/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>
will load the pre-defined ``TeX-AMS_HTML`` configuration, but will modify
the settings to allow ``$...$`` delimiters, and to process ``\$`` to
produce dollar signs within the text of the page.

View File

@ -0,0 +1,172 @@
.. _whats-new:
**************************
What's New in MathJax v1.1
**************************
MathJax version 1.1 includes a number of important improvements and
enhancements over version 1.0. We have worked hard to fix bugs, improve
support for browsers and mobile devices, supprot TeX and MathML better, and
increase MathJax's performance.
In addition to these changes, MathJax.org now offers MathJax as a network
service. Instead of having to install MathJax on your own server, you can
link to our content delivery network (CDN) to get fast access to
up-to-date and past versions of MathJax. See :ref:`Loading MathJax from
the CDN <loading-CDN>` for more details.
The following sections outline the changes in v1.1:
Optimization
============
* Combined configuraiton files that load all the needed files in one piece
rather than loading them individually. This simplifies configuration
and speeds up typsetting of the mathematics on the page.
* Improved responsiveness to mouse events during typesetting.
* Parallel downloading of files needed by MathJax, for faster startup
times.
* Shorter timeout for web fonts, so if they can't be downlaoded, you don't
have to wait so long.
* Rollover to image fonts if a web font fails to load (so you don't have
to wait for *every* font to fail.
* The MathJax files are now packed only with `yuicompressor` rather than a
custom compressor. The CDN serves gzipped versions, which compressed
better than the gzipped custom-packed files.
* Improved rendering speed in IE by removing ``position:relative`` from
the style for mathematics.
* Improve rendering speed for most browsers by isolating the mathematics
from page during typesetting (avoids full page reflows).
Enhancements
============
* Allow the input and output jax configuration blocks to specify extensions
to be loaded when the jax is loaded (this avoids needing to load them up
front, so they don't have to be loaded on pages that don't include
mathematics, for example).
* Better handling of background color from style attributes.
* Ability to pass configuration parameters via script URL.
* Support HTML5 compliant configuration syntax.
* Switch the Git repository from storing the fonts in `fonts.zip` to
storing the `fonts/` directory directly.
* Improved About box.
* add a minimum scaling factor (so math won't get too small)
TeX Support
============
* Added support for ``\href``, ``\style``, ``\class``, ``\cssId``.
* Avoid recursive macro definitions and other resource consumption possibilities.
* Fix for ``\underline`` bug.
* Fix for bug with ``\fbox``.
* Fix height problem with ``\raise`` and ``\lower``.
* Fix problem with ``\over`` used inside array entries.
* Fix problem with nesting of math delimiters inside text-mode material.
* Fix single digit super- and subscripts followed by punctuation.
* Make sure `movablelimits` is off for ``\underline`` and related macros.
* Fix problem with dimensions given with ``pc`` units.
MathML Support
==============
* Fix ``&lt;`` and ``&amp;`` being translated too early.
* Handle self-closing tags in HTML files better.
* Combine adjacent relational operators in ``<mo>`` tags.
* Fix entity name problems.
* Better support for MathML namespaces.
* Properly handle comments within MathML in IE.
* Properly consider ``<mspace>`` and ``<mtext>`` as space-like.
* Improved support for ``<maction>`` with embelished operators.
Other Bug Fixes
===============
* Fixed CSS bleed through with zoom and other situations.
* Fixed problems with ``showMathMenuMSIE`` when set to ``false``.
* Replaced illegal prefix characters in cookie name.
* Improve placement of surd for square roots and n-th roots.
* Fixed layer obscuring math from MathPlayer for screen readers.
* Newlines in CDATA comments are now handled properly.
* Resolved conflict between `jsMath2jax` and `tex2jax` both processing the
same equation.
* Fixed problem with ``class="tex2jax_ignore"`` affecting the processing of
sibling elements.
Browser Support
===============
**Android**
* Added detection and configuration for Android browser.
* Allow use of OTF web fonts in Android 2.2.
**Blackberry**
* MathJax now works with OS version 6.
**Chrome**
* Use OTF web fonts rather than SVG fonts for version 4 and above.
**Firefox**
* Added Firefox 4 detection and configuration.
* Fix for extra line-break bug when displayed equations are in
preformatted text.
* Update fonts so that FF 3.6.13 and above can read them.
**Internet Explorer**
* Changes for compatibility with IE9.
* Fix for IE8 incorrectly parsing MathML.
* Fix for IE8 namespace problem.
* Fix for null ``parentNode`` problem.
* Fix for ``outerHTML`` not quoting values of attributes.
**iPhone/iPad**
* Add support for OTF web fonts in iOS4.2.
**Nokia**
* MathJax now works with Symbian\ :sup:`3`\ .
**Opera**
* Prevent Opera from using STIX fonts unless explicitly requested via the
font menu (since Opera can't display many of the characters).
* Fix for bad em-size detection in 10.61.
* Fixed a problem with the About dialog in Opera 11.
**Safari**
* Use OTF web fonts for Safari/PC.
**WebKit**
* Better version detection.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -6,17 +6,13 @@
// ==/UserScript==
if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) {
if ((document.getElementsByTagName("math").length > 0) ||
(document.getElementsByTagNameNS == null ? false :
(document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) {
if ((document.getElementsByTagName("math").length > 0) ||
(document.getElementsByTagNameNS == null ? false :
(document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) {
var script = document.createElement("script");
script.src = "http://www.yoursite.edu/MathJax/MathJax.js"; // put your URL here
var config = 'MathJax.Hub.Config({' +
'extensions:["mml2jax.js"],' +
'jax:["input/MathML","output/HTML-CSS"]' +
'});' +
'MathJax.Hub.Startup.onload()';
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full";
var config = 'MathJax.Hub.Startup.onload()';
if (window.opera) {script.innerHTML = config} else {script.text = config}
document.getElementsByTagName("head")[0].appendChild(script);
}
}
}

View File

@ -9,27 +9,23 @@ if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) {
//
// Replace the images with MathJax scripts of type math/tex
//
var images = document.getElementsByTagName('img');
var images = document.getElementsByTagName('img'), count = 0;
for (var i = images.length - 1; i >= 0; i--) {
var img = images[i];
if (img.className === "tex") {
var script = document.createElement("script"); script.type = "math/tex";
if (window.opera) {script.innerHTML = img.alt} else {script.text = img.alt}
img.parentNode.replaceChild(script,img);
img.parentNode.replaceChild(script,img); count++;
}
}
//
// Load MathJax and have it process the page
//
var script = document.createElement("script");
script.src = "http://www.yoursite.edu/MathJax/MathJax.js"; // put your URL here
var config = 'MathJax.Hub.Config({' +
'config: ["MMLorHTML.js"],' +
'extensions:["TeX/noErrors.js","TeX/noUndefined.js",' +
'"TeX/AMSmath.js","TeX/AMSsymbols.js"],' +
'jax:["input/TeX"]' +
'});' +
'MathJax.Hub.Startup.onload()';
if (window.opera) {script.innerHTML = config} else {script.text = config}
document.getElementsByTagName("head")[0].appendChild(script);
if (count) {
//
// Load MathJax and have it process the page
//
var script = document.createElement("script");
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full";
var config = 'MathJax.Hub.Startup.onload()';
if (window.opera) {script.innerHTML = config} else {script.text = config}
document.getElementsByTagName("head")[0].appendChild(script);
}
}

View File

@ -139,8 +139,8 @@ div.body h6 {
background-color: #f2f2f2;
font-weight: normal;
color: #20435c;
border-top: 1px solid #cccccc;
border-bottom: 2px solid #cccccc;
border-top: 2px solid #cccccc;
border-bottom: 1px solid #cccccc;
margin: 30px -20px 20px -20px;
padding: 3px 0 3px 10px;
}

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="The MathJax API" href="index.html" />
<link rel="next" title="The MathJax.Message Object" href="message.html" />
@ -80,7 +80,7 @@ documentation for details on how to do this properly.</p>
<tt class="descname">timeout</tt></dt>
<dd><p>Number of milliseconds to wait for a file to load before
it is considered to have failed to load.</p>
<p><em>Default:</em> 20 seconds</p>
<p><em>Default:</em> 15 seconds</p>
</dd></dl>
<dl class="describe">
@ -114,6 +114,14 @@ callbacks that are to be run when they load or timeout, and
additional internal data.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">loadHooks</tt></dt>
<dd><p>An object containing the load hooks for the various files, set up by
the <a class="reference internal" href="#loadHook" title="loadHook"><tt class="xref py py-meth docutils literal"><span class="pre">loadHook()</span></tt></a> method, or by the
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Register.LoadHook()</span></tt> method.</p>
</dd></dl>
</div>
<div class="section" id="methods">
<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline"></a></h2>
@ -183,9 +191,9 @@ already has been loaded, or where it is to be found.</p>
file has been completely loaded and initialized. The <cite>file</cite>
parameter is the name of the file that has been loaded. This
routine will cause any callback functions registered for the file
or included in the :meth:<tt class="docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> calls to be
or included in the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> calls to be
executed, passing them the status or the load
(<cite>MathJax.Ajax.STATUS.OK`</cite> or <tt class="docutils literal"><span class="pre">MathJax.Ajax.STATUS.ERROR</span></tt>) as
(<tt class="docutils literal"><span class="pre">MathJax.Ajax.STATUS.OK</span></tt> or <tt class="docutils literal"><span class="pre">MathJax.Ajax.STATUS.ERROR</span></tt>) as
their last parameter.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -272,6 +280,30 @@ that may be loaded in the future.</p>
</table>
</dd></dl>
<dl class="method">
<dt id="Preloading">
<tt class="descname">Preloading</tt><big>(</big><em>file1</em><span class="optional">[</span>, <em>file2...</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Preloading" title="Permalink to this definition"></a></dt>
<dd><p>Used withing combined configuration files to indicate what files are
in the configuration file. Marks the files are loading (since there
will never be an explicit <a class="reference internal" href="#Load" title="Load"><tt class="xref py py-meth docutils literal"><span class="pre">Load()</span></tt></a> or <a class="reference internal" href="#Require" title="Require"><tt class="xref py py-meth docutils literal"><span class="pre">Require()</span></tt></a> call for
then), so that load-hooks and other load-related events can be
properly processed.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple">
<li><strong>file1, file2, ...</strong> &#8212; the names of the files in the combined file</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="Styles">
<tt class="descname">Styles</tt><big>(</big><em>styles</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Styles" title="Permalink to this definition"></a></dt>
@ -362,11 +394,6 @@ actual root URL location).</p>
<h4>Next topic</h4>
<p class="topless"><a href="message.html"
title="next chapter">The MathJax.Message Object</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/ajax.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="The MathJax API" href="index.html" />
<link rel="next" title="The MathJax.Callback.Queue Class" href="queue.html" />
@ -391,11 +391,6 @@ and returns the signal object. See
<h4>Next topic</h4>
<p class="topless"><a href="queue.html"
title="next chapter">The MathJax.Callback.Queue Class</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/callback.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="The MathJax API" href="index.html" />
<link rel="next" title="The Base Jax Class" href="jax.html" />
@ -69,7 +69,7 @@ that class.</p>
<h2>Class Properties<a class="headerlink" href="#class-properties" title="Permalink to this headline"></a></h2>
<dl class="describe">
<dt>
<tt class="descname">name</tt></dt>
<tt class="descname">id</tt></dt>
<dd><p>The name of the jax.</p>
</dd></dl>
@ -91,13 +91,15 @@ that class.</p>
<dl class="describe">
<dt>
<tt class="descname">inputJax</tt></dt>
<dd><p>A reference to the input jax that created the element.</p>
<dd><p>A reference to the input jax that created the element. (In the
future, this will be changed to the name of the input jax.)</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">outputJax</tt></dt>
<dd><p>A reference to the output jax that has processed this element.</p>
<dd><p>A reference to the output jax that has processed this element. (In
the future, this will be changed to the name of the output jax.)</p>
</dd></dl>
<dl class="describe">
@ -116,7 +118,8 @@ collection, thus causing a memory leak.</p>
<dt>
<tt class="descname">originalText</tt></dt>
<dd><p>A string indicating the original input text that was processed for
this element.</p>
this element. (In the future, this may be managed by the input jax
rather than <tt class="docutils literal"><span class="pre">MathJax.Hub</span></tt>.)</p>
</dd></dl>
<dl class="describe">
@ -239,11 +242,6 @@ contextual menu.</p>
<h4>Next topic</h4>
<p class="topless"><a href="jax.html"
title="next chapter">The Base Jax Class</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/elementjax.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="The MathJax API" href="index.html" />
<link rel="next" title="The MathJax.Callback Class" href="callback.html" />
@ -176,6 +176,29 @@ provided. It is equivalent to</p>
</table>
</dd></dl>
<dl class="method">
<dt id="setText">
<tt class="descname">setText</tt><big>(</big><em>script</em>, <em>text</em><big>)</big><a class="headerlink" href="#setText" title="Permalink to this definition"></a></dt>
<dd><p>Sets the contents of the <tt class="docutils literal"><span class="pre">script</span></tt> element to be the given
<tt class="docutils literal"><span class="pre">text</span></tt>, properly taking into account the browser limitations and
bugs.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple">
<li><strong>script</strong> &#8212; the script whose content is to be set</li>
<li><strong>text</strong> &#8212; the text that is to be the script&#8217;s new content</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">Cookie.Set(name,data)</tt></dt>
@ -185,7 +208,7 @@ the <cite>data</cite> object as the data for the cookie. For example,</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">HTML</span><span class="p">.</span><span class="nx">Cookie</span><span class="p">.</span><span class="nx">Set</span><span class="p">(</span><span class="s2">&quot;test&quot;</span><span class="p">,{</span><span class="nx">x</span><span class="o">:</span><span class="mi">42</span><span class="p">,</span> <span class="nx">y</span><span class="o">:</span><span class="s2">&quot;It Works!&quot;</span><span class="p">});</span>
</pre></div>
</div>
<p>will create a cookie named &#8220;mjx:test&#8221; that stores the values of
<p>will create a cookie named &#8220;mjx.test&#8221; that stores the values of
<tt class="docutils literal"><span class="pre">x</span></tt> and <tt class="docutils literal"><span class="pre">y</span></tt> provided in the <cite>data</cite> object. This data can be
retrieved using the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.HTML.Cookie.Get()</span></tt> method
discussed below.</p>
@ -248,11 +271,6 @@ above,</p>
<h4>Next topic</h4>
<p class="topless"><a href="callback.html"
title="next chapter">The MathJax.Callback Class</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/html.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="The MathJax API" href="index.html" />
<link rel="next" title="The MathJax.Ajax Object" href="ajax.html" />
@ -77,7 +77,7 @@ Options</em></a> reference page.</p>
<dl class="describe">
<dt>
<tt class="descname">processUpdateTime: 500</tt></dt>
<tt class="descname">processUpdateTime: 250</tt></dt>
<dd><p>The minimum time (in milliseconds) between updates of the
&#8220;Processing Math&#8221; message.</p>
</dd></dl>
@ -89,6 +89,13 @@ Options</em></a> reference page.</p>
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Register.MessageHook()</span></tt> method).</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">queue</tt></dt>
<dd><p>MathJax&#8217;s main processing queue. Use <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Queue()</span></tt> to push
callbacks onto this queue.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">Browser</tt></dt>
@ -162,7 +169,7 @@ need to do special processing. For example:</p>
<tt class="descname">Config</tt><big>(</big><em>options</em><big>)</big><a class="headerlink" href="#Config" title="Permalink to this definition"></a></dt>
<dd><p>Sets the configuration options (stored in <tt class="docutils literal"><span class="pre">MathJax.Hub.config</span></tt>)
to the values stored in the <cite>options</cite> object. See
<a class="reference internal" href="../configuration.html#configuration"><em>Configuring MathJax</em></a> for details on how this
<a class="reference internal" href="../options/index.html#configuration"><em>Configuring MathJax</em></a> for details on how this
is used and the options that you can set.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -180,6 +187,22 @@ is used and the options that you can set.</p>
</table>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">Configured()</tt></dt>
<dd><p>When <tt class="docutils literal"><span class="pre">delayStartupUntil</span></tt> is specified in the configuration file or
in the script that loads <tt class="docutils literal"><span class="pre">MathJax.js</span></tt>, MathJax&#8217;s startup sequence is
delayed until this routine is called. See <a class="reference internal" href="../options/index.html#configuration"><em>Configuring MathJax</em></a> for details on how this is used.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><tt class="docutils literal"><span class="pre">null</span></tt></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">Register.PreProcessor(callback)</tt></dt>
@ -630,11 +653,6 @@ error on the page.</p>
<h4>Next topic</h4>
<p class="topless"><a href="ajax.html"
title="next chapter">The MathJax.Ajax Object</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/hub.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="next" title="The MathJax variable" href="variable.html" />
<link rel="prev" title="Modifying Math on the Page" href="../typeset.html" />
@ -101,11 +101,6 @@ on the main MathJax documentation page.</p>
<h4>Next topic</h4>
<p class="topless"><a href="variable.html"
title="next chapter">The MathJax variable</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/index.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="The MathJax API" href="index.html" />
<link rel="next" title="The MathJax.OutputJax Class" href="outputjax.html" />
@ -79,7 +79,7 @@ that class.</p>
<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline"></a></h2>
<dl class="describe">
<dt>
<tt class="descname">name</tt></dt>
<tt class="descname">id</tt></dt>
<dd><p>The name of the jax.</p>
</dd></dl>
@ -95,21 +95,25 @@ that class.</p>
<dd><p>The directory where the jax files are stored (e.g., <tt class="docutils literal"><span class="pre">&quot;[MathJax]/jax/input/TeX&quot;</span></tt>);</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">elementJax</tt></dt>
<dd><p>The name of the ElementJax class that this input jax will produce
(typically <tt class="docutils literal"><span class="pre">mml</span></tt>, as that is the only ElementJax at the moment).</p>
</dd></dl>
</div>
<div class="section" id="methods">
<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline"></a></h2>
<dl class="method">
<dt>
<tt class="descname">Translate</tt><big>(</big><em>script</em><big>)</big></dt>
<dd><p>This is the main routine called by MathJax when a <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> of
the appropriate type is found. The default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a>
method simply loads the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file and returns that callback
for that load function so that MathJax will know when to try
the <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> action again. When the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file
loads, it should override the default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> with its
own version that does the actual translation; that way, when the
second Translate call is made, it will be to the actual
translation routine rather than the default loader.</p>
<dd><p>This is the main routine called by MathJax when a <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> of the
appropriate type is found. The default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method
throws an error indicating that <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> hasn&#8217;t been
redefined, so when the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file loads, it should override the
default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> with its own version that does the actual
translation.</p>
<p>The translation process should include the creation of an
<a class="reference internal" href="elementjax.html#api-element-jax"><em>Element Jax</em></a> that stores the data needed
for this element.</p>
@ -177,11 +181,6 @@ of the various types from one another.</p>
<h4>Next topic</h4>
<p class="topless"><a href="outputjax.html"
title="next chapter">The MathJax.OutputJax Class</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/inputjax.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="The MathJax API" href="index.html" />
<link rel="next" title="The MathJax Object-Oriented Programming Model" href="object.html" />
@ -60,7 +60,7 @@ other jax classes.</p>
<p>Unlike most MathJax.Object classes, calling the class object creates a
<em>subclass</em> of the class, rather than an instance of the class. E.g.,</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">InputJax</span><span class="p">.</span><span class="nx">MyInputJax</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">InputJax</span><span class="p">({</span>
<span class="nx">name</span><span class="o">:</span> <span class="s2">&quot;MyInputJax&quot;</span><span class="p">,</span>
<span class="nx">id</span><span class="o">:</span> <span class="s2">&quot;MyInputJax&quot;</span><span class="p">,</span>
<span class="nx">version</span><span class="o">:</span> <span class="s2">&quot;1.0&quot;</span><span class="p">,</span>
<span class="p">...</span>
<span class="p">});</span>
@ -88,7 +88,7 @@ other jax classes.</p>
<h2>Instance Properties<a class="headerlink" href="#instance-properties" title="Permalink to this headline"></a></h2>
<dl class="describe">
<dt>
<tt class="descname">name</tt></dt>
<tt class="descname">id</tt></dt>
<dd><p>The name of the jax.</p>
</dd></dl>
@ -123,16 +123,16 @@ configuration subsection for the specific jax in question.</p>
<div class="section" id="methods">
<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline"></a></h2>
<dl class="method">
<dt id="Translate">
<tt class="descname">Translate</tt><big>(</big><em>script</em><big>)</big><a class="headerlink" href="#Translate" title="Permalink to this definition"></a></dt>
<dd><p>This is the method that the <tt class="docutils literal"><span class="pre">MathJax.Hub</span></tt> calls when it needs
the input or output jax to process the given math <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt>
call. Its default action is to start loading the jax&#8217;s <tt class="docutils literal"><span class="pre">jax.js</span></tt>
file, and redefine the <a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method to be the
<a class="reference internal" href="#noTranslate" title="noTranslate"><tt class="xref py py-meth docutils literal"><span class="pre">noTranslate()</span></tt></a> method below. The <tt class="docutils literal"><span class="pre">jax.js</span></tt> file should
redefine the <a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method to perform the translation
operation for the specific jax. For an input jax, it should
return the <cite>ElementJax</cite> object that it created.</p>
<dt>
<tt class="descname">Process</tt><big>(</big><em>script</em><big>)</big></dt>
<dd><p>This is the method that the <tt class="docutils literal"><span class="pre">MathJax.Hub</span></tt> calls when it needs the
input or output jax to process the given math <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt>. Its
default action is to start loading the jax&#8217;s <tt class="docutils literal"><span class="pre">jax.js</span></tt> file, and
redefine itself to simplu return the callback for the laod operation
(so that further calls to it will cause the processing to wait for the
callback). Once the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file has loaded, this method is
replaced by the jax&#8217;s <a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method, so that subsequent calls
to <a class="reference internal" href="hub.html#Process" title="Process"><tt class="xref py py-meth docutils literal"><span class="pre">Process()</span></tt></a> will perform the appropriate translation.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
@ -155,14 +155,19 @@ return the <cite>ElementJax</cite> object that it created.</p>
</dd></dl>
<dl class="method">
<dt id="noTranslate">
<tt class="descname">noTranslate</tt><big>(</big><em>script</em><big>)</big><a class="headerlink" href="#noTranslate" title="Permalink to this definition"></a></dt>
<dd><p>This is a temporary routine that is used while the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file
is loading. It throws an error indicating the the
<a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method hasn&#8217;t been redefined. That way, if
the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file failes to load for some reason, you will
receive an error trying to process mathematics with this input
jax.</p>
<dt id="Translate">
<tt class="descname">Translate</tt><big>(</big><em>script</em><big>)</big><a class="headerlink" href="#Translate" title="Permalink to this definition"></a></dt>
<dd><p>This is a stub for a routine that should be defined by the jax&#8217;s
<tt class="docutils literal"><span class="pre">jax.js</span></tt> file when it is loaded. It should perform the translation
action for the specific jax. For an input jax, it should return the
<cite>ElementJax</cite> object that it created. The <a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> mehtod is
never called directly by MathJax; during the <a class="reference internal" href="ajax.html#loadComplete" title="loadComplete"><tt class="xref py py-meth docutils literal"><span class="pre">loadComplete()</span></tt></a>
call, this funciton is copied to the <a class="reference internal" href="hub.html#Process" title="Process"><tt class="xref py py-meth docutils literal"><span class="pre">Process()</span></tt></a> method, and is
called via that name. The default <a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> method throws an
error indicating that the <a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> meth was not been
redefined. That way, if the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file fails to load for some
reason, you will receive an error trying to process mathematics with
this jax.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
@ -177,7 +182,7 @@ jax.</p>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><tt class="docutils literal"><span class="pre">null</span></tt></p>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">an <cite>ElementJax</cite> object, or <tt class="docutils literal"><span class="pre">null</span></tt></p>
</td>
</tr>
</tbody>
@ -239,8 +244,8 @@ following:</p>
<li>Post the &#8220;[name] Jax Config&#8221; message to the startup signal.</li>
<li>Perform the jax&#8217;s <a class="reference internal" href="hub.html#Config" title="Config"><tt class="xref py py-meth docutils literal"><span class="pre">Config()</span></tt></a> method.</li>
<li>Post the &#8220;[name] Jax Require&#8221; message to the startup signal.</li>
<li>Load the files from the jax&#8217;s <tt class="docutils literal"><span class="pre">require</span></tt> array (which may
have been modified during the configuration process).</li>
<li>Load the files from the jax&#8217;s <tt class="docutils literal"><span class="pre">require</span></tt> and
<tt class="docutils literal"><span class="pre">config.extensions</span></tt> arrays.</li>
<li>Post the &#8220;[name] Jax Startup&#8221; message to the startup signal.</li>
<li>Perform the jax&#8217;s <a class="reference internal" href="#Startup" title="Startup"><tt class="xref py py-meth docutils literal"><span class="pre">Startup()</span></tt></a> method.</li>
<li>Post the &#8220;[name] Jax Ready&#8221; message to the startup signal.</li>
@ -248,6 +253,10 @@ have been modified during the configuration process).</li>
<tt class="docutils literal"><span class="pre">jax.js</span></tt> file.</li>
</ol>
</div></blockquote>
<p>Note that the configuration process (the <a class="reference internal" href="hub.html#Config" title="Config"><tt class="xref py py-meth docutils literal"><span class="pre">Config()</span></tt></a> call) can
modify the <tt class="docutils literal"><span class="pre">require</span></tt> or <tt class="docutils literal"><span class="pre">config.extensions</span></tt> arrays to add more
files that need to be loaded, and that the <a class="reference internal" href="#Startup" title="Startup"><tt class="xref py py-meth docutils literal"><span class="pre">Startup()</span></tt></a> method
isn&#8217;t called until those files are completely loaded.</p>
</dd></dl>
</div>
@ -275,11 +284,6 @@ have been modified during the configuration process).</li>
<h4>Next topic</h4>
<p class="topless"><a href="object.html"
title="next chapter">The MathJax Object-Oriented Programming Model</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/jax.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="The MathJax API" href="index.html" />
<link rel="next" title="The MathJax.HTML Object" href="html.html" />
@ -113,7 +113,7 @@ removed automatically; you must call the
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the message id nuber for this message.</p>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the message id number for this message.</p>
</td>
</tr>
</tbody>
@ -142,6 +142,69 @@ removed automatically; you must call the
</table>
</dd></dl>
<dl class="method">
<dt id="Remove">
<tt class="descname">Remove</tt><big>(</big><big>)</big><a class="headerlink" href="#Remove" title="Permalink to this definition"></a></dt>
<dd><p>This removes the message frame from the window (it will reappear when
future messages are set, however).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><tt class="docutils literal"><span class="pre">null</span></tt></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="File">
<tt class="descname">File</tt><big>(</big><em>file</em><big>)</big><a class="headerlink" href="#File" title="Permalink to this definition"></a></dt>
<dd><p>This sets the message area to a &#8220;Loading <em>file</em>&#8221; message, where <em>file</em>
is the name of the file (with <tt class="docutils literal"><span class="pre">[MathJax]</span></tt> representing the root
directory).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple">
<li><strong>file</strong> &#8212; the name of the file being loaded.</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the message id number for the message created.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="filterText">
<tt class="descname">filterText</tt><big>(</big><em>text</em>, <em>n</em><big>)</big><a class="headerlink" href="#filterText" title="Permalink to this definition"></a></dt>
<dd><p>This method is called on each message before it is displayed. It can
be used to modify (e.g., shorten) the various messages before they are
displayed. The default action is to check of the <tt class="docutils literal"><span class="pre">messageStyle</span></tt>
configuration parameter is <tt class="docutils literal"><span class="pre">simple</span></tt>, and if so, convert loading and
processing messages to a simpler form. This method can be overridden
to perform other sanitization of the message strings.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple">
<li><strong>text</strong> &#8212; the text of the message to be posted</li>
<li><strong>n</strong> &#8212; the id number of the message to be posted</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the modified message text</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="Log">
<tt class="descname">Log</tt><big>(</big><big>)</big><a class="headerlink" href="#Log" title="Permalink to this definition"></a></dt>
@ -180,11 +243,6 @@ newlines. This is used in debugging MathJax operations.</p>
<h4>Next topic</h4>
<p class="topless"><a href="html.html"
title="next chapter">The MathJax.HTML Object</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/message.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,10 +21,10 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="The MathJax API" href="index.html" />
<link rel="next" title="Converting to MathJax from jsMath" href="../jsMath.html" />
<link rel="next" title="Describing HTML snippets" href="../HTML-snippets.html" />
<link rel="prev" title="The Base Jax Class" href="jax.html" />
</head>
<body>
@ -36,7 +36,7 @@
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../jsMath.html" title="Converting to MathJax from jsMath"
<a href="../HTML-snippets.html" title="Describing HTML snippets"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="jax.html" title="The Base Jax Class"
@ -310,13 +310,8 @@ wrapping the <cite>def</cite> for the <a class="reference internal" href="#Subcl
<p class="topless"><a href="jax.html"
title="previous chapter">The Base Jax Class</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="../jsMath.html"
title="next chapter">Converting to MathJax from jsMath</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/object.txt"
rel="nofollow">Show Source</a></li>
</ul>
<p class="topless"><a href="../HTML-snippets.html"
title="next chapter">Describing HTML snippets</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -341,7 +336,7 @@ wrapping the <cite>def</cite> for the <a class="reference internal" href="#Subcl
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../jsMath.html" title="Converting to MathJax from jsMath"
<a href="../HTML-snippets.html" title="Describing HTML snippets"
>next</a> |</li>
<li class="right" >
<a href="jax.html" title="The Base Jax Class"

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="The MathJax API" href="index.html" />
<link rel="next" title="The MathJax.ElementJax Class" href="elementjax.html" />
@ -80,7 +80,7 @@ that class.</p>
<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline"></a></h2>
<dl class="describe">
<dt>
<tt class="descname">name</tt></dt>
<tt class="descname">id</tt></dt>
<dd><p>The name of the jax.</p>
</dd></dl>
@ -104,15 +104,12 @@ that class.</p>
<tt class="descname">Translate</tt><big>(</big><em>script</em><big>)</big></dt>
<dd><p>This is the main routine called by MathJax when an element jax is
to be converted to output. The default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a>
method simply loads the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file and returns that callback
for that load function so that MathJax will know when to try
the <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> action again. When the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file
loads, it should override the default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> with its
own version that does the actual translation; that way, when the
second Translate call is made, it will be to the actual
translation routine rather than the default loader.</p>
method throws an error indicating that <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> hasn&#8217;t been
redefined, so when the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file loads, it should override the
default <a class="reference internal" href="jax.html#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> with its own version that does the actual
translation.</p>
<p>You should use <tt class="docutils literal"><span class="pre">MathJax.Hub.getJaxFor(script)</span></tt> to obtain the
element jax for the given script. The translation process may add
element jax for the given script. The translation process may
modify the element jax (e.g., if it has data that needs to be
stored with the jax), and may insert DOM elements into the
document near the jax&#8217;s <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tag.</p>
@ -202,11 +199,6 @@ tag associated with the element jax.</p>
<h4>Next topic</h4>
<p class="topless"><a href="elementjax.html"
title="next chapter">The MathJax.ElementJax Class</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/outputjax.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="The MathJax API" href="index.html" />
<link rel="next" title="The MathJax.Callback.Signal Class" href="signal.html" />
@ -203,11 +203,6 @@ it has been waiting for a command to complete.</p>
<h4>Next topic</h4>
<p class="topless"><a href="signal.html"
title="next chapter">The MathJax.Callback.Signal Class</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/queue.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="The MathJax API" href="index.html" />
<link rel="next" title="The MathJax.InputJax Class" href="inputjax.html" />
@ -290,11 +290,6 @@ message is posted to the signal.</p>
<h4>Next topic</h4>
<p class="topless"><a href="inputjax.html"
title="next chapter">The MathJax.InputJax Class</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/signal.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="The MathJax API" href="index.html" />
<link rel="next" title="The MathJax.Hub Object" href="hub.html" />
@ -176,11 +176,6 @@ perform typesetting actions (and is <tt class="docutils literal"><span class="pr
<h4>Next topic</h4>
<p class="topless"><a href="hub.html"
title="next chapter">The MathJax.Hub Object</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/variable.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" />
<link rel="next" title="Using Queues" href="queues.html" />
@ -261,11 +261,6 @@ schedules it to be called in half a second.</p>
<h4>Next topic</h4>
<p class="topless"><a href="queues.html"
title="next chapter">Using Queues</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/callbacks.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -21,9 +21,9 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="The MathJax Processing Model" href="model.html" />
<link rel="next" title="Whats New in MathJax v1.1" href="whats-new.html" />
<link rel="prev" title="MathJax Output Formats" href="output.html" />
</head>
<body>
@ -35,7 +35,7 @@
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="model.html" title="The MathJax Processing Model"
<a href="whats-new.html" title="Whats New in MathJax v1.1"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="output.html" title="MathJax Output Formats"
@ -76,11 +76,11 @@ our groups.</p>
</div>
<div class="section" id="issue-tracking">
<span id="community-tracker"></span><h2>Issue tracking<a class="headerlink" href="#issue-tracking" title="Permalink to this headline"></a></h2>
<p>Found a bug or want to suggest an improvement? Post it to our <a class="reference external" href="http://github.com/mathjax/mathjax/issues">issue tracker</a>. We monitor the tracker closely,
<p>Found a bug or want to suggest an improvement? Post it to our <a class="reference external" href="http://github.com/mathjax/MathJax/issues">issue tracker</a>. We monitor the tracker closely,
and work hard to respond to problems quickly.</p>
<p>Before you create a new issue, however, please search the issues to see if it
has already been reported. You could also be using an outdated version of
MathJax, so be sure to <a class="reference internal" href="installation.html#getting-mathjax-svn"><em>upgrade your copy</em></a> to verify
MathJax, so be sure to <a class="reference internal" href="installation.html#getting-mathjax-git"><em>upgrade your copy</em></a> to verify
that the problem persists in the lastest version.</p>
</div>
<div class="section" id="powered-by-mathjax">
@ -110,13 +110,8 @@ our <a class="reference external" href="http://www.mathjax.org/community/mathjax
<p class="topless"><a href="output.html"
title="previous chapter">MathJax Output Formats</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="model.html"
title="next chapter">The MathJax Processing Model</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/community.txt"
rel="nofollow">Show Source</a></li>
</ul>
<p class="topless"><a href="whats-new.html"
title="next chapter">What&#8217;s New in MathJax v1.1</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
@ -141,7 +136,7 @@ our <a class="reference external" href="http://www.mathjax.org/community/mathjax
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="model.html" title="The MathJax Processing Model"
<a href="whats-new.html" title="Whats New in MathJax v1.1"
>next</a> |</li>
<li class="right" >
<a href="output.html" title="MathJax Output Formats"

276
docs/html/config-files.html Normal file
View File

@ -0,0 +1,276 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Common Configurations &mdash; MathJax v1.1 documentation</title>
<link rel="stylesheet" href="_static/mj.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '1.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="Configuration Objects" href="options/index.html" />
<link rel="prev" title="Loading and Configuring MathJax" href="configuration.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="options/index.html" title="Configuration Objects"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="configuration.html" title="Loading and Configuring MathJax"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="common-configurations">
<span id="id1"></span><h1>Common Configurations<a class="headerlink" href="#common-configurations" title="Permalink to this headline"></a></h1>
<p>MathJax comes with a number of pre-defined configuration files in the
<tt class="docutils literal"><span class="pre">MathJax/config</span></tt> directory. The <tt class="docutils literal"><span class="pre">default.js</span></tt> 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</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;path-to-MathJax/MathJax.js?config=default&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is the URL to the MathJax directory on your
server or hard disk.</p>
<p>The remaining files are combined configuration files that include not just
configuration parameters but also the files that MathJax would need to
load for those configurations. This means MathJax will have to load fewer
files, and since each file access requires establishing connections over
the network, it can be better to load one larger file than several smaller
ones. See <a class="reference internal" href="configuration.html#loading"><em>Loading and Configuring MathJax</em></a> for more
details about how to load configurations, and how to modify the parameters
for a configuration file.</p>
<p>The following sections describe the contents of the combined configuration
files. Each comes in two flavors: a standard version and a &#8220;full&#8221; version.
The standard version simply defines the output processor(s) that are part
of the configuration, but doesn&#8217;t load the code that implements the output
processor; the full version loads the complete output processors, so
everything that MathJax needs for the page should be loaded up front, and
there will be no delay once the page is ready to be processed. To obtain
the &#8220;full&#8221; version, add <tt class="docutils literal"><span class="pre">-full</span></tt> to the end of the configuration file
name.</p>
<div class="section" id="the-tex-ams-mml-htmlormml-configuration-file">
<h2>The <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt> configuration file<a class="headerlink" href="#the-tex-ams-mml-htmlormml-configuration-file" title="Permalink to this headline"></a></h2>
<p>This configuration file is the most general of the pre-defined
configurations. It loads all the important MathJax components, including
the TeX and MathML preprocessors and input processors, the AMSmath,
AMSsymbols, noErrors, and noUndefined TeX extensions, both the native
MathML and HTML-with-CSS output processor definitions, and the MathMenu and
MathZoom extensions. It is equivalent to the following configuration:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;MMLorHTML.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;input/MathML&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">,</span><span class="s2">&quot;output/NativeMML&quot;</span><span class="p">],</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">,</span><span class="s2">&quot;mml2jax.js&quot;</span><span class="p">,</span><span class="s2">&quot;MathMenu.js&quot;</span><span class="p">,</span><span class="s2">&quot;MathZoom.js&quot;</span><span class="p">],</span>
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;AMSmath.js&quot;</span><span class="p">,</span><span class="s2">&quot;AMSsymbols.js&quot;</span><span class="p">,</span><span class="s2">&quot;noErrors.js&quot;</span><span class="p">,</span><span class="s2">&quot;noUndefined.js&quot;</span><span class="p">]</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>In addition, it loads the mml Element Jax, the TeX and MathML input jax
main code (not just the definition files), as well as the <cite>toMathML</cite>
extension, which is used by the Show Source option in the MathJax
contextual menu. The full version also loads both the HTML-CSS and
NativeMML output jax main code, plus the HTML-CSS <cite>mtable</cite> extension, which
is normally loaded on demand.</p>
<p>See the <a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration</em></a> section for
other configuration options for the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor, and the
<a class="reference internal" href="options/TeX.html#configure-tex"><em>TeX input jax configuration</em></a> section for options
that control the TeX input processor.
See the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration</em></a> section for
other configuration options for the <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessor, and the
<a class="reference internal" href="options/MathML.html#configure-mathml"><em>MathML input jax configuration</em></a> section for
options that control the MathML input processor.
See <a class="reference internal" href="output.html#output-formats"><em>MathJax Output Formats</em></a> for more
information on the NativeMML and HTML-CSS output processors. See the
<a class="reference internal" href="options/MMLorHTML.html#configure-mmlorhtml"><em>MMLorHTML configuration</em></a> section for
details on the options that control the <tt class="docutils literal"><span class="pre">MMLorHTML</span></tt> configuration.</p>
</div>
<div class="section" id="the-tex-ams-html-configuration-file">
<h2>The <tt class="docutils literal"><span class="pre">TeX-AMS_HTML</span></tt> configuration file<a class="headerlink" href="#the-tex-ams-html-configuration-file" title="Permalink to this headline"></a></h2>
<p>This configuration file is for sites that only use TeX format for their
mathematics, and that want the output to be as close to TeX output as
possible. This uses the HTML-CSS output jax (even when the user&#8217;s browser
understands MathML). The user can still use the MathJax contextual menu
to select the NativeMML output jax if they desire.</p>
<p>This file includes all the important MathJax components for TeX input and
output, including the <cite>tex2jax</cite> preprocessor and TeX input jax, the
AMSmath, AMSsymbols, noErrors, and noUndefined TeX extensions, the
HTML-with-CSS output processor definition, and the MathMenu and MathZoom
extensions. It is equivalent to the following configuration:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">],</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">,</span><span class="s2">&quot;MathMenu.js&quot;</span><span class="p">,</span><span class="s2">&quot;MathZoom.js&quot;</span><span class="p">],</span>
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;AMSmath.js&quot;</span><span class="p">,</span><span class="s2">&quot;AMSsymbols.js&quot;</span><span class="p">,</span><span class="s2">&quot;noErrors.js&quot;</span><span class="p">,</span><span class="s2">&quot;noUndefined.js&quot;</span><span class="p">]</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>In addition, it loads the mml Element Jax and the TeX input jax main code
(not just the definition file), as well as the <cite>toMathML</cite> extension, which
is used by the Show Source option in the MathJax contextual menu. The full
version also loads the HTML-CSS output jax main code, plus the HTML-CSS
<cite>mtable</cite> extension, which is normally loaded on demand.</p>
<p>See the <a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration</em></a> section for
other configuration options for the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor, and the
<a class="reference internal" href="options/TeX.html#configure-tex"><em>TeX input jax configuration</em></a> section for options
that control the TeX input processor.
See <a class="reference internal" href="output.html#output-formats"><em>MathJax Output Formats</em></a> for more
information on the HTML-CSS output processor.</p>
</div>
<div class="section" id="the-mml-htmlormml-configuration-file">
<h2>The <tt class="docutils literal"><span class="pre">MML_HTMLorMML</span></tt> configuration file<a class="headerlink" href="#the-mml-htmlormml-configuration-file" title="Permalink to this headline"></a></h2>
<p>This configuration file is for sites that only use MathML format for their
mathematics. It will use MathML output in browsers where that is
supported, and HTML-CSS output otherwise. The user can still use the
MathJax contextual menu to select the other output format if they desire.</p>
<p>This file includes all the important MathJax components for MathML input
and output, including the <cite>mml2jax</cite> preprocessor and MathML input jax, the
NativeMML and HTML-CSS output processor definition files, and the MathMenu
and MathZoom extensions. It is equivalent to the following configuration:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;MMLorHTML.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/MathML&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">,</span><span class="s2">&quot;output/NativeMML&quot;</span><span class="p">],</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;mml2jax.js&quot;</span><span class="p">,</span><span class="s2">&quot;MathMenu.js&quot;</span><span class="p">,</span><span class="s2">&quot;MathZoom.js&quot;</span><span class="p">]</span>
<span class="p">});</span>
</pre></div>
</div>
<p>In addition, it loads the mml Element Jax and the MathML input jax main
code (not just the definition file), as well as the <cite>toMathML</cite> extension,
which is used by the Show Source option in the MathJax contextual menu.
The full version also loads both the HTML-CSS and NativeMML output jax main
code files, plus the HTML-CSS <cite>mtable</cite> extension, which is normally loaded
on demand.</p>
<p>See the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration</em></a> section for
other configuration options for the <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessor, and the
<a class="reference internal" href="options/MathML.html#configure-mathml"><em>MathML input jax configuration</em></a> section for
options that control the MathML input processor.
See <a class="reference internal" href="output.html#output-formats"><em>MathJax Output Formats</em></a> for more
information on the NativeMML and HTML-CSS output processors. See the
<a class="reference internal" href="options/MMLorHTML.html#configure-mmlorhtml"><em>MMLorHTML configuration</em></a> section for
details on the options that control the <tt class="docutils literal"><span class="pre">MMLorHTML</span></tt> configuration.</p>
</div>
<div class="section" id="the-accessible-configuration-file">
<h2>The <tt class="docutils literal"><span class="pre">Accessible</span></tt> configuration file<a class="headerlink" href="#the-accessible-configuration-file" title="Permalink to this headline"></a></h2>
<p>This configuration file is essentially the same as
<tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt> except that it includes configuration that is
designed for assitive technology, particularly for those with visual
challenges. It is equivalent to the following configuration:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;MMLorHTML.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;input/MathML&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">,</span><span class="s2">&quot;output/NativeMML&quot;</span><span class="p">],</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">,</span><span class="s2">&quot;mml2jax.js&quot;</span><span class="p">,</span><span class="s2">&quot;MathMenu.js&quot;</span><span class="p">,</span><span class="s2">&quot;MathZoom.js&quot;</span><span class="p">],</span>
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;AMSmath.js&quot;</span><span class="p">,</span><span class="s2">&quot;AMSsymbols.js&quot;</span><span class="p">,</span><span class="s2">&quot;noErrors.js&quot;</span><span class="p">,</span><span class="s2">&quot;noUndefined.js&quot;</span><span class="p">]</span>
<span class="p">},</span>
<span class="nx">NativeMML</span><span class="o">:</span> <span class="p">{</span> <span class="nx">showMathMenuMSIE</span><span class="o">:</span> <span class="kc">false</span> <span class="p">},</span>
<span class="nx">menuSettings</span><span class="o">:</span> <span class="p">{</span> <span class="nx">zoom</span><span class="o">:</span> <span class="s2">&quot;Double-Click&quot;</span> <span class="p">},</span>
<span class="nx">errorSettings</span><span class="o">:</span> <span class="p">{</span> <span class="nx">message</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;[Math Error]&quot;</span><span class="p">]</span> <span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>This turns off the MathJax contextual Message for Internet Explorer, since
it can interfere with some screen readers. It also sets the zoom trigger
to double-click, so that readers can see a larger version of the
mathematics but double-clicking on any equation.</p>
<p>In addition, it loads the mml Element Jax, the TeX and MathML input jax
main code (not just the definition files), as well as the <cite>toMathML</cite>
extension, which is used by the Show Source option in the MathJax
contextual menu. The full version also loads both the HTML-CSS and
NativeMML output jax main code, plus the HTML-CSS <cite>mtable</cite> extension, which
is normally loaded on demand.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Common Configurations</a><ul>
<li><a class="reference internal" href="#the-tex-ams-mml-htmlormml-configuration-file">The <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt> configuration file</a></li>
<li><a class="reference internal" href="#the-tex-ams-html-configuration-file">The <tt class="docutils literal"><span class="pre">TeX-AMS_HTML</span></tt> configuration file</a></li>
<li><a class="reference internal" href="#the-mml-htmlormml-configuration-file">The <tt class="docutils literal"><span class="pre">MML_HTMLorMML</span></tt> configuration file</a></li>
<li><a class="reference internal" href="#the-accessible-configuration-file">The <tt class="docutils literal"><span class="pre">Accessible</span></tt> configuration file</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="configuration.html"
title="previous chapter">Loading and Configuring MathJax</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="options/index.html"
title="next chapter">Configuration Objects</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="options/index.html" title="Configuration Objects"
>next</a> |</li>
<li class="right" >
<a href="configuration.html" title="Loading and Configuring MathJax"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>

View File

@ -21,9 +21,9 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="The Core Configuration Options" href="options/hub.html" />
<link rel="next" title="Common Configurations" href="config-files.html" />
<link rel="prev" title="Installing and Testing MathJax" href="installation.html" />
</head>
<body>
@ -35,7 +35,7 @@
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="options/hub.html" title="The Core Configuration Options"
<a href="config-files.html" title="Common Configurations"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation.html" title="Installing and Testing MathJax"
@ -53,28 +53,48 @@
<span id="loading"></span><h1>Loading and Configuring MathJax<a class="headerlink" href="#loading-and-configuring-mathjax" title="Permalink to this headline"></a></h1>
<p>You load MathJax into a web page by including its main JavaScript file
into the page. That is done via a <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tag that links to the
<tt class="docutils literal"><span class="pre">MathJax.js</span></tt> file. Place the following line in the <tt class="docutils literal"><span class="pre">&lt;head&gt;</span></tt>
<tt class="docutils literal"><span class="pre">MathJax.js</span></tt> file. To do that, place the following line in the <tt class="docutils literal"><span class="pre">&lt;head&gt;</span></tt>
section of your document:</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;path-to-MathJax/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is replaced by the URL of the MathJax
directory on your server, or (if you are using MathJax locally rather
than through a server) the location of that directory on your hard
disk. For example, if the MathJax directory is at the top level of
your web server&#8217;s directory hierarchy, you might use</p>
<p>where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is replaced by the URL of the copy of MathJax
that you are loading. For example, if you are using the MathJax
distributed network service, the tag might be</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
<span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>If you have installed MathJax yourself, <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> will be the
location of MathJax on your server, or (if you are using MathJax locally
rather than through a server) the location of that directory on your hard
disk. For example, if the MathJax directory is at the top level of your
web server&#8217;s directory hierarchy, you might use</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>to load MathJax.</p>
<p>Although it is possible to load MathJax from a site other than your
own web server, there are issues involved in doing so that you need to
take into consideration. See the <a class="reference internal" href="installation.html#cross-domain-linking"><em>Notes About Shared Servers</em></a> for more details. Please do <strong>not</strong> link to
the copy of MathJax at <tt class="docutils literal"><span class="pre">www.mathjax.org</span></tt>, as we do not have the
resources to act as a web service for all the sites on the web that
would like to display mathematics. If you are able to run MathJax
from your own server, please do so (this will probably give you better
response time in any case).</p>
<p>If you install MathJax on a server in a domain that is different from the
one containing the page that will load MathJax, then there are issues
involved in doing so that you need to take into consideration. See the
<a class="reference internal" href="installation.html#cross-domain-linking"><em>Notes About Shared Servers</em></a> for more details.</p>
<p>When you load MathJax, it is common to include additional parameters for
MathJax as part of the URL. These control MathJax&#8217;s configuration, and are
discussed in the <a class="reference internal" href="options/index.html#configuration"><em>Configuration Objects</em></a> section. A
typical invocation of MathJax would be</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
<span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>which loads MathJax with a configuration file that includes everything you
need in order to enter mathematics in either TeX, LaTeX, or MathML
notation, and produces output using MathML if the browser supports that,
or HTML-with-CSS otherwise. If you <strong>don&#8217;t</strong> load an explicit
configuration file, you will need to include an in-line configuration
block in order to tell MathJax how to read and display the mathematics on
your pages. See the section below for details.</p>
<p>It is best to load MathJax in the document&#8217;s <tt class="docutils literal"><span class="pre">&lt;head&gt;</span></tt> block, but it
is also possible to load MathJax into the <tt class="docutils literal"><span class="pre">&lt;body&gt;</span></tt> section, if
needed. If you do this, load it as early as possible, as
@ -87,275 +107,300 @@ if you are loading MathJax in the <tt class="docutils literal"><span class="pre"
been prepared, for example, via a <a class="reference external" href="http://www.greasespot.net/">GreaseMonkey</a> script, or using a specially prepared
<a class="reference external" href="http://en.wikipedia.org/wiki/Bookmarklet">bookmarklet</a>. This is an
advanced topic, however; see <a class="reference internal" href="dynamic.html#ajax-mathjax"><em>Loading MathJax Dynamically</em></a> for more details.</p>
<div class="section" id="loading-mathjax-from-the-cdn">
<span id="loading-cdn"></span><h2>Loading MathJax from the CDN<a class="headerlink" href="#loading-mathjax-from-the-cdn" title="Permalink to this headline"></a></h2>
<p>MathJax is now available as a web service from <tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt>, so you
can obtain MathJax from there without needing to install it on your own
server. The CDN is part of a distributed &#8220;cloud&#8221; network, so it is
handled by servers around the world. That means that you should get acces
to a server geographically near you, for a fast, reliable connection.</p>
<p>The CDN hosts the most current version of MathJax, as well as older
versions, so you can either link to a version that stays up-to-date as
Mathjax is improved, or you can stay with one of the release versions so
that you pages always use the same version of MathJax.</p>
<p>The URL that you use to obtain MathJax determines the version that you
get. The CDN has the following directory structure:</p>
<div class="highlight-sh"><div class="highlight"><pre>mathjax/ <span class="c"># project-name</span>
1.0-latest/
1.1-beta/ <span class="c"># temporary</span>
1.1-latest/ <span class="c"># the 1.1 release with any ciritical patches</span>
...
latest/ <span class="c"># the most current version (1.1-latest in this case)</span>
</pre></div>
</div>
<p>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,
<tt class="docutils literal"><span class="pre">1.1-latest</span></tt> will initially point to v1.1, but over time may be updated
with patches that would correspond to releases that might be numbers 1.1a,
1.1b, etc., even if such releases are not actually prepared for
distribution (they likely won&#8217;t be).</p>
<p>We may occasionally introduce directories for betas, as indicated above,
but they will be temprorary, and will be removed after the official
release.</p>
<p>To load from a particular release, use the directory for that release.
For example,</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/1.1-latest/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>will load the stable v1.1 version, even if we release v1.2 or other later
versions, while</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>will always be the most current stable release, so it will go from v1.1 to
v1.2 autmatically 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.</p>
<p>The use of <tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt> is governed by its <a class="reference external" href="http://www.mathjax.org/download/mathjax-cdn-terms-of-service/">terms of service</a>, so be
sure to read that before linked to the MathJax CDN server.</p>
</div>
<div class="section" id="configuring-mathjax">
<h2>Configuring MathJax<a class="headerlink" href="#configuring-mathjax" title="Permalink to this headline"></a></h2>
<p>There are several ways to configure MathJax, but the easiest is to use
the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file that comes with MathJax. See the
comments in that file, or the <a class="reference internal" href="#configuration"><em>configuration details</em></a> section, for explanations of the meanings of the various
configuration options. You can edit the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file to
change any of the settings that you want to customize. When you
include MathJax in your page via</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;path-to-MathJax/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
<p>There are two ways to configure MathJax: via a configuration file, or by
including configuration commands wthin the web page itself. These can be
used independently, or in combination. For example, you can load a main
pre-defined configuration file, but include in-line commands to
adjust the configuration to your needs.</p>
<p>Note that you must use at least one of these two forms of configuration.
Unlike earlier versions of MathJax, version 1.1 does not load a default
configuration file. If you have been using version 1.0&#8217;s
<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> for your configuration, you will need to load that
configuration file explicitly via a <tt class="docutils literal"><span class="pre">config</span></tt> parameter, as described
below.</p>
</div>
<p>it will load <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> automatically as one of its
first actions.</p>
<p>Alternatively, you can configure MathJax efficiently by calling
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> when you include MathJax in your page, as
follows:</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;path-to-MathJax/MathJax.js&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span> <span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">],</span>
<span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">&#39;$&#39;</span><span class="p">,</span><span class="s1">&#39;$&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s2">&quot;\\(&quot;</span><span class="p">,</span><span class="s2">&quot;\\)&quot;</span><span class="p">]</span> <span class="p">],</span>
<span class="nx">displayMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">&#39;$$&#39;</span><span class="p">,</span><span class="s1">&#39;$$&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s2">&quot;\\[&quot;</span><span class="p">,</span><span class="s2">&quot;\\]&quot;</span><span class="p">]</span> <span class="p">],</span>
<span class="p">},</span>
<span class="s2">&quot;HTML-CSS&quot;</span><span class="o">:</span> <span class="p">{</span> <span class="nx">availableFonts</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;TeX&quot;</span><span class="p">]</span> <span class="p">}</span>
<span class="p">});</span>
<div class="section" id="using-a-configuration-file">
<span id="config-files"></span><h2>Using a configuration file<a class="headerlink" href="#using-a-configuration-file" title="Permalink to this headline"></a></h2>
<p>The first way to configure MathJax is to use a configuration file.
MathJax comes with a number of pre-defined configuration files, which are
stored in the <tt class="docutils literal"><span class="pre">MathJax/config</span></tt> directory. Among these are the following</p>
<dl class="describe">
<dt>
<tt class="descname">default.js</tt></dt>
<dd><p>A file that contains nearly all the configuration options with comments
describing them, which you can edit to suit your needs.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">TeX-AMS-MML_HTMLorMML.js</tt></dt>
<dd><p>Allows math to be specified in TeX, LaTeX, or MathML notation, with the
<cite>AMSmath</cite> and <cite>AMSsymbols</cite> packages included, producing output using
MathML if the browser supports it, and HTML-with-CSS otherwise.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">TeX-AMS_HTML.js</tt></dt>
<dd><p>Allows math to be specified in TeX or LaTeX notation (with the
<cite>AMSmath</cite> and <cite>AMSsymbols</cite> packages included, and produces output
using the HTML-CSS output processor.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">MML_HTMLorMML.js</tt></dt>
<dd><p>Allows math to be specified using MathML notation, and produces MathML
output if the browser supports it, or HTML-CSS output otherwise.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">Accessible.js</tt></dt>
<dd><p>Essentially the same as <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt>, but with some
settings specified to make MathJax work better with assistive
technology (for the visually impaired). This includes setting the
zoom trigger to be a double-click, and removing the MathMenu in
Internet Explorer (which can interfere with some screen readers).</p>
</dd></dl>
<p>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
comments explaining them. The others are what are called <cite>combined
configuration files</cite>, which not only configure MathJax, but also pre-load the
various files that the configuration requires. (The contents of these
files are explained in more detail in the <a class="reference external" href="common-configurations">Common Configurations</a> section.)</p>
<p>Usually, MathJax loads its components only when they are needed, but each
component will require a separate file to be loaded, and that can cause
delays before the mathematics is displayed. The combined configuration
files load the majority of the needed files all as one large file, reducing
the number of network requests that are needed. That means you will
probably be getting the componets that MathJax needs faster than you would
without the combined file, but you may be loading components that are never
actually used; that is the trade off.</p>
<p>Each of the combined configuration files comes in two flavors: the ones
listed above, which only configure the output processors but don&#8217;t include
the main code, and a &#8220;full&#8221; version, that also includes the complete
output processors. For example, with <tt class="docutils literal"><span class="pre">TeX-AMS_HTML.js</span></tt> and
<tt class="docutils literal"><span class="pre">TeX-AMS_HTML-full.js</span></tt>, the latter includes the complete HTML-CSS output
processor. The &#8220;full&#8221; configuration files are substantially larger (on
the order of 70KB), so you need to decide whether it is worth loading the
full configuraiton for your pages.</p>
<p>If most of your pages include mathematics, then it is to your advantage to
load the full version, but if you are including MathJax in a theme file for
a blog or wiki that only includes mathematics occasionally, then perhaps it
is better to use the standard configuration instead, in which case the
output processors are only loaded when they are actually needed, saving the
loading of 70KB for pages that don&#8217;t. Of course, if your server is
configured to compress the files it sends, the difference between the two
is considerably reduced. Furthermore, most browsers will cache the
javascript they receive, so the download cost should only occur on the
first page a user views, so it may be best to use the &#8220;full&#8221; version after
all. Note, however, that mobile devices sometimes have limits on the size
of files that they cache, so they may be forced to download the
configuration on every page. You need to keep these issues in mind as you
decide on which configuration to use.</p>
<p>To load a configuration file, use <tt class="docutils literal"><span class="pre">config=filename</span></tt> (where <tt class="docutils literal"><span class="pre">filename</span></tt>
is one of the names above without the <tt class="docutils literal"><span class="pre">.js</span></tt>) as a parameter to the URL of
the <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> file. For example</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
<span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>This example includes the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor and configures it
to use both the standard TeX and LaTeX math delimiters. It uses the
TeX input processor and the HTML-CSS output processor, and forces the
HTML-CSS processor to use the TeX fonts rather that other locally
installed fonts (e.g., <a class="reference internal" href="glossary.html#term-stix"><em class="xref std std-term">STIX</em></a> fonts). See the
<a class="reference internal" href="#configuration"><em>configuration options</em></a> section (or the comments
in the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file) for more information about the
configuration options that you can include in the
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. Note that if you configure MathJax
using this in-line approach, the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file is <strong>not</strong>
loaded.</p>
<p>Finally, if you would like to use several different configuration
files (like <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt>, but with different settings in each
one), you can copy <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> to <tt class="docutils literal"><span class="pre">config/MathJax-2.js</span></tt>,
or some other convenient name, and use</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;path-to-MathJax/MathJax.js&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> <span class="nx">config</span><span class="o">:</span> <span class="s2">&quot;MathJax-2.js&quot;</span> <span class="p">});</span>
<p>loads the <tt class="docutils literal"><span class="pre">config/TeX-AMS-MML_HTMLorMML.js</span></tt> configuration file from the
MathJax distributed network service.</p>
<p>You can include more than one configuration file by separating them with
commas. For example, if you have a locally defined configuration file
called <tt class="docutils literal"><span class="pre">MathJax/config/local/local.js</span></tt> that modifies the settings for the
<tt class="docutils literal"><span class="pre">TeX-AMS_HML</span></tt> configuration, defines some new TeX macros, and so on, you
can use</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
<span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML,local/local.js&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>to load the alternative configuration file <tt class="docutils literal"><span class="pre">config/MathJax-2.js</span></tt>
from the MathJax <tt class="docutils literal"><span class="pre">config</span></tt> directory. In this way, you can have as
many distinct configuration files as you need.</p>
<p>to first load the main configuraiton, then the local modifications.</p>
</div>
<div class="section" id="common-configurations">
<span id="id1"></span><h2>Common Configurations<a class="headerlink" href="#common-configurations" title="Permalink to this headline"></a></h2>
<p>The following examples show configurations that are useful for some
common situations. This is certainly not an exhaustive list, and
there are variations possible for any of them. Again, the comments in
the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file can help you decide what settings to
include, even if you are using the in-line configuration method.</p>
<div class="section" id="the-tex-setup">
<h3>The TeX setup<a class="headerlink" href="#the-tex-setup" title="Permalink to this headline"></a></h3>
<p>This example calls the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor to identify
mathematics in the page by looking for TeX and LaTeX math delimiters.
It uses <tt class="docutils literal"><span class="pre">$...$</span></tt> and <tt class="docutils literal"><span class="pre">\(...\)</span></tt> for in-line mathematics, while
<tt class="docutils literal"><span class="pre">$$...$$</span></tt> and <tt class="docutils literal"><span class="pre">\[...\]</span></tt> mark displayed equations. Because dollar
signs are used to mark mathematics, if you want to produce an actual
dollar sign in your document, you must &#8220;escape&#8221; it using a slash:
<tt class="docutils literal"><span class="pre">\$</span></tt>. This configuration also loads the <tt class="docutils literal"><span class="pre">AMSmath</span></tt> and
<tt class="docutils literal"><span class="pre">AMSsymbols</span></tt> extensions so that the macros and environments they
provide are defined for use on the page.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">,</span><span class="s2">&quot;TeX/AMSmath.js&quot;</span><span class="p">,</span><span class="s2">&quot;TeX/AMSsymbols.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">],</span>
<span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s1">&#39;$&#39;</span><span class="p">,</span><span class="s1">&#39;$&#39;</span><span class="p">],[</span><span class="s2">&quot;\\(&quot;</span><span class="p">,</span><span class="s2">&quot;\\)&quot;</span><span class="p">]],</span>
<span class="nx">processEscapes</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="p">},</span>
<span class="p">});</span>
</pre></div>
</div>
<p>Other extensions that you may consider adding to the <cite>extensions</cite>
array include: <tt class="docutils literal"><span class="pre">TeX/noErrors.js</span></tt>, which shows the original TeX code
if an error occurs while processing the mathematics (rather than an
error message), <tt class="docutils literal"><span class="pre">TeX/noUndefined.js</span></tt>, which shows undefined
macros names in red (rather than producing an error), and
<tt class="docutils literal"><span class="pre">TeX/autobold.js</span></tt>, which automatically inserts <tt class="docutils literal"><span class="pre">\boldsymbol{...}</span></tt>
around your mathematics when it appears in a section of your page that
is in bold. Most of the other TeX extensions are loaded automatically
when needed, and so do not need to be included explicitly in your
<cite>extensions</cite> array.</p>
<p>See the <a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration</em></a> section for
other configuration options for the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor, and the
<a class="reference internal" href="options/TeX.html#configure-tex"><em>TeX input jax configuration</em></a> section for options
that control the TeX input processor.</p>
</div>
<div class="section" id="the-mathml-setup">
<h3>The MathML setup<a class="headerlink" href="#the-mathml-setup" title="Permalink to this headline"></a></h3>
<p>This example calls the <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessor to identify
mathematics in the page that is in <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> format, which uses
<tt class="docutils literal"><span class="pre">&lt;math</span> <span class="pre">display=&quot;block&quot;&gt;</span></tt> to indicate displayed equations, and
<tt class="docutils literal"><span class="pre">&lt;math</span> <span class="pre">display=&quot;inline&quot;&gt;</span></tt> or simply <tt class="docutils literal"><span class="pre">&lt;math&gt;</span></tt> to mark in-line
formulas.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;mml2jax.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/MathML&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">]</span>
<span class="p">});</span>
</pre></div>
</div>
<p>Note that this will work in HTML files, not just XHTML files (MathJax
works with both), and that the web page need not be served with any
special MIME-type. Also note that, unless you are using XHTML rather
than HTML, you should not include a namespace prefix for your
<tt class="docutils literal"><span class="pre">&lt;math&gt;</span></tt> tags; for example, you should not use <tt class="docutils literal"><span class="pre">&lt;m:math&gt;</span></tt> except
in a file where you have tied the <tt class="docutils literal"><span class="pre">m</span></tt> namespace to the MathML DTD.</p>
<p>See the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration</em></a> section for
other configuration options for the <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessor, and the
<a class="reference internal" href="options/MathML.html#configure-mathml"><em>MathML input jax configuration</em></a> section for
options that control the MathML input processor.</p>
</div>
<div class="section" id="both-tex-and-mathml">
<h3>Both TeX and MathML<a class="headerlink" href="#both-tex-and-mathml" title="Permalink to this headline"></a></h3>
<p>This example provides for both TeX and MathML input in the same file.
It calls on both the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> and <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessors and the
TeX and MathML input jax to do the job.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">,</span> <span class="s2">&quot;mml2jax.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span> <span class="s2">&quot;input/MathML&quot;</span><span class="p">,</span> <span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">],</span>
<span class="p">});</span>
</pre></div>
</div>
<p>Notice that no <tt class="docutils literal"><span class="pre">tex2jax</span></tt> configuration section is included, so it
uses its default options (no single dollar signs for in-line math).</p>
<p>The majority of the code for the TeX and MathML input processors are
not loaded until they are actually needed by the mathematics on the
page, so if this configuration is used on a page that include only
MathML, the TeX input processor will not be loaded. Thus it is
reasonably efficient to specify both input processors even if only one
(or neither one) is used.</p>
</div>
<div class="section" id="tex-input-with-mathml-output">
<h3>TeX input with MathML output<a class="headerlink" href="#tex-input-with-mathml-output" title="Permalink to this headline"></a></h3>
<p>This example configures MathJax to use the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor
and TeX input processor, but the choice of output format is determined
by MathJax depending on the capabilities of the user&#8217;s browser. The
is performed by the <tt class="docutils literal"><span class="pre">MMLorHTML.js</span></tt> configuration file that is loaded
in the <cite>config`</cite> array.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;MMLorHTML.js&quot;</span><span class="p">],</span>
<div class="section" id="using-in-line-configuration-options">
<h2>Using in-line configuration options<a class="headerlink" href="#using-in-line-configuration-options" title="Permalink to this headline"></a></h2>
<p>The second way to configure MathJax is through <cite>in-line configuration</cite>,
that puts the configuration options within the web page itself. This
process has changed in version 1.1 to make it compatible with HTML5.
Earlier versions of MathJax had in-line configuration included within the
content of the <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tag that loads <tt class="docutils literal"><span class="pre">MathJax.js</span></tt>, but HTML5 makes
it illegal to have content for a script with a <tt class="docutils literal"><span class="pre">src</span></tt> attribute.</p>
<p>MathJax solves this problem by using separate <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tags to perform
configuration for MathJax. Because MathJax starts its configuration
process as soon as it is loaded, the configuration script must come
<strong>before</strong> the script tag that loads <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> itself. You do this
by including a <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> with <tt class="docutils literal"><span class="pre">type=&quot;text/x-mathjax-config&quot;</span></tt>, whose
content will be run when MathJax performs its configuration. Generally,
this script will include a <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call to perform
MathJax configuration, but it can also include other MathJax commands,
such as registering signal actions, or any JavaScript commands that you
want. You can have as many such script tags as you want, and MathJax will
process them in order as they appear in the document.</p>
<p>For instance,</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">]</span>
<span class="p">});</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span> <span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">],</span>
<span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">&#39;$&#39;</span><span class="p">,</span><span class="s1">&#39;$&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s2">&quot;\\(&quot;</span><span class="p">,</span><span class="s2">&quot;\\)&quot;</span><span class="p">]</span> <span class="p">],</span>
<span class="nx">displayMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">&#39;$$&#39;</span><span class="p">,</span><span class="s1">&#39;$$&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s2">&quot;\\[&quot;</span><span class="p">,</span><span class="s2">&quot;\\]&quot;</span><span class="p">]</span> <span class="p">],</span>
<span class="nx">processEscapes</span><span class="o">:</span> <span class="kc">true</span>
<span class="p">},</span>
<span class="s2">&quot;HTML-CSS&quot;</span><span class="o">:</span> <span class="p">{</span> <span class="nx">availableFonts</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;TeX&quot;</span><span class="p">]</span> <span class="p">}</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;path-to-MathJax/MathJax.js&quot;</span><span class="nt">&gt;</span>
</pre></div>
</div>
<p>With this setup, Firefox or Internet Explorer with the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer
plugin</a> installed
will use the NativeMML output processor, while all other browsers will
use the HTML-CSS output processor. Since native MathML support is
faster than MathJax&#8217;s HTML-CSS processor, this will mean that the web
pages will display faster for Firefox and IE than they would
otherwise. This speed comes at the cost, however, as you are now
relying on the native MathML support to render the mathematics, and
that is outside of MathJax&#8217;s control. There may be spacing or other
display differences (compared to MathJax&#8217;s HTML-CSS output) when the
NativeMML output processor is used.</p>
<p>See <a class="reference internal" href="output.html#output-formats"><em>MathJax Output Formats</em></a> for more
information on the NativeMML and HTML-CSS output processors. See the
<a class="reference internal" href="options/MMLorHTML.html#configure-mmlorhtml"><em>MMLorHTML configuration</em></a> section for
details on the options that control the <tt class="docutils literal"><span class="pre">MMLorHTML</span></tt> configuration.</p>
</div>
<div class="section" id="mathml-input-and-output-in-all-browsers">
<h3>MathML input and output in all browsers<a class="headerlink" href="#mathml-input-and-output-in-all-browsers" title="Permalink to this headline"></a></h3>
<p>This example configures MathJax to look for MathML within your page,
and to display it using the browser&#8217;s native MathML support, if
possible, or its HTML-CSS output if not.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;MMLorHTML.js&quot;</span><span class="p">],</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;mml2jax.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/MathML&quot;</span><span class="p">]</span>
<span class="p">});</span>
</pre></div>
</div>
<p>Using this configuration, MathJax finally makes MathML available in
all modern browsers.</p>
<p>See the <a class="reference internal" href="options/MMLorHTML.html#configure-mmlorhtml"><em>MMLorHTML configuration</em></a> section
for details on the options that control the <tt class="docutils literal"><span class="pre">MMLorHTML</span></tt>
configuration file, the <a class="reference internal" href="options/MathML.html#configure-mathml"><em>MathML configuration</em></a>
section for the options that control the MathML output processor, and
the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration</em></a> section for the
options that control the <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessor.</p>
</div>
</div>
<div class="section" id="configuration-objects">
<span id="configuration"></span><h2>Configuration Objects<a class="headerlink" href="#configuration-objects" title="Permalink to this headline"></a></h2>
<p>The various components of MathJax, including its input and output
processors, its preprocessors, its extensions, and the MathJax core,
all can be configured through the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file, or via a
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call (indeed, if you look closely, you
will see that <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> is itself one big call to
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt>). Anything that is in
<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> can be included in-line to configure MathJax.</p>
<p>The structure that you pass to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> is a
JavaScript object that includes name-value pairs giving the names of
parameters and their values, with pairs separated by commas. Be
careful not to include a comma after the last value, however, as some
browsers (namely Internet Explorer) will fail to process the
configuration if you do.</p>
<p>The MathJax components, like the TeX input processor, have their own
sections in the configuration object, labeled by the component name,
and using an configuration object as its value. The object is itself
a configuration object made up of name-value pairs that give the
configuration options for the component.</p>
<p>For example,</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">showProcessingMessages</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span> <span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">],</span>
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">TagSide</span><span class="o">:</span> <span class="s2">&quot;left&quot;</span><span class="p">,</span>
<span class="nx">Macros</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">RR</span><span class="o">:</span> <span class="s1">&#39;{\\bf R}&#39;</span><span class="p">,</span>
<span class="nx">bold</span><span class="o">:</span> <span class="p">[</span><span class="s1">&#39;{\\bf #1}&#39;</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
<p>This example includes the <cite>tex2jax</cite> preprocessor and configures it to use
both the standard <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a> and <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a> math delimiters. It uses
the <cite>TeX</cite> input processor and the <cite>HTML-CSS</cite> output processor, and forces the
HTML-CSS processor to use the TeX fonts rather that other locally installed
fonts (e.g., <a class="reference internal" href="glossary.html#term-stix"><em class="xref std std-term">STIX</em></a> fonts). See the <a class="reference internal" href="options/index.html#configuration"><em>configuration options</em></a> section (or the comments in the <tt class="docutils literal"><span class="pre">config/default.js</span></tt>
file) for more information about the configuration options that you can
include in the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. Note that this
configuration does <strong>not</strong> load any pre-defined configuration file.</p>
<p>Note that you can combine in-line configuration with file-based
configuration, simply include <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> scripts as above,
but also include <tt class="docutils literal"><span class="pre">config=filename</span></tt> when you load the <tt class="docutils literal"><span class="pre">MathJax.js</span></tt>
file. For example, the <cite>tex2jax</cite> preprocessor does <strong>not</strong> the TeX
single-dollar in-line math delimiters by default. You can load one of the
pre-defined configuration files that include the TeX preprocessor, and use
an in-line configuration block to enable the single-dollar signs:</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">&#39;$&#39;</span><span class="p">,</span><span class="s1">&#39;$&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s2">&quot;\\(&quot;</span><span class="p">,</span><span class="s2">&quot;\\)&quot;</span><span class="p">]</span> <span class="p">],</span>
<span class="nx">processEscapes</span><span class="o">:</span> <span class="kc">true</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;path-to-MathJax/MathJax.js?config=TeX-AMS_HTML&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>is a configuration that includes two settings for the MathJax Hub (one
for <cite>showProcessingMessages</cite> and one of the <cite>jax</cite> array), and a
configuration object for the TeX input processor. The latter includes
a setting for the TeX input processor&#8217;s <cite>TagSide</cite> option (to set tags
on the left rather than the right) and a setting for <cite>Macros</cite>, which
defines new TeX macros (in this case, two macros, one called <tt class="docutils literal"><span class="pre">\RR</span></tt>
that produces a bold &#8220;R&#8221;, and one called <tt class="docutils literal"><span class="pre">\bold</span></tt> that puts is
argument in bold face).</p>
<p>The <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file is another example that shows nearly
all the configuration options for all of MathJax&#8217;s components.</p>
</div>
<div class="section" id="configuration-options-by-component">
<h2>Configuration Options by Component<a class="headerlink" href="#configuration-options-by-component" title="Permalink to this headline"></a></h2>
<p>The individual options are explained in the following sections, which
are categorized by the component they affect.</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="options/hub.html">The core options</a></li>
</ul>
<div class="section" id="configuring-mathjax-after-it-is-loaded">
<span id="delaystartupuntil"></span><h2>Configuring MathJax after it is loaded<a class="headerlink" href="#configuring-mathjax-after-it-is-loaded" title="Permalink to this headline"></a></h2>
<p>Because MathJax begins its configuration process immediately after it is
loaded (so that it can start loading files as quickly as it can), the
configuration blocks for MathJax must come before <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> is loaded,
so they will be available to MathJax when it starts up. There are
situations, however, when you might want to put off configuring MathJax
until later in the page.</p>
<p>One such situation is when you have a site that loads MathJax as part of a
theme or template, but want to be able to modify the configuration on
specific pages of the site. To accomplish this, you need to ask MathJax
to delay its startup configuration until some later time. MathJax uses
the <tt class="docutils literal"><span class="pre">delayStartupUntil</span></tt> parameter to control the timing of the startup
sequence. By default, it is set to <tt class="docutils literal"><span class="pre">none</span></tt>, meaning there is no delay
and MathJax starts configuration right away.</p>
<p>You can set <tt class="docutils literal"><span class="pre">delayStartupUntil=onload</span></tt> in order to prevent MathJax from
continuing its startup process until the page&#8217;s onLoad handler fires. This
allows MathJax to find the <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> blocks that occur
anywhere on the page, not just the ones that appear above the <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt>
that loads <tt class="docutils literal"><span class="pre">MathJax.js</span></tt>. It also means that MathJax will not begin
loading any of the files that it needs until then as well, which may delay
the displaying of your mathematics, since the onLoad handler doesn&#8217;t
execute until all the images and other media are available. (If you have
used a combined configuration file, however, it already includes all the
main files that MathJax needs, so there is not much loss in delaying the
startup.)</p>
<p>You can set <tt class="docutils literal"><span class="pre">delayStartupUntil=configured</span></tt> in order to delay the startup
configuration until the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Configured()</span></tt> method is
called. This allows you to delay startup until later on the page, but
then restart MathJax configuration process as soon as possible rather than
waiting for the entire page to load. For example, you could use</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
<span class="na">src=</span><span class="s">&quot;path-to-MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML&amp;delayStartupUntil=configured&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="options/tex2jax.html">The tex2jax preprocessor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="options/mml2jax.html">The mml2jax preprocessor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="options/jsMath2jax.html">The jsMath2jax preprocessor options</a></li>
</ul>
<p>in your theme&#8217;s header file, and</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Configured</span><span class="p">()</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="options/TeX.html">The TeX input processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="options/MathML.html">The MathML input processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="options/HTML-CSS.html">The HTML-CSS output processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="options/NativeMML.html">The NativeMML output processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="options/MMLorHTML.html">The MMLorHTML configuration options</a></li>
</ul>
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="options/MathMenu.html">The MathMenu options</a></li>
<li class="toctree-l1"><a class="reference internal" href="options/MathZoom.html">The MathZoom options</a></li>
<li class="toctree-l1"><a class="reference internal" href="options/FontWarnings.html">The FontWarnings options</a></li>
</ul>
<p>in its footer, so that MathJax will delay setting up until the footer is
reached, but will not have to wait until images and other files are
laoded. If you have <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> script tags within the main
body of the document, MathJax will read and process those before
continuing its startup. In this way you can use a default configuration
that can be modified on a page-by-page basis.</p>
</div>
<div class="section" id="details-of-the-mathjax-configuration-process">
<h2>Details of the MathJax configuration process<a class="headerlink" href="#details-of-the-mathjax-configuration-process" title="Permalink to this headline"></a></h2>
<p>Since there are a number of different ways to configure MathJax, it is
important to know how they interact. The configuration process is the
following:</p>
<ol class="arabic simple">
<li>Process any configuration file explicitly specified as a script parameter.</li>
<li>Process the in-line script body (deprecated), if present.</li>
<li>If delayed startup is requested, wait for the indicated signal.</li>
<li>Process <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> config blocks.</li>
<li>Process any config files queued in the configuration&#8217;s <cite>config</cite> array
by earlier config code.</li>
</ol>
<p>Note that <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> script blocks must either precede the
<tt class="docutils literal"><span class="pre">MathJax.js</span></tt> script element, or startup must be delayed. Otherwise, blocks
that follow the <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> script element may or may not be available
when MathJax runs, and browser-dependent erratic behavior will result.</p>
</div>
</div>
@ -368,19 +413,12 @@ are categorized by the component they affect.</p>
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Loading and Configuring MathJax</a><ul>
<li><a class="reference internal" href="#loading-mathjax-from-the-cdn">Loading MathJax from the CDN</a></li>
<li><a class="reference internal" href="#configuring-mathjax">Configuring MathJax</a></li>
<li><a class="reference internal" href="#common-configurations">Common Configurations</a><ul>
<li><a class="reference internal" href="#the-tex-setup">The TeX setup</a></li>
<li><a class="reference internal" href="#the-mathml-setup">The MathML setup</a></li>
<li><a class="reference internal" href="#both-tex-and-mathml">Both TeX and MathML</a></li>
<li><a class="reference internal" href="#tex-input-with-mathml-output">TeX input with MathML output</a></li>
<li><a class="reference internal" href="#mathml-input-and-output-in-all-browsers">MathML input and output in all browsers</a></li>
</ul>
</li>
<li><a class="reference internal" href="#configuration-objects">Configuration Objects</a></li>
<li><a class="reference internal" href="#configuration-options-by-component">Configuration Options by Component</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#using-a-configuration-file">Using a configuration file</a></li>
<li><a class="reference internal" href="#using-in-line-configuration-options">Using in-line configuration options</a></li>
<li><a class="reference internal" href="#configuring-mathjax-after-it-is-loaded">Configuring MathJax after it is loaded</a></li>
<li><a class="reference internal" href="#details-of-the-mathjax-configuration-process">Details of the MathJax configuration process</a></li>
</ul>
</li>
</ul>
@ -389,13 +427,8 @@ are categorized by the component they affect.</p>
<p class="topless"><a href="installation.html"
title="previous chapter">Installing and Testing MathJax</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="options/hub.html"
title="next chapter">The Core Configuration Options</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/configuration.txt"
rel="nofollow">Show Source</a></li>
</ul>
<p class="topless"><a href="config-files.html"
title="next chapter">Common Configurations</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
@ -420,7 +453,7 @@ are categorized by the component they affect.</p>
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="options/hub.html" title="The Core Configuration Options"
<a href="config-files.html" title="Common Configurations"
>next</a> |</li>
<li class="right" >
<a href="installation.html" title="Installing and Testing MathJax"

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="Modifying Math on the Page" href="typeset.html" />
<link rel="prev" title="Using Signals" href="signals.html" />
@ -66,14 +66,12 @@ handler yourself, to let it know that it is OK to typeset the
mathematics on the page. You accomplish this by calling the
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Startup.onload()</span></tt> method as part of your MathJax
startup script. To do this, you will need to give MathJax an in-line
configuration, so you will not be able to use the
<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file (though you can add it to your in-line
configuration&#8217;s <cite>config</cite> array).</p>
configuration.</p>
<p>Here is an example of how to load and configure MathJax dynamically:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">&quot;script&quot;</span><span class="p">);</span>
<span class="nx">script</span><span class="p">.</span><span class="nx">type</span> <span class="o">=</span> <span class="s2">&quot;text/javascript&quot;</span><span class="p">;</span>
<span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">&quot;/MathJax/MathJax.js&quot;</span><span class="p">;</span> <span class="c1">// use the location of your MathJax</span>
<span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js&quot;</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">&#39;MathJax.Hub.Config({&#39;</span> <span class="o">+</span>
<span class="s1">&#39;extensions: [&quot;tex2jax.js&quot;],&#39;</span> <span class="o">+</span>
@ -88,20 +86,18 @@ configuration&#8217;s <cite>config</cite> array).</p>
<span class="p">})();</span>
</pre></div>
</div>
<p>Be sure to set the <tt class="docutils literal"><span class="pre">src</span></tt> to the correct URL for your copy of
MathJax. You can adjust the <tt class="docutils literal"><span class="pre">config</span></tt> variable to your needs, but be
careful to get the commas right. The <tt class="docutils literal"><span class="pre">window.opera</span></tt> test is because
<p>You can adjust the <tt class="docutils literal"><span class="pre">config</span></tt> variable to your needs, but be careful to get
the commas right. The <tt class="docutils literal"><span class="pre">window.opera</span></tt> test is because some versions of
Opera doesn&#8217;t handle setting <tt class="docutils literal"><span class="pre">script.text</span></tt> properly, while Internet
Explorer doesn&#8217;t handle setting the <tt class="docutils literal"><span class="pre">innerHTML</span></tt> of a script tag.</p>
<p>Here is a version that uses the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file to
<p>Here is a version that uses the <tt class="docutils literal"><span class="pre">config=filename</span></tt> method to
configure MathJax:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">&quot;script&quot;</span><span class="p">);</span>
<span class="nx">script</span><span class="p">.</span><span class="nx">type</span> <span class="o">=</span> <span class="s2">&quot;text/javascript&quot;</span><span class="p">;</span>
<span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">&quot;/MathJax/MathJax.js&quot;</span><span class="p">;</span> <span class="c1">// use the location of your MathJax</span>
<span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full&quot;</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">&#39;MathJax.Hub.Config({ config: &quot;MathJax.js&quot; }); &#39;</span> <span class="o">+</span>
<span class="s1">&#39;MathJax.Hub.Startup.onload();&#39;</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">&#39;MathJax.Hub.Startup.onload();&#39;</span><span class="p">;</span>
<span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span>
<span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span>
@ -111,13 +107,12 @@ configure MathJax:</p>
</pre></div>
</div>
<p>Note that the <strong>only</strong> reliable way to configure MathJax is to use an
in-line configuration of the type discussed above. You should <strong>not</strong>
call <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> directly in your code, as it will
not run at the correct time &#8212; it will either run too soon, in which
case <tt class="docutils literal"><span class="pre">MathJax</span></tt> may not be defined and the function will throw an
error, or it will run too late, after MathJax has already finished its
configuration process, so your changes will not have the desired
effect.</p>
in-line configuration block of the type discussed above. You should
<strong>not</strong> call <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> directly in your code, as it will
not run at the correct time &#8212; it will either run too soon, in which case
<tt class="docutils literal"><span class="pre">MathJax</span></tt> may not be defined and the function will throw an error, or it
will run too late, after MathJax has already finished its configuration
process, so your changes will not have the desired effect.</p>
<div class="section" id="mathjax-and-greasemonkey">
<h2>MathJax and GreaseMonkey<a class="headerlink" href="#mathjax-and-greasemonkey" title="Permalink to this headline"></a></h2>
<p>You can use techniques like the ones discussed above to good effect in
@ -134,8 +129,7 @@ major browsers:</p>
that loads a <tt class="docutils literal"><span class="pre">file://</span></tt> URL into a page that comes from the web (for
security reasons). That means that you can&#8217;t have your GreaseMonkey
script load a local copy of MathJax, so you have to refer to a
server-based copy. In the scripts below, you need to insert the URL
of a copy of MathJax from your own server.</p>
server-based copy. The MathJax CDN works nicely for this.</p>
<hr class="docutils" />
<p>Here is a script that runs MathJax in any document that contains
MathML (whether its includes MathJax or not). That allows
@ -154,12 +148,8 @@ IE+MathPlayer.</p>
<span class="p">(</span><span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagNameNS</span> <span class="o">==</span> <span class="kc">null</span> <span class="o">?</span> <span class="kc">false</span> <span class="o">:</span>
<span class="p">(</span><span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagNameNS</span><span class="p">(</span><span class="s2">&quot;http://www.w3.org/1998/Math/MathML&quot;</span><span class="p">,</span><span class="s2">&quot;math&quot;</span><span class="p">).</span><span class="nx">length</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)))</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">&quot;script&quot;</span><span class="p">);</span>
<span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">&quot;http://www.yoursite.edu/MathJax/MathJax.js&quot;</span><span class="p">;</span> <span class="c1">// put your URL here</span>
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">&#39;MathJax.Hub.Config({&#39;</span> <span class="o">+</span>
<span class="s1">&#39;extensions:[&quot;mml2jax.js&quot;],&#39;</span> <span class="o">+</span>
<span class="s1">&#39;jax:[&quot;input/MathML&quot;,&quot;output/HTML-CSS&quot;]&#39;</span> <span class="o">+</span>
<span class="s1">&#39;});&#39;</span> <span class="o">+</span>
<span class="s1">&#39;MathJax.Hub.Startup.onload()&#39;</span><span class="p">;</span>
<span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full&quot;</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">&#39;MathJax.Hub.Startup.onload()&#39;</span><span class="p">;</span>
<span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> <span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span>
<span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">&quot;head&quot;</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">script</span><span class="p">);</span>
<span class="p">}</span>
@ -181,29 +171,25 @@ converting the math images to their original TeX code.</p>
<span class="c1">//</span>
<span class="c1">// Replace the images with MathJax scripts of type math/tex</span>
<span class="c1">//</span>
<span class="kd">var</span> <span class="nx">images</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s1">&#39;img&#39;</span><span class="p">);</span>
<span class="kd">var</span> <span class="nx">images</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s1">&#39;img&#39;</span><span class="p">),</span> <span class="nx">count</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
<span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">i</span> <span class="o">=</span> <span class="nx">images</span><span class="p">.</span><span class="nx">length</span> <span class="o">-</span> <span class="mi">1</span><span class="p">;</span> <span class="nx">i</span> <span class="o">&gt;=</span> <span class="mi">0</span><span class="p">;</span> <span class="nx">i</span><span class="o">--</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">img</span> <span class="o">=</span> <span class="nx">images</span><span class="p">[</span><span class="nx">i</span><span class="p">];</span>
<span class="k">if</span> <span class="p">(</span><span class="nx">img</span><span class="p">.</span><span class="nx">className</span> <span class="o">===</span> <span class="s2">&quot;tex&quot;</span><span class="p">)</span> <span class="p">{</span>
<span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">&quot;script&quot;</span><span class="p">);</span> <span class="nx">script</span><span class="p">.</span><span class="nx">type</span> <span class="o">=</span> <span class="s2">&quot;math/tex&quot;</span><span class="p">;</span>
<span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">img</span><span class="p">.</span><span class="nx">alt</span><span class="p">}</span> <span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">img</span><span class="p">.</span><span class="nx">alt</span><span class="p">}</span>
<span class="nx">img</span><span class="p">.</span><span class="nx">parentNode</span><span class="p">.</span><span class="nx">replaceChild</span><span class="p">(</span><span class="nx">script</span><span class="p">,</span><span class="nx">img</span><span class="p">);</span>
<span class="nx">img</span><span class="p">.</span><span class="nx">parentNode</span><span class="p">.</span><span class="nx">replaceChild</span><span class="p">(</span><span class="nx">script</span><span class="p">,</span><span class="nx">img</span><span class="p">);</span> <span class="nx">count</span><span class="o">++</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="c1">//</span>
<span class="c1">// Load MathJax and have it process the page</span>
<span class="c1">//</span>
<span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">&quot;script&quot;</span><span class="p">);</span>
<span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">&quot;http://www.yoursite.edu/MathJax/MathJax.js&quot;</span><span class="p">;</span> <span class="c1">// put your URL here</span>
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">&#39;MathJax.Hub.Config({&#39;</span> <span class="o">+</span>
<span class="s1">&#39;config: [&quot;MMLorHTML.js&quot;],&#39;</span> <span class="o">+</span>
<span class="s1">&#39;extensions:[&quot;TeX/noErrors.js&quot;,&quot;TeX/noUndefined.js&quot;,&#39;</span> <span class="o">+</span>
<span class="s1">&#39;&quot;TeX/AMSmath.js&quot;,&quot;TeX/AMSsymbols.js&quot;],&#39;</span> <span class="o">+</span>
<span class="s1">&#39;jax:[&quot;input/TeX&quot;]&#39;</span> <span class="o">+</span>
<span class="s1">&#39;});&#39;</span> <span class="o">+</span>
<span class="s1">&#39;MathJax.Hub.Startup.onload()&#39;</span><span class="p">;</span>
<span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> <span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span>
<span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">&quot;head&quot;</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">script</span><span class="p">);</span>
<span class="k">if</span> <span class="p">(</span><span class="nx">count</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">//</span>
<span class="c1">// Load MathJax and have it process the page</span>
<span class="c1">//</span>
<span class="kd">var</span> <span class="nx">script</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s2">&quot;script&quot;</span><span class="p">);</span>
<span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full&quot;</span><span class="p">;</span>
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">&#39;MathJax.Hub.Startup.onload()&#39;</span><span class="p">;</span>
<span class="k">if</span> <span class="p">(</span><span class="nb">window</span><span class="p">.</span><span class="nx">opera</span><span class="p">)</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span> <span class="k">else</span> <span class="p">{</span><span class="nx">script</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">config</span><span class="p">}</span>
<span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">&quot;head&quot;</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">script</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
@ -231,11 +217,6 @@ converting the math images to their original TeX code.</p>
<h4>Next topic</h4>
<p class="topless"><a href="typeset.html"
title="next chapter">Modifying Math on the Page</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/dynamic.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
</head>
<body>
@ -94,9 +94,11 @@
<h2 id="F">F</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/message.html#File">File()</a></dt>
<dt><a href="api/ajax.html#fileURL">fileURL()</a></dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/message.html#filterText">filterText()</a></dt>
<dt><a href="api/hub.html#formatError">formatError()</a></dt>
</dl></td>
</tr></table>
@ -172,9 +174,6 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/signal.html#NoInterest">NoInterest()</a></dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/jax.html#noTranslate">noTranslate()</a></dt>
</dl></td>
</tr></table>
@ -182,6 +181,7 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/signal.html#Post">Post()</a></dt>
<dt><a href="api/ajax.html#Preloading">Preloading()</a></dt>
<dt><a href="api/hub.html#PreProcess">PreProcess()</a></dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
@ -201,10 +201,11 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/jax.html#Register">Register()</a></dt>
<dt><a href="api/message.html#Remove">Remove()</a></dt>
<dt><a href="api/hub.html#Reprocess">Reprocess()</a></dt>
<dt><a href="api/ajax.html#Require">Require()</a></dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/ajax.html#Require">Require()</a></dt>
<dt><a href="api/callback.html#reset">reset()</a></dt>
<dt><a href="api/queue.html#Resume">Resume()</a></dt>
</dl></td>
@ -214,6 +215,7 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/message.html#Set">Set()</a></dt>
<dt><a href="api/html.html#setText">setText()</a></dt>
<dt><a href="api/callback.html#Signal">Signal()</a></dt>
<dt><a href="api/elementjax.html#SourceElement">SourceElement()</a></dt>
<dt><a href="api/jax.html#Startup">Startup()</a></dt>

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="prev" title="CSS Style Objects" href="CSS-styles.html" />
</head>
@ -120,11 +120,6 @@ formats for mathematical journals, articles, and books.</p>
<h4>Previous topic</h4>
<p class="topless"><a href="CSS-styles.html"
title="previous chapter">CSS Style Objects</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/glossary.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="#" />
<link rel="next" title="What is MathJax?" href="mathjax.html" />
</head>
@ -57,6 +57,8 @@ MathML that works in all modern browsers.</p>
<li class="toctree-l1"><a class="reference internal" href="start.html">Getting Started with MathJax</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installing and Testing MathJax</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Loading and Configuring MathJax</a></li>
<li class="toctree-l1"><a class="reference internal" href="config-files.html">Common MathJax Configurations</a></li>
<li class="toctree-l1"><a class="reference internal" href="options/index.html">MathJax Configuration Options</a></li>
<li class="toctree-l1"><a class="reference internal" href="platforms/index.html">Using MathJax in Web Platforms</a></li>
</ul>
</div>
@ -73,8 +75,18 @@ MathML that works in all modern browsers.</p>
</ul>
</div>
</div>
<div class="section" id="upgrading-mathjax">
<span id="id1"></span><h2>Upgrading MathJax<a class="headerlink" href="#upgrading-mathjax" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="whats-new.html">What&#8217;s New in MathJax v1.1</a></li>
<li class="toctree-l1"><a class="reference internal" href="upgrade.html">Migrating from MathJax v1.0 to v1.1</a></li>
<li class="toctree-l1"><a class="reference internal" href="jsMath.html">Converting to MathJax from jsMath</a></li>
</ul>
</div>
</div>
<div class="section" id="advanced-topics">
<span id="id1"></span><h2>Advanced Topics<a class="headerlink" href="#advanced-topics" title="Permalink to this headline"></a></h2>
<span id="id2"></span><h2>Advanced Topics<a class="headerlink" href="#advanced-topics" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="model.html">The MathJax Processing Model</a></li>
@ -89,11 +101,6 @@ MathML that works in all modern browsers.</p>
<li class="toctree-l1"><a class="reference internal" href="api/index.html">Details of the MathJax API</a></li>
</ul>
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="jsMath.html">Converting to MathJax from jsMath</a></li>
</ul>
</div>
</div>
<div class="section" id="reference-pages">
<h2>Reference Pages<a class="headerlink" href="#reference-pages" title="Permalink to this headline"></a></h2>
@ -106,9 +113,15 @@ MathML that works in all modern browsers.</p>
</div>
<ul class="simple">
<li><a class="reference internal" href="search.html"><em>Search</em></a></li>
<li><a class="reference external" href="http://www.mathjax.org/help/user">User Help Pages</a>:<ul>
<li><a class="reference external" href="http://www.mathjax.org/help/fonts">MathJax Font Help</a></li>
<li><a class="reference external" href="http://www.mathjax.org/help/menu">MathJax Contextual Menu</a></li>
<li><a class="reference external" href="http://www.mathjax.org/help/zoom">MathJax Zoom Feature</a></li>
</ul>
</li>
</ul>
<hr class="docutils" />
<p>This version of the documentation was built March 03, 2011.</p>
<p>This version of the documentation was built March 07, 2011.</p>
</div>
</div>
@ -124,6 +137,9 @@ MathML that works in all modern browsers.</p>
<li><a class="reference internal" href="#basic-usage">Basic Usage</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#upgrading-mathjax">Upgrading MathJax</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#advanced-topics">Advanced Topics</a><ul>
</ul>
</li>
@ -137,11 +153,6 @@ MathML that works in all modern browsers.</p>
<h4>Next topic</h4>
<p class="topless"><a href="mathjax.html"
title="next chapter">What is MathJax?</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="Loading and Configuring MathJax" href="configuration.html" />
<link rel="prev" title="Getting Started" href="start.html" />
@ -51,6 +51,10 @@
<div class="section" id="installing-and-testing-mathjax">
<span id="installation"></span><h1>Installing and Testing MathJax<a class="headerlink" href="#installing-and-testing-mathjax" title="Permalink to this headline"></a></h1>
<p>The easiest way to use MathJax is to link directly to the MathJax
distributed network service (see <a class="reference internal" href="start.html#mathjax-cdn"><em>Using the MathJax CDN</em></a>). In that case, there is no need to install MathJax
yourself, and you can begin using MathJax right away; skip this document on
installation and go directly to <a class="reference internal" href="configuration.html#loading"><em>Configuring MathJax</em></a>.</p>
<p>MathJax can be loaded from a public web server or privately from your hard drive
or other local media. To use MathJax in either way, you will need to obtain a
copy of MathJax and its font package. There are three ways to do this: via
@ -58,68 +62,70 @@ copy of MathJax and its font package. There are three ways to do this: via
is easier to keep your installation up to date with these tools.</p>
<div class="section" id="obtaining-mathjax-via-git">
<span id="getting-mathjax-git"></span><h2>Obtaining MathJax via Git<a class="headerlink" href="#obtaining-mathjax-via-git" title="Permalink to this headline"></a></h2>
<p>The easiest way to get MathJax and keep it up to date is to use the <a class="reference external" href="http://git-scm.com/">Git</a> version control system to access our <a class="reference external" href="http://github.com/mathjax/mathjax">GitHub repository</a>. Use the commands</p>
<div class="highlight-sh"><div class="highlight"><pre>git clone git://github.com/mathjax/MathJax.git mathjax
<p>The easiest way to get MathJax and keep it up to date is to use the <a class="reference external" href="http://git-scm.com/">Git</a> version control system to access our <a class="reference external" href="http://github.com/mathjax/mathjax">GitHub repository</a>. Use the command</p>
<div class="highlight-sh"><div class="highlight"><pre>git clone git://github.com/mathjax/MathJax.git MathJax
</pre></div>
</div>
<p>to obtain and set up a copy of MathJax. Note that there is no longer
a <tt class="docutils literal"><span class="pre">fonts.zip</span></tt> file, and that the <tt class="docutils literal"><span class="pre">fonts</span></tt> directory is now part of
the repository itself.</p>
<p>Whenever you want to update MathJax, you can now use</p>
<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>mathjax
<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>MathJax
git remote show origin
</pre></div>
</div>
<p>to check if there are updates to MathJax (this will print several
lines of data, but the last line should tell you if your copy is up to
date or out of date). If MathJax needs updating, use</p>
<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>mathjax
<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>MathJax
git pull origin
</pre></div>
</div>
<p>to udpate your copy of MathJax to the current release version. If you
keep MathJax updated in this way, you will be sure that you have the
latest bug fixes and new features as they become available.</p>
<p>This gets you the current development copy of MathJax, which is the
&#8220;bleeding-edge&#8221; version that contains all the latest changes to
MathJax. At times, however, these may be less stable than the
&#8220;release&#8221; version. If you prefer to use the most stable version (that
may not include all the latest patches and features), use <tt class="docutils literal"><span class="pre">git</span> <span class="pre">tag</span>
<span class="pre">-l</span></tt> to see all versions and use <tt class="docutils literal"><span class="pre">git</span> <span class="pre">checkout</span> <span class="pre">&lt;tag_name&gt;</span></tt> to
checkout that version of MathJax. When you want to upgrade to a new
release, you will need to repeat this for the latest release tag.</p>
<p>This gets you the current development copy of MathJax, which is the version
that contains all the latest changes to MathJax. Although we try to make
sure this version is a stable and usable version of MathJax, it is under
active development, and at times it may be less stable than the &#8220;release&#8221;
version. If you prefer to use the most stable version (that may not
include all the latest patches and features), use <tt class="docutils literal"><span class="pre">git</span> <span class="pre">tag</span> <span class="pre">-l</span></tt> to see all
versions and use <tt class="docutils literal"><span class="pre">git</span> <span class="pre">checkout</span> <span class="pre">&lt;tag_name&gt;</span></tt> to checkout that version of
MathJax. When you want to upgrade to a new release, you will need to
repeat this for the latest release tag.</p>
</div>
<div class="section" id="obtaining-mathjax-via-svn">
<span id="getting-mathjax-svn"></span><h2>Obtaining MathJax via SVN<a class="headerlink" href="#obtaining-mathjax-via-svn" title="Permalink to this headline"></a></h2>
<p>If you are more comfortable with the <a class="reference external" href="http://subversion.apache.org/">subversion</a> source control system, you may want
to use GitHub&#8217;s <tt class="docutils literal"><span class="pre">svn</span></tt> service to obtain MathJax. If you want to get the
latest revision using <tt class="docutils literal"><span class="pre">svn</span></tt>, use the commands</p>
<div class="highlight-sh"><div class="highlight"><pre>svn checkout http://svn.github.com/mathjax/MathJax.git mathjax
latest revision using <tt class="docutils literal"><span class="pre">svn</span></tt>, use the command</p>
<div class="highlight-sh"><div class="highlight"><pre>svn checkout http://svn.github.com/mathjax/MathJax.git MathJax
</pre></div>
</div>
<p>to obtain and set up a copy of MathJax. Note that there is no longer
a <tt class="docutils literal"><span class="pre">fonts.zip</span></tt> file, and that the <tt class="docutils literal"><span class="pre">fonts</span></tt> directory is now part of
the repository itself.</p>
<p>Whenever you want to update MathJax, you can now use</p>
<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>mathjax
<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>MathJax
svn status -u
</pre></div>
</div>
<p>to check if there are updates to MathJax. If MathJax needs updating,
use</p>
<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>mathjax
<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>MathJax
svn update
</pre></div>
</div>
<p>to udpate your copy of MathJax to the current release version. If you
keep MathJax updated in this way, you will be sure that you have the
latest bug fixes and new features as they become available.</p>
<p>This gets you the current development copy of MathJax, which is the
&#8220;bleeding-edge&#8221; version that contains all the latest changes to
MathJax. At times, however, these may be less stable than the
&#8220;release&#8221; version. If you prefer to use one of the tagged releases
instead, then either use <tt class="docutils literal"><span class="pre">git</span></tt> as described above, or one of the
archive files as described below. You can use</p>
<p>This gets you the current development copy of MathJax, which is the version
that contains all the latest changes to MathJax. Although we try to make
sure this version is a stable and usable version of MathJax, it is under
active development, and at times it may be less stable than the &#8220;release&#8221;
version. If you prefer to use one of the tagged releases instead, then
either use <tt class="docutils literal"><span class="pre">git</span></tt> as described above, or one of the archive files as
described below. You can use</p>
<div class="highlight-sh"><div class="highlight"><pre>svn checkout http://svn.github.com/mathjax/MathJax.git@nnn mathjax
</pre></div>
</div>
@ -144,10 +150,18 @@ it locally rather then through a web server). One natural location is
to put it at the top level of your web server&#8217;s hierarchy. That would
let you refer to the main MathJax file as <tt class="docutils literal"><span class="pre">/MathJax/MathJax.js</span></tt> from
within any page on your server.</p>
<p>From the <a class="reference external" href="http://github.com/mathjax/mathjax/">MathJax GitHub download link</a> (the big download button at the
<p>From the <a class="reference external" href="http://github.com/mathjax/mathjax/">MathJax GitHub download link</a> (the download button at the
right), you can also select the <tt class="docutils literal"><span class="pre">Download</span> <span class="pre">.tar.gz</span></tt> or <tt class="docutils literal"><span class="pre">Download</span>
<span class="pre">.zip</span></tt> buttons to get a copy of the current &#8220;bleeding-edge&#8221; version of
<span class="pre">.zip</span></tt> buttons to get a copy of the current development version of
MathJax that contains all the latest changes and bug-fixes.</p>
<p>If a packaged release recevies any important updates, then those updates
will be part of the <cite>branch</cite> for that version. The link to the <tt class="docutils literal"><span class="pre">.zip</span></tt>
file in the download list will be the original release version, not the
patched version. To obtain the patched version, use the <cite>Branches</cite> drop
down menu (at the far left of the menus within the page) to select the the
release branch, and then use the downlaod button and the <tt class="docutils literal"><span class="pre">Downlaod</span>
<span class="pre">.tar.gz</span></tt> or <tt class="docutils literal"><span class="pre">Download</span> <span class="pre">.zip</span></tt> button to get the latest patched version of
that release.</p>
</div>
<div class="section" id="testing-your-installation">
<h2>Testing your installation<a class="headerlink" href="#testing-your-installation" title="Permalink to this headline"></a></h2>
@ -163,8 +177,7 @@ properly. If you have installed MathJax on a server, use the web
address for those files rather than opening them locally. When you
view the <tt class="docutils literal"><span class="pre">index.html</span></tt> file, you should see (after a few moments) a
message that MathJax appears to be working. If not, you should check
that the files have been transferred to the server completely, that
the fonts archive has been unpacked in the correct location, and that
that the files have been transferred to the server completely, and that
the permissions allow the server to access the files and folders that
are part of the MathJax directory (be sure to verify the MathJax
folder&#8217;s permissions as well). Checking the server logs may help
@ -180,22 +193,19 @@ a different site. For example, a departmental server at
installation at <tt class="docutils literal"><span class="pre">www.yourcollege.edu</span></tt> rather than installing a
separate copy on the departmental machine. MathJax can certainly
be loaded from another server, but there is one imporant caveat &#8212;
Firefox&#8217;s same-origin security policy for cross-domain scripting.</p>
<p>Firefoxs interpretation of the same-origin policy is more strict than
most other browsers, and it affects how fonts are loaded with the
<cite>&#64;font-face</cite> CSS directive. MathJax uses this directive to load
web-based math fonts into a page when the user doesn&#8217;t have them
installed locally on their own computer. Firefox&#8217;s security policy,
however, only allows this when the fonts come from the same server as
the web page itself, so if you load MathJax (and hence its web fonts)
from a different server, Firefox won&#8217;t be able to access those web
fonts. In this case, MathJax will pause while waiting for the font to
download (which will never happen) and will time out after about 15
seconds for each font it tries to access. Typically that is three or
four fonts, so your Firefox users will experience a minute or so
delay before mathematics is displayed, and then it will probably
display incorrectly because the browser doesn&#8217;t have access to the
correct fonts.</p>
Firefox&#8217;s and IE9&#8217;s same-origin security policy for cross-domain scripting.</p>
<p>Firefox&#8217;s interpretation of the same-origin policy is more strict than most
other browsers, and it affects how fonts are loaded with the <cite>&#64;font-face</cite>
CSS directive. MathJax uses this directive to load web-based math fonts
into a page when the user doesn&#8217;t have them installed locally on their own
computer. Firefox&#8217;s security policy, however, only allows this when the
fonts come from the same server as the web page itself, so if you load
MathJax (and hence its web fonts) from a different server, Firefox won&#8217;t be
able to access those web fonts. In this case, MathJax will pause while
waiting for the font to download (which will never happen); it will time
out after about 5 seconds and switch to image fonts as a fallback.
Similarly, IE9 has a similar same-origin policy in its <cite>IE9 standards
mode</cite>, so it exhibits this same behavior.</p>
<p>There is a solution to this, however, if you manage the server where
MathJax is installed, and if that server is running the <a class="reference external" href="http://www.apache.org/">Apache web
server</a>. In the remote server&#8217;s
@ -207,17 +217,16 @@ Header set Access-Control-Allow-Origin "*"
&lt;/IfModule&gt;
&lt;/FilesMatch&gt;</pre>
</div>
<p>and make sure the permissions allow the server to read this file.
(The file&#8217;s name starts with a period, which causes it to be an
&#8220;invisible&#8221; file on unix-based operating systems. Some systems,
particularly graphic user interfaces, may not allow you to create such
files, so you might need to use the command-line interface to
accomplish this.)</p>
<p>This file should make it possible for pages at other sites to load
MathJax from this server in such a way that Firefox will be able to
download the web-based fonts. If you want to restrict the sites that
can access the web fonts, change the <tt class="docutils literal"><span class="pre">Access-Control-Allow-Origin</span></tt>
line to something like:</p>
<p>and make sure the permissions allow the server to read this file. (The
file&#8217;s name starts with a period, which causes it to be an &#8220;invisible&#8221; file
on unix-based operating systems. Some systems, particularly those with
graphical user interfaces, may not allow you to create such files, so you
might need to use the command-line interface to accomplish this.)</p>
<p>This file should make it possible for pages at other sites to load MathJax
from this server in such a way that Firefox and IE9 will be able to
download the web-based fonts. If you want to restrict the sites that can
access the web fonts, change the <tt class="docutils literal"><span class="pre">Access-Control-Allow-Origin</span></tt> line to
something like:</p>
<div class="highlight-python"><pre>Header set Access-Control-Allow-Origin "http://www.math.yourcollege.edu"</pre>
</div>
<p>so that only pages at <tt class="docutils literal"><span class="pre">www.math.yourcollege.edu</span></tt> will be able to
@ -225,8 +234,8 @@ download the fonts from this site. See the open font library
discussion of <a class="reference external" href="http://openfontlibrary.org/wiki/Web_Font_linking_and_Cross-Origin_Resource_Sharing">web-font linking</a>
for more details.</p>
</div>
<div class="section" id="forefox-and-local-fonts">
<span id="ff-local-fonts"></span><h2>Forefox and Local Fonts<a class="headerlink" href="#forefox-and-local-fonts" title="Permalink to this headline"></a></h2>
<div class="section" id="firefox-and-local-fonts">
<span id="ff-local-fonts"></span><h2>Firefox and local fonts<a class="headerlink" href="#firefox-and-local-fonts" title="Permalink to this headline"></a></h2>
<p>Firefox&#8217;s same-origin security policy affects its ability to load
web-based fonts, as described above. This has implications not only
to cross-domain loading of MathJax, but also to using MathJax locally
@ -244,6 +253,26 @@ containing the page that uses MathJax. This is an unfortunate
restriction, but it is a limitiation imposed by Firefox&#8217;s security
model that MathJax can not circumvent. Currently, this is not a
problem for other browsers.</p>
<p>One solution to this problem is to install the MathJax fonts locally, so
that Firefox will not have to use web-based fonts in the first place. To
do that, either install the <a class="reference external" href="http://stixfonts.org">STIX fonts</a>, or copy
the fonts from <tt class="docutils literal"><span class="pre">MathJax/fonts/HTML-CSS/TeX/otf</span></tt> into your systems fonts
directory and restart your browser (see the <a class="reference external" href="http://www.mathjax.org/help/fonts">MathJax fonts help page</a> for details).</p>
</div>
<div class="section" id="ie9-and-remote-fonts">
<h2>IE9 and remote fonts<a class="headerlink" href="#ie9-and-remote-fonts" title="Permalink to this headline"></a></h2>
<p>IE9&#8217;s same-origin policy affects its ability to load web-based fonts, as
described above. This has implications not ony to cross-domain loading of
MathJax, but also to the case where you view a local page (with a
<tt class="docutils literal"><span class="pre">file://</span></tt> URL) that accesses MathJax from a remote site, like the MathJax
CDN service. In this case, IE9 does <strong>not</strong> honor the
<tt class="docutils literal"><span class="pre">Access-Control-Allow-Origin</span></tt> setting of the remote server (as it would
if the web page came from an <tt class="docutils literal"><span class="pre">http://</span></tt> URL), and so it <strong>never</strong> allows the
font to be accessed.</p>
<p>One solution to this problem is to install the MathJax fonts locally so
that MathJax doesn&#8217;t have to use web-based fonts in the first place. Your
best bet is to install the <a class="reference external" href="http://stixfonts.org">STIX fonts</a> on your system (see the <a class="reference external" href="http://www.mathjax.org/help/fonts">MathJax
fonts help page</a> for details).</p>
</div>
</div>
@ -261,7 +290,8 @@ problem for other browsers.</p>
<li><a class="reference internal" href="#obtaining-mathjax-via-an-archive">Obtaining MathJax via an archive</a></li>
<li><a class="reference internal" href="#testing-your-installation">Testing your installation</a></li>
<li><a class="reference internal" href="#notes-about-shared-installations">Notes about shared installations</a></li>
<li><a class="reference internal" href="#forefox-and-local-fonts">Forefox and Local Fonts</a></li>
<li><a class="reference internal" href="#firefox-and-local-fonts">Firefox and local fonts</a></li>
<li><a class="reference internal" href="#ie9-and-remote-fonts">IE9 and remote fonts</a></li>
</ul>
</li>
</ul>
@ -272,11 +302,6 @@ problem for other browsers.</p>
<h4>Next topic</h4>
<p class="topless"><a href="configuration.html"
title="next chapter">Loading and Configuring MathJax</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/installation.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -21,10 +21,10 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="Describing HTML snippets" href="HTML-snippets.html" />
<link rel="prev" title="The MathJax Object-Oriented Programming Model" href="api/object.html" />
<link rel="next" title="The MathJax Processing Model" href="model.html" />
<link rel="prev" title="Migrating from MathJax v1.0 to v1.1" href="upgrade.html" />
</head>
<body>
@ -35,10 +35,10 @@
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="HTML-snippets.html" title="Describing HTML snippets"
<a href="model.html" title="The MathJax Processing Model"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="api/object.html" title="The MathJax Object-Oriented Programming Model"
<a href="upgrade.html" title="Migrating from MathJax v1.0 to v1.1"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
</ul>
@ -57,20 +57,36 @@ processing the mathematics within the webpage once it has been loaded
in the browser by a user viewing your web pages. If you are using
jsMath with its <tt class="docutils literal"><span class="pre">tex2math</span></tt> preprocessor, then switching to MathJax
should be easy, and is simply a matter of configuring MathJax
appropriately. See the section on <a class="reference internal" href="configuration.html#configuration"><em>Configuring MathJax</em></a> for details about loading and configuring MathJax.</p>
appropriately. See the section on <a class="reference internal" href="configuration.html#loading"><em>Loading and Configuring MathJax</em></a> for details.</p>
<p>On the other hand, if you are using jsMath&#8217;s <tt class="docutils literal"><span class="pre">&lt;span</span>
<span class="pre">class=&quot;math&quot;&gt;...&lt;/span&gt;</span></tt> and <tt class="docutils literal"><span class="pre">&lt;div</span> <span class="pre">class=&quot;math&quot;&gt;...&lt;/div&gt;</span></tt> tags to
mark the mathematics in your document, then you should use MathJax&#8217;s
<tt class="docutils literal"><span class="pre">jsMath2jax</span></tt> preprocessor when you switch to MathJax. To do this,
include <tt class="docutils literal"><span class="pre">&quot;jsMath2jax.js&quot;</span></tt> in the <cite>extensions</cite> array of your
configuration, with the <cite>jax</cite> array set to include <tt class="docutils literal"><span class="pre">&quot;input/TeX&quot;</span></tt>.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;jsMath2jax.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span> <span class="p">...]</span>
configuration, with the <cite>jax</cite> array set to include <tt class="docutils literal"><span class="pre">&quot;input/TeX&quot;</span></tt>. For
example,</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;jsMath2jax.js&quot;</span><span class="p">]</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;script</span>
<span class="nt"> </span><span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>would load the <tt class="docutils literal"><span class="pre">jsMath2jax</span></tt> preprocessor, along with a configuration
file that processes TeX input and produces HTML-with-CSS output.</p>
<p>There are a few configuration options for <tt class="docutils literal"><span class="pre">jsMath2jax</span></tt>, which you
can find in the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file, or in the <a class="reference internal" href="options/jsMath2jax.html#configure-jsmath2jax"><em>jsMath
can find in the <tt class="docutils literal"><span class="pre">config/default.js</span></tt> file, or in the <a class="reference internal" href="options/jsMath2jax.html#configure-jsmath2jax"><em>jsMath
configuration options</em></a> section.</p>
<p>If you are generating your jsMath documents programmatically, it would be
better to convert from generating the jsMath <tt class="docutils literal"><span class="pre">&lt;span&gt;</span></tt> and <tt class="docutils literal"><span class="pre">&lt;div&gt;</span></tt> tags
to producing the corresponding MathJax <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tags. You would use
<tt class="docutils literal"><span class="pre">&lt;script</span> <span class="pre">type=&quot;math/tex&quot;&gt;</span></tt> in place of <tt class="docutils literal"><span class="pre">&lt;span</span> <span class="pre">class=&quot;math&quot;&gt;</span></tt> and
<tt class="docutils literal"><span class="pre">&lt;script</span> <span class="pre">type=&quot;math/tex;</span> <span class="pre">mode=display&quot;&gt;</span></tt> in place of <tt class="docutils literal"><span class="pre">&lt;div</span>
<span class="pre">class=&quot;math&quot;&gt;</span></tt>. See the section on <a class="reference internal" href="model.html#mathjax-script-tags"><em>How mathematics is stored in the
page</em></a> for more details.</p>
</div>
@ -80,16 +96,11 @@ configuration options</em></a> section.</p>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="api/object.html"
title="previous chapter">The MathJax Object-Oriented Programming Model</a></p>
<p class="topless"><a href="upgrade.html"
title="previous chapter">Migrating from MathJax v1.0 to v1.1</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="HTML-snippets.html"
title="next chapter">Describing HTML snippets</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/jsMath.txt"
rel="nofollow">Show Source</a></li>
</ul>
<p class="topless"><a href="model.html"
title="next chapter">The MathJax Processing Model</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
@ -114,10 +125,10 @@ configuration options</em></a> section.</p>
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="HTML-snippets.html" title="Describing HTML snippets"
<a href="model.html" title="The MathJax Processing Model"
>next</a> |</li>
<li class="right" >
<a href="api/object.html" title="The MathJax Object-Oriented Programming Model"
<a href="upgrade.html" title="Migrating from MathJax v1.0 to v1.1"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
</ul>

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="Getting Started" href="start.html" />
<link rel="prev" title="MathJax Documentation" href="index.html" />
@ -94,11 +94,6 @@ mathematics on your web pages interactive and dynamic.</p>
<h4>Next topic</h4>
<p class="topless"><a href="start.html"
title="next chapter">Getting Started</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/mathjax.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="MathJax Output Formats" href="output.html" />
<link rel="prev" title="MathJax TeX and LaTeX Support" href="tex.html" />
@ -52,7 +52,7 @@
<div class="section" id="mathjax-mathml-support">
<span id="mathml-support"></span><h1>MathJax MathML Support<a class="headerlink" href="#mathjax-mathml-support" title="Permalink to this headline"></a></h1>
<p>The support for <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> in MathJax consists of three parts: the
<cite>mml2jax</cite> preprocessor, the MathML input processor, and the NativeMML
<cite>mml2jax</cite> preprocessor, the <cite>MathML</cite> input processor, and the <cite>NativeMML</cite>
output processor. The first of these looks for <tt class="docutils literal"><span class="pre">&lt;math&gt;</span></tt> tags within
your document and marks them for later processing by MathJax. The
second converts the MathML to the internal format used by MathJax, and
@ -67,7 +67,7 @@ MathML input processor with the HTML-CSS output processor to make
MathML available in browsers that don&#8217;t have native MathML support.
It is also possible to have MathJax select the output processor for
you so that MathML is used in those browsers that support it, while
HTML-CSS is used for those that don&#8217;t. See the <a class="reference internal" href="configuration.html#common-configurations"><em>common
HTML-CSS is used for those that don&#8217;t. See the <a class="reference internal" href="config-files.html#common-configurations"><em>common
configurations</em></a> section for details and
examples.</p>
<p>Of course it is also possible to use all three components together.
@ -79,9 +79,9 @@ any of the other setup issues that make using native MathML
difficult. MathJax handles the setup and properly marks the
mathematics so that the browser will render it as MathML. In
addition, MathJax provides its contextual menu for the MathML, which
lets the user zoom the mathematics for easier reading, get the copy
lets the user zoom the mathematics for easier reading, get and copy
the source markup, and so on, so there is added value to using MathJax
even whith a pure MathML workflow.</p>
even with a pure MathML workflow.</p>
<div class="section" id="mathml-in-html-pages">
<h2>MathML in HTML pages<a class="headerlink" href="#mathml-in-html-pages" title="Permalink to this headline"></a></h2>
<p>For MathML that is handled via the pre-processor, you should not use
@ -151,11 +151,6 @@ children of <tt class="docutils literal"><span class="pre">mrow</span></tt> or i
<h4>Next topic</h4>
<p class="topless"><a href="output.html"
title="next chapter">MathJax Output Formats</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/mathml.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -21,10 +21,10 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="The MathJax Startup Sequence" href="startup.html" />
<link rel="prev" title="The MathJax Community" href="community.html" />
<link rel="prev" title="Converting to MathJax from jsMath" href="jsMath.html" />
</head>
<body>
@ -38,7 +38,7 @@
<a href="startup.html" title="The MathJax Startup Sequence"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="community.html" title="The MathJax Community"
<a href="jsMath.html" title="Converting to MathJax from jsMath"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
</ul>
@ -93,7 +93,7 @@ and it also avoids the conflict between the use of the less-than sign,
<tt class="docutils literal"><span class="pre">&lt;</span></tt>, in mathematics and asn an HTML special character (that starts
an HTML tag).</p>
<div class="section" id="how-mathematics-is-stored-in-the-page">
<h2>How mathematics is stored in the page<a class="headerlink" href="#how-mathematics-is-stored-in-the-page" title="Permalink to this headline"></a></h2>
<span id="mathjax-script-tags"></span><h2>How mathematics is stored in the page<a class="headerlink" href="#how-mathematics-is-stored-in-the-page" title="Permalink to this headline"></a></h2>
<p>In order to identify mathematics in the page, MathJax uses special
<tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tags to enclose the mathematics. This is done because
such tags can be located easily, and because their content is not
@ -257,16 +257,11 @@ dynamic as the rest of the page.</p>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="community.html"
title="previous chapter">The MathJax Community</a></p>
<p class="topless"><a href="jsMath.html"
title="previous chapter">Converting to MathJax from jsMath</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="startup.html"
title="next chapter">The MathJax Startup Sequence</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/model.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
@ -294,7 +289,7 @@ dynamic as the rest of the page.</p>
<a href="startup.html" title="The MathJax Startup Sequence"
>next</a> |</li>
<li class="right" >
<a href="community.html" title="The MathJax Community"
<a href="jsMath.html" title="Converting to MathJax from jsMath"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
</ul>

View File

@ -21,9 +21,9 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="Using MathJax in popular web platforms" href="../platforms/index.html" />
<link rel="prev" title="The MathZoom extension" href="MathZoom.html" />
</head>
@ -42,7 +42,7 @@
<a href="MathZoom.html" title="The MathZoom extension"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -220,11 +220,6 @@ The default is 1.5 seconds.</p>
<h4>Next topic</h4>
<p class="topless"><a href="../platforms/index.html"
title="next chapter">Using MathJax in popular web platforms</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/options/FontWarnings.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -255,7 +250,7 @@ The default is 1.5 seconds.</p>
<a href="MathZoom.html" title="The MathZoom extension"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">

View File

@ -21,9 +21,9 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The NativeMML output processor" href="NativeMML.html" />
<link rel="prev" title="The MathML input processor" href="MathML.html" />
</head>
@ -42,7 +42,7 @@
<a href="MathML.html" title="The MathML input processor"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -78,6 +78,14 @@ factor. The user can also adjust this value using the contextual
menu item associated with the typeset mathematics.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">minScaleAdjust: 50</tt></dt>
<dd><p>This gives a minimum scale (as a percent) for the scaling used my
MathJax to match the equation to the surrounding text. This will
prevent MathJax from making the mathematics too small.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">availableFonts: [&quot;STIX&quot;,&quot;TeX&quot;]</tt></dt>
@ -197,11 +205,6 @@ where the tooltip will be placed.</p>
<h4>Next topic</h4>
<p class="topless"><a href="NativeMML.html"
title="next chapter">The NativeMML output processor</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/options/HTML-CSS.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -232,7 +235,7 @@ where the tooltip will be placed.</p>
<a href="MathML.html" title="The MathML input processor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">

View File

@ -21,9 +21,9 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The MathMenu extension" href="MathMenu.html" />
<link rel="prev" title="The NativeMML output processor" href="NativeMML.html" />
</head>
@ -42,7 +42,7 @@
<a href="NativeMML.html" title="The NativeMML output processor"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -99,11 +99,6 @@ complicated output generated by MathJax, so its setting is
<h4>Next topic</h4>
<p class="topless"><a href="MathMenu.html"
title="next chapter">The MathMenu extension</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/options/MMLorHTML.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -134,7 +129,7 @@ complicated output generated by MathJax, so its setting is
<a href="NativeMML.html" title="The NativeMML output processor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">

View File

@ -21,9 +21,9 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The HTML-CSS output processor" href="HTML-CSS.html" />
<link rel="prev" title="The TeX input processor" href="TeX.html" />
</head>
@ -42,7 +42,7 @@
<a href="TeX.html" title="The TeX input processor"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -88,11 +88,6 @@ spacing would be used (rather than TeX spacing rules).</p>
<h4>Next topic</h4>
<p class="topless"><a href="HTML-CSS.html"
title="next chapter">The HTML-CSS output processor</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/options/MathML.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -123,7 +118,7 @@ spacing would be used (rather than TeX spacing rules).</p>
<a href="TeX.html" title="The TeX input processor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">

View File

@ -21,9 +21,9 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The MathZoom extension" href="MathZoom.html" />
<link rel="prev" title="The MMLorHTML configuration options" href="MMLorHTML.html" />
</head>
@ -42,7 +42,7 @@
<a href="MMLorHTML.html" title="The MMLorHTML configuration options"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -68,7 +68,7 @@ options, include a <tt class="docutils literal"><span class="pre">MathMenu</span
<p>would set the <tt class="docutils literal"><span class="pre">delay</span></tt> option to 600 milliseconds.</p>
<dl class="describe">
<dt>
<tt class="descname">delay: 400</tt></dt>
<tt class="descname">delay: 150</tt></dt>
<dd><p>This is the hover delay for the display (in milliseconds) for
submenus in the contextual menu: when the mouse is over a submenu
label for this long, the menu will appear. (The submenu also will
@ -150,11 +150,6 @@ style in a JavaScript object.</p>
<h4>Next topic</h4>
<p class="topless"><a href="MathZoom.html"
title="next chapter">The MathZoom extension</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/options/MathMenu.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -185,7 +180,7 @@ style in a JavaScript object.</p>
<a href="MMLorHTML.html" title="The MMLorHTML configuration options"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">

View File

@ -21,9 +21,9 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The FontWarnings extension" href="FontWarnings.html" />
<link rel="prev" title="The MathMenu extension" href="MathMenu.html" />
</head>
@ -42,7 +42,7 @@
<a href="MathMenu.html" title="The MathMenu extension"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -103,11 +103,6 @@ style in a JavaScript object.</p>
<h4>Next topic</h4>
<p class="topless"><a href="FontWarnings.html"
title="next chapter">The FontWarnings extension</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/options/MathZoom.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -138,7 +133,7 @@ style in a JavaScript object.</p>
<a href="MathMenu.html" title="The MathMenu extension"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">

View File

@ -21,9 +21,9 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The MMLorHTML configuration options" href="MMLorHTML.html" />
<link rel="prev" title="The HTML-CSS output processor" href="HTML-CSS.html" />
</head>
@ -42,7 +42,7 @@
<a href="HTML-CSS.html" title="The HTML-CSS output processor"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -127,11 +127,6 @@ CSS style in a JavaScript object.</p>
<h4>Next topic</h4>
<p class="topless"><a href="MMLorHTML.html"
title="next chapter">The MMLorHTML configuration options</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/options/NativeMML.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -162,7 +157,7 @@ CSS style in a JavaScript object.</p>
<a href="HTML-CSS.html" title="The HTML-CSS output processor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">

View File

@ -21,9 +21,9 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The MathML input processor" href="MathML.html" />
<link rel="prev" title="The jsMath2jax Preprocessor" href="jsMath2jax.html" />
</head>
@ -42,7 +42,7 @@
<a href="jsMath2jax.html" title="The jsMath2jax Preprocessor"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -117,6 +117,24 @@ which produces a bold-face &#8220;R&#8221;, and <tt class="docutils literal"><sp
parameter and set it in the bold-face font.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">MAXMACROS: 10000</tt></dt>
<dd><p>Because a definition of the form <tt class="docutils literal"><span class="pre">\def\x{\x}</span> <span class="pre">\x</span></tt> would cause MathJax
to loop infinitely, the <cite>MAXMACROS</cite> constant will limit the nuber of
macro substitutions allowed in any expression processed by MathJax.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">MAXBUFFER: 5*1024</tt></dt>
<dd><p>Because a definition of the form <tt class="docutils literal"><span class="pre">\def\x{\x</span> <span class="pre">aaa}</span> <span class="pre">\x</span></tt> would loop
infinitely, and at the same time stack up lots of a&#8217;s in MathJax&#8217;s
equation buffer, the <cite>MAXBUFFER</cite> constant is used to limit the size of
the string being processed by MathJax. It is set to 5KB, which should
be sufficient for any reasonable equation.</p>
</dd></dl>
</div>
@ -131,11 +149,6 @@ parameter and set it in the bold-face font.</p>
<h4>Next topic</h4>
<p class="topless"><a href="MathML.html"
title="next chapter">The MathML input processor</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/options/TeX.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -166,7 +179,7 @@ parameter and set it in the bold-face font.</p>
<a href="jsMath2jax.html" title="The jsMath2jax Preprocessor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">

View File

@ -21,11 +21,11 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The tex2jax Preprocessor" href="tex2jax.html" />
<link rel="prev" title="Loading and Configuring MathJax" href="../configuration.html" />
<link rel="prev" title="Configuration Objects" href="index.html" />
</head>
<body>
@ -39,10 +39,10 @@
<a href="tex2jax.html" title="The tex2jax Preprocessor"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../configuration.html" title="Loading and Configuring MathJax"
<a href="index.html" title="Configuration Objects"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -192,7 +192,11 @@ displayed equations.</p>
configuration, styles, jax, and so on) as soon as it can. If you
expect to be doing additional configuration on the page, however,
you may want to have it wait until the page&#8217;s onload hander is
called. If so, set this to <tt class="docutils literal"><span class="pre">&quot;onload&quot;</span></tt>.</p>
called. If so, set this to <tt class="docutils literal"><span class="pre">&quot;onload&quot;</span></tt>. You can also set this to
<tt class="docutils literal"><span class="pre">&quot;configured&quot;</span></tt>, in which case, MathJax will delay its startup until
you explicitly call <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Configured()</span></tt>. See
<a class="reference internal" href="../configuration.html#delaystartupuntil"><em>Configuring MathJax after it is loaded</em></a> for more
details.</p>
</dd></dl>
<dl class="describe">
@ -284,6 +288,16 @@ how these are specified in JavaScript.</p>
</dd></dl>
<dl class="describe">
<dt>
<tt class="descname">v1.0-compatible: true</tt></dt>
<dd><p>This controls whether MathJax issues the warning about not having an
explicit configuration in the event that the <cite>jax</cite> array is empty
after configuration is complete. If you really intend that array to
be empty, set this flag to <tt class="docutils literal"><span class="pre">false</span></tt>. Note that setting this to false
does <strong>not</strong> cause a default configuration file to be loaded.</p>
</dd></dl>
</div>
@ -293,16 +307,11 @@ how these are specified in JavaScript.</p>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="../configuration.html"
title="previous chapter">Loading and Configuring MathJax</a></p>
<p class="topless"><a href="index.html"
title="previous chapter">Configuration Objects</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="tex2jax.html"
title="next chapter">The tex2jax Preprocessor</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/options/hub.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -330,10 +339,10 @@ how these are specified in JavaScript.</p>
<a href="tex2jax.html" title="The tex2jax Preprocessor"
>next</a> |</li>
<li class="right" >
<a href="../configuration.html" title="Loading and Configuring MathJax"
<a href="index.html" title="Configuration Objects"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">

View File

@ -0,0 +1,191 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Configuration Objects &mdash; MathJax v1.1 documentation</title>
<link rel="stylesheet" href="../_static/mj.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '1.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="next" title="The Core Configuration Options" href="hub.html" />
<link rel="prev" title="Common Configurations" href="../config-files.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="hub.html" title="The Core Configuration Options"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../config-files.html" title="Common Configurations"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="configuration-objects">
<span id="configuration"></span><h1>Configuration Objects<a class="headerlink" href="#configuration-objects" title="Permalink to this headline"></a></h1>
<p>The various components of MathJax, including its input and output
processors, its preprocessors, its extensions, and the MathJax core,
all can be configured through the <tt class="docutils literal"><span class="pre">config/default.js</span></tt> file, or via a
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call (indeed, if you look closely, you
will see that <tt class="docutils literal"><span class="pre">config/default.js</span></tt> is itself one big call to
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt>). Anything that is in
<tt class="docutils literal"><span class="pre">config/default.js</span></tt> can be included in-line to configure MathJax.</p>
<p>The structure that you pass to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> is a
JavaScript object that includes name-value pairs giving the names of
parameters and their values, with pairs separated by commas. Be
careful not to include a comma after the last value, however, as some
browsers (namely Internet Explorer) will fail to process the
configuration if you do.</p>
<p>The MathJax components, like the TeX input processor, have their own
sections in the configuration object, labeled by the component name,
and using a configuration object as its value. The object is itself
a configuration object made up of name-value pairs that give the
configuration options for the component.</p>
<p>For example,</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">showProcessingMessages</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span> <span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">],</span>
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">TagSide</span><span class="o">:</span> <span class="s2">&quot;left&quot;</span><span class="p">,</span>
<span class="nx">Macros</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">RR</span><span class="o">:</span> <span class="s1">&#39;{\\bf R}&#39;</span><span class="p">,</span>
<span class="nx">bold</span><span class="o">:</span> <span class="p">[</span><span class="s1">&#39;{\\bf #1}&#39;</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>is a configuration that includes two settings for the MathJax Hub (one
for <cite>showProcessingMessages</cite> and one of the <cite>jax</cite> array), and a
configuration object for the TeX input processor. The latter includes
a setting for the TeX input processor&#8217;s <cite>TagSide</cite> option (to set tags
on the left rather than the right) and a setting for <cite>Macros</cite>, which
defines new TeX macros (in this case, two macros, one called <tt class="docutils literal"><span class="pre">\RR</span></tt>
that produces a bold &#8220;R&#8221;, and one called <tt class="docutils literal"><span class="pre">\bold</span></tt> that puts is
argument in bold face).</p>
<p>The <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file is another example that shows nearly
all the configuration options for all of MathJax&#8217;s components.</p>
<div class="section" id="configuration-options-by-component">
<h2>Configuration Options by Component<a class="headerlink" href="#configuration-options-by-component" title="Permalink to this headline"></a></h2>
<p>The individual options are explained in the following sections, which
are categorized by the component they affect.</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="hub.html">The core options</a></li>
</ul>
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="tex2jax.html">The tex2jax preprocessor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="mml2jax.html">The mml2jax preprocessor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="jsMath2jax.html">The jsMath2jax preprocessor options</a></li>
</ul>
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="TeX.html">The TeX input processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="MathML.html">The MathML input processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="HTML-CSS.html">The HTML-CSS output processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="NativeMML.html">The NativeMML output processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="MMLorHTML.html">The MMLorHTML configuration options</a></li>
</ul>
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="MathMenu.html">The MathMenu options</a></li>
<li class="toctree-l1"><a class="reference internal" href="MathZoom.html">The MathZoom options</a></li>
<li class="toctree-l1"><a class="reference internal" href="FontWarnings.html">The FontWarnings options</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Configuration Objects</a><ul>
<li><a class="reference internal" href="#configuration-options-by-component">Configuration Options by Component</a><ul>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="../config-files.html"
title="previous chapter">Common Configurations</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="hub.html"
title="next chapter">The Core Configuration Options</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="hub.html" title="The Core Configuration Options"
>next</a> |</li>
<li class="right" >
<a href="../config-files.html" title="Common Configurations"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>

View File

@ -21,9 +21,9 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The TeX input processor" href="TeX.html" />
<link rel="prev" title="The mml2jax Preprocessor" href="mml2jax.html" />
</head>
@ -42,7 +42,7 @@
<a href="mml2jax.html" title="The mml2jax Preprocessor"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -110,11 +110,6 @@ details on how to represent HTML code in this way.</p>
<h4>Next topic</h4>
<p class="topless"><a href="TeX.html"
title="next chapter">The TeX input processor</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/options/jsMath2jax.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -145,7 +140,7 @@ details on how to represent HTML code in this way.</p>
<a href="mml2jax.html" title="The mml2jax Preprocessor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">

View File

@ -21,9 +21,9 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The jsMath2jax Preprocessor" href="jsMath2jax.html" />
<link rel="prev" title="The tex2jax Preprocessor" href="tex2jax.html" />
</head>
@ -42,7 +42,7 @@
<a href="tex2jax.html" title="The tex2jax Preprocessor"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -110,11 +110,6 @@ details on how to represent HTML code in this way.</p>
<h4>Next topic</h4>
<p class="topless"><a href="jsMath2jax.html"
title="next chapter">The jsMath2jax Preprocessor</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/options/mml2jax.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -145,7 +140,7 @@ details on how to represent HTML code in this way.</p>
<a href="tex2jax.html" title="The tex2jax Preprocessor"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">

View File

@ -21,9 +21,9 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="Loading and Configuring MathJax" href="../configuration.html" />
<link rel="up" title="Configuration Objects" href="index.html" />
<link rel="next" title="The mml2jax Preprocessor" href="mml2jax.html" />
<link rel="prev" title="The Core Configuration Options" href="hub.html" />
</head>
@ -42,7 +42,7 @@
<a href="hub.html" title="The Core Configuration Options"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Configuration Objects</a> &raquo;</li>
</ul>
</div>
@ -205,11 +205,6 @@ been marked as ignored above.</p>
<h4>Next topic</h4>
<p class="topless"><a href="mml2jax.html"
title="next chapter">The mml2jax Preprocessor</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/options/tex2jax.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
@ -240,7 +235,7 @@ been marked as ignored above.</p>
<a href="hub.html" title="The Core Configuration Options"
>previous</a> |</li>
<li><a href="../index.html">MathJax v1.1 documentation</a> &raquo;</li>
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> &raquo;</li>
<li><a href="index.html" >Configuration Objects</a> &raquo;</li>
</ul>
</div>
<div class="footer">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="The MathJax Community" href="community.html" />
<link rel="prev" title="MathJax MathML Support" href="mathml.html" />
@ -57,9 +57,16 @@
<li>Using a browser&#8217;s native MathML support.</li>
</ul>
<p>These are implemented by the <cite>HTML-CSS</cite> and <cite>NativeMML</cite> output
processors. You select which one you want to use by including either
<tt class="docutils literal"><span class="pre">&quot;output/HTML-CSS&quot;</span></tt> or <tt class="docutils literal"><span class="pre">&quot;output/NativeMML&quot;</span></tt> in the <cite>jax</cite> array of
your MathJax configuration. For example</p>
processors.</p>
<p>If you are using one of the combined configuration files, then this will
select one of these output processors for you. If the config file ends in
<tt class="docutils literal"><span class="pre">_HTML</span></tt>, then it is the HTML-CSS output processor, and if it ends in
<tt class="docutils literal"><span class="pre">_HTMLorMML</span></tt>, then the NativeMML output processor will be chosen if the
browser supports it, otherwise HTML-CSS output will be used.</p>
<p>If you are performing your own in-line or file-based configuration, you
select which one you want to use by including either <tt class="docutils literal"><span class="pre">&quot;output/HTML-CSS&quot;</span></tt>
or <tt class="docutils literal"><span class="pre">&quot;output/NativeMML&quot;</span></tt> in the <cite>jax</cite> array of your MathJax configuration.
For example</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">]</span>
</pre></div>
</div>
@ -69,7 +76,7 @@ in your document.</p>
major browsers, with results that are consistent across browsers and
operating systems. This is MathJax&#8217;s primary output mode. It&#8217;s major
advantage is its quality and consistency; it&#8217;s drawback is that it is
slower that the NativeMML mode at rendering the mathematics. (The
slower than the NativeMML mode at rendering the mathematics. (The
HTML-CSS processor has not yet been optimized for speed, so you can
expect some improvement in the future. Note that IE8 in &#8220;IE8
standards mode&#8221; is an order of magnitude slower than any other browser
@ -83,58 +90,75 @@ MathML. Opera has some built-in support for MathML that works well
with simple equations, but fails with more complex formulas, so we
don&#8217;t recommend using the NativeMML output processor with Opera. Safari,
Chrome, Konqueror, and most other browsers don&#8217;t support MathML
natively.</p>
<p>The advantage of the NativeMML output Processor is its speed, since
native MathML support is much faster than using complicated HTML and
CSS to lay out mathematics via an interpreted language like JavaScript
(as the HTML-CSS output processor does). The disadvantage is that you
are dependent on the browser&#8217;s MathML implementation for your
natively, but may in the future, since MathML is part of the HTML5
specification.</p>
<p>The advantage of the NativeMML output Processor is its speed, since native
MathML support is much faster than using complicated HTML and CSS to lay
out mathematics, as the HTML-CSS output processor does. The disadvantage
is that you are dependent on the browser&#8217;s MathML implementation for your
rendering, and these vary in quality of output and completeness of
implementation. MathJax may rely on features that are not available
in some renderers (for example, Firefox&#8217;s MathML support does not
implement some of the named widths, such as
<tt class="docutils literal"><span class="pre">negativethinmathspace</span></tt>). The results using the NativeMML output
processor may have spacing or other rendering problems that are
outside of MathJax&#8217;s control.</p>
implementation. MathJax may rely on features that are not available in
some renderers (for example, Firefox&#8217;s MathML support does not implement
some of the named widths, such as <tt class="docutils literal"><span class="pre">negativethinmathspace</span></tt>). The results
using the NativeMML output processor may have spacing or other rendering
problems that are outside of MathJax&#8217;s control.</p>
<div class="section" id="automatic-selection-of-the-output-processor">
<h2>Automatic Selection of the Output Processor<a class="headerlink" href="#automatic-selection-of-the-output-processor" title="Permalink to this headline"></a></h2>
<p>Since not all browsers support MathML natively, it would be unwise to
choose the NativeMML output processor unless you are sure of your
audience&#8217;s browser capabilities. MathJax can help with that, however,
since there is a special configuration file that will choose between
NativeMML and HTML-CSS depending on the browser in use. To invoke it,
add <tt class="docutils literal"><span class="pre">&quot;MMLorHTML.js&quot;</span></tt> to your configurations <cite>config</cite> array, and <strong>do
not</strong> include an output processor in your <cite>jax</cite> array; MathJax will
fill that in for you based on the abilities of your user&#8217;s browser.</p>
since a number of its combined configuration files will select NativeMML
output when the browser supports it, and HTML-CSS output otherwise. These
are the configuration files that end in <tt class="docutils literal"><span class="pre">_HTMLorMML</span></tt>.</p>
<p>If you are doing your own configuration, there is a special configuration
file that you can include that will choose between NativeMML and HTML-CSS
depending on the browser in use. To invoke it, add <tt class="docutils literal"><span class="pre">&quot;MMLorHTML.js&quot;</span></tt> to
your configurations <cite>config</cite> array, and <strong>do not</strong> include an output
processor in your <cite>jax</cite> array; MathJax will fill that in for you based on
the abilities of your user&#8217;s browser.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;MMLorHTML.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">]</span>
</pre></div>
</div>
<p>You can customize which choice to make on a browser-by-browser basis
or a global basis. See the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file or the
<a class="reference internal" href="configuration.html#configuration"><em>Configuring MathJax</em></a> section for futher
details.</p>
or a global basis. See the <tt class="docutils literal"><span class="pre">config/default.js</span></tt> file or the
<a class="reference internal" href="options/MMLorHTML.html#configure-mmlorhtml"><em>Configuring MMLorHTML</em></a> section for futher
details. As an example, this configuration tells MathJax to use HTML-CSS
output rather than native MathML support for Firefox:</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">MMLorHTML</span><span class="o">:</span> <span class="p">{</span> <span class="nx">prefer</span><span class="o">:</span> <span class="p">{</span> <span class="nx">Firefox</span><span class="o">:</span> <span class="s2">&quot;HTML&quot;</span> <span class="p">}</span> <span class="p">}</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
<span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>With this configuration, MathML output will be used only for IE with the
MathPlayer plugin (Firefox is the only other browser to have native MathML
support that is sufficient for use with MathJax). Note, however, that a
user can employ the MathJax contectual menu to select the other renderer if
he or she wishes.</p>
<p>MathJax produces MathML that models the underlying mathematics as best
it can, rather than using complicated hacks to improve output for a
particular MathML implementation. When you make the choice to use the
NativeMML output processor, you are making a trade-off: gaining speed
at the expense of quality and reliability, a decision that should not
be taken lightly. Note, however, that a user can employ the MathJax
contectual menu to select the other other renderer if he or she
wishes.</p>
be taken lightly.</p>
</div>
<div class="section" id="html-css-with-ie8">
<span id="id1"></span><h2>HTML-CSS with IE8<a class="headerlink" href="#html-css-with-ie8" title="Permalink to this headline"></a></h2>
<p>Internet Explorer 8 has at least eight different rendering modes in
which can operate, and that are triggered by the <cite>DOCTYPE</cite> of the
document being viewed. Its &#8220;quirks&#8221; mode is its fastest mode, and its
&#8220;IE8 standards&#8221; mode is its slowest. This is the mode triggered by
strict HTML document types, and since most modern content management
systems now include a <cite>DOCTYPE</cite> that activates &#8220;standards&#8221; mode, IE8
will operate in its slowest manner. This is particularly apparent
when MathJax is used, since IE8 in standards mode runs 20 to 30 times
slower than it does in its IE7 emulation mode, and 60 times slower
than in quirks mode.</p>
<p>Internet Explorer 8 has at least eight different rendering modes in which
it can operate, and that are triggered by the <cite>DOCTYPE</cite> of the document
being viewed. Its &#8220;quirks&#8221; mode is its fastest mode, and its &#8220;IE8
standards&#8221; mode is its slowest. This is the mode triggered by strict HTML
document types, and since most modern content management systems now
include a <cite>DOCTYPE</cite> that activates &#8220;standards&#8221; mode, IE8 will operate in
its slowest manner. This is particularly apparent when MathJax is used,
since IE8 in standards mode runs 20 to 30 times slower than it does in its
IE7 emulation mode, and 60 times slower than in quirks mode, on the sample
equations page in <tt class="docutils literal"><span class="pre">test/sample.html</span></tt>.</p>
<p>Most users find this speed reduction unacceptable when there is much
mathematics on the page. To overcome this problem, you may wish to
tell IE8 to use its IE7 emulation mode rather than its IE8 standards
@ -151,6 +175,9 @@ before any stylesheets or other content are loaded.</p>
described above to select NativeMML output when possible, and request
that your users install the <a class="reference external" href="http://www.dessci.com/en/products/mathplayer/">MathPlayer plugin</a>, which will render
the mathematics much more quickly.</p>
<p>It appears that IE9 in IE9 standards mode may perform better than IE8, but
since IE9 is still in beta testing as of this writing, we have yet to see
exactly what the performance of MathJax in IE9 will be like.</p>
</div>
</div>
@ -175,11 +202,6 @@ the mathematics much more quickly.</p>
<h4>Next topic</h4>
<p class="topless"><a href="community.html"
title="next chapter">The MathJax Community</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/output.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="next" title="Installing MathJax in WordPress" href="wordpress.html" />
<link rel="prev" title="The FontWarnings extension" href="../options/FontWarnings.html" />
@ -51,6 +51,15 @@
<div class="section" id="using-mathjax-in-popular-web-platforms">
<span id="platforms"></span><h1>Using MathJax in popular web platforms<a class="headerlink" href="#using-mathjax-in-popular-web-platforms" title="Permalink to this headline"></a></h1>
<p>MathJax plugins are available for a growing number of wikis, blogs, and
other content-management systems. These include WordPress, Blogger,
Sphinx, TiddlyWiki, and MathEL-Wiki. A list of these is available in the
<a class="reference external" href="http://www.mathjax.org/community/mathjax-in-use/#web-apps">web applications and integrations</a> list of the
<a class="reference external" href="http://www.mathjax.org">MathJax web site</a>.</p>
<p>If the program you are using is not one of these, you may still be able to
use MathJax by modifying the theme or template for your wiki or blog.</p>
<div class="section" id="using-mathjax-in-a-theme-file">
<h2>Using MathJax in a Theme File<a class="headerlink" href="#using-mathjax-in-a-theme-file" title="Permalink to this headline"></a></h2>
<p>Most web-based content-management systems include a theme or template
layer that determines how the pages look, and that loads information
common to all pages. Such theme files provide one popular way to
@ -61,12 +70,11 @@ which probably means you need to be an administrator for the site; if
you are not, you may need to have an administrator do these steps for
you.</p>
<p>To enable MathJax in your web platform, add the line:</p>
<div class="highlight-python"><pre>&lt;script type="text/javascript" src="path-to-MathJax/MathJax.js"&gt;&lt;/script&gt;</pre>
<div class="highlight-python"><pre>&lt;script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&gt;&lt;/script&gt;</pre>
</div>
<p>(where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is the web-address of the main MathJax
directory for your server) either just before the <tt class="docutils literal"><span class="pre">&lt;/head&gt;</span></tt> tag in
your theme file, or at the end of the file if it contains no
<tt class="docutils literal"><span class="pre">&lt;/head&gt;</span></tt>.</p>
<p>either just before the <tt class="docutils literal"><span class="pre">&lt;/head&gt;</span></tt> tag in your theme file, or at the end of
the file if it contains no <tt class="docutils literal"><span class="pre">&lt;/head&gt;</span></tt>.</p>
<p>The theme files for various popular platforms are:</p>
<blockquote>
<div><dl class="docutils">
@ -89,6 +97,7 @@ your theme file, or at the end of the file if it contains no
<p>Keep in mind that this will enable MathJax for your current
theme/template only. If you change themes or update your theme, you
will have to repeat these steps.</p>
</div>
<div class="section" id="insructions-for-specific-platforms">
<h2>Insructions for Specific Platforms<a class="headerlink" href="#insructions-for-specific-platforms" title="Permalink to this headline"></a></h2>
<p>Some programs, such as WordPress and Moveable Type, allow you to edit
@ -112,6 +121,7 @@ instructions for these are given via the links below.</p>
<h3><a href="../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Using MathJax in popular web platforms</a><ul>
<li><a class="reference internal" href="#using-mathjax-in-a-theme-file">Using MathJax in a Theme File</a></li>
<li><a class="reference internal" href="#insructions-for-specific-platforms">Insructions for Specific Platforms</a><ul>
</ul>
</li>
@ -125,11 +135,6 @@ instructions for these are given via the links below.</p>
<h4>Next topic</h4>
<p class="topless"><a href="wordpress.html"
title="next chapter">Installing MathJax in WordPress</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/platforms/index.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="Using MathJax in popular web platforms" href="index.html" />
<link rel="next" title="MathJax TeX and LaTeX Support" href="../tex.html" />
@ -53,8 +53,6 @@
<div class="section" id="using-mathjax-in-movable-type">
<span id="platform-movable-type"></span><h1>Using MathJax in Movable Type<a class="headerlink" href="#using-mathjax-in-movable-type" title="Permalink to this headline"></a></h1>
<p>These instructions assume you already have placed the MathJax files on
your server (see <a class="reference internal" href="../installation.html#installation"><em>Installing and Testing MathJax</em></a>).</p>
<ol class="arabic">
<li><p class="first">Open Moveable Type Admin interface for the site on which you want to enable
MathJax.</p>
@ -72,19 +70,20 @@ and open the <cite>HTML Head</cite> template.</p>
</div></blockquote>
</li>
<li><p class="first">At the end of the file, insert</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;path-to-MathJax/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
<span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is replaced by the web-address of the
main MathJax dorectory on your server.</p>
<p>to load MathJax from our distributed netowrk service.</p>
<blockquote>
<div><img alt="../_images/mt_head.png" src="../_images/mt_head.png" />
</div></blockquote>
</li>
<li><p class="first">Save the file. This should enable MathJax, so you should be able
to start adding mathematical content to your pages. Use the
<tt class="docutils literal"><span class="pre">config/MathJas.js</span></tt> file in the MathJax directory to configure
MathJax to your needs (see <a class="reference internal" href="../configuration.html#configuration"><em>Configuring MathJax</em></a> for details).</p>
<li><p class="first">Save the file. This will enable MathJax with both TeX and MathML
input, so you should be able to start adding mathematical content to
your pages. If you need to adjust the configuraiton, see
<a class="reference internal" href="../configuration.html#loading"><em>Configuring MathJax</em></a> for more details.</p>
</li>
</ol>
</div>
@ -101,11 +100,6 @@ MathJax to your needs (see <a class="reference internal" href="../configuration.
<h4>Next topic</h4>
<p class="topless"><a href="../tex.html"
title="next chapter">MathJax TeX and LaTeX Support</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/platforms/movable-type.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="../index.html" />
<link rel="up" title="Using MathJax in popular web platforms" href="index.html" />
<link rel="next" title="Using MathJax in Movable Type" href="movable-type.html" />
@ -53,8 +53,8 @@
<div class="section" id="installing-mathjax-in-wordpress">
<span id="platform-wordpress"></span><h1>Installing MathJax in WordPress<a class="headerlink" href="#installing-mathjax-in-wordpress" title="Permalink to this headline"></a></h1>
<p>These instructions assume you already have placed the MathJax files on
your server (see <a class="reference internal" href="../installation.html#installation"><em>Installing MathJax</em></a>).</p>
<p>Note that there is a <a class="reference external" href="http://wordpress.org/extend/plugins/mathjax-latex/">WordPress plugin for MathJax</a>, so that may be a
better choice than editing the theme directly.</p>
<ol class="arabic">
<li><p class="first">Open the WordPress admin interface.</p>
</li>
@ -74,18 +74,18 @@ header file (it should be <tt class="docutils literal"><span class="pre">header.
<p>This part depends slightly on how your current theme is written.
In the <tt class="docutils literal"><span class="pre">header.php</span></tt> file, look for the end-of-head tag,
<tt class="docutils literal"><span class="pre">&lt;/head&gt;</span></tt>. If you find it, insert</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;path-to-MathJax/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
<span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>just before that. Otherwise, insert the same code at the very
bottom of the file. Here, <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> should be replaced
by the web-address of the main MathJax directory on your server,
e.g., <tt class="docutils literal"><span class="pre">src=&quot;/mathjax/MathJax.js&quot;</span></tt>.</p>
bottom of the file.</p>
</li>
<li><p class="first">Save the file. This should enable MathJax, so you should be able to
start adding mathematical content to your pages. Use the
<tt class="docutils literal"><span class="pre">config/MathJas.js</span></tt> file in the MathJax directory to configure
MathJax to your needs (see <a class="reference internal" href="../configuration.html#configuration"><em>Configuring MathJax</em></a> for details).</p>
<li><p class="first">Save the file. This will enable MathJax with both TeX and MathML
input, so you should be able to start adding mathematical content to
your pages. If you need to adjust the configuraiton, see
<a class="reference internal" href="../configuration.html#loading"><em>Configuring MathJax</em></a> for more details.</p>
</li>
</ol>
</div>
@ -102,11 +102,6 @@ MathJax to your needs (see <a class="reference internal" href="../configuration.
<h4>Next topic</h4>
<p class="topless"><a href="movable-type.html"
title="next chapter">Using MathJax in Movable Type</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/platforms/wordpress.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" />
<link rel="next" title="Using Signals" href="signals.html" />
@ -290,11 +290,6 @@ finishes everything it has queued when it was loaded. For example,</p>
<h4>Next topic</h4>
<p class="topless"><a href="signals.html"
title="next chapter">Using Signals</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/queues.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -22,7 +22,7 @@
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/searchtools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<script type="text/javascript">
jQuery(function() { Search.loadIndex("searchindex.js"); });

File diff suppressed because one or more lines are too long

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" />
<link rel="next" title="Loading MathJax Dynamically" href="dynamic.html" />
@ -213,11 +213,6 @@ structure and methods of the signal object.</p>
<h4>Next topic</h4>
<p class="topless"><a href="dynamic.html"
title="next chapter">Loading MathJax Dynamically</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/signals.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="Installing and Testing MathJax" href="installation.html" />
<link rel="prev" title="What is MathJax?" href="mathjax.html" />
@ -52,8 +52,50 @@
<div class="section" id="getting-started">
<span id="id1"></span><h1>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline"></a></h1>
<p>MathJax allows you to include mathematics in your web pages, either
using TeX and LaTeX notation, or as MathML. To use MathJax, you will
need to do the following things:</p>
using TeX and LaTeX notation, or as MathML, and you can even use both
in the same document.</p>
<p>There are two ways to access MathJax: the easiest way is to use the
copy of MathJax available from our distributed network service at
<tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt>, but you can also download and install a copy of
MathJax on your own server, or for use locally on your own hard disk
(with no need for network access). Both of these are described below,
with links to more detailed explanations. This page gives the
quickest and easiest ways to get MathJax up and running on your web
site, but you may want to read the details in order to customize the
setup for your pages.</p>
<div class="section" id="using-the-mathjax-content-delivery-network-cdn">
<span id="mathjax-cdn"></span><h2>Using the MathJax Content Delivery Network (CDN)<a class="headerlink" href="#using-the-mathjax-content-delivery-network-cdn" title="Permalink to this headline"></a></h2>
<p>To use MathJax from our server, you need to do two things:</p>
<ol class="arabic simple">
<li>Link MathJax into the web pages that are to include mathematics.</li>
<li>Put mathematics into your web pages so that MathJax can display
it.</li>
</ol>
<p>You accomplish the first step by putting</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>into the <tt class="docutils literal"><span class="pre">&lt;head&gt;</span></tt> block of your document. (It can also go in the
<tt class="docutils literal"><span class="pre">&lt;body&gt;</span></tt> if necessary, but the head is to be preferred.) This will
load the latest version of MathJax from the distributed server, and
configure it to recognize mathematics in both TeX and MathML notation,
and ask it to generate its output using MathML if the browser supports
that, and otherwise use HTML-with-CSS to display the mathematics.
This is the most general configuration, and should suffice for most
people&#8217;s needs. Other configurations are available, however, and you
can also provide additional configuration parameters to taylor one of
the confiogurations to your needs. More details can be found in the
<a class="reference internal" href="configuration.html#loading"><em>Loading and Configuring MathJax</em></a> instructions.</p>
<p>The use of <tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt> is governed by its <a class="reference external" href="http://www.mathjax.org/download/mathjax-cdn-terms-of-service/">terms of service</a>, so be
sure to read that before linked to the MathJax CDN server.</p>
<p>To see how to enter mathematics in your web pages, see <a class="reference internal" href="#putting-mathematics-in-a-web-page">Putting
mathematics in a web page</a> below.</p>
</div>
<div class="section" id="installing-your-own-copy-of-mathjax">
<h2>Installing Your Own Copy of MathJax<a class="headerlink" href="#installing-your-own-copy-of-mathjax" title="Permalink to this headline"></a></h2>
<p>We recommend using the CDN service if you can, but you can also install
MathJax on your own server, or locally on your own hard disk. To do
so you will need to do the following things:</p>
<ol class="arabic simple">
<li>Obtain a copy of MathJax and make it available on your server.</li>
<li>Configure MathJax to suit the needs of your site.</li>
@ -61,20 +103,16 @@ need to do the following things:</p>
<li>Put mathematics into your web pages so that MathJax can display
it.</li>
</ol>
<p>Each of these steps is described briefly below, with links to more
detailed explanations. This page gives the quickest and easiest ways
to get MathJax up and running on your web site, but you may want to
read the details in order to customize the setup for your pages.</p>
<div class="section" id="obtaining-and-installing-mathjax">
<h2>Obtaining and Installing MathJax<a class="headerlink" href="#obtaining-and-installing-mathjax" title="Permalink to this headline"></a></h2>
<h3>Obtaining and Installing MathJax<a class="headerlink" href="#obtaining-and-installing-mathjax" title="Permalink to this headline"></a></h3>
<p>The easiest way to set up MathJax is to obtain the v1.1 archive from
the <a class="reference external" href="http://www.mathjax.org/download/">MathJax download page</a> (you
should obtain a file names something like
<tt class="docutils literal"><span class="pre">mathjax-MathJax-v1.0-X-XXXXXXXX.zip</span></tt>, where the X&#8217;s are
should obtain a file named something like
<tt class="docutils literal"><span class="pre">mathjax-MathJax-v1.1-X-XXXXXXXX.zip</span></tt>, where the X&#8217;s are
random-looking letters and numbers). This archive includes both the
MathJax code and the MathJax webfonts, so it is the only file you
need. (This is different from the beta releases, which had the fonts
separate from the rest of the code).</p>
need. Note that this is different from earlier releases, which had
the fonts separate from the rest of the code.</p>
<p>Unpack the archive and place the resulting MathJax folder onto your
web server at a convenient location where you can include it into your
web pages. For example, making <tt class="docutils literal"><span class="pre">MathJax</span></tt> a top-level directory on
@ -83,60 +121,61 @@ refer to the main MathJax file via the URL <tt class="docutils literal"><span cl
from within any page on your server.</p>
<p>Note: While this is the easiest way to set up MathJax initially, there
is a better way to do it if you want to be able to keep your copy of
MathJax up-to-date easily. That uses the <a class="reference external" href="http://git-scm.com/">Git</a>
version control system, and is described in the <a class="reference internal" href="installation.html#getting-mathjax-git"><em>Installing
MathJax</em></a> document. If you prefer using
<a class="reference external" href="http://subversion.apache.org/">Subversion</a>, you can also use that
to get a copy of MathJax (see <a class="reference internal" href="installation.html#getting-mathjax-svn"><em>Installing MathJax via SVN</em></a>).</p>
MathJax up-to-date. That uses the <a class="reference external" href="http://git-scm.com/">Git</a> version
control system, and is described in the <a class="reference internal" href="installation.html#getting-mathjax-git"><em>Installing MathJax</em></a> document. If you prefer using <a class="reference external" href="http://subversion.apache.org/">Subversion</a>, you can also use that to get a copy
of MathJax (see <a class="reference internal" href="installation.html#getting-mathjax-svn"><em>Installing MathJax via SVN</em></a>).</p>
<p>Once you have MathJax set up on your server, you can test it using the
files in the <tt class="docutils literal"><span class="pre">MathJax/test</span></tt> directory. Load them in your browser
using its web address rather than opening them locally (i.e., use an
<tt class="docutils literal"><span class="pre">http://</span></tt> URL rather than a <tt class="docutils literal"><span class="pre">file://</span></tt> URL). When you view the
<tt class="docutils literal"><span class="pre">index.html</span></tt> file, after a few moments you should see a message that
MathJax appears to be working. If not, check that the files have been
transferred to the server completely and that the permissions allow
the server to access the files and folders that are part of the
MathJax directory. (Be sure to verify the MathJax folder&#8217;s permissions
as well.) Check the server log files for any errors that pertain to
the MathJax installation; this may help locate problems in the
permission or locations of files.</p>
<tt class="docutils literal"><span class="pre">index.html</span></tt> file, after a few moments you should see a message
indicating that MathJax appears to be working. If not, check that the
files have been transferred to the server completely and that the
permissions allow the server to access the files and folders that are
part of the MathJax directory. (Be sure to verify the MathJax
folder&#8217;s permissions as well.) Check the server log files for any
errors that pertain to the MathJax installation; this may help locate
problems in the permission or locations of files.</p>
</div>
<div class="section" id="configuring-mathjax">
<h2>Configuring MathJax<a class="headerlink" href="#configuring-mathjax" title="Permalink to this headline"></a></h2>
<div class="section" id="configuring-your-copy-of-mathjax">
<h3>Configuring your copy of MathJax<a class="headerlink" href="#configuring-your-copy-of-mathjax" title="Permalink to this headline"></a></h3>
<p>When you include MathJax into your web pages as described below, it
will load the file <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> (i.e., the file named
<tt class="docutils literal"><span class="pre">MathJax.js</span></tt> in the <tt class="docutils literal"><span class="pre">config</span></tt> folder of the main <tt class="docutils literal"><span class="pre">MathJax</span></tt>
folder). This file contains the configuration parameters that
control how MathJax operates. There are comments in it that
explain each of the parameters, and you can edit the file to suit
your needs.</p>
<p>The default settings are appropriate for pages that use TeX as the
input language, but you might still want to adjust some settings; for
example, you might want to include some additional extensions such as
the <tt class="docutils literal"><span class="pre">AMSmath</span></tt> and <tt class="docutils literal"><span class="pre">AMSsymbols</span></tt> extensions. The comments in the
file should help you do this, but more detailed instructions are
included in the <a class="reference internal" href="configuration.html#configuration"><em>Configuring MathJax</em></a> document.
There are also ways to configure MathJax other than by using the
<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file; these are descibed on that page as well.</p>
will load the file <tt class="docutils literal"><span class="pre">config/TeX-AMS-MML_HTMLorMML.js</span></tt> (i.e., the file
named <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML.js</span></tt> in the <tt class="docutils literal"><span class="pre">config</span></tt> folder of the
main <tt class="docutils literal"><span class="pre">MathJax</span></tt> folder). This file preloads all the most comply-used
components of MathJax, allowing it to process mathematics that is in
the TeX or LaTeX format, or in MathML notation. It will produce
output in MathML form if the user&#8217;s browser supports that, and will use
HTML-with-CSS to render the mathematics otherwise.</p>
<p>There are a number of other prebuilt configuration files that you can
choose from as well, or you could use the <tt class="docutils literal"><span class="pre">config/default.js</span></tt> file and
customize the settings yourself. The combined configuration files are
described more fully in <a class="reference internal" href="config-files.html#common-configurations"><em>Common Configurations</em></a>, and the configuration options are described in
<a class="reference internal" href="options/index.html#configuration"><em>Configuration Options</em></a>.</p>
<p>Note: The configuration process has changed in MathJax v1.1, so if you have
existing pages that use MathJax, you may need to modify the tag that
loads MathJax so that is conforms with the new configuration process.
See <a class="reference internal" href="installation.html#installation"><em>Installing and Configuring MathJax</em></a> for more
details.</p>
</div>
<div class="section" id="linking-mathjax-into-a-web-page">
<h2>Linking MathJax into a web page<a class="headerlink" href="#linking-mathjax-into-a-web-page" title="Permalink to this headline"></a></h2>
<div class="section" id="linking-your-copy-of-mathjax-into-a-web-page">
<h3>Linking your copy of MathJax into a web page<a class="headerlink" href="#linking-your-copy-of-mathjax-into-a-web-page" title="Permalink to this headline"></a></h3>
<p>You can include MathJax in your web page by putting</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;path-to-MathJax/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;path-to-MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>in your document&#8217;s <tt class="docutils literal"><span class="pre">&lt;head&gt;</span></tt> block. Here, <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> should
be replaced by the URL for the main MathJax directory, so if you have
put the <tt class="docutils literal"><span class="pre">MathJax</span></tt> directory at the top level of you server&#8217;s web
site, you could use</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>to load MathJax in your page. For example, your page could look like</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;html&gt;</span>
<span class="nt">&lt;head&gt;</span>
...
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
<span class="nt">&lt;/head&gt;</span>
<span class="nt">&lt;body&gt;</span>
...
@ -144,37 +183,36 @@ site, you could use</p>
<span class="nt">&lt;/html&gt;</span>
</pre></div>
</div>
<p>Although it is possible to load MathJax from a site other than your
own web server, there are issues involved in doing so that you need to
take into consideration. See the <a class="reference internal" href="installation.html#cross-domain-linking"><em>Notes About Shared Servers</em></a> for more details. Please do <strong>not</strong> link to
the copy of MathJax at <tt class="docutils literal"><span class="pre">www.mathjax.org</span></tt>, as we do not have the
resources to act as a web service for all the sites on the web that
would like to display mathematics. If you are able to run MathJax
from your own server, please do so (this will probably give you better
response time in any case).</p>
<p>If you have installed MathJax on a server that is in a different
domain from the one serving the page that loads MathJax, be sure to
read the <a class="reference internal" href="installation.html#cross-domain-linking"><em>Notes About Shared Servers</em></a> for
more details. In that case, you may wish to consider using the
<a class="reference internal" href="#mathjax-cdn"><em>MathJax CDN</em></a> rather than installing your own copy
of MathJax.</p>
</div>
</div>
<div class="section" id="putting-mathematics-in-a-web-page">
<h2>Putting mathematics in a web page<a class="headerlink" href="#putting-mathematics-in-a-web-page" title="Permalink to this headline"></a></h2>
<p>To put mathematics in your web page, you can use either TeX and LaTeX
notation, or MathML notation (or both); the configuration file tells
MathJax which you want to use, and how you plan to indicate the
mathematics when you are using TeX notation. The following sections
tell you how to use each of these formats.</p>
<p>To put mathematics in your web page, you can use either <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a>
and <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a> notation or <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> notation or both within
the same page; the MathJax configuration tells MathJax which you want
to use, and how you plan to indicate the mathematics when you are
using TeX notation. The configuration file used in the examples above
tells MathJax to look for both TeX and MathML notation within your
pages. These two formats are described in more detail below.</p>
<div class="section" id="tex-and-latex-input">
<span id="id2"></span><h3>TeX and LaTeX input<a class="headerlink" href="#tex-and-latex-input" title="Permalink to this headline"></a></h3>
<p>To process mathematics that is written in <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a> or <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a>
format, include <tt class="docutils literal"><span class="pre">&quot;input/TeX&quot;</span></tt> in your configuration&#8217;s <cite>jax</cite> array,
and add <tt class="docutils literal"><span class="pre">&quot;tex2jax.js&quot;</span></tt> to the <cite>extensions</cite> array so that MathJax
will look for TeX-style math delimiters to identify the mathematics on
the page.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2math.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span> <span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">]</span>
</pre></div>
</div>
<p>Note that the default math delimiters are <tt class="docutils literal"><span class="pre">$$...$$</span></tt> and <tt class="docutils literal"><span class="pre">\[...\]</span></tt>
for displayed mathematics, and <tt class="docutils literal"><span class="pre">\(...\)</span></tt> for in-line mathematics.
In particular, the <tt class="docutils literal"><span class="pre">$...$</span></tt> in-line delimiters are <strong>not</strong> used by
default. That is because dollar signs appear too often in
<p>Mathematics that is written in <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a> or <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a> format is
indicated using <em>math delimiters</em> that surround the mathematics,
telling MathJax what part of your page represents mathematics and what
is normal text. There are two types of equations: ones that occur
within a paragraph (in-line mathematics), and larger equations that
appear separated from the rest of the text on lines by themselves
(displayed mathematics).</p>
<p>The default math delimiters are <tt class="docutils literal"><span class="pre">$$...$$</span></tt> and <tt class="docutils literal"><span class="pre">\[...\]</span></tt> for
displayed mathematics, and <tt class="docutils literal"><span class="pre">\(...\)</span></tt> for in-line mathematics. Note
in particular that the <tt class="docutils literal"><span class="pre">$...$</span></tt> in-line delimiters are <strong>not</strong> used
by default. That is because dollar signs appear too often in
non-mathematical settings, which could cause some text to be treated
as mathematics unexpectedly. For example, with single-dollar
delimiters, &#8221;... the cost is $2.50 for the first one, and $2.00 for
@ -182,72 +220,81 @@ each additional one ...&#8221; would cause the phrase &#8220;2.50 for the first
one, and&#8221; to be treated as mathematics since it falls between dollar
signs. For this reason, if you want to use single-dollars for in-line
math mode, you must enable that explicitly in your configuration:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span><span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s1">&#39;$&#39;</span><span class="p">,</span><span class="s1">&#39;$&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;\\(&#39;</span><span class="p">,</span><span class="s1">&#39;\\)&#39;</span><span class="p">]]}</span>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span><span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s1">&#39;$&#39;</span><span class="p">,</span><span class="s1">&#39;$&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;\\(&#39;</span><span class="p">,</span><span class="s1">&#39;\\)&#39;</span><span class="p">]]}</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascipt&quot;</span> <span class="na">src=</span><span class="s">&quot;path-to-mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>See the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file, or the <a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration
<p>See the <tt class="docutils literal"><span class="pre">config/default.js</span></tt> file, or the <a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration
options</em></a> page, for additional configuration
parameters that you can specify for the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor.</p>
<p>Here is a complete sample page containing TeX mathematics (which
assumes that <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> is configured as described above):</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;html&gt;</span>
parameters that you can specify for the <cite>tex2jax</cite> preprocessor,
which is the component of MathJax that identifies TeX notation within
the page). See the <a class="reference internal" href="tex.html#tex-support"><em>TeX and LaTeX</em></a> page for
more on MathJax&#8217;s support for TeX.</p>
<p>Here is a complete sample page containing TeX mathematics (also available
in the <tt class="docutils literal"><span class="pre">test/sample-tex.html</span></tt> file):</p>
<div class="highlight-html"><div class="highlight"><pre><span class="cp">&lt;!DOCTYPE html&gt;</span>
<span class="nt">&lt;html&gt;</span>
<span class="nt">&lt;head&gt;</span>
<span class="nt">&lt;title&gt;</span>MathJax TeX Test Page<span class="nt">&lt;/title&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span><span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span><span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s1">&#39;$&#39;</span><span class="p">,</span><span class="s1">&#39;$&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;\\(&#39;</span><span class="p">,</span><span class="s1">&#39;\\)&#39;</span><span class="p">]]}});</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
<span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;/head&gt;</span>
<span class="nt">&lt;body&gt;</span>
When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
<span class="nt">&lt;/body&gt;</span>
<span class="nt">&lt;/html&gt;</span>
</pre></div>
</div>
<p>There are a number of extensions for the TeX input processor that you
might want to add to the <cite>extensions</cite> array. These include:</p>
<p>Since the TeX notation is part of the text of the page, there are some
caveats that you must keep in mind when you enter your mathematics.
In particular, you need to be careful about the use of less-than
signs, since those are what the browser uses to indicate the start of
a tag in HTML. Putting a space on both sides of the less-than sign
should be sufficient, but see <a class="reference internal" href="tex.html#tex-support"><em>TeX and LaTeX support</em></a> for details.</p>
<p>There are a number of extensions for the TeX input processor that are
loaded by the <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt> configuration. These include:</p>
<ul class="simple">
<li><cite>TeX/AMSmath.js</cite>, which defines the AMS math environments and
macros,</li>
<li><cite>TeX/AMSsymbols.js</cite>, which defines the macros for the symbols in
the msam10 and msbm10 fonts,</li>
the <cite>msam10</cite> and <cite>msbm10</cite> fonts,</li>
<li><cite>TeX/noErrors.js</cite>, which shows the original TeX code rather than
an error message when there is a problem processing the TeX, and</li>
<li><cite>TeX/noUndefined.js</cite>, which prevents undefined macros from
producing an error message, and instead shows the macro name in red.</li>
</ul>
<p>For example,</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2math.js&quot;</span><span class="p">,</span><span class="s2">&quot;TeX/noErrors.js&quot;</span><span class="p">,</span><span class="s2">&quot;TeX/noUndefined.js&quot;</span><span class="p">,</span>
<span class="s2">&quot;TeX/AMSmath.js&quot;</span><span class="p">,</span><span class="s2">&quot;TeX/AMSsymbols.js&quot;</span><span class="p">]</span>
</pre></div>
</div>
<p>loads all four extensions, in addition to the <tt class="docutils literal"><span class="pre">tex2math</span></tt>
preprocessor.</p>
<p>Other extensions may be loaded automatically when needed.</p>
</div>
<div class="section" id="mathml-input">
<h3>MathML input<a class="headerlink" href="#mathml-input" title="Permalink to this headline"></a></h3>
<p>To process mathematics written in <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a>, include
<tt class="docutils literal"><span class="pre">&quot;input/MathML&quot;</span></tt> in your configuration&#8217;s <cite>jax</cite> array, and add
<tt class="docutils literal"><span class="pre">&quot;mml2jax.js&quot;</span></tt> to the <cite>extensions</cite> array so that MathJax will
locate the <tt class="docutils literal"><span class="pre">&lt;math&gt;</span></tt> elements in the page automatically.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;mml2jax.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/MathML&quot;</span><span class="p">,</span> <span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">]</span>
</pre></div>
</div>
<p>With this configuration, you would mark your mathematics using
standard <tt class="docutils literal"><span class="pre">&lt;math&gt;</span></tt> tags, where <tt class="docutils literal"><span class="pre">&lt;math</span> <span class="pre">display=&quot;block&quot;&gt;</span></tt> represents
displayed mathematics and <tt class="docutils literal"><span class="pre">&lt;math</span> <span class="pre">display=&quot;inline&quot;&gt;</span></tt> or just
<tt class="docutils literal"><span class="pre">&lt;math&gt;</span></tt> represents in-line mathematics.</p>
<p>For mathematics written in <a class="reference internal" href="glossary.html#term-mathml"><em class="xref std std-term">MathML</em></a> notation, you mark your
mathematics using standard <tt class="docutils literal"><span class="pre">&lt;math&gt;</span></tt> tags, where <tt class="docutils literal"><span class="pre">&lt;math</span>
<span class="pre">display=&quot;block&quot;&gt;</span></tt> represents displayed mathematics and <tt class="docutils literal"><span class="pre">&lt;math</span>
<span class="pre">display=&quot;inline&quot;&gt;</span></tt> or just <tt class="docutils literal"><span class="pre">&lt;math&gt;</span></tt> represents in-line mathematics.</p>
<p>Note that this will work in HTML files, not just XHTML files (MathJax
works with both), and that the web page need not be served with any
special MIME-type. Also note that, unless you are using XHTML rather
than HTML, you should not include a namespace prefix for your
<tt class="docutils literal"><span class="pre">&lt;math&gt;</span></tt> tags; for example, you should not use <tt class="docutils literal"><span class="pre">&lt;m:math&gt;</span></tt> except
in a file where you have tied the <tt class="docutils literal"><span class="pre">m</span></tt> namespace to the MathML DTD.</p>
<p>Here is a complete sample page containing MathML mathematics (which
assumes that <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> is configured as described above):</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;html&gt;</span>
<p>Here is a complete sample page containing MathML mathematics (also
available in the <tt class="docutils literal"><span class="pre">test/sample-mml.html</span></tt> file):</p>
<div class="highlight-html"><div class="highlight"><pre><span class="cp">&lt;!DOCTYPE html&gt;</span>
<span class="nt">&lt;html&gt;</span>
<span class="nt">&lt;head&gt;</span>
<span class="nt">&lt;title&gt;</span>MathJax MathML Test Page<span class="nt">&lt;/title&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
<span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;/head&gt;</span>
<span class="nt">&lt;body&gt;</span>
@ -281,8 +328,22 @@ there are two solutions to <span class="nt">&lt;math&gt;</span>
<span class="nt">&lt;/html&gt;</span>
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">mml2jax</span></tt> has only a few configuration options; see the
<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file or the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration options</em></a> page for more details.</p>
<p>When entering MathML notation in an HTML page (rather than an XHTML
page), you should <strong>not</strong> use self-closing tags, but should use explicit
open and close tags for all your math elements. For example, you
should use</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;mspace</span> <span class="na">width=</span><span class="s">&quot;thinmathspace&quot;</span><span class="nt">&gt;&lt;/mspace&gt;</span>
</pre></div>
</div>
<p>rather than <tt class="docutils literal"><span class="pre">&lt;mspace</span> <span class="pre">width=&quot;5pt&quot;</span> <span class="pre">/&gt;</span></tt> in an HTML document. If you use the
self-closing form, some browsers will not build the math tree properly, and
MathJax will receive a damaged math structure, which will not be rendered
as the original notation would have been. Unfortunately, there is nothing
MathJax can do about that, since the browser has incorrectly interpreted
the tags long before MathJax has a chance to work with them.</p>
<p>The component of MathJax that recognizes MathML notation is called the
<cite>mml2jax</cite> extension, and it has only a few configuration options; see the
<tt class="docutils literal"><span class="pre">config/default.js</span></tt> file or the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration options</em></a> page for more details. See the <a class="reference internal" href="mathml.html#mathml-support"><em>MathML</em></a> page for more on MathJax&#8217;s MathML support.</p>
</div>
</div>
<div class="section" id="where-to-go-from-here">
@ -291,7 +352,7 @@ there are two solutions to <span class="nt">&lt;math&gt;</span>
MathJax installed and configured on your web server, and you should be
able to use it to write web pages that include mathematics. At this
point, you can start making pages that contain mathematical content!</p>
<p>You could also read more about the details of how to <a class="reference internal" href="configuration.html#configuration"><em>customize
<p>You could also read more about the details of how to <a class="reference internal" href="configuration.html#loading"><em>customize
MathJax</em></a>.</p>
<p>If you are trying to use MathJax in blog or wiki software or in some
other content-management system, you might want to read about <a class="reference internal" href="platforms/index.html#platforms"><em>using
@ -317,9 +378,13 @@ MathJax, you could visit the <a class="reference internal" href="community.html#
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Getting Started</a><ul>
<li><a class="reference internal" href="#using-the-mathjax-content-delivery-network-cdn">Using the MathJax Content Delivery Network (CDN)</a></li>
<li><a class="reference internal" href="#installing-your-own-copy-of-mathjax">Installing Your Own Copy of MathJax</a><ul>
<li><a class="reference internal" href="#obtaining-and-installing-mathjax">Obtaining and Installing MathJax</a></li>
<li><a class="reference internal" href="#configuring-mathjax">Configuring MathJax</a></li>
<li><a class="reference internal" href="#linking-mathjax-into-a-web-page">Linking MathJax into a web page</a></li>
<li><a class="reference internal" href="#configuring-your-copy-of-mathjax">Configuring your copy of MathJax</a></li>
<li><a class="reference internal" href="#linking-your-copy-of-mathjax-into-a-web-page">Linking your copy of MathJax into a web page</a></li>
</ul>
</li>
<li><a class="reference internal" href="#putting-mathematics-in-a-web-page">Putting mathematics in a web page</a><ul>
<li><a class="reference internal" href="#tex-and-latex-input">TeX and LaTeX input</a></li>
<li><a class="reference internal" href="#mathml-input">MathML input</a></li>
@ -336,11 +401,6 @@ MathJax, you could visit the <a class="reference internal" href="community.html#
<h4>Next topic</h4>
<p class="topless"><a href="installation.html"
title="next chapter">Installing and Testing MathJax</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/start.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="Synchronizing your code with MathJax" href="synchronize.html" />
<link rel="prev" title="The MathJax Processing Model" href="model.html" />
@ -103,11 +103,10 @@ pushed into the queue:</p>
<ol class="arabic simple" start="2">
<li>Perform the configuration actions:<ul>
<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Config</span></tt> startup signal</li>
<li>Execute the content of the <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> that loaded MathJax,
or load the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file if the <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt>
is empty</li>
<li>If the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.delayStartupUntil</span></tt> value is set,
wait until its condition is met</li>
<li>Load any configuration files specified via <tt class="docutils literal"><span class="pre">config=</span></tt> as a script parameter</li>
<li>Execute the content of the <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> that loaded MathJax, if it is not empty</li>
<li>Wait for the <tt class="docutils literal"><span class="pre">delayStartupUntil</span></tt> condition to be met, if one was specified</li>
<li>Execute any <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> script blocks</li>
<li>load the files listed in the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.config</span></tt> array</li>
<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Config</span></tt> startup signal</li>
</ul>
@ -156,12 +155,16 @@ the name of the extension)</li>
</li>
</ol>
<ol class="arabic simple" start="7">
<li>Wait for the onload handler to fire</li>
<li>Set the MathJax menu&#8217;s renderer value based on the jax that have been
loaded</li>
</ol>
<ol class="arabic simple" start="8">
<li>Set <tt class="docutils literal"><span class="pre">MathJax.isReady</span></tt> to <tt class="docutils literal"><span class="pre">true</span></tt></li>
<li>Wait for the onload handler to fire</li>
</ol>
<ol class="arabic simple" start="9">
<li>Set <tt class="docutils literal"><span class="pre">MathJax.isReady</span></tt> to <tt class="docutils literal"><span class="pre">true</span></tt></li>
</ol>
<ol class="arabic simple" start="10">
<li>Perform the typesetting pass (preprocessors and processors)<ul>
<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Typeset</span></tt> startup signal</li>
<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">PreProcess</span></tt> hub signal</li>
@ -179,9 +182,18 @@ with the math element&#8217;s ID</li>
</ul>
</li>
</ol>
<ol class="arabic simple" start="10">
<ol class="arabic simple" start="11">
<li>Post the <tt class="docutils literal"><span class="pre">End</span></tt> startup signal</li>
</ol>
<p>The loading of the jax and extensions in steps 5 and 6 are now done in
parallel, rather than sequentially. That is, all the jax and extensions
are requested simultaneously, so they load concurrently. That means they
can load in any order, and that the begin and end signals for the jax and
extensions can be intermixed. (In general, you will get <cite>Begin Jax</cite>
followed by <cite>Begin Extensions</cite>, but the order of <cite>End Jax</cite> and <cite>End
Extensions</cite> will depend on the file sbeing loaded.) Both 5 and 6 must
complete, however, before 7 will be performed.</p>
<p>See the <tt class="docutils literal"><span class="pre">test/sample-signals.html</span></tt> file to see the signals in action.</p>
</div>
@ -196,11 +208,6 @@ with the math element&#8217;s ID</li>
<h4>Next topic</h4>
<p class="topless"><a href="synchronize.html"
title="next chapter">Synchronizing your code with MathJax</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/startup.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="Using Callbacks" href="callbacks.html" />
<link rel="prev" title="The MathJax Startup Sequence" href="startup.html" />
@ -81,20 +81,19 @@ synchronize with MathJax, but you can also create your own private
queues for actions that need to be synchronized with each other, but
not to MathJax as a whole. See the <a class="reference internal" href="api/queue.html#api-queue"><em>Queue Object</em></a>
reference page for more details.</p>
<p><strong>Signals</strong> are another means of synchronizing your own code with
MathJax. Many of the important actions that MathJax takes (like
typesetting new math on the page, or loading an external component)
are &#8220;announced&#8221; by posting a message to a special object called a
<cite>Signal</cite>. Your code can register an interest in receiving one or more
of these signals by providing a callback to be called when the signal
is posted. When the signal arrives, MathJax will call your code.
This works somewhat like an event handler, except that many different
types of events can go through the same signal, and the signals have a
&#8220;memory&#8221;, meaning that if you register an interest in a particular
type of signal and that signal has already occurred, you will be told
about the past occurrances as well as any future ones. See the
<a class="reference internal" href="api/signal.html#api-signal"><em>Signal Object</em></a> reference page for more details.
See also the <tt class="docutils literal"><span class="pre">test/sample-signals.html</span></tt> file in the MathJax <tt class="docutils literal"><span class="pre">test</span></tt>
<p><strong>Signals</strong> are another means of synchronizing your own code with MathJax.
Many of the important actions that MathJax takes (like typesetting new math
on the page, or loading an external component) are &#8220;announced&#8221; by posting a
message to a special object called a <cite>Signal</cite>. Your code can register an
interest in receiving one or more of these signals by providing a callback
to be called when the signal is posted. When the signal arrives, MathJax
will call your code. This works somewhat like an event handler, except
that many different types of events can go through the same signal, and the
signals have a &#8220;memory&#8221;, meaning that if you register an interest in a
particular type of signal and that signal has already occurred, you will be
told about the past occurrances as well as any future ones. See the
<a class="reference internal" href="api/signal.html#api-signal"><em>Signal Object</em></a> reference page for more details. See
also the <tt class="docutils literal"><span class="pre">test/sample-signals.html</span></tt> file in the MathJax <tt class="docutils literal"><span class="pre">test</span></tt>
directory for a working example of using signals.</p>
<p>Each of these is explained in more detail in the links below:</p>
<div class="toctree-wrapper compound">
@ -118,11 +117,6 @@ directory for a working example of using signals.</p>
<h4>Next topic</h4>
<p class="topless"><a href="callbacks.html"
title="next chapter">Using Callbacks</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/synchronize.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="MathJax MathML Support" href="mathml.html" />
<link rel="prev" title="Using MathJax in Movable Type" href="platforms/movable-type.html" />
@ -51,13 +51,13 @@
<div class="section" id="mathjax-tex-and-latex-support">
<span id="tex-support"></span><h1>MathJax TeX and LaTeX Support<a class="headerlink" href="#mathjax-tex-and-latex-support" title="Permalink to this headline"></a></h1>
<p>The support for TeX and LaTeX in MathJax consists of two parts: the
<cite>tex2jax</cite> preprocessor, and the TeX input processor. The first of
these looks for mathematics within your web page (indicated by math
delimiters like <tt class="docutils literal"><span class="pre">$$...$$</span></tt>) and marks the mathematics for later
processing by MathJax. The TeX input processor is what converts the
TeX notation into MathJax&#8217;s internal format, where one of MathJax&#8217;s
output processors then displays it in the web page.</p>
<p>The support for <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a> and <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a> in MathJax consists of two
parts: the <cite>tex2jax</cite> preprocessor, and the <cite>TeX</cite> input processor. The
first of these looks for mathematics within your web page (indicated by
math delimiters like <tt class="docutils literal"><span class="pre">$$...$$</span></tt>) and marks the mathematics for later
processing by MathJax. The TeX input processor is what converts the TeX
notation into MathJax&#8217;s internal format, where one of MathJax&#8217;s output
processors then displays it in the web page.</p>
<p>The <cite>tex2jax</cite> preprocessor can be configured to look for whatever
markers you want to use for your math delimiters. See the
<a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration options</em></a> section for
@ -76,6 +76,40 @@ does not implement <tt class="docutils literal"><span class="pre">\emph</span></
<tt class="docutils literal"><span class="pre">\begin{enumerate}...\end{enumerate}</span></tt> or other text-mode macros or
environments. You must use HTML to handle such formatting tasks. If
you need a LaTeX-to-HTML converter, you should consider <a class="reference external" href="http://www.google.com/search?q=latex+to+html+converter">other options</a>.</p>
<div class="section" id="tex-and-latex-math-delimiters">
<h2>TeX and LaTeX math delimiters<a class="headerlink" href="#tex-and-latex-math-delimiters" title="Permalink to this headline"></a></h2>
<p>By default, the <cite>tex2jax</cite> preprocesor defines the LaTeX math delimiters,
which are <tt class="docutils literal"><span class="pre">\(...\)</span></tt> for in-line math, and <tt class="docutils literal"><span class="pre">\[...\]</span></tt> for displayed
equations. It also defines the TeX delimiters <tt class="docutils literal"><span class="pre">$$...$$</span></tt> for displayed
equations, but it does <strong>not</strong> define <tt class="docutils literal"><span class="pre">$...$</span></tt> as in-line math
delimiters. That is because dollar signs appear too often in
non-mathematical settings, which could cause some text to be treated
as mathematics unexpectedly. For example, with single-dollar
delimiters, &#8221;... the cost is $2.50 for the first one, and $2.00 for
each additional one ...&#8221; would cause the phrase &#8220;2.50 for the first
one, and&#8221; to be treated as mathematics since it falls between dollar
signs. For this reason, if you want to use single-dollars for in-line
math mode, you must enable that explicitly in your configuration:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s1">&#39;$&#39;</span><span class="p">,</span><span class="s1">&#39;$&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;\\(&#39;</span><span class="p">,</span><span class="s1">&#39;\\)&#39;</span><span class="p">]],</span>
<span class="nx">processEscapes</span><span class="o">:</span> <span class="kc">true</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>Note that if you do this, you may want to also set <tt class="docutils literal"><span class="pre">processEscapes</span></tt> to
<tt class="docutils literal"><span class="pre">true</span></tt>, as in the example above, so that you can use <tt class="docutils literal"><span class="pre">\$</span></tt> to prevent a
dollar sign from being treated as a math delimiter within the text of your
web page. (Note that within TeX mathematics, <tt class="docutils literal"><span class="pre">\$</span></tt> always has this
meaning; <tt class="docutils literal"><span class="pre">processEscapes</span></tt> only affects the treatment of the <em>opening</em>
math delimiter.)</p>
<p>See the <tt class="docutils literal"><span class="pre">config/default.js</span></tt> file, or the <a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration
options</em></a> page, for additional configuration
parameters that you can specify for the <cite>tex2jax</cite> preprocessor,
which is the component of MathJax that identifies TeX notation within
the page).</p>
</div>
<div class="section" id="tex-and-latex-in-html-documents">
<h2>TeX and LaTeX in HTML documents<a class="headerlink" href="#tex-and-latex-in-html-documents" title="Permalink to this headline"></a></h2>
<p>Keep in mind that your mathematics is part of an HTML document, so you
@ -123,41 +157,63 @@ does.</p>
<div class="section" id="tex-and-latex-extensions">
<span id="tex-extensions"></span><h2>TeX and LaTeX extensions<a class="headerlink" href="#tex-and-latex-extensions" title="Permalink to this headline"></a></h2>
<p>While MathJax includes nearly all of the Plain TeX math macros, and
many of the LaTeX macros and environments, note everything is
many of the LaTeX macros and environments, not everything is
implemented in the core TeX input processor. Some less-used commands
are defined in extensions to the TeX processor. MathJax will load
some extensions automatically when you first use the commands they
implement (for example, the <tt class="docutils literal"><span class="pre">\def</span></tt> and <tt class="docutils literal"><span class="pre">\newcommand</span></tt> macros are
implemented in the <tt class="docutils literal"><span class="pre">TeX/newcommand.js</span></tt> extension, but MathJax loads
implemented in the <tt class="docutils literal"><span class="pre">newcommand.js</span></tt> extension, but MathJax loads
this extension itself when you use those macros). Not all extensions
are set up to load automatically, however, so you may need to request
some extensions explicitly yourself.</p>
<p>To enable any of the TeX extensions, simply add the appropriate string
(e.g., <cite>&#8220;TeX/AMSmath.js&#8221;</cite>) to your config&#8217;s <cite>extensions</cite> array. The
main extensions are described below.</p>
<div class="section" id="amsmath-and-amssymbol">
<h3>AMSmath and AMSsymbol<a class="headerlink" href="#amsmath-and-amssymbol" title="Permalink to this headline"></a></h3>
<p>The <cite>AMSmath</cite> extension implements AMS math environments and macros,
and the <cite>AMSsymbol</cite> extension implements macros for accessing the AMS
symbol fonts. To use these extensions, add them to your <cite>extensions</cite> array.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;TeX/AMSmath.js&quot;</span><span class="p">,</span> <span class="s2">&quot;TeX/AMSsymbol.js&quot;</span><span class="p">,</span> <span class="p">...]</span>
(e.g., <tt class="docutils literal"><span class="pre">&quot;AMSmath.js&quot;</span></tt>) to the <cite>extensions</cite> array in the <tt class="docutils literal"><span class="pre">TeX</span></tt> block
of your configuration. If you use one of the combined configuration files,
like <tt class="docutils literal"><span class="pre">TeX-AMS_HTML</span></tt>, this will already include several of the extensions
automatically, but you can include others using a mathjax configuration
script prior to loading MathJax. For example</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span> <span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span> <span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;autobold.js&quot;</span><span class="p">]</span> <span class="p">}});</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
<span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>See the list of commands at the end of this document for details about
what commands are implemented in these extensions.</p>
<p>The <cite>AMSmath</cite> extension will be loaded automatically when you first
use one of the math environments it defines, but you will have to load
it explicitly if you want to use the other macros that it defines.
The <cite>AMSsymbols</cite> extension is not loaded automatically, so you must
include it explicitly if you want to use the macros it defines.</p>
<p>will load the <cite>autobold</cite> TeX extension in addition to those already
included in the <tt class="docutils literal"><span class="pre">TeX-AMS_HTML</span></tt> configuration file.</p>
<p>The main extensions are described below.</p>
<div class="section" id="amsmath-and-amssymbol">
<h3>AMSmath and AMSsymbol<a class="headerlink" href="#amsmath-and-amssymbol" title="Permalink to this headline"></a></h3>
<p>The <cite>AMSmath</cite> extension implements AMS math environments and macros, and
the <cite>AMSsymbol</cite> extension implements macros for accessing the AMS symbol
fonts. These are already included in the combined configuration files that
load the TeX input processor. To use these extensions in your own
configurations, add them to the <cite>extensions</cite> array in the TeX block.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;AMSmath.js&quot;</span><span class="p">,</span> <span class="s2">&quot;AMSsymbol.js&quot;</span><span class="p">,</span> <span class="p">...]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>See the list of control sequences at the end of this document for details
about what commands are implemented in these extensions.</p>
<p>If you are not using one of the combined configuration files, the <cite>AMSmath</cite>
extension will be loaded automatically when you first use one of the math
environments it defines, but you will have to load it explicitly if you
want to use the other macros that it defines. The <cite>AMSsymbols</cite> extension
is not loaded automatically, so you must include it explicitly if you want
to use the macros it defines.</p>
</div>
<div class="section" id="autobold">
<h3>Autobold<a class="headerlink" href="#autobold" title="Permalink to this headline"></a></h3>
<p>The <cite>autobold</cite> extension adds <tt class="docutils literal"><span class="pre">\boldsymbol{...}</span></tt> around mathematics that
appears in a section of an HTML page that is in bold.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;TeX/autobold.js&quot;</span><span class="p">]</span>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;autobold.js&quot;</span><span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This extension is <strong>not</strong> loaded by the combined configuration files.</p>
</div>
<div class="section" id="noerrors">
<h3>noErrors<a class="headerlink" href="#noerrors" title="Permalink to this headline"></a></h3>
@ -166,21 +222,24 @@ displayed and shows the original TeX code instead. You can configure
whether the dollar signs are shown or not for in-line math, and
whether to put all the TeX on one line or use multiple lines (if the
original text contained line breaks).</p>
<p>To enable the <cite>noErrors</cite> extension and configure it, use</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;TeX/noErrors.js&quot;</span><span class="p">,</span> <span class="p">...],</span>
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">noErrors</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">inlineDelimiters</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;&quot;</span><span class="p">,</span><span class="s2">&quot;&quot;</span><span class="p">],</span> <span class="c1">// or [&quot;$&quot;,&quot;$&quot;] or [&quot;\\(&quot;,&quot;\\)&quot;]</span>
<span class="nx">multiLine</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span> <span class="c1">// false for TeX on all one line</span>
<span class="nx">style</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;font-family&quot;</span><span class="o">:</span> <span class="s2">&quot;serif&quot;</span><span class="p">,</span>
<span class="s2">&quot;font-size&quot;</span><span class="o">:</span> <span class="s2">&quot;80%&quot;</span><span class="p">,</span>
<span class="s2">&quot;color&quot;</span><span class="o">:</span> <span class="s2">&quot;black&quot;</span><span class="p">,</span>
<span class="s2">&quot;border&quot;</span><span class="o">:</span> <span class="s2">&quot;1px solid&quot;</span>
<span class="c1">// add any additional CSS styles that you want</span>
<span class="c1">// (be sure there is no extra comma at the end of the last item)</span>
<span class="p">}</span>
<p>This extension is loaded by all the combined configuration files that
include the TeX input processor. To enable the <cite>noErrors</cite> extension in
your own configuration, or to modify its parameters, add something like the
following to your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;noErrors.js&quot;</span><span class="p">],</span>
<span class="nx">noErrors</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">inlineDelimiters</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;&quot;</span><span class="p">,</span><span class="s2">&quot;&quot;</span><span class="p">],</span> <span class="c1">// or [&quot;$&quot;,&quot;$&quot;] or [&quot;\\(&quot;,&quot;\\)&quot;]</span>
<span class="nx">multiLine</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span> <span class="c1">// false for TeX on all one line</span>
<span class="nx">style</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;font-family&quot;</span><span class="o">:</span> <span class="s2">&quot;serif&quot;</span><span class="p">,</span>
<span class="s2">&quot;font-size&quot;</span><span class="o">:</span> <span class="s2">&quot;80%&quot;</span><span class="p">,</span>
<span class="s2">&quot;color&quot;</span><span class="o">:</span> <span class="s2">&quot;black&quot;</span><span class="p">,</span>
<span class="s2">&quot;border&quot;</span><span class="o">:</span> <span class="s2">&quot;1px solid&quot;</span>
<span class="c1">// add any additional CSS styles that you want</span>
<span class="c1">// (be sure there is no extra comma at the end of the last item)</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
@ -191,14 +250,14 @@ paragraph, like standard display mathematics.</p>
black border. If you want it to look as though the TeX is just part of
the paragraph, use</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">noErrors</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">inlineDelimiters</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;$&quot;</span><span class="p">,</span><span class="s2">&quot;$&quot;</span><span class="p">],</span> <span class="c1">// or [&quot;&quot;,&quot;&quot;] or [&quot;\\(&quot;,&quot;\\)&quot;]</span>
<span class="nx">multiLine</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nx">style</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;font-size&quot;</span><span class="o">:</span> <span class="s2">&quot;normal&quot;</span><span class="p">,</span>
<span class="s2">&quot;border&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span>
<span class="p">}</span>
<span class="nx">noErrors</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">inlineDelimiters</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;$&quot;</span><span class="p">,</span><span class="s2">&quot;$&quot;</span><span class="p">],</span> <span class="c1">// or [&quot;&quot;,&quot;&quot;] or [&quot;\\(&quot;,&quot;\\)&quot;]</span>
<span class="nx">multiLine</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nx">style</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">&quot;font-size&quot;</span><span class="o">:</span> <span class="s2">&quot;normal&quot;</span><span class="p">,</span>
<span class="s2">&quot;border&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
@ -207,25 +266,28 @@ the paragraph, use</p>
<div class="section" id="noundefined">
<h3>noUndefined<a class="headerlink" href="#noundefined" title="Permalink to this headline"></a></h3>
<p>The <cite>noUndefined</cite> extension causes undefined control sequences to be
shown as their macro names rather than produce an error message. So
shown as their macro names rather than generating error messages. So
<tt class="docutils literal"><span class="pre">$X_{\xxx}$</span></tt> would display as an &#8220;X&#8221; with a subscript consiting of the
text <tt class="docutils literal"><span class="pre">\xxx</span></tt> in red.</p>
<p>To enable and configure this extension, use for example</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;TeX/noUndefined.js&quot;</span><span class="p">,</span> <span class="p">...],</span>
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">noUndefined</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">attributes</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">mathcolor</span><span class="o">:</span> <span class="s2">&quot;red&quot;</span><span class="p">,</span>
<span class="nx">mathbackground</span><span class="o">:</span> <span class="s2">&quot;#FFEEEE&quot;</span><span class="p">,</span>
<span class="nx">mathsize</span><span class="o">:</span> <span class="s2">&quot;90%&quot;</span>
<span class="p">}</span>
<p>This extension is loaded by all the combined configuration files that
include the TeX input processor. To enable the <cite>noUndefined</cite> extension
in your own configuration, or to modify its parameters, add something like
the following ro your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;noUndefined.js&quot;</span><span class="p">],</span>
<span class="nx">noUndefined</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">attributes</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">mathcolor</span><span class="o">:</span> <span class="s2">&quot;red&quot;</span><span class="p">,</span>
<span class="nx">mathbackground</span><span class="o">:</span> <span class="s2">&quot;#FFEEEE&quot;</span><span class="p">,</span>
<span class="nx">mathsize</span><span class="o">:</span> <span class="s2">&quot;90%&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">attributes</span></tt> setting specifies attributes to apply to the
<tt class="docutils literal"><span class="pre">mtext</span></tt> element that encodes the name of the undefined macro. The
default settings set <tt class="docutils literal"><span class="pre">mathcolor</span></tt> to <tt class="docutils literal"><span class="pre">&quot;red&quot;</span></tt>, but do not set any
default values set <tt class="docutils literal"><span class="pre">mathcolor</span></tt> to <tt class="docutils literal"><span class="pre">&quot;red&quot;</span></tt>, but do not set any
other attributes. This example sets the background to a light pink,
and reduces the font size slightly.</p>
</div>
@ -264,9 +326,9 @@ in <cite>STIXGeneral</cite>), otherwise MathJax tries <cite>Arial Unicode MS</ci
<tt class="docutils literal"><span class="pre">\unicode{}</span></tt> macro, so you do not need to add it to the <cite>extensions</cite>
array. You can configure the extension as follows:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">unicode</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">fonts</span><span class="o">:</span> <span class="s2">&quot;STIXGeneral, &#39;Arial Unicode MS&#39;&quot;</span>
<span class="p">}</span>
<span class="nx">unicode</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">fonts</span><span class="o">:</span> <span class="s2">&quot;STIXGeneral, &#39;Arial Unicode MS&#39;&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
@ -937,6 +999,7 @@ S
<span class="k">\subset</span>
<span class="k">\subseteq</span>
<span class="k">\subseteqq</span> AMSsymbols
<span class="k">\subsetneq</span> AMSsymbols
<span class="k">\substack</span> AMSmath
<span class="k">\succ</span>
<span class="k">\succapprox</span> AMSsymbols
@ -952,6 +1015,7 @@ S
<span class="k">\supset</span>
<span class="k">\supseteq</span>
<span class="k">\supseteqq</span> AMSsymbols
<span class="k">\supsetneq</span> AMSsymbols
<span class="k">\surd</span>
<span class="k">\swarrow</span>
@ -1089,6 +1153,7 @@ Z
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">MathJax TeX and LaTeX Support</a><ul>
<li><a class="reference internal" href="#tex-and-latex-math-delimiters">TeX and LaTeX math delimiters</a></li>
<li><a class="reference internal" href="#tex-and-latex-in-html-documents">TeX and LaTeX in HTML documents</a></li>
<li><a class="reference internal" href="#tex-and-latex-extensions">TeX and LaTeX extensions</a><ul>
<li><a class="reference internal" href="#amsmath-and-amssymbol">AMSmath and AMSsymbol</a></li>
@ -1109,11 +1174,6 @@ Z
<h4>Next topic</h4>
<p class="topless"><a href="mathml.html"
title="next chapter">MathJax MathML Support</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/tex.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

View File

@ -21,7 +21,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="The MathJax API" href="api/index.html" />
<link rel="prev" title="Loading MathJax Dynamically" href="dynamic.html" />
@ -198,18 +198,22 @@ queue. If your startup code performs the commands</p>
</div>
<p>to change the student&#8217;s answer to be the typeset version of whatever
is in the <tt class="docutils literal"><span class="pre">studentAnswer</span></tt> variable.</p>
<p>Here is a complete example that illustrates this approach</p>
<p>Here is a complete example that illustrates this approach (available in a
more full-featured version as <tt class="docutils literal"><span class="pre">test/sample-dynamic.html</span></tt>):</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;html&gt;</span>
<span class="nt">&lt;head&gt;</span>
<span class="nt">&lt;title&gt;</span>MathJax Dynamic Math Test Page<span class="nt">&lt;/title&gt;</span>
<span class="nt">&lt;script </span><span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">],</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">],</span>
<span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span><span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s2">&quot;$&quot;</span><span class="p">,</span><span class="s2">&quot;$&quot;</span><span class="p">],[</span><span class="s2">&quot;\\(&quot;</span><span class="p">,</span><span class="s2">&quot;\\)&quot;</span><span class="p">]]}</span>
<span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s2">&quot;$&quot;</span><span class="p">,</span><span class="s2">&quot;$&quot;</span><span class="p">],[</span><span class="s2">&quot;\\(&quot;</span><span class="p">,</span><span class="s2">&quot;\\)&quot;</span><span class="p">]]</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
<span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;/head&gt;</span>
<span class="nt">&lt;body&gt;</span>
@ -275,11 +279,6 @@ You typed: ${}$
<h4>Next topic</h4>
<p class="topless"><a href="api/index.html"
title="next chapter">The MathJax API</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/typeset.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">

306
docs/html/upgrade.html Normal file
View File

@ -0,0 +1,306 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Migrating from MathJax v1.0 to v1.1 &mdash; MathJax v1.1 documentation</title>
<link rel="stylesheet" href="_static/mj.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '1.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="Converting to MathJax from jsMath" href="jsMath.html" />
<link rel="prev" title="Whats New in MathJax v1.1" href="whats-new.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="jsMath.html" title="Converting to MathJax from jsMath"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="whats-new.html" title="Whats New in MathJax v1.1"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="migrating-from-mathjax-v1-0-to-v1-1">
<span id="upgrade"></span><h1>Migrating from MathJax v1.0 to v1.1<a class="headerlink" href="#migrating-from-mathjax-v1-0-to-v1-1" title="Permalink to this headline"></a></h1>
<p>MathJax v1.1 fixes a number of bugs in v1.0, and improves support for
new versions of browsers and mobile devices. It includes changes to
increase its performance, and to make it more compliant with HTML5. It
has more flexible configuration options, and the ability to load
configuration files that combine multiple files into a single one to
increase loading speed when MathJax starts up. Finally, MathJax.org now
offers MathJax as a web service through a distributed &#8220;cloud&#8221; server.</p>
<p>This document describes the changes you may need to make to your MathJax
configurations in order to take advantage of these improvements.</p>
<div class="section" id="configuration-changes">
<h2>Configuration Changes<a class="headerlink" href="#configuration-changes" title="Permalink to this headline"></a></h2>
<p>The main changes that you will see as a page author are in the way that
MathJax can be loaded and configured. If you have been using in-line
configuration by putting a <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call in the body of
the <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tag that loads MathJax, then your site should work
unchanged with version 1.1 of MathJax. You may wish to consider moving to
the new HTML5-compliant method of configuring MathJax, however, which uses
a separate <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tag to specify the configuration. That tag should
come <strong>before</strong> the one that loads <tt class="docutils literal"><span class="pre">Mathjax.js</span></tt>, and should have
<tt class="docutils literal"><span class="pre">type=&quot;text/x-mathjax-config&quot;</span></tt> rather than <tt class="docutils literal"><span class="pre">type=&quot;text/javascript&quot;</span></tt>.
For example,</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">],</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">]</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>would become</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">],</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">]</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>instead. This will make sure your pages pass HTML5 validation. Be sure
that you put the configuration block <strong>before</strong> the script that loads
MathJax. See <a class="reference internal" href="configuration.html#loading"><em>Loading and Configuring MathJax</em></a> for more
details.</p>
<p>If your page simply loads <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> and relies on
<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt>, then you will need to modify your <tt class="docutils literal"><span class="pre">&lt;script&gt;</span></tt> tag
in order to use MathJax v1.1. This is because MathJax no longer loads a
default configuration file; you are required to explicity specify the
configuration file if you use one. Furthermore, the name of the
<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file was a source of confusion, so it has been
renamed <tt class="docutils literal"><span class="pre">config/default.js</span></tt> instead. Thus, if you used</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>in the past, you should replace it with</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js?config=default&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>instead. If you don&#8217;t do this, you will receive a warning message that
directs you to a page that explains how to update your script tags to use
the new configuration format.</p>
</div>
<div class="section" id="combined-configurations">
<h2>Combined Configurations<a class="headerlink" href="#combined-configurations" title="Permalink to this headline"></a></h2>
<p>New with version 1.1 is the ability to combine several files into a single
configuration file, and to load that via the same script that loads
MathJax. This should make configuring MathJax easier, and also helps to
speed up the initial loading of MathJax&#8217;s components, since only one file
needs to be downloaded.</p>
<p>MathJax comes with four pre-built configurations, and our hope is that one
of these will suit your needs. They are described in more detail in the
<a class="reference internal" href="configuration.html#config-files"><em>Using a Configuration File</em></a> section. To load one,
add <tt class="docutils literal"><span class="pre">?config=filename</span></tt> (where <tt class="docutils literal"><span class="pre">filename</span></tt> is the name of the
configuration file without the <tt class="docutils literal"><span class="pre">.js</span></tt>) to the URL that loads
<tt class="docutils literal"><span class="pre">MathJax.js</span></tt>. For example</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">],</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">,</span><span class="s2">&quot;AMSmath.js&quot;</span><span class="p">,</span><span class="s2">&quot;AMSsymbols.js&quot;</span><span class="p">]</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>could be replaced by the single line</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js?config=TeX-AMS_HTML&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>In this way, you don&#8217;t have to include the in-line configuration, and all
the needed files will be downloaded when MathJax starts up. For complete
details about the contents of the combined configuration files, see the
<a class="reference internal" href="config-files.html#common-configurations"><em>Common Configurations</em></a> section.</p>
<p>If you want to use a pre-defined configuration file, but want to modify some
of the configuration parameters, you can use both a
<tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> block and a <tt class="docutils literal"><span class="pre">config=filename</span></tt> parameter in
combination. For example,</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">&#39;$&#39;</span><span class="p">,</span><span class="s1">&#39;$&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;\\(&#39;</span><span class="p">,</span><span class="s1">&#39;\\)&#39;</span><span class="p">]</span> <span class="p">],</span>
<span class="nx">processEscapes</span><span class="o">:</span> <span class="kc">true</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js?config=TeX-AMS_HTML&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>would load the <tt class="docutils literal"><span class="pre">TeX-AMS_HTML</span></tt> configuration file, but would reconfigure
the inline math delimiters to include <tt class="docutils literal"><span class="pre">$...$</span></tt> in addition to
<tt class="docutils literal"><span class="pre">\(...\)</span></tt>, and would set the <tt class="docutils literal"><span class="pre">processEscapes</span></tt> parameter to <tt class="docutils literal"><span class="pre">true</span></tt>.</p>
</div>
<div class="section" id="loading-mathjax-from-the-cdn">
<h2>Loading MathJax from the CDN<a class="headerlink" href="#loading-mathjax-from-the-cdn" title="Permalink to this headline"></a></h2>
<p>The MathJax installation is fairly substantial (due to the large number of
images needed for the image fonts), and so you may not want to (or be able
to) store MathJax on your own server. Keeping MathJax up to date can also
be a maintenance problem, and you might prefer to let others handle that
for you. In either case, using the MathJax distributed network service may be
the best way for you to obtain MathJax. That way you can be sure you are
using an up-to-date version of MathJax, and that the server will be fast
and reliable.</p>
<p>To use the MathJax CDN service, simply load MathJax as follows:</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span>
<span class="na">src=</span><span class="s">&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;/scrip&gt;</span>
</pre></div>
</div>
<p>Of course, you can load any configuration file that you wish, or use a
<tt class="docutils literal"><span class="pre">text/x=mathajx-config</span></tt> block to configure MathJax in-line.
<a class="reference internal" href="configuration.html#loading-cdn"><em>More details</em></a> are available, if you need them.</p>
<p>The use of <tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt> is governed by its <a class="reference external" href="http://www.mathjax.org/download/mathjax-cdn-terms-of-service/">terms of service</a>, so be
sure to read that before linked to the MathJax CDN server.</p>
</div>
<div class="section" id="change-in-default-tex-delimiters">
<h2>Change in default TeX delimiters<a class="headerlink" href="#change-in-default-tex-delimiters" title="Permalink to this headline"></a></h2>
<p>In addition to the fact that MathJax v1.1 no longer loads a default
configuration file, there is a second configuration change that could
affect your pages. The <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file properly configured the
<cite>tex2jax</cite> preprocessor to use only <tt class="docutils literal"><span class="pre">\(...\)</span></tt> and not <tt class="docutils literal"><span class="pre">$...$</span></tt> for in-line
math delimiters, but the <cite>tex2jax</cite> preprocessor itself incorrectly
defaulted to including <tt class="docutils literal"><span class="pre">$...$</span></tt> as in-line math delimiters. The result
was that if you used in-line configuration to specify the <tt class="docutils literal"><span class="pre">tex2jax</span></tt>
preprocessor, single-dollar delimiters were enabled by default, while if
you used file-based configuration, they weren&#8217;t.</p>
<p>This inconsistency was an error, and the correct behavior was supposed to
have the single-dollar delimiters disabled in both cases. This is now
true in v1.1 of MathJax. This means that if you used in-line
configuration to specify the <cite>tex2jax</cite> preprocessor, you will need to
change your configuration to explicitly enable the single-dollar
delimiters if you want to use them.</p>
<p>For example, if you had</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">],</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">]</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
</pre></div>
</div>
<p>and you want to use single-dollar delimiters for in-line math, then you
should replace this with</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span><span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">],</span>
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;tex2jax.js&quot;</span><span class="p">],</span>
<span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">&#39;$&#39;</span><span class="p">,</span><span class="s1">&#39;$&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;\\(&#39;</span><span class="p">,</span><span class="s1">&#39;\\)&#39;</span><span class="p">]</span> <span class="p">],</span>
<span class="nx">processEscapes</span><span class="o">:</span> <span class="kc">true</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>The same technique can be used in conjunction with a combined
configuration file. For example</p>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/x-mathjax-config&quot;</span><span class="nt">&gt;</span>
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
<span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">&#39;$&#39;</span><span class="p">,</span><span class="s1">&#39;$&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;\\(&#39;</span><span class="p">,</span><span class="s1">&#39;\\)&#39;</span><span class="p">]</span> <span class="p">],</span>
<span class="nx">processEscapes</span><span class="o">:</span> <span class="kc">true</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">type=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">src=</span><span class="s">&quot;/MathJax/MathJax.js?config=TeX-AMS_HTML&quot;</span><span class="nt">&gt;&lt;/script&gt;</span>
</pre></div>
</div>
<p>will load the pre-defined <tt class="docutils literal"><span class="pre">TeX-AMS_HTML</span></tt> configuration, but will modify
the settings to allow <tt class="docutils literal"><span class="pre">$...$</span></tt> delimiters, and to process <tt class="docutils literal"><span class="pre">\$</span></tt> to
produce dollar signs within the text of the page.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Migrating from MathJax v1.0 to v1.1</a><ul>
<li><a class="reference internal" href="#configuration-changes">Configuration Changes</a></li>
<li><a class="reference internal" href="#combined-configurations">Combined Configurations</a></li>
<li><a class="reference internal" href="#loading-mathjax-from-the-cdn">Loading MathJax from the CDN</a></li>
<li><a class="reference internal" href="#change-in-default-tex-delimiters">Change in default TeX delimiters</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="whats-new.html"
title="previous chapter">What&#8217;s New in MathJax v1.1</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="jsMath.html"
title="next chapter">Converting to MathJax from jsMath</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="jsMath.html" title="Converting to MathJax from jsMath"
>next</a> |</li>
<li class="right" >
<a href="whats-new.html" title="Whats New in MathJax v1.1"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>

264
docs/html/whats-new.html Normal file
View File

@ -0,0 +1,264 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Whats New in MathJax v1.1 &mdash; MathJax v1.1 documentation</title>
<link rel="stylesheet" href="_static/mj.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '1.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
<link rel="next" title="Migrating from MathJax v1.0 to v1.1" href="upgrade.html" />
<link rel="prev" title="The MathJax Community" href="community.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="upgrade.html" title="Migrating from MathJax v1.0 to v1.1"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="community.html" title="The MathJax Community"
accesskey="P">previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="what-s-new-in-mathjax-v1-1">
<span id="whats-new"></span><h1>What&#8217;s New in MathJax v1.1<a class="headerlink" href="#what-s-new-in-mathjax-v1-1" title="Permalink to this headline"></a></h1>
<p>MathJax version 1.1 includes a number of important improvements and
enhancements over version 1.0. We have worked hard to fix bugs, improve
support for browsers and mobile devices, supprot TeX and MathML better, and
increase MathJax&#8217;s performance.</p>
<p>In addition to these changes, MathJax.org now offers MathJax as a network
service. Instead of having to install MathJax on your own server, you can
link to our content delivery network (CDN) to get fast access to
up-to-date and past versions of MathJax. See <a class="reference internal" href="configuration.html#loading-cdn"><em>Loading MathJax from
the CDN</em></a> for more details.</p>
<p>The following sections outline the changes in v1.1:</p>
<div class="section" id="optimization">
<h2>Optimization<a class="headerlink" href="#optimization" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>Combined configuraiton files that load all the needed files in one piece
rather than loading them individually. This simplifies configuration
and speeds up typsetting of the mathematics on the page.</li>
<li>Improved responsiveness to mouse events during typesetting.</li>
<li>Parallel downloading of files needed by MathJax, for faster startup
times.</li>
<li>Shorter timeout for web fonts, so if they can&#8217;t be downlaoded, you don&#8217;t
have to wait so long.</li>
<li>Rollover to image fonts if a web font fails to load (so you don&#8217;t have
to wait for <em>every</em> font to fail.</li>
<li>The MathJax files are now packed only with <cite>yuicompressor</cite> rather than a
custom compressor. The CDN serves gzipped versions, which compressed
better than the gzipped custom-packed files.</li>
<li>Improved rendering speed in IE by removing <tt class="docutils literal"><span class="pre">position:relative</span></tt> from
the style for mathematics.</li>
<li>Improve rendering speed for most browsers by isolating the mathematics
from page during typesetting (avoids full page reflows).</li>
</ul>
</div>
<div class="section" id="enhancements">
<h2>Enhancements<a class="headerlink" href="#enhancements" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>Allow the input and output jax configuration blocks to specify extensions
to be loaded when the jax is loaded (this avoids needing to load them up
front, so they don&#8217;t have to be loaded on pages that don&#8217;t include
mathematics, for example).</li>
<li>Better handling of background color from style attributes.</li>
<li>Ability to pass configuration parameters via script URL.</li>
<li>Support HTML5 compliant configuration syntax.</li>
<li>Switch the Git repository from storing the fonts in <cite>fonts.zip</cite> to
storing the <cite>fonts/</cite> directory directly.</li>
<li>Improved About box.</li>
<li>add a minimum scaling factor (so math won&#8217;t get too small)</li>
</ul>
</div>
<div class="section" id="tex-support">
<h2>TeX Support<a class="headerlink" href="#tex-support" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>Added support for <tt class="docutils literal"><span class="pre">\href</span></tt>, <tt class="docutils literal"><span class="pre">\style</span></tt>, <tt class="docutils literal"><span class="pre">\class</span></tt>, <tt class="docutils literal"><span class="pre">\cssId</span></tt>.</li>
<li>Avoid recursive macro definitions and other resource consumption possibilities.</li>
<li>Fix for <tt class="docutils literal"><span class="pre">\underline</span></tt> bug.</li>
<li>Fix for bug with <tt class="docutils literal"><span class="pre">\fbox</span></tt>.</li>
<li>Fix height problem with <tt class="docutils literal"><span class="pre">\raise</span></tt> and <tt class="docutils literal"><span class="pre">\lower</span></tt>.</li>
<li>Fix problem with <tt class="docutils literal"><span class="pre">\over</span></tt> used inside array entries.</li>
<li>Fix problem with nesting of math delimiters inside text-mode material.</li>
<li>Fix single digit super- and subscripts followed by punctuation.</li>
<li>Make sure <cite>movablelimits</cite> is off for <tt class="docutils literal"><span class="pre">\underline</span></tt> and related macros.</li>
<li>Fix problem with dimensions given with <tt class="docutils literal"><span class="pre">pc</span></tt> units.</li>
</ul>
</div>
<div class="section" id="mathml-support">
<h2>MathML Support<a class="headerlink" href="#mathml-support" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>Fix <tt class="docutils literal"><span class="pre">&amp;lt;</span></tt> and <tt class="docutils literal"><span class="pre">&amp;amp;</span></tt> being translated too early.</li>
<li>Handle self-closing tags in HTML files better.</li>
<li>Combine adjacent relational operators in <tt class="docutils literal"><span class="pre">&lt;mo&gt;</span></tt> tags.</li>
<li>Fix entity name problems.</li>
<li>Better support for MathML namespaces.</li>
<li>Properly handle comments within MathML in IE.</li>
<li>Properly consider <tt class="docutils literal"><span class="pre">&lt;mspace&gt;</span></tt> and <tt class="docutils literal"><span class="pre">&lt;mtext&gt;</span></tt> as space-like.</li>
<li>Improved support for <tt class="docutils literal"><span class="pre">&lt;maction&gt;</span></tt> with embelished operators.</li>
</ul>
</div>
<div class="section" id="other-bug-fixes">
<h2>Other Bug Fixes<a class="headerlink" href="#other-bug-fixes" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>Fixed CSS bleed through with zoom and other situations.</li>
<li>Fixed problems with <tt class="docutils literal"><span class="pre">showMathMenuMSIE</span></tt> when set to <tt class="docutils literal"><span class="pre">false</span></tt>.</li>
<li>Replaced illegal prefix characters in cookie name.</li>
<li>Improve placement of surd for square roots and n-th roots.</li>
<li>Fixed layer obscuring math from MathPlayer for screen readers.</li>
<li>Newlines in CDATA comments are now handled properly.</li>
<li>Resolved conflict between <cite>jsMath2jax</cite> and <cite>tex2jax</cite> both processing the
same equation.</li>
<li>Fixed problem with <tt class="docutils literal"><span class="pre">class=&quot;tex2jax_ignore&quot;</span></tt> affecting the processing of
sibling elements.</li>
</ul>
</div>
<div class="section" id="browser-support">
<h2>Browser Support<a class="headerlink" href="#browser-support" title="Permalink to this headline"></a></h2>
<p><strong>Android</strong></p>
<ul class="simple">
<li>Added detection and configuration for Android browser.</li>
<li>Allow use of OTF web fonts in Android 2.2.</li>
</ul>
<p><strong>Blackberry</strong></p>
<ul class="simple">
<li>MathJax now works with OS version 6.</li>
</ul>
<p><strong>Chrome</strong></p>
<ul class="simple">
<li>Use OTF web fonts rather than SVG fonts for version 4 and above.</li>
</ul>
<p><strong>Firefox</strong></p>
<ul class="simple">
<li>Added Firefox 4 detection and configuration.</li>
<li>Fix for extra line-break bug when displayed equations are in
preformatted text.</li>
<li>Update fonts so that FF 3.6.13 and above can read them.</li>
</ul>
<p><strong>Internet Explorer</strong></p>
<ul class="simple">
<li>Changes for compatibility with IE9.</li>
<li>Fix for IE8 incorrectly parsing MathML.</li>
<li>Fix for IE8 namespace problem.</li>
<li>Fix for null <tt class="docutils literal"><span class="pre">parentNode</span></tt> problem.</li>
<li>Fix for <tt class="docutils literal"><span class="pre">outerHTML</span></tt> not quoting values of attributes.</li>
</ul>
<p><strong>iPhone/iPad</strong></p>
<ul class="simple">
<li>Add support for OTF web fonts in iOS4.2.</li>
</ul>
<p><strong>Nokia</strong></p>
<ul class="simple">
<li>MathJax now works with Symbian<sup>3</sup>.</li>
</ul>
<p><strong>Opera</strong></p>
<ul class="simple">
<li>Prevent Opera from using STIX fonts unless explicitly requested via the
font menu (since Opera can&#8217;t display many of the characters).</li>
<li>Fix for bad em-size detection in 10.61.</li>
<li>Fixed a problem with the About dialog in Opera 11.</li>
</ul>
<p><strong>Safari</strong></p>
<ul class="simple">
<li>Use OTF web fonts for Safari/PC.</li>
</ul>
<p><strong>WebKit</strong></p>
<ul class="simple">
<li>Better version detection.</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">What&#8217;s New in MathJax v1.1</a><ul>
<li><a class="reference internal" href="#optimization">Optimization</a></li>
<li><a class="reference internal" href="#enhancements">Enhancements</a></li>
<li><a class="reference internal" href="#tex-support">TeX Support</a></li>
<li><a class="reference internal" href="#mathml-support">MathML Support</a></li>
<li><a class="reference internal" href="#other-bug-fixes">Other Bug Fixes</a></li>
<li><a class="reference internal" href="#browser-support">Browser Support</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="community.html"
title="previous chapter">The MathJax Community</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="upgrade.html"
title="next chapter">Migrating from MathJax v1.0 to v1.1</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="upgrade.html" title="Migrating from MathJax v1.0 to v1.1"
>next</a> |</li>
<li class="right" >
<a href="community.html" title="The MathJax Community"
>previous</a> |</li>
<li><a href="index.html">MathJax v1.1 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>