Update the html output
This commit is contained in:
parent
b6d16ccd10
commit
f0a8d82f57
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="Glossary" href="glossary.html" />
|
<link rel="next" title="Glossary" href="glossary.html" />
|
||||||
<link rel="prev" title="Describing HTML snippets" href="HTML-snippets.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>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="glossary.html"
|
<p class="topless"><a href="glossary.html"
|
||||||
title="next chapter">Glossary</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -21,10 +21,10 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="CSS Style Objects" href="CSS-styles.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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
<a href="CSS-styles.html" title="CSS Style Objects"
|
<a href="CSS-styles.html" title="CSS Style Objects"
|
||||||
accesskey="N">next</a> |</li>
|
accesskey="N">next</a> |</li>
|
||||||
<li class="right" >
|
<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>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -122,16 +122,11 @@ This is bold text shown in red
|
||||||
<div class="sphinxsidebar">
|
<div class="sphinxsidebar">
|
||||||
<div class="sphinxsidebarwrapper">
|
<div class="sphinxsidebarwrapper">
|
||||||
<h4>Previous topic</h4>
|
<h4>Previous topic</h4>
|
||||||
<p class="topless"><a href="jsMath.html"
|
<p class="topless"><a href="api/object.html"
|
||||||
title="previous chapter">Converting to MathJax from jsMath</a></p>
|
title="previous chapter">The MathJax Object-Oriented Programming Model</a></p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="CSS-styles.html"
|
<p class="topless"><a href="CSS-styles.html"
|
||||||
title="next chapter">CSS Style Objects</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<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"
|
<a href="CSS-styles.html" title="CSS Style Objects"
|
||||||
>next</a> |</li>
|
>next</a> |</li>
|
||||||
<li class="right" >
|
<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>
|
>previous</a> |</li>
|
||||||
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -35,7 +35,7 @@ Properties
|
||||||
Number of milliseconds to wait for a file to load before
|
Number of milliseconds to wait for a file to load before
|
||||||
it is considered to have failed to load.
|
it is considered to have failed to load.
|
||||||
|
|
||||||
*Default:* 20 seconds
|
*Default:* 15 seconds
|
||||||
|
|
||||||
.. describe:: STATUS.OK
|
.. describe:: STATUS.OK
|
||||||
|
|
||||||
|
@ -60,6 +60,12 @@ Properties
|
||||||
callbacks that are to be run when they load or timeout, and
|
callbacks that are to be run when they load or timeout, and
|
||||||
additional internal data.
|
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
|
Methods
|
||||||
=======
|
=======
|
||||||
|
@ -106,9 +112,9 @@ Methods
|
||||||
file has been completely loaded and initialized. The `file`
|
file has been completely loaded and initialized. The `file`
|
||||||
parameter is the name of the file that has been loaded. This
|
parameter is the name of the file that has been loaded. This
|
||||||
routine will cause any callback functions registered for the file
|
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
|
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.
|
their last parameter.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
|
@ -148,6 +154,18 @@ Methods
|
||||||
- **callback** --- the callback specification
|
- **callback** --- the callback specification
|
||||||
:Returns: the callback object
|
: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])
|
.. method:: Styles(styles[,callback])
|
||||||
|
|
||||||
Creates a stylesheet from the given style data. `styles` can
|
Creates a stylesheet from the given style data. `styles` can
|
||||||
|
|
|
@ -24,7 +24,7 @@ that class.
|
||||||
Class Properties
|
Class Properties
|
||||||
================
|
================
|
||||||
|
|
||||||
.. describe:: name
|
.. describe:: id
|
||||||
|
|
||||||
The name of the jax.
|
The name of the jax.
|
||||||
|
|
||||||
|
@ -42,11 +42,13 @@ Instance Properties
|
||||||
|
|
||||||
.. describe:: inputJax
|
.. 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
|
.. 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
|
.. describe:: inputID
|
||||||
|
|
||||||
|
@ -61,7 +63,8 @@ Instance Properties
|
||||||
.. describe:: originalText
|
.. describe:: originalText
|
||||||
|
|
||||||
A string indicating the original input text that was processed for
|
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
|
.. describe:: mimeType
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,17 @@ Methods
|
||||||
- **text** --- the text for the new node
|
- **text** --- the text for the new node
|
||||||
:Returns: the new text 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)
|
.. describe:: Cookie.Set(name,data)
|
||||||
|
|
||||||
Creates a MathJax cookie using the ``MathJax.HTML.Cookie.prefix``
|
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!"});
|
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
|
``x`` and ``y`` provided in the `data` object. This data can be
|
||||||
retrieved using the :meth:`MathJax.HTML.Cookie.Get()` method
|
retrieved using the :meth:`MathJax.HTML.Cookie.Get()` method
|
||||||
discussed below.
|
discussed below.
|
||||||
|
|
|
@ -28,7 +28,7 @@ Properties
|
||||||
options and their default values are given in the :ref:`Core
|
options and their default values are given in the :ref:`Core
|
||||||
Options <configure-hub>` reference page.
|
Options <configure-hub>` reference page.
|
||||||
|
|
||||||
.. describe:: processUpdateTime: 500
|
.. describe:: processUpdateTime: 250
|
||||||
|
|
||||||
The minimum time (in milliseconds) between updates of the
|
The minimum time (in milliseconds) between updates of the
|
||||||
"Processing Math" message.
|
"Processing Math" message.
|
||||||
|
@ -38,6 +38,11 @@ Properties
|
||||||
The hub processing signal (tied to the
|
The hub processing signal (tied to the
|
||||||
:meth:`MathJax.Hub.Register.MessageHook()` method).
|
: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
|
.. describe:: Browser
|
||||||
|
|
||||||
The name of the browser as determined by MathJax. It will be one
|
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
|
- **options** --- object containing options to be set
|
||||||
:Returns: ``null``
|
: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)
|
.. describe:: Register.PreProcessor(callback)
|
||||||
|
|
||||||
Used by preprocessors to register themselves with MathJax so that
|
Used by preprocessors to register themselves with MathJax so that
|
||||||
|
|
|
@ -35,7 +35,7 @@ that class.
|
||||||
Properties
|
Properties
|
||||||
==========
|
==========
|
||||||
|
|
||||||
.. describe:: name
|
.. describe:: id
|
||||||
|
|
||||||
The name of the jax.
|
The name of the jax.
|
||||||
|
|
||||||
|
@ -47,6 +47,11 @@ Properties
|
||||||
|
|
||||||
The directory where the jax files are stored (e.g., ``"[MathJax]/jax/input/TeX"``);
|
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
|
Methods
|
||||||
=======
|
=======
|
||||||
|
@ -54,15 +59,12 @@ Methods
|
||||||
.. Method:: Translate(script)
|
.. Method:: Translate(script)
|
||||||
:noindex:
|
:noindex:
|
||||||
|
|
||||||
This is the main routine called by MathJax when a ``<script>`` of
|
This is the main routine called by MathJax when a ``<script>`` of the
|
||||||
the appropriate type is found. The default :meth:`Translate()`
|
appropriate type is found. The default :meth:`Translate()` method
|
||||||
method simply loads the ``jax.js`` file and returns that callback
|
throws an error indicating that :meth:`Translate()` hasn't been
|
||||||
for that load function so that MathJax will know when to try
|
redefined, so when the ``jax.js`` file loads, it should override the
|
||||||
the :meth:`Translate()` action again. When the ``jax.js`` file
|
default :meth:`Translate()` with its own version that does the actual
|
||||||
loads, it should override the default :meth:`Translate()` with its
|
translation.
|
||||||
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.
|
|
||||||
|
|
||||||
The translation process should include the creation of an
|
The translation process should include the creation of an
|
||||||
:ref:`Element Jax <api-element-jax>` that stores the data needed
|
:ref:`Element Jax <api-element-jax>` that stores the data needed
|
||||||
|
@ -84,3 +86,4 @@ Methods
|
||||||
:Parameters:
|
:Parameters:
|
||||||
- **mimetype** --- the MIME-type of the input this jax processes
|
- **mimetype** --- the MIME-type of the input this jax processes
|
||||||
:Returns: ``null``
|
:Returns: ``null``
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ Unlike most MathJax.Object classes, calling the class object creates a
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
|
||||||
MathJax.InputJax.MyInputJax = MathJax.InputJax({
|
MathJax.InputJax.MyInputJax = MathJax.InputJax({
|
||||||
name: "MyInputJax",
|
id: "MyInputJax",
|
||||||
version: "1.0",
|
version: "1.0",
|
||||||
...
|
...
|
||||||
});
|
});
|
||||||
|
@ -40,7 +40,7 @@ Class Properties
|
||||||
Instance Properties
|
Instance Properties
|
||||||
===================
|
===================
|
||||||
|
|
||||||
.. describe:: name
|
.. describe:: id
|
||||||
|
|
||||||
The name of the jax.
|
The name of the jax.
|
||||||
|
|
||||||
|
@ -67,35 +67,41 @@ Instance Properties
|
||||||
Methods
|
Methods
|
||||||
=======
|
=======
|
||||||
|
|
||||||
.. Method:: Translate(script)
|
.. Method:: Process(script)
|
||||||
|
:noindex:
|
||||||
|
|
||||||
This is the method that the ``MathJax.Hub`` calls when it needs
|
This is the method that the ``MathJax.Hub`` calls when it needs the
|
||||||
the input or output jax to process the given math ``<script>``
|
input or output jax to process the given math ``<script>``. Its
|
||||||
call. Its default action is to start loading the jax's ``jax.js``
|
default action is to start loading the jax's ``jax.js`` file, and
|
||||||
file, and redefine the :meth:`Translate()` method to be the
|
redefine itself to simplu return the callback for the laod operation
|
||||||
:meth:`noTranslate()` method below. The ``jax.js`` file should
|
(so that further calls to it will cause the processing to wait for the
|
||||||
redefine the :meth:`Translate()` method to perform the translation
|
callback). Once the ``jax.js`` file has loaded, this method is
|
||||||
operation for the specific jax. For an input jax, it should
|
replaced by the jax's :meth:`Translate()` method, so that subsequent calls
|
||||||
return the `ElementJax` object that it created.
|
to :meth:`Process()` will perform the appropriate translation.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
- **script** --- reference to the DOM ``<script>`` object for
|
- **script** --- reference to the DOM ``<script>`` object for
|
||||||
the mathematics to be translated
|
the mathematics to be translated
|
||||||
:Returns: an `ElementJax` object, or ``null``
|
: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
|
This is a stub for a routine that should be defined by the jax's
|
||||||
is loading. It throws an error indicating the the
|
``jax.js`` file when it is loaded. It should perform the translation
|
||||||
:meth:`Translate()` method hasn't been redefined. That way, if
|
action for the specific jax. For an input jax, it should return the
|
||||||
the ``jax.js`` file failes to load for some reason, you will
|
`ElementJax` object that it created. The :meth:`Translate()` mehtod is
|
||||||
receive an error trying to process mathematics with this input
|
never called directly by MathJax; during the :meth:`loadComplete()`
|
||||||
jax.
|
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:
|
:Parameters:
|
||||||
- **script** --- reference to the DOM ``<script>`` object for
|
- **script** --- reference to the DOM ``<script>`` object for
|
||||||
the mathematics to be translated
|
the mathematics to be translated
|
||||||
:Returns: ``null``
|
:Returns: an `ElementJax` object, or ``null``
|
||||||
|
|
||||||
.. Method:: Register(mimetype)
|
.. Method:: Register(mimetype)
|
||||||
|
|
||||||
|
@ -136,13 +142,16 @@ Methods
|
||||||
1. Post the "[name] Jax Config" message to the startup signal.
|
1. Post the "[name] Jax Config" message to the startup signal.
|
||||||
2. Perform the jax's :meth:`Config()` method.
|
2. Perform the jax's :meth:`Config()` method.
|
||||||
3. Post the "[name] Jax Require" message to the startup signal.
|
3. Post the "[name] Jax Require" message to the startup signal.
|
||||||
4. Load the files from the jax's ``require`` array (which may
|
4. Load the files from the jax's ``require`` and
|
||||||
have been modified during the configuration process).
|
``config.extensions`` arrays.
|
||||||
5. Post the "[name] Jax Startup" message to the startup signal.
|
5. Post the "[name] Jax Startup" message to the startup signal.
|
||||||
6. Perform the jax's :meth:`Startup()` method.
|
6. Perform the jax's :meth:`Startup()` method.
|
||||||
7. Post the "[name] Jax Ready" message to the startup signal.
|
7. Post the "[name] Jax Ready" message to the startup signal.
|
||||||
8. perform the :meth:`MathJax.Ajax.loadComplete()` call for the
|
8. perform the :meth:`MathJax.Ajax.loadComplete()` call for the
|
||||||
``jax.js`` file.
|
``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.
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ Methods
|
||||||
- **message** --- the text to display in the message area
|
- **message** --- the text to display in the message area
|
||||||
- **n** --- the message id number
|
- **n** --- the message id number
|
||||||
- **delay** --- amout of time to display the message
|
- **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])
|
.. method:: Clear(n[,delay])
|
||||||
|
|
||||||
|
@ -78,9 +78,42 @@ Methods
|
||||||
- **delay** --- the delay before removing the message
|
- **delay** --- the delay before removing the message
|
||||||
:Returns: ``null``
|
: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()
|
.. method:: Log()
|
||||||
|
|
||||||
Returns a string of all the messages issued so far, separated by
|
Returns a string of all the messages issued so far, separated by
|
||||||
newlines. This is used in debugging MathJax operations.
|
newlines. This is used in debugging MathJax operations.
|
||||||
|
|
||||||
:Returns: string of all messages so far
|
:Returns: string of all messages so far
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ that class.
|
||||||
Properties
|
Properties
|
||||||
==========
|
==========
|
||||||
|
|
||||||
.. describe:: name
|
.. describe:: id
|
||||||
|
|
||||||
The name of the jax.
|
The name of the jax.
|
||||||
|
|
||||||
|
@ -57,16 +57,13 @@ Methods
|
||||||
|
|
||||||
This is the main routine called by MathJax when an element jax is
|
This is the main routine called by MathJax when an element jax is
|
||||||
to be converted to output. The default :meth:`Translate()`
|
to be converted to output. The default :meth:`Translate()`
|
||||||
method simply loads the ``jax.js`` file and returns that callback
|
method throws an error indicating that :meth:`Translate()` hasn't been
|
||||||
for that load function so that MathJax will know when to try
|
redefined, so when the ``jax.js`` file loads, it should override the
|
||||||
the :meth:`Translate()` action again. When the ``jax.js`` file
|
default :meth:`Translate()` with its own version that does the actual
|
||||||
loads, it should override the default :meth:`Translate()` with its
|
translation.
|
||||||
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.
|
|
||||||
|
|
||||||
You should use ``MathJax.Hub.getJaxFor(script)`` to obtain the
|
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
|
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
|
stored with the jax), and may insert DOM elements into the
|
||||||
document near the jax's ``<script>`` tag.
|
document near the jax's ``<script>`` tag.
|
||||||
|
|
|
@ -40,12 +40,12 @@ Issue tracking
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Found a bug or want to suggest an improvement? Post it to our `issue tracker
|
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.
|
and work hard to respond to problems quickly.
|
||||||
|
|
||||||
Before you create a new issue, however, please search the issues to see if it
|
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
|
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.
|
that the problem persists in the lastest version.
|
||||||
|
|
||||||
|
|
||||||
|
|
192
docs/html/_sources/config-files.txt
Normal file
192
docs/html/_sources/config-files.txt
Normal 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.
|
||||||
|
|
|
@ -6,18 +6,28 @@ Loading and Configuring MathJax
|
||||||
|
|
||||||
You load MathJax into a web page by including its main JavaScript file
|
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
|
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:
|
section of your document:
|
||||||
|
|
||||||
.. code-block:: html
|
.. code-block:: html
|
||||||
|
|
||||||
<script type="text/javascript" src="path-to-MathJax/MathJax.js"></script>
|
<script type="text/javascript" src="path-to-MathJax/MathJax.js"></script>
|
||||||
|
|
||||||
where ``path-to-MathJax`` is replaced by the URL of the MathJax
|
where ``path-to-MathJax`` is replaced by the URL of the copy of MathJax
|
||||||
directory on your server, or (if you are using MathJax locally rather
|
that you are loading. For example, if you are using the MathJax
|
||||||
than through a server) the location of that directory on your hard
|
distributed network service, the tag might be
|
||||||
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
|
||||||
|
|
||||||
|
<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
|
.. code-block:: html
|
||||||
|
|
||||||
|
@ -25,15 +35,29 @@ your web server's directory hierarchy, you might use
|
||||||
|
|
||||||
to load MathJax.
|
to load MathJax.
|
||||||
|
|
||||||
Although it is possible to load MathJax from a site other than your
|
If you install MathJax on a server in a domain that is different from the
|
||||||
own web server, there are issues involved in doing so that you need to
|
one containing the page that will load MathJax, then there are issues
|
||||||
take into consideration. See the :ref:`Notes About Shared Servers
|
involved in doing so that you need to take into consideration. See the
|
||||||
<cross-domain-linking>` for more details. Please do **not** link to
|
:ref:`Notes About Shared Servers <cross-domain-linking>` for more details.
|
||||||
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
|
When you load MathJax, it is common to include additional parameters for
|
||||||
would like to display mathematics. If you are able to run MathJax
|
MathJax as part of the URL. These control MathJax's configuration, and are
|
||||||
from your own server, please do so (this will probably give you better
|
discussed in the :ref:`Configuration Objects <configuration>` section. A
|
||||||
response time in any case).
|
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
|
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
|
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
|
advanced topic, however; see :ref:`Loading MathJax Dynamically
|
||||||
<ajax-mathjax>` for more details.
|
<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
|
Configuring MathJax
|
||||||
===================
|
===================
|
||||||
|
|
||||||
There are several ways to configure MathJax, but the easiest is to use
|
There are two ways to configure MathJax: via a configuration file, or by
|
||||||
the ``config/MathJax.js`` file that comes with MathJax. See the
|
including configuration commands wthin the web page itself. These can be
|
||||||
comments in that file, or the :ref:`configuration details
|
used independently, or in combination. For example, you can load a main
|
||||||
<configuration>` section, for explanations of the meanings of the various
|
pre-defined configuration file, but include in-line commands to
|
||||||
configuration options. You can edit the ``config/MathJax.js`` file to
|
adjust the configuration to your needs.
|
||||||
change any of the settings that you want to customize. When you
|
|
||||||
include MathJax in your page via
|
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
|
.. 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>
|
||||||
|
|
||||||
it will load ``config/MathJax.js`` automatically as one of its
|
loads the ``config/TeX-AMS-MML_HTMLorMML.js`` configuration file from the
|
||||||
first actions.
|
MathJax distributed network service.
|
||||||
|
|
||||||
Alternatively, you can configure MathJax efficiently by calling
|
You can include more than one configuration file by separating them with
|
||||||
:meth:`MathJax.Hub.Config()` when you include MathJax in your page, as
|
commas. For example, if you have a locally defined configuration file
|
||||||
follows:
|
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
|
.. code-block:: html
|
||||||
|
|
||||||
<script type="text/javascript" src="path-to-MathJax/MathJax.js">
|
<script type="text/javascript"
|
||||||
|
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML,local/local.js">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
to first load the main configuraiton, then the local modifications.
|
||||||
|
|
||||||
|
|
||||||
|
Using in-line configuration options
|
||||||
|
===================================
|
||||||
|
|
||||||
|
The second way to configure MathJax is through `in-line configuration`,
|
||||||
|
that puts the configuration options within the web page itself. This
|
||||||
|
process has changed in version 1.1 to make it compatible with HTML5.
|
||||||
|
Earlier versions of MathJax had in-line configuration included within the
|
||||||
|
content of the ``<script>`` tag that loads ``MathJax.js``, but HTML5 makes
|
||||||
|
it illegal to have content for a script with a ``src`` attribute.
|
||||||
|
|
||||||
|
MathJax solves this problem by using separate ``<script>`` tags to perform
|
||||||
|
configuration for MathJax. Because MathJax starts its configuration
|
||||||
|
process as soon as it is loaded, the configuration script must come
|
||||||
|
**before** the script tag that loads ``MathJax.js`` itself. You do this
|
||||||
|
by including a ``<script>`` with ``type="text/x-mathjax-config"``, whose
|
||||||
|
content will be run when MathJax performs its configuration. Generally,
|
||||||
|
this script will include a :meth:`MathJax.Hub.Config()` call to perform
|
||||||
|
MathJax configuration, but it can also include other MathJax commands,
|
||||||
|
such as registering signal actions, or any JavaScript commands that you
|
||||||
|
want. You can have as many such script tags as you want, and MathJax will
|
||||||
|
process them in order as they appear in the document.
|
||||||
|
|
||||||
|
For instance,
|
||||||
|
|
||||||
|
.. code-block:: html
|
||||||
|
|
||||||
|
<script type="text/x-mathjax-config">
|
||||||
MathJax.Hub.Config({
|
MathJax.Hub.Config({
|
||||||
extensions: ["tex2jax.js"],
|
extensions: ["tex2jax.js"],
|
||||||
jax: ["input/TeX", "output/HTML-CSS"],
|
jax: ["input/TeX", "output/HTML-CSS"],
|
||||||
tex2jax: {
|
tex2jax: {
|
||||||
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
|
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
|
||||||
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
|
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
|
||||||
|
processEscapes: true
|
||||||
},
|
},
|
||||||
"HTML-CSS": { availableFonts: ["TeX"] }
|
"HTML-CSS": { availableFonts: ["TeX"] }
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<script type="text/javascript" src="path-to-MathJax/MathJax.js">
|
||||||
|
|
||||||
This example includes the ``tex2jax`` preprocessor and configures it
|
This example includes the `tex2jax` preprocessor and configures it to use
|
||||||
to use both the standard TeX and LaTeX math delimiters. It uses the
|
both the standard :term:`TeX` and :term:`LaTeX` math delimiters. It uses
|
||||||
TeX input processor and the HTML-CSS output processor, and forces the
|
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
|
HTML-CSS processor to use the TeX fonts rather that other locally installed
|
||||||
installed fonts (e.g., :term:`STIX` fonts). See the
|
fonts (e.g., :term:`STIX` fonts). See the :ref:`configuration options
|
||||||
:ref:`configuration options <configuration>` section (or the comments
|
<configuration>` section (or the comments in the ``config/default.js``
|
||||||
in the ``config/MathJax.js`` file) for more information about the
|
file) for more information about the configuration options that you can
|
||||||
configuration options that you can include in the
|
include in the :meth:`MathJax.Hub.Config()` call. Note that this
|
||||||
:meth:`MathJax.Hub.Config()` call. Note that if you configure MathJax
|
configuration does **not** load any pre-defined configuration file.
|
||||||
using this in-line approach, the ``config/MathJax.js`` file is **not**
|
|
||||||
loaded.
|
|
||||||
|
|
||||||
Finally, if you would like to use several different configuration
|
Note that you can combine in-line configuration with file-based
|
||||||
files (like ``config/MathJax.js``, but with different settings in each
|
configuration, simply include ``text/x-mathjax-config`` scripts as above,
|
||||||
one), you can copy ``config/MathJax.js`` to ``config/MathJax-2.js``,
|
but also include ``config=filename`` when you load the ``MathJax.js``
|
||||||
or some other convenient name, and use
|
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
|
.. code-block:: html
|
||||||
|
|
||||||
<script type="text/javascript" src="path-to-MathJax/MathJax.js">
|
<script type="text/x-mathjax-config">
|
||||||
MathJax.Hub.Config({ config: "MathJax-2.js" });
|
MathJax.Hub.Config({
|
||||||
|
tex2jax: {
|
||||||
|
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
|
||||||
|
processEscapes: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="path-to-MathJax/MathJax.js?config=TeX-AMS_HTML">
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
to load the alternative configuration file ``config/MathJax-2.js``
|
|
||||||
from the MathJax ``config`` directory. In this way, you can have as
|
.. _delayStartupUntil:
|
||||||
many distinct configuration files as you need.
|
|
||||||
|
Configuring MathJax after it is loaded
|
||||||
|
======================================
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.)
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
.. _common-configurations:
|
Details of the MathJax configuration process
|
||||||
|
============================================
|
||||||
|
|
||||||
Common Configurations
|
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 following examples show configurations that are useful for some
|
1. Process any configuration file explicitly specified as a script parameter.
|
||||||
common situations. This is certainly not an exhaustive list, and
|
2. Process the in-line script body (deprecated), if present.
|
||||||
there are variations possible for any of them. Again, the comments in
|
3. If delayed startup is requested, wait for the indicated signal.
|
||||||
the ``config/MathJax.js`` file can help you decide what settings to
|
4. Process ``text/x-mathjax-config`` config blocks.
|
||||||
include, even if you are using the in-line configuration method.
|
5. Process any config files queued in the configuration's `config` array
|
||||||
|
by earlier config code.
|
||||||
|
|
||||||
The TeX setup
|
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
|
||||||
This example calls the ``tex2jax`` preprocessor to identify
|
when MathJax runs, and browser-dependent erratic behavior will result.
|
||||||
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:: 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"],
|
|
||||||
extensions: ["tex2jax.js"],
|
|
||||||
jax: ["input/TeX"]
|
|
||||||
});
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
MathML input and output in all browsers
|
|
||||||
---------------------------------------
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
.. code-block:: javascript
|
|
||||||
|
|
||||||
MathJax.Hub.Config({
|
|
||||||
config: ["MMLorHTML.js"],
|
|
||||||
extensions: ["mml2jax.js"],
|
|
||||||
jax: ["input/MathML"]
|
|
||||||
});
|
|
||||||
|
|
||||||
Using this configuration, MathJax finally makes MathML available in
|
|
||||||
all modern browsers.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
.. _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/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.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
mathematics on the page. You accomplish this by calling the
|
||||||
:meth:`MathJax.Hub.Startup.onload()` method as part of your MathJax
|
: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
|
startup script. To do this, you will need to give MathJax an in-line
|
||||||
configuration, so you will not be able to use the
|
configuration.
|
||||||
``config/MathJax.js`` file (though you can add it to your in-line
|
|
||||||
configuration's `config` array).
|
|
||||||
|
|
||||||
Here is an example of how to load and configure MathJax dynamically:
|
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 () {
|
(function () {
|
||||||
var script = document.createElement("script");
|
var script = document.createElement("script");
|
||||||
script.type = "text/javascript";
|
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({' +
|
var config = 'MathJax.Hub.Config({' +
|
||||||
'extensions: ["tex2jax.js"],' +
|
'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);
|
document.getElementsByTagName("head")[0].appendChild(script);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
Be sure to set the ``src`` to the correct URL for your copy of
|
You can adjust the ``config`` variable to your needs, but be careful to get
|
||||||
MathJax. You can adjust the ``config`` variable to your needs, but be
|
the commas right. The ``window.opera`` test is because some versions of
|
||||||
careful to get the commas right. The ``window.opera`` test is because
|
|
||||||
Opera doesn't handle setting ``script.text`` properly, while Internet
|
Opera doesn't handle setting ``script.text`` properly, while Internet
|
||||||
Explorer doesn't handle setting the ``innerHTML`` of a script tag.
|
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:
|
configure MathJax:
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
@ -59,10 +56,9 @@ configure MathJax:
|
||||||
(function () {
|
(function () {
|
||||||
var script = document.createElement("script");
|
var script = document.createElement("script");
|
||||||
script.type = "text/javascript";
|
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" }); ' +
|
var config = 'MathJax.Hub.Startup.onload();';
|
||||||
'MathJax.Hub.Startup.onload();';
|
|
||||||
|
|
||||||
if (window.opera) {script.innerHTML = config}
|
if (window.opera) {script.innerHTML = config}
|
||||||
else {script.text = config}
|
else {script.text = config}
|
||||||
|
@ -71,13 +67,12 @@ configure MathJax:
|
||||||
})();
|
})();
|
||||||
|
|
||||||
Note that the **only** reliable way to configure MathJax is to use an
|
Note that the **only** reliable way to configure MathJax is to use an
|
||||||
in-line configuration of the type discussed above. You should **not**
|
in-line configuration block of the type discussed above. You should
|
||||||
call :meth:`MathJax.Hub.Config()` directly in your code, as it will
|
**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
|
not run at the correct time --- it will either run too soon, in which case
|
||||||
case ``MathJax`` may not be defined and the function will throw an
|
``MathJax`` may not be defined and the function will throw an error, or it
|
||||||
error, or it will run too late, after MathJax has already finished its
|
will run too late, after MathJax has already finished its configuration
|
||||||
configuration process, so your changes will not have the desired
|
process, so your changes will not have the desired effect.
|
||||||
effect.
|
|
||||||
|
|
||||||
|
|
||||||
MathJax and GreaseMonkey
|
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
|
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
|
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
|
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
|
server-based copy. The MathJax CDN works nicely for this.
|
||||||
of a copy of MathJax from your own server.
|
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -122,12 +116,8 @@ IE+MathPlayer.
|
||||||
(document.getElementsByTagNameNS == null ? false :
|
(document.getElementsByTagNameNS == null ? false :
|
||||||
(document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) {
|
(document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) {
|
||||||
var script = document.createElement("script");
|
var script = document.createElement("script");
|
||||||
script.src = "http://www.yoursite.edu/MathJax/MathJax.js"; // put your URL here
|
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full";
|
||||||
var config = 'MathJax.Hub.Config({' +
|
var config = 'MathJax.Hub.Startup.onload()';
|
||||||
'extensions:["mml2jax.js"],' +
|
|
||||||
'jax:["input/MathML","output/HTML-CSS"]' +
|
|
||||||
'});' +
|
|
||||||
'MathJax.Hub.Startup.onload()';
|
|
||||||
if (window.opera) {script.innerHTML = config} else {script.text = config}
|
if (window.opera) {script.innerHTML = config} else {script.text = config}
|
||||||
document.getElementsByTagName("head")[0].appendChild(script);
|
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
|
// 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--) {
|
for (var i = images.length - 1; i >= 0; i--) {
|
||||||
var img = images[i];
|
var img = images[i];
|
||||||
if (img.className === "tex") {
|
if (img.className === "tex") {
|
||||||
var script = document.createElement("script"); script.type = "math/tex";
|
var script = document.createElement("script"); script.type = "math/tex";
|
||||||
if (window.opera) {script.innerHTML = img.alt} else {script.text = img.alt}
|
if (window.opera) {script.innerHTML = img.alt} else {script.text = img.alt}
|
||||||
img.parentNode.replaceChild(script,img);
|
img.parentNode.replaceChild(script,img); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (count) {
|
||||||
//
|
//
|
||||||
// Load MathJax and have it process the page
|
// Load MathJax and have it process the page
|
||||||
//
|
//
|
||||||
var script = document.createElement("script");
|
var script = document.createElement("script");
|
||||||
script.src = "http://www.yoursite.edu/MathJax/MathJax.js"; // put your URL here
|
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full";
|
||||||
var config = 'MathJax.Hub.Config({' +
|
var config = 'MathJax.Hub.Startup.onload()';
|
||||||
'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}
|
if (window.opera) {script.innerHTML = config} else {script.text = config}
|
||||||
document.getElementsByTagName("head")[0].appendChild(script);
|
document.getElementsByTagName("head")[0].appendChild(script);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
**Source**: `mathjax_wikipedia.user.js <_static/mathjax_wikipedia.user.js>`_
|
**Source**: `mathjax_wikipedia.user.js <_static/mathjax_wikipedia.user.js>`_
|
||||||
|
|
|
@ -15,6 +15,8 @@ Basic Usage
|
||||||
Getting Started with MathJax <start>
|
Getting Started with MathJax <start>
|
||||||
Installing and Testing MathJax <installation>
|
Installing and Testing MathJax <installation>
|
||||||
Loading and Configuring MathJax <configuration>
|
Loading and Configuring MathJax <configuration>
|
||||||
|
Common MathJax Configurations <config-files>
|
||||||
|
MathJax Configuration Options <options/index>
|
||||||
Using MathJax in Web Platforms <platforms/index>
|
Using MathJax in Web Platforms <platforms/index>
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
@ -30,6 +32,19 @@ Basic Usage
|
||||||
The MathJax Community <community>
|
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:
|
||||||
|
|
||||||
Advanced Topics
|
Advanced Topics
|
||||||
|
@ -49,10 +64,6 @@ Advanced Topics
|
||||||
|
|
||||||
Details of the MathJax API<api/index>
|
Details of the MathJax API<api/index>
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 1
|
|
||||||
|
|
||||||
Converting to MathJax from jsMath <jsMath>
|
|
||||||
|
|
||||||
Reference Pages
|
Reference Pages
|
||||||
===============
|
===============
|
||||||
|
@ -66,6 +77,12 @@ Reference Pages
|
||||||
|
|
||||||
* :ref:`Search <search>`
|
* :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|.
|
This version of the documentation was built |today|.
|
||||||
|
|
|
@ -4,6 +4,12 @@
|
||||||
Installing and Testing MathJax
|
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
|
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
|
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
|
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
|
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://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
|
.. 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
|
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
|
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
|
.. code-block:: sh
|
||||||
|
|
||||||
cd mathjax
|
cd MathJax
|
||||||
git remote show origin
|
git remote show origin
|
||||||
|
|
||||||
to check if there are updates to MathJax (this will print several
|
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
|
.. code-block:: sh
|
||||||
|
|
||||||
cd mathjax
|
cd MathJax
|
||||||
git pull origin
|
git pull origin
|
||||||
|
|
||||||
to udpate your copy of MathJax to the current release version. If you
|
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
|
keep MathJax updated in this way, you will be sure that you have the
|
||||||
latest bug fixes and new features as they become available.
|
latest bug fixes and new features as they become available.
|
||||||
|
|
||||||
This gets you the current development copy of MathJax, which is the
|
This gets you the current development copy of MathJax, which is the version
|
||||||
"bleeding-edge" version that contains all the latest changes to
|
that contains all the latest changes to MathJax. Although we try to make
|
||||||
MathJax. At times, however, these may be less stable than the
|
sure this version is a stable and usable version of MathJax, it is under
|
||||||
"release" version. If you prefer to use the most stable version (that
|
active development, and at times it may be less stable than the "release"
|
||||||
may not include all the latest patches and features), use ``git tag
|
version. If you prefer to use the most stable version (that may not
|
||||||
-l`` to see all versions and use ``git checkout <tag_name>`` to
|
include all the latest patches and features), use ``git tag -l`` to see all
|
||||||
checkout that version of MathJax. When you want to upgrade to a new
|
versions and use ``git checkout <tag_name>`` to checkout that version of
|
||||||
release, you will need to repeat this for the latest release tag.
|
MathJax. When you want to upgrade to a new release, you will need to
|
||||||
|
repeat this for the latest release tag.
|
||||||
|
|
||||||
|
|
||||||
.. _getting-mathjax-svn:
|
.. _getting-mathjax-svn:
|
||||||
|
@ -66,11 +73,11 @@ Obtaining MathJax via SVN
|
||||||
If you are more comfortable with the `subversion
|
If you are more comfortable with the `subversion
|
||||||
<http://subversion.apache.org/>`_ source control system, you may want
|
<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
|
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
|
.. 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
|
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
|
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
|
.. code-block:: sh
|
||||||
|
|
||||||
cd mathjax
|
cd MathJax
|
||||||
svn status -u
|
svn status -u
|
||||||
|
|
||||||
to check if there are updates to MathJax. If MathJax needs updating,
|
to check if there are updates to MathJax. If MathJax needs updating,
|
||||||
|
@ -88,19 +95,20 @@ use
|
||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
||||||
cd mathjax
|
cd MathJax
|
||||||
svn update
|
svn update
|
||||||
|
|
||||||
to udpate your copy of MathJax to the current release version. If you
|
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
|
keep MathJax updated in this way, you will be sure that you have the
|
||||||
latest bug fixes and new features as they become available.
|
latest bug fixes and new features as they become available.
|
||||||
|
|
||||||
This gets you the current development copy of MathJax, which is the
|
This gets you the current development copy of MathJax, which is the version
|
||||||
"bleeding-edge" version that contains all the latest changes to
|
that contains all the latest changes to MathJax. Although we try to make
|
||||||
MathJax. At times, however, these may be less stable than the
|
sure this version is a stable and usable version of MathJax, it is under
|
||||||
"release" version. If you prefer to use one of the tagged releases
|
active development, and at times it may be less stable than the "release"
|
||||||
instead, then either use ``git`` as described above, or one of the
|
version. If you prefer to use one of the tagged releases instead, then
|
||||||
archive files as described below. You can use
|
either use ``git`` as described above, or one of the archive files as
|
||||||
|
described below. You can use
|
||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
||||||
|
@ -134,11 +142,20 @@ let you refer to the main MathJax file as ``/MathJax/MathJax.js`` from
|
||||||
within any page on your server.
|
within any page on your server.
|
||||||
|
|
||||||
From the `MathJax GitHub download link
|
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
|
right), you can also select the ``Download .tar.gz`` or ``Download
|
||||||
.zip`` buttons to get a copy of the current "bleeding-edge" version of
|
.zip`` buttons to get a copy of the current development version of
|
||||||
MathJax that contains all the latest changes and bug-fixes.
|
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
|
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
|
address for those files rather than opening them locally. When you
|
||||||
view the ``index.html`` file, you should see (after a few moments) a
|
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
|
message that MathJax appears to be working. If not, you should check
|
||||||
that the files have been transferred to the server completely, that
|
that the files have been transferred to the server completely, and that
|
||||||
the fonts archive has been unpacked in the correct location, and that
|
|
||||||
the permissions allow the server to access the files and folders 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
|
are part of the MathJax directory (be sure to verify the MathJax
|
||||||
folder's permissions as well). Checking the server logs may help
|
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
|
installation at ``www.yourcollege.edu`` rather than installing a
|
||||||
separate copy on the departmental machine. MathJax can certainly
|
separate copy on the departmental machine. MathJax can certainly
|
||||||
be loaded from another server, but there is one imporant caveat ---
|
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.
|
||||||
|
|
||||||
Firefox’s interpretation of the same-origin policy is more strict than
|
Firefox's interpretation of the same-origin policy is more strict than most
|
||||||
most other browsers, and it affects how fonts are loaded with the
|
other browsers, and it affects how fonts are loaded with the `@font-face`
|
||||||
`@font-face` CSS directive. MathJax uses this directive to load
|
CSS directive. MathJax uses this directive to load web-based math fonts
|
||||||
web-based math fonts into a page when the user doesn't have them
|
into a page when the user doesn't have them installed locally on their own
|
||||||
installed locally on their own computer. Firefox's security policy,
|
computer. Firefox's security policy, however, only allows this when the
|
||||||
however, only allows this when the fonts come from the same server as
|
fonts come from the same server as the web page itself, so if you load
|
||||||
the web page itself, so if you load MathJax (and hence its web fonts)
|
MathJax (and hence its web fonts) from a different server, Firefox won't be
|
||||||
from a different server, Firefox won't be able to access those web
|
able to access those web fonts. In this case, MathJax will pause while
|
||||||
fonts. In this case, MathJax will pause while waiting for the font to
|
waiting for the font to download (which will never happen); it will time
|
||||||
download (which will never happen) and will time out after about 15
|
out after about 5 seconds and switch to image fonts as a fallback.
|
||||||
seconds for each font it tries to access. Typically that is three or
|
Similarly, IE9 has a similar same-origin policy in its `IE9 standards
|
||||||
four fonts, so your Firefox users will experience a minute or so
|
mode`, so it exhibits this same behavior.
|
||||||
delay before mathematics is displayed, and then it will probably
|
|
||||||
display incorrectly because the browser doesn't have access to the
|
|
||||||
correct fonts.
|
|
||||||
|
|
||||||
There is a solution to this, however, if you manage the server where
|
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
|
MathJax is installed, and if that server is running the `Apache web
|
||||||
server <http://www.apache.org/>`_. In the remote server's
|
server <http://www.apache.org/>`_. In the remote server's
|
||||||
``MathJax/fonts/HTML-CSS/TeX/otf`` folder, create a file called
|
``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)$">
|
<FilesMatch "\.(ttf|otf|eot)$">
|
||||||
<IfModule mod_headers.c>
|
<IfModule mod_headers.c>
|
||||||
|
@ -207,18 +221,17 @@ server <http://www.apache.org/>`_. In the remote server's
|
||||||
</IfModule>
|
</IfModule>
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
|
|
||||||
and make sure the permissions allow the server to read this file.
|
and make sure the permissions allow the server to read this file. (The
|
||||||
(The file's name starts with a period, which causes it to be an
|
file's name starts with a period, which causes it to be an "invisible" file
|
||||||
"invisible" file on unix-based operating systems. Some systems,
|
on unix-based operating systems. Some systems, particularly those with
|
||||||
particularly graphic user interfaces, may not allow you to create such
|
graphical user interfaces, may not allow you to create such files, so you
|
||||||
files, so you might need to use the command-line interface to
|
might need to use the command-line interface to accomplish this.)
|
||||||
accomplish this.)
|
|
||||||
|
|
||||||
This file should make it possible for pages at other sites to load
|
This file should make it possible for pages at other sites to load MathJax
|
||||||
MathJax from this server in such a way that Firefox will be able to
|
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
|
download the web-based fonts. If you want to restrict the sites that can
|
||||||
can access the web fonts, change the ``Access-Control-Allow-Origin``
|
access the web fonts, change the ``Access-Control-Allow-Origin`` line to
|
||||||
line to something like::
|
something like::
|
||||||
|
|
||||||
Header set Access-Control-Allow-Origin "http://www.math.yourcollege.edu"
|
Header set Access-Control-Allow-Origin "http://www.math.yourcollege.edu"
|
||||||
|
|
||||||
|
@ -231,7 +244,7 @@ for more details.
|
||||||
|
|
||||||
.. _ff-local-fonts:
|
.. _ff-local-fonts:
|
||||||
|
|
||||||
Forefox and Local Fonts
|
Firefox and local fonts
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
Firefox's same-origin security policy affects its ability to load
|
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
|
restriction, but it is a limitiation imposed by Firefox's security
|
||||||
model that MathJax can not circumvent. Currently, this is not a
|
model that MathJax can not circumvent. Currently, this is not a
|
||||||
problem for other browsers.
|
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).
|
||||||
|
|
|
@ -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
|
in the browser by a user viewing your web pages. If you are using
|
||||||
jsMath with its ``tex2math`` preprocessor, then switching to MathJax
|
jsMath with its ``tex2math`` preprocessor, then switching to MathJax
|
||||||
should be easy, and is simply a matter of configuring MathJax
|
should be easy, and is simply a matter of configuring MathJax
|
||||||
appropriately. See the section on :ref:`Configuring MathJax
|
appropriately. See the section on :ref:`Loading and Configuring MathJax
|
||||||
<configuration>` for details about loading and configuring MathJax.
|
<loading>` for details.
|
||||||
|
|
||||||
On the other hand, if you are using jsMath's ``<span
|
On the other hand, if you are using jsMath's ``<span
|
||||||
class="math">...</span>`` and ``<div class="math">...</div>`` tags to
|
class="math">...</span>`` and ``<div class="math">...</div>`` tags to
|
||||||
mark the mathematics in your document, then you should use MathJax's
|
mark the mathematics in your document, then you should use MathJax's
|
||||||
``jsMath2jax`` preprocessor when you switch to MathJax. To do this,
|
``jsMath2jax`` preprocessor when you switch to MathJax. To do this,
|
||||||
include ``"jsMath2jax.js"`` in the `extensions` array of your
|
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"],
|
<script type="text/x-mathjax-config">
|
||||||
jax: ["input/TeX", ...]
|
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
|
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.
|
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.
|
||||||
|
|
|
@ -5,7 +5,7 @@ MathJax MathML Support
|
||||||
**********************
|
**********************
|
||||||
|
|
||||||
The support for :term:`MathML` in MathJax consists of three parts: the
|
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
|
output processor. The first of these looks for ``<math>`` tags within
|
||||||
your document and marks them for later processing by MathJax. The
|
your document and marks them for later processing by MathJax. The
|
||||||
second converts the MathML to the internal format used by MathJax, and
|
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
|
difficult. MathJax handles the setup and properly marks the
|
||||||
mathematics so that the browser will render it as MathML. In
|
mathematics so that the browser will render it as MathML. In
|
||||||
addition, MathJax provides its contextual menu for the MathML, which
|
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
|
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
|
MathML in HTML pages
|
||||||
|
|
|
@ -50,6 +50,8 @@ and it also avoids the conflict between the use of the less-than sign,
|
||||||
an HTML tag).
|
an HTML tag).
|
||||||
|
|
||||||
|
|
||||||
|
.. _mathjax-script-tags:
|
||||||
|
|
||||||
How mathematics is stored in the page
|
How mathematics is stored in the page
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
|
|
|
@ -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
|
factor. The user can also adjust this value using the contextual
|
||||||
menu item associated with the typeset mathematics.
|
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"]
|
.. describe:: availableFonts: ["STIX","TeX"]
|
||||||
|
|
||||||
This is a list of the fonts to look for on a user's computer in
|
This is a list of the fonts to look for on a user's computer in
|
||||||
|
|
|
@ -20,7 +20,7 @@ options, include a ``MathMenu`` section in your
|
||||||
|
|
||||||
would set the ``delay`` option to 600 milliseconds.
|
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
|
This is the hover delay for the display (in milliseconds) for
|
||||||
submenus in the contextual menu: when the mouse is over a submenu
|
submenus in the contextual menu: when the mouse is over a submenu
|
||||||
|
|
|
@ -65,3 +65,17 @@ to be defined within the TeX input processor.
|
||||||
would ask the TeX processor to define two new macros: ``\RR``,
|
would ask the TeX processor to define two new macros: ``\RR``,
|
||||||
which produces a bold-face "R", and ``\bold{...}``, which takes one
|
which produces a bold-face "R", and ``\bold{...}``, which takes one
|
||||||
parameter and set it in the bold-face font.
|
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.
|
|
@ -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
|
configuration, styles, jax, and so on) as soon as it can. If you
|
||||||
expect to be doing additional configuration on the page, however,
|
expect to be doing additional configuration on the page, however,
|
||||||
you may want to have it wait until the page's onload hander is
|
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
|
.. 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
|
on :ref:`CSS style objects <css-style-objects>` for details on
|
||||||
how these are specified in JavaScript.
|
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.
|
91
docs/html/_sources/options/index.txt
Normal file
91
docs/html/_sources/options/index.txt
Normal 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>
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,18 @@ Currently, MathJax can render math in two ways:
|
||||||
- Using a browser's native MathML support.
|
- Using a browser's native MathML support.
|
||||||
|
|
||||||
These are implemented by the `HTML-CSS` and `NativeMML` output
|
These are implemented by the `HTML-CSS` and `NativeMML` output
|
||||||
processors. You select which one you want to use by including either
|
processors.
|
||||||
``"output/HTML-CSS"`` or ``"output/NativeMML"`` in the `jax` array of
|
|
||||||
your MathJax configuration. For example
|
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
|
.. 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
|
major browsers, with results that are consistent across browsers and
|
||||||
operating systems. This is MathJax's primary output mode. It's major
|
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
|
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
|
HTML-CSS processor has not yet been optimized for speed, so you can
|
||||||
expect some improvement in the future. Note that IE8 in "IE8
|
expect some improvement in the future. Note that IE8 in "IE8
|
||||||
standards mode" is an order of magnitude slower than any other browser
|
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
|
with simple equations, but fails with more complex formulas, so we
|
||||||
don't recommend using the NativeMML output processor with Opera. Safari,
|
don't recommend using the NativeMML output processor with Opera. Safari,
|
||||||
Chrome, Konqueror, and most other browsers don't support MathML
|
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
|
The advantage of the NativeMML output Processor is its speed, since native
|
||||||
native MathML support is much faster than using complicated HTML and
|
MathML support is much faster than using complicated HTML and CSS to lay
|
||||||
CSS to lay out mathematics via an interpreted language like JavaScript
|
out mathematics, as the HTML-CSS output processor does. The disadvantage
|
||||||
(as the HTML-CSS output processor does). The disadvantage is that you
|
is that you are dependent on the browser's MathML implementation for your
|
||||||
are dependent on the browser's MathML implementation for your
|
|
||||||
rendering, and these vary in quality of output and completeness of
|
rendering, and these vary in quality of output and completeness of
|
||||||
implementation. MathJax may rely on features that are not available
|
implementation. MathJax may rely on features that are not available in
|
||||||
in some renderers (for example, Firefox's MathML support does not
|
some renderers (for example, Firefox's MathML support does not implement
|
||||||
implement some of the named widths, such as
|
some of the named widths, such as ``negativethinmathspace``). The results
|
||||||
``negativethinmathspace``). The results using the NativeMML output
|
using the NativeMML output processor may have spacing or other rendering
|
||||||
processor may have spacing or other rendering problems that are
|
problems that are outside of MathJax's control.
|
||||||
outside of MathJax's control.
|
|
||||||
|
|
||||||
Automatic Selection of the Output Processor
|
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
|
Since not all browsers support MathML natively, it would be unwise to
|
||||||
choose the NativeMML output processor unless you are sure of your
|
choose the NativeMML output processor unless you are sure of your
|
||||||
audience's browser capabilities. MathJax can help with that, however,
|
audience's browser capabilities. MathJax can help with that, however,
|
||||||
since there is a special configuration file that will choose between
|
since a number of its combined configuration files will select NativeMML
|
||||||
NativeMML and HTML-CSS depending on the browser in use. To invoke it,
|
output when the browser supports it, and HTML-CSS output otherwise. These
|
||||||
add ``"MMLorHTML.js"`` to your configurations `config` array, and **do
|
are the configuration files that end in ``_HTMLorMML``.
|
||||||
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.
|
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
|
.. code-block:: javascript
|
||||||
|
|
||||||
|
@ -74,18 +87,34 @@ fill that in for you based on the abilities of your user's browser.
|
||||||
jax: ["input/TeX"]
|
jax: ["input/TeX"]
|
||||||
|
|
||||||
You can customize which choice to make on a browser-by-browser basis
|
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
|
or a global basis. See the ``config/default.js`` file or the
|
||||||
:ref:`Configuring MathJax <configuration>` section for futher
|
:ref:`Configuring MMLorHTML <configure-MMLorHTML>` section for futher
|
||||||
details.
|
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
|
MathJax produces MathML that models the underlying mathematics as best
|
||||||
it can, rather than using complicated hacks to improve output for a
|
it can, rather than using complicated hacks to improve output for a
|
||||||
particular MathML implementation. When you make the choice to use the
|
particular MathML implementation. When you make the choice to use the
|
||||||
NativeMML output processor, you are making a trade-off: gaining speed
|
NativeMML output processor, you are making a trade-off: gaining speed
|
||||||
at the expense of quality and reliability, a decision that should not
|
at the expense of quality and reliability, a decision that should not
|
||||||
be taken lightly. Note, however, that a user can employ the MathJax
|
be taken lightly.
|
||||||
contectual menu to select the other other renderer if he or she
|
|
||||||
wishes.
|
|
||||||
|
|
||||||
|
|
||||||
.. _html-css-with-ie8:
|
.. _html-css-with-ie8:
|
||||||
|
@ -93,16 +122,16 @@ wishes.
|
||||||
HTML-CSS with IE8
|
HTML-CSS with IE8
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Internet Explorer 8 has at least eight different rendering modes in
|
Internet Explorer 8 has at least eight different rendering modes in which
|
||||||
which can operate, and that are triggered by the `DOCTYPE` of the
|
it can operate, and that are triggered by the `DOCTYPE` of the document
|
||||||
document being viewed. Its "quirks" mode is its fastest mode, and its
|
being viewed. Its "quirks" mode is its fastest mode, and its "IE8
|
||||||
"IE8 standards" mode is its slowest. This is the mode triggered by
|
standards" mode is its slowest. This is the mode triggered by strict HTML
|
||||||
strict HTML document types, and since most modern content management
|
document types, and since most modern content management systems now
|
||||||
systems now include a `DOCTYPE` that activates "standards" mode, IE8
|
include a `DOCTYPE` that activates "standards" mode, IE8 will operate in
|
||||||
will operate in its slowest manner. This is particularly apparent
|
its slowest manner. This is particularly apparent when MathJax is used,
|
||||||
when MathJax is used, since IE8 in standards mode runs 20 to 30 times
|
since IE8 in standards mode runs 20 to 30 times slower than it does in its
|
||||||
slower than it does in its IE7 emulation mode, and 60 times slower
|
IE7 emulation mode, and 60 times slower than in quirks mode, on the sample
|
||||||
than in quirks mode.
|
equations page in ``test/sample.html``.
|
||||||
|
|
||||||
Most users find this speed reduction unacceptable when there is much
|
Most users find this speed reduction unacceptable when there is much
|
||||||
mathematics on the page. To overcome this problem, you may wish to
|
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
|
that your users install the `MathPlayer plugin
|
||||||
<http://www.dessci.com/en/products/mathplayer/>`_, which will render
|
<http://www.dessci.com/en/products/mathplayer/>`_, which will render
|
||||||
the mathematics much more quickly.
|
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.
|
||||||
|
|
|
@ -4,6 +4,20 @@
|
||||||
Using MathJax in popular web platforms
|
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
|
Most web-based content-management systems include a theme or template
|
||||||
layer that determines how the pages look, and that loads information
|
layer that determines how the pages look, and that loads information
|
||||||
common to all pages. Such theme files provide one popular way to
|
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::
|
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
|
either just before the ``</head>`` tag in your theme file, or at the end of
|
||||||
directory for your server) either just before the ``</head>`` tag in
|
the file if it contains no ``</head>``.
|
||||||
your theme file, or at the end of the file if it contains no
|
|
||||||
``</head>``.
|
|
||||||
|
|
||||||
The theme files for various popular platforms are:
|
The theme files for various popular platforms are:
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,6 @@
|
||||||
Using MathJax in Movable Type
|
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
|
1. Open Moveable Type Admin interface for the site on which you want to enable
|
||||||
MathJax.
|
MathJax.
|
||||||
|
|
||||||
|
@ -25,17 +22,17 @@ your server (see :ref:`Installing and Testing MathJax <installation>`).
|
||||||
|
|
||||||
.. code-block:: html
|
.. 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
|
to load MathJax from our distributed netowrk service.
|
||||||
main MathJax dorectory on your server.
|
|
||||||
|
|
||||||
.. image:: ../images/mt_head.png
|
.. image:: ../images/mt_head.png
|
||||||
|
|
||||||
5. Save the file. This should enable MathJax, so you should be able
|
5. Save the file. This will enable MathJax with both TeX and MathML
|
||||||
to start adding mathematical content to your pages. Use the
|
input, so you should be able to start adding mathematical content to
|
||||||
``config/MathJas.js`` file in the MathJax directory to configure
|
your pages. If you need to adjust the configuraiton, see
|
||||||
MathJax to your needs (see :ref:`Configuring MathJax
|
:ref:`Configuring MathJax <loading>` for more details.
|
||||||
<configuration>` for details).
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,9 @@
|
||||||
Installing MathJax in WordPress
|
Installing MathJax in WordPress
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
These instructions assume you already have placed the MathJax files on
|
Note that there is a `WordPress plugin for MathJax
|
||||||
your server (see :ref:`Installing MathJax <installation>`).
|
<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.
|
1. Open the WordPress admin interface.
|
||||||
|
|
||||||
|
@ -28,15 +29,14 @@ your server (see :ref:`Installing MathJax <installation>`).
|
||||||
|
|
||||||
.. code-block:: html
|
.. 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
|
just before that. Otherwise, insert the same code at the very
|
||||||
bottom of the file. Here, ``path-to-MathJax`` should be replaced
|
bottom of the file.
|
||||||
by the web-address of the main MathJax directory on your server,
|
|
||||||
e.g., ``src="/mathjax/MathJax.js"``.
|
|
||||||
|
|
||||||
4. Save the file. This should enable MathJax, so you should be able to
|
4. Save the file. This will enable MathJax with both TeX and MathML
|
||||||
start adding mathematical content to your pages. Use the
|
input, so you should be able to start adding mathematical content to
|
||||||
``config/MathJas.js`` file in the MathJax directory to configure
|
your pages. If you need to adjust the configuraiton, see
|
||||||
MathJax to your needs (see :ref:`Configuring MathJax
|
:ref:`Configuring MathJax <loading>` for more details.
|
||||||
<configuration>` for details).
|
|
||||||
|
|
|
@ -5,8 +5,63 @@ Getting Started
|
||||||
***************
|
***************
|
||||||
|
|
||||||
MathJax allows you to include mathematics in your web pages, either
|
MathJax allows you to include mathematics in your web pages, either
|
||||||
using TeX and LaTeX notation, or as MathML. To use MathJax, you will
|
using TeX and LaTeX notation, or as MathML, and you can even use both
|
||||||
need to do the following things:
|
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.
|
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
|
4. Put mathematics into your web pages so that MathJax can display
|
||||||
it.
|
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
|
Obtaining and Installing MathJax
|
||||||
================================
|
--------------------------------
|
||||||
|
|
||||||
The easiest way to set up MathJax is to obtain the v1.1 archive from
|
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
|
the `MathJax download page <http://www.mathjax.org/download/>`_ (you
|
||||||
should obtain a file names something like
|
should obtain a file named something like
|
||||||
``mathjax-MathJax-v1.0-X-XXXXXXXX.zip``, where the X's are
|
``mathjax-MathJax-v1.1-X-XXXXXXXX.zip``, where the X's are
|
||||||
random-looking letters and numbers). This archive includes both the
|
random-looking letters and numbers). This archive includes both the
|
||||||
MathJax code and the MathJax webfonts, so it is the only file you
|
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
|
need. Note that this is different from earlier releases, which had
|
||||||
separate from the rest of the code).
|
the fonts separate from the rest of the code.
|
||||||
|
|
||||||
Unpack the archive and place the resulting MathJax folder onto your
|
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 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
|
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
|
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/>`_
|
MathJax up-to-date. That uses the `Git <http://git-scm.com/>`_ version
|
||||||
version control system, and is described in the :ref:`Installing
|
control system, and is described in the :ref:`Installing MathJax
|
||||||
MathJax <getting-mathjax-git>` document. If you prefer using
|
<getting-mathjax-git>` document. If you prefer using `Subversion
|
||||||
`Subversion <http://subversion.apache.org/>`_, you can also use that
|
<http://subversion.apache.org/>`_, you can also use that to get a copy
|
||||||
to get a copy of MathJax (see :ref:`Installing MathJax via SVN
|
of MathJax (see :ref:`Installing MathJax via SVN
|
||||||
<getting-mathjax-svn>`).
|
<getting-mathjax-svn>`).
|
||||||
|
|
||||||
Once you have MathJax set up on your server, you can test it using the
|
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
|
files in the ``MathJax/test`` directory. Load them in your browser
|
||||||
using its web address rather than opening them locally (i.e., use an
|
using its web address rather than opening them locally (i.e., use an
|
||||||
``http://`` URL rather than a ``file://`` URL). When you view the
|
``http://`` URL rather than a ``file://`` URL). When you view the
|
||||||
``index.html`` file, after a few moments you should see a message that
|
``index.html`` file, after a few moments you should see a message
|
||||||
MathJax appears to be working. If not, check that the files have been
|
indicating that MathJax appears to be working. If not, check that the
|
||||||
transferred to the server completely and that the permissions allow
|
files have been transferred to the server completely and that the
|
||||||
the server to access the files and folders that are part of the
|
permissions allow the server to access the files and folders that are
|
||||||
MathJax directory. (Be sure to verify the MathJax folder's permissions
|
part of the MathJax directory. (Be sure to verify the MathJax
|
||||||
as well.) Check the server log files for any errors that pertain to
|
folder's permissions as well.) Check the server log files for any
|
||||||
the MathJax installation; this may help locate problems in the
|
errors that pertain to the MathJax installation; this may help locate
|
||||||
permission or locations of files.
|
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
|
When you include MathJax into your web pages as described below, it
|
||||||
will load the file ``config/MathJax.js`` (i.e., the file named
|
will load the file ``config/TeX-AMS-MML_HTMLorMML.js`` (i.e., the file
|
||||||
``MathJax.js`` in the ``config`` folder of the main ``MathJax``
|
named ``TeX-AMS-MML_HTMLorMML.js`` in the ``config`` folder of the
|
||||||
folder). This file contains the configuration parameters that
|
main ``MathJax`` folder). This file preloads all the most comply-used
|
||||||
control how MathJax operates. There are comments in it that
|
components of MathJax, allowing it to process mathematics that is in
|
||||||
explain each of the parameters, and you can edit the file to suit
|
the TeX or LaTeX format, or in MathML notation. It will produce
|
||||||
your needs.
|
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
|
There are a number of other prebuilt configuration files that you can
|
||||||
input language, but you might still want to adjust some settings; for
|
choose from as well, or you could use the ``config/default.js`` file and
|
||||||
example, you might want to include some additional extensions such as
|
customize the settings yourself. The combined configuration files are
|
||||||
the ``AMSmath`` and ``AMSsymbols`` extensions. The comments in the
|
described more fully in :ref:`Common Configurations
|
||||||
file should help you do this, but more detailed instructions are
|
<common-configurations>`, and the configuration options are described in
|
||||||
included in the :ref:`Configuring MathJax <configuration>` document.
|
:ref:`Configuration Options <configuration>`.
|
||||||
There are also ways to configure MathJax other than by using the
|
|
||||||
``config/MathJax.js`` file; these are descibed on that page as well.
|
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
|
You can include MathJax in your web page by putting
|
||||||
|
|
||||||
.. code-block:: html
|
.. 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
|
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
|
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
|
.. 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
|
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>
|
<html>
|
||||||
<head>
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
...
|
...
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
Although it is possible to load MathJax from a site other than your
|
If you have installed MathJax on a server that is in a different
|
||||||
own web server, there are issues involved in doing so that you need to
|
domain from the one serving the page that loads MathJax, be sure to
|
||||||
take into consideration. See the :ref:`Notes About Shared Servers
|
read the :ref:`Notes About Shared Servers <cross-domain-linking>` for
|
||||||
<cross-domain-linking>` for more details. Please do **not** link to
|
more details. In that case, you may wish to consider using the
|
||||||
the copy of MathJax at ``www.mathjax.org``, as we do not have the
|
:ref:`MathJax CDN <mathjax-cdn>` rather than installing your own copy
|
||||||
resources to act as a web service for all the sites on the web that
|
of MathJax.
|
||||||
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).
|
|
||||||
|
|
||||||
|
|
||||||
Putting mathematics in a web page
|
Putting mathematics in a web page
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
To put mathematics in your web page, you can use either TeX and LaTeX
|
To put mathematics in your web page, you can use either :term:`TeX`
|
||||||
notation, or MathML notation (or both); the configuration file tells
|
and :term:`LaTeX` notation or :term:`MathML` notation or both within
|
||||||
MathJax which you want to use, and how you plan to indicate the
|
the same page; the MathJax configuration tells MathJax which you want
|
||||||
mathematics when you are using TeX notation. The following sections
|
to use, and how you plan to indicate the mathematics when you are
|
||||||
tell you how to use each of these formats.
|
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:
|
.. _tex-and-latex-input:
|
||||||
|
@ -144,21 +198,18 @@ tell you how to use each of these formats.
|
||||||
TeX and LaTeX input
|
TeX and LaTeX input
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
To process mathematics that is written in :term:`TeX` or :term:`LaTeX`
|
Mathematics that is written in :term:`TeX` or :term:`LaTeX` format is
|
||||||
format, include ``"input/TeX"`` in your configuration's `jax` array,
|
indicated using *math delimiters* that surround the mathematics,
|
||||||
and add ``"tex2jax.js"`` to the `extensions` array so that MathJax
|
telling MathJax what part of your page represents mathematics and what
|
||||||
will look for TeX-style math delimiters to identify the mathematics on
|
is normal text. There are two types of equations: ones that occur
|
||||||
the page.
|
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
|
The default math delimiters are ``$$...$$`` and ``\[...\]`` for
|
||||||
|
displayed mathematics, and ``\(...\)`` for in-line mathematics. Note
|
||||||
extensions: ["tex2math.js"],
|
in particular that the ``$...$`` in-line delimiters are **not** used
|
||||||
jax: ["input/TeX", "output/HTML-CSS"]
|
by default. That is because dollar signs appear too often in
|
||||||
|
|
||||||
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
|
|
||||||
non-mathematical settings, which could cause some text to be treated
|
non-mathematical settings, which could cause some text to be treated
|
||||||
as mathematics unexpectedly. For example, with single-dollar
|
as mathematics unexpectedly. For example, with single-dollar
|
||||||
delimiters, "... the cost is $2.50 for the first one, and $2.00 for
|
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
|
signs. For this reason, if you want to use single-dollars for in-line
|
||||||
math mode, you must enable that explicitly in your configuration:
|
math mode, you must enable that explicitly in your configuration:
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: html
|
||||||
|
|
||||||
|
<script type="text/x-mathjax-config">
|
||||||
|
MathJax.Hub.Config({
|
||||||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
|
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
|
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
|
Here is a complete sample page containing TeX mathematics (also available
|
||||||
assumes that ``config/MathJax.js`` is configured as described above):
|
in the ``test/sample-tex.html`` file):
|
||||||
|
|
||||||
.. code-block:: html
|
.. code-block:: html
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>MathJax TeX Test Page</title>
|
<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>
|
</head>
|
||||||
<body>
|
<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}.$$
|
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
There are a number of extensions for the TeX input processor that you
|
Since the TeX notation is part of the text of the page, there are some
|
||||||
might want to add to the `extensions` array. These include:
|
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
|
- `TeX/AMSmath.js`, which defines the AMS math environments and
|
||||||
macros,
|
macros,
|
||||||
|
|
||||||
- `TeX/AMSsymbols.js`, which defines the macros for the symbols in
|
- `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
|
- `TeX/noErrors.js`, which shows the original TeX code rather than
|
||||||
an error message when there is a problem processing the TeX, and
|
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
|
- `TeX/noUndefined.js`, which prevents undefined macros from
|
||||||
producing an error message, and instead shows the macro name in red.
|
producing an error message, and instead shows the macro name in red.
|
||||||
|
|
||||||
For example,
|
Other extensions may be loaded automatically when needed.
|
||||||
|
|
||||||
.. 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.
|
|
||||||
|
|
||||||
|
|
||||||
MathML input
|
MathML input
|
||||||
------------
|
------------
|
||||||
|
|
||||||
To process mathematics written in :term:`MathML`, include
|
For mathematics written in :term:`MathML` notation, you mark your
|
||||||
``"input/MathML"`` in your configuration's `jax` array, and add
|
mathematics using standard ``<math>`` tags, where ``<math
|
||||||
``"mml2jax.js"`` to the `extensions` array so that MathJax will
|
display="block">`` represents displayed mathematics and ``<math
|
||||||
locate the ``<math>`` elements in the page automatically.
|
display="inline">`` or just ``<math>`` represents in-line mathematics.
|
||||||
|
|
||||||
.. 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.
|
|
||||||
|
|
||||||
Note that this will work in HTML files, not just XHTML files (MathJax
|
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
|
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
|
``<math>`` tags; for example, you should not use ``<m:math>`` except
|
||||||
in a file where you have tied the ``m`` namespace to the MathML DTD.
|
in a file where you have tied the ``m`` namespace to the MathML DTD.
|
||||||
|
|
||||||
Here is a complete sample page containing MathML mathematics (which
|
Here is a complete sample page containing MathML mathematics (also
|
||||||
assumes that ``config/MathJax.js`` is configured as described above):
|
available in the ``test/sample-mml.html`` file):
|
||||||
|
|
||||||
.. code-block:: html
|
.. code-block:: html
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>MathJax MathML Test Page</title>
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -283,9 +341,27 @@ assumes that ``config/MathJax.js`` is configured as described above):
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
The ``mml2jax`` has only a few configuration options; see the
|
When entering MathML notation in an HTML page (rather than an XHTML
|
||||||
``config/MathJax.js`` file or the :ref:`mml2jax configuration options
|
page), you should **not** use self-closing tags, but should use explicit
|
||||||
<configure-mml2jax>` page for more details.
|
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?
|
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!
|
point, you can start making pages that contain mathematical content!
|
||||||
|
|
||||||
You could also read more about the details of how to :ref:`customize
|
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
|
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
|
other content-management system, you might want to read about :ref:`using
|
||||||
|
|
|
@ -63,11 +63,10 @@ pushed into the queue:
|
||||||
2. Perform the configuration actions:
|
2. Perform the configuration actions:
|
||||||
|
|
||||||
- Post the ``Begin Config`` startup signal
|
- Post the ``Begin Config`` startup signal
|
||||||
- Execute the content of the ``<script>`` that loaded MathJax,
|
- Load any configuration files specified via ``config=`` as a script parameter
|
||||||
or load the ``config/MathJax.js`` file if the ``<script>``
|
- Execute the content of the ``<script>`` that loaded MathJax, if it is not empty
|
||||||
is empty
|
- Wait for the ``delayStartupUntil`` condition to be met, if one was specified
|
||||||
- If the ``MathJax.Hub.config.delayStartupUntil`` value is set,
|
- Execute any ``text/x-mathjax-config`` script blocks
|
||||||
wait until its condition is met
|
|
||||||
- load the files listed in the ``MathJax.Hub.config.config`` array
|
- load the files listed in the ``MathJax.Hub.config.config`` array
|
||||||
- Post the ``End Config`` startup signal
|
- 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 Typeset`` startup signal
|
||||||
- Post the ``Begin PreProcess`` hub 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.
|
|
@ -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>`
|
not to MathJax as a whole. See the :ref:`Queue Object <api-queue>`
|
||||||
reference page for more details.
|
reference page for more details.
|
||||||
|
|
||||||
**Signals** are another means of synchronizing your own code with
|
**Signals** are another means of synchronizing your own code with MathJax.
|
||||||
MathJax. Many of the important actions that MathJax takes (like
|
Many of the important actions that MathJax takes (like typesetting new math
|
||||||
typesetting new math on the page, or loading an external component)
|
on the page, or loading an external component) are "announced" by posting a
|
||||||
are "announced" by posting a message to a special object called a
|
message to a special object called a `Signal`. Your code can register an
|
||||||
`Signal`. Your code can register an interest in receiving one or more
|
interest in receiving one or more of these signals by providing a callback
|
||||||
of these signals by providing a callback to be called when the signal
|
to be called when the signal is posted. When the signal arrives, MathJax
|
||||||
is posted. When the signal arrives, MathJax will call your code.
|
will call your code. This works somewhat like an event handler, except
|
||||||
This works somewhat like an event handler, except that many different
|
that many different types of events can go through the same signal, and the
|
||||||
types of events can go through the same signal, and the signals have a
|
signals have a "memory", meaning that if you register an interest in a
|
||||||
"memory", meaning that if you register an interest in a particular
|
particular type of signal and that signal has already occurred, you will be
|
||||||
type of signal and that signal has already occurred, you will be told
|
told about the past occurrances as well as any future ones. See the
|
||||||
about the past occurrances as well as any future ones. See the
|
:ref:`Signal Object <api-signal>` reference page for more details. See
|
||||||
:ref:`Signal Object <api-signal>` reference page for more details.
|
also the ``test/sample-signals.html`` file in the MathJax ``test``
|
||||||
See also the ``test/sample-signals.html`` file in the MathJax ``test``
|
|
||||||
directory for a working example of using signals.
|
directory for a working example of using signals.
|
||||||
|
|
||||||
Each of these is explained in more detail in the links below:
|
Each of these is explained in more detail in the links below:
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
MathJax TeX and LaTeX Support
|
MathJax TeX and LaTeX Support
|
||||||
*****************************
|
*****************************
|
||||||
|
|
||||||
The support for TeX and LaTeX in MathJax consists of two parts: the
|
The support for :term:`TeX` and :term:`LaTeX` in MathJax consists of two
|
||||||
`tex2jax` preprocessor, and the TeX input processor. The first of
|
parts: the `tex2jax` preprocessor, and the `TeX` input processor. The
|
||||||
these looks for mathematics within your web page (indicated by math
|
first of these looks for mathematics within your web page (indicated by
|
||||||
delimiters like ``$$...$$``) and marks the mathematics for later
|
math delimiters like ``$$...$$``) and marks the mathematics for later
|
||||||
processing by MathJax. The TeX input processor is what converts the
|
processing by MathJax. The TeX input processor is what converts the TeX
|
||||||
TeX notation into MathJax's internal format, where one of MathJax's
|
notation into MathJax's internal format, where one of MathJax's output
|
||||||
output processors then displays it in the web page.
|
processors then displays it in the web page.
|
||||||
|
|
||||||
The `tex2jax` preprocessor can be configured to look for whatever
|
The `tex2jax` preprocessor can be configured to look for whatever
|
||||||
markers you want to use for your math delimiters. See the
|
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>`_.
|
<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
|
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
|
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
|
implemented in the core TeX input processor. Some less-used commands
|
||||||
are defined in extensions to the TeX processor. MathJax will load
|
are defined in extensions to the TeX processor. MathJax will load
|
||||||
some extensions automatically when you first use the commands they
|
some extensions automatically when you first use the commands they
|
||||||
implement (for example, the ``\def`` and ``\newcommand`` macros are
|
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
|
this extension itself when you use those macros). Not all extensions
|
||||||
are set up to load automatically, however, so you may need to request
|
are set up to load automatically, however, so you may need to request
|
||||||
some extensions explicitly yourself.
|
some extensions explicitly yourself.
|
||||||
|
|
||||||
To enable any of the TeX extensions, simply add the appropriate string
|
To enable any of the TeX extensions, simply add the appropriate string
|
||||||
(e.g., `"TeX/AMSmath.js"`) to your config's `extensions` array. The
|
(e.g., ``"AMSmath.js"``) to the `extensions` array in the ``TeX`` block
|
||||||
main extensions are described below.
|
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
|
AMSmath and AMSsymbol
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
The `AMSmath` extension implements AMS math environments and macros,
|
The `AMSmath` extension implements AMS math environments and macros, and
|
||||||
and the `AMSsymbol` extension implements macros for accessing the AMS
|
the `AMSsymbol` extension implements macros for accessing the AMS symbol
|
||||||
symbol fonts. To use these extensions, add them to your `extensions` array.
|
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
|
.. 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
|
See the list of control sequences at the end of this document for details
|
||||||
what commands are implemented in these extensions.
|
about what commands are implemented in these extensions.
|
||||||
|
|
||||||
The `AMSmath` extension will be loaded automatically when you first
|
If you are not using one of the combined configuration files, the `AMSmath`
|
||||||
use one of the math environments it defines, but you will have to load
|
extension will be loaded automatically when you first use one of the math
|
||||||
it explicitly if you want to use the other macros that it defines.
|
environments it defines, but you will have to load it explicitly if you
|
||||||
The `AMSsymbols` extension is not loaded automatically, so you must
|
want to use the other macros that it defines. The `AMSsymbols` extension
|
||||||
include it explicitly if you want to use the macros it defines.
|
is not loaded automatically, so you must include it explicitly if you want
|
||||||
|
to use the macros it defines.
|
||||||
|
|
||||||
|
|
||||||
Autobold
|
Autobold
|
||||||
|
@ -141,7 +201,11 @@ appears in a section of an HTML page that is in bold.
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
|
||||||
extensions: ["TeX/autobold.js"]
|
TeX: {
|
||||||
|
extensions: ["autobold.js"]
|
||||||
|
}
|
||||||
|
|
||||||
|
This extension is **not** loaded by the combined configuration files.
|
||||||
|
|
||||||
|
|
||||||
noErrors
|
noErrors
|
||||||
|
@ -153,12 +217,15 @@ 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
|
whether to put all the TeX on one line or use multiple lines (if the
|
||||||
original text contained line breaks).
|
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
|
.. code-block:: javascript
|
||||||
|
|
||||||
extensions: ["TeX/noErrors.js", ...],
|
|
||||||
TeX: {
|
TeX: {
|
||||||
|
extensions: ["noErrors.js"],
|
||||||
noErrors: {
|
noErrors: {
|
||||||
inlineDelimiters: ["",""], // or ["$","$"] or ["\\(","\\)"]
|
inlineDelimiters: ["",""], // or ["$","$"] or ["\\(","\\)"]
|
||||||
multiLine: true, // false for TeX on all one line
|
multiLine: true, // false for TeX on all one line
|
||||||
|
@ -201,16 +268,19 @@ noUndefined
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
The `noUndefined` extension causes undefined control sequences to be
|
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
|
``$X_{\xxx}$`` would display as an "X" with a subscript consiting of the
|
||||||
text ``\xxx`` in red.
|
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
|
.. code-block:: javascript
|
||||||
|
|
||||||
extensions: ["TeX/noUndefined.js", ...],
|
|
||||||
TeX: {
|
TeX: {
|
||||||
|
extensions: ["noUndefined.js"],
|
||||||
noUndefined: {
|
noUndefined: {
|
||||||
attributes: {
|
attributes: {
|
||||||
mathcolor: "red",
|
mathcolor: "red",
|
||||||
|
@ -222,7 +292,7 @@ To enable and configure this extension, use for example
|
||||||
|
|
||||||
The ``attributes`` setting specifies attributes to apply to the
|
The ``attributes`` setting specifies attributes to apply to the
|
||||||
``mtext`` element that encodes the name of the undefined macro. 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,
|
other attributes. This example sets the background to a light pink,
|
||||||
and reduces the font size slightly.
|
and reduces the font size slightly.
|
||||||
|
|
||||||
|
@ -949,6 +1019,7 @@ the macro name.
|
||||||
\subset
|
\subset
|
||||||
\subseteq
|
\subseteq
|
||||||
\subseteqq AMSsymbols
|
\subseteqq AMSsymbols
|
||||||
|
\subsetneq AMSsymbols
|
||||||
\substack AMSmath
|
\substack AMSmath
|
||||||
\succ
|
\succ
|
||||||
\succapprox AMSsymbols
|
\succapprox AMSsymbols
|
||||||
|
@ -964,6 +1035,7 @@ the macro name.
|
||||||
\supset
|
\supset
|
||||||
\supseteq
|
\supseteq
|
||||||
\supseteqq AMSsymbols
|
\supseteqq AMSsymbols
|
||||||
|
\supsetneq AMSsymbols
|
||||||
\surd
|
\surd
|
||||||
\swarrow
|
\swarrow
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,8 @@ then you can use
|
||||||
to change the student's answer to be the typeset version of whatever
|
to change the student's answer to be the typeset version of whatever
|
||||||
is in the ``studentAnswer`` variable.
|
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
|
.. code-block:: html
|
||||||
|
|
||||||
|
@ -180,13 +181,16 @@ Here is a complete example that illustrates this approach
|
||||||
<head>
|
<head>
|
||||||
<title>MathJax Dynamic Math Test Page</title>
|
<title>MathJax Dynamic Math Test Page</title>
|
||||||
|
|
||||||
<script src="/MathJax/MathJax.js">
|
<script type="text/x-mathjax-config">
|
||||||
MathJax.Hub.Config({
|
MathJax.Hub.Config({
|
||||||
extensions: ["tex2jax.js"],
|
tex2jax: {
|
||||||
jax: ["input/TeX","output/HTML-CSS"],
|
inlineMath: [["$","$"],["\\(","\\)"]]
|
||||||
tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<script type="text/javascript"
|
||||||
|
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full">
|
||||||
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
234
docs/html/_sources/upgrade.txt
Normal file
234
docs/html/_sources/upgrade.txt
Normal 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.
|
172
docs/html/_sources/whats-new.txt
Normal file
172
docs/html/_sources/whats-new.txt
Normal 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 ``<`` and ``&`` 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 |
|
@ -10,12 +10,8 @@ if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) {
|
||||||
(document.getElementsByTagNameNS == null ? false :
|
(document.getElementsByTagNameNS == null ? false :
|
||||||
(document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) {
|
(document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) {
|
||||||
var script = document.createElement("script");
|
var script = document.createElement("script");
|
||||||
script.src = "http://www.yoursite.edu/MathJax/MathJax.js"; // put your URL here
|
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full";
|
||||||
var config = 'MathJax.Hub.Config({' +
|
var config = 'MathJax.Hub.Startup.onload()';
|
||||||
'extensions:["mml2jax.js"],' +
|
|
||||||
'jax:["input/MathML","output/HTML-CSS"]' +
|
|
||||||
'});' +
|
|
||||||
'MathJax.Hub.Startup.onload()';
|
|
||||||
if (window.opera) {script.innerHTML = config} else {script.text = config}
|
if (window.opera) {script.innerHTML = config} else {script.text = config}
|
||||||
document.getElementsByTagName("head")[0].appendChild(script);
|
document.getElementsByTagName("head")[0].appendChild(script);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,27 +9,23 @@ if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) {
|
||||||
//
|
//
|
||||||
// Replace the images with MathJax scripts of type math/tex
|
// 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--) {
|
for (var i = images.length - 1; i >= 0; i--) {
|
||||||
var img = images[i];
|
var img = images[i];
|
||||||
if (img.className === "tex") {
|
if (img.className === "tex") {
|
||||||
var script = document.createElement("script"); script.type = "math/tex";
|
var script = document.createElement("script"); script.type = "math/tex";
|
||||||
if (window.opera) {script.innerHTML = img.alt} else {script.text = img.alt}
|
if (window.opera) {script.innerHTML = img.alt} else {script.text = img.alt}
|
||||||
img.parentNode.replaceChild(script,img);
|
img.parentNode.replaceChild(script,img); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (count) {
|
||||||
//
|
//
|
||||||
// Load MathJax and have it process the page
|
// Load MathJax and have it process the page
|
||||||
//
|
//
|
||||||
var script = document.createElement("script");
|
var script = document.createElement("script");
|
||||||
script.src = "http://www.yoursite.edu/MathJax/MathJax.js"; // put your URL here
|
script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full";
|
||||||
var config = 'MathJax.Hub.Config({' +
|
var config = 'MathJax.Hub.Startup.onload()';
|
||||||
'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}
|
if (window.opera) {script.innerHTML = config} else {script.text = config}
|
||||||
document.getElementsByTagName("head")[0].appendChild(script);
|
document.getElementsByTagName("head")[0].appendChild(script);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,8 +139,8 @@ div.body h6 {
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: #20435c;
|
color: #20435c;
|
||||||
border-top: 1px solid #cccccc;
|
border-top: 2px solid #cccccc;
|
||||||
border-bottom: 2px solid #cccccc;
|
border-bottom: 1px solid #cccccc;
|
||||||
margin: 30px -20px 20px -20px;
|
margin: 30px -20px 20px -20px;
|
||||||
padding: 3px 0 3px 10px;
|
padding: 3px 0 3px 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="The MathJax API" href="index.html" />
|
<link rel="up" title="The MathJax API" href="index.html" />
|
||||||
<link rel="next" title="The MathJax.Message Object" href="message.html" />
|
<link rel="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>
|
<tt class="descname">timeout</tt></dt>
|
||||||
<dd><p>Number of milliseconds to wait for a file to load before
|
<dd><p>Number of milliseconds to wait for a file to load before
|
||||||
it is considered to have failed to load.</p>
|
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>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
|
@ -114,6 +114,14 @@ callbacks that are to be run when they load or timeout, and
|
||||||
additional internal data.</p>
|
additional internal data.</p>
|
||||||
</dd></dl>
|
</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>
|
||||||
<div class="section" id="methods">
|
<div class="section" id="methods">
|
||||||
<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2>
|
<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>
|
file has been completely loaded and initialized. The <cite>file</cite>
|
||||||
parameter is the name of the file that has been loaded. This
|
parameter is the name of the file that has been loaded. This
|
||||||
routine will cause any callback functions registered for the file
|
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
|
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>
|
their last parameter.</p>
|
||||||
<table class="docutils field-list" frame="void" rules="none">
|
<table class="docutils field-list" frame="void" rules="none">
|
||||||
<col class="field-name" />
|
<col class="field-name" />
|
||||||
|
@ -272,6 +280,30 @@ that may be loaded in the future.</p>
|
||||||
</table>
|
</table>
|
||||||
</dd></dl>
|
</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> — 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">
|
<dl class="method">
|
||||||
<dt id="Styles">
|
<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>
|
<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>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="message.html"
|
<p class="topless"><a href="message.html"
|
||||||
title="next chapter">The MathJax.Message Object</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="The MathJax API" href="index.html" />
|
<link rel="up" title="The MathJax API" href="index.html" />
|
||||||
<link rel="next" title="The MathJax.Callback.Queue Class" href="queue.html" />
|
<link rel="next" title="The MathJax.Callback.Queue Class" href="queue.html" />
|
||||||
|
@ -391,11 +391,6 @@ and returns the signal object. See
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="queue.html"
|
<p class="topless"><a href="queue.html"
|
||||||
title="next chapter">The MathJax.Callback.Queue Class</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="The MathJax API" href="index.html" />
|
<link rel="up" title="The MathJax API" href="index.html" />
|
||||||
<link rel="next" title="The Base Jax Class" href="jax.html" />
|
<link rel="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>
|
<h2>Class Properties<a class="headerlink" href="#class-properties" title="Permalink to this headline">¶</a></h2>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">name</tt></dt>
|
<tt class="descname">id</tt></dt>
|
||||||
<dd><p>The name of the jax.</p>
|
<dd><p>The name of the jax.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
|
@ -91,13 +91,15 @@ that class.</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">inputJax</tt></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>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">outputJax</tt></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>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
|
@ -116,7 +118,8 @@ collection, thus causing a memory leak.</p>
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">originalText</tt></dt>
|
<tt class="descname">originalText</tt></dt>
|
||||||
<dd><p>A string indicating the original input text that was processed for
|
<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>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
|
@ -239,11 +242,6 @@ contextual menu.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="jax.html"
|
<p class="topless"><a href="jax.html"
|
||||||
title="next chapter">The Base Jax Class</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="The MathJax API" href="index.html" />
|
<link rel="up" title="The MathJax API" href="index.html" />
|
||||||
<link rel="next" title="The MathJax.Callback Class" href="callback.html" />
|
<link rel="next" title="The MathJax.Callback Class" href="callback.html" />
|
||||||
|
@ -176,6 +176,29 @@ provided. It is equivalent to</p>
|
||||||
</table>
|
</table>
|
||||||
</dd></dl>
|
</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> — the script whose content is to be set</li>
|
||||||
|
<li><strong>text</strong> — the text that is to be the script’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">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">Cookie.Set(name,data)</tt></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">"test"</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">"It Works!"</span><span class="p">});</span>
|
<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">"test"</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">"It Works!"</span><span class="p">});</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>will create a cookie named “mjx:test” that stores the values of
|
<p>will create a cookie named “mjx.test” 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
|
<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
|
retrieved using the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.HTML.Cookie.Get()</span></tt> method
|
||||||
discussed below.</p>
|
discussed below.</p>
|
||||||
|
@ -248,11 +271,6 @@ above,</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="callback.html"
|
<p class="topless"><a href="callback.html"
|
||||||
title="next chapter">The MathJax.Callback Class</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="The MathJax API" href="index.html" />
|
<link rel="up" title="The MathJax API" href="index.html" />
|
||||||
<link rel="next" title="The MathJax.Ajax Object" href="ajax.html" />
|
<link rel="next" title="The MathJax.Ajax Object" href="ajax.html" />
|
||||||
|
@ -77,7 +77,7 @@ Options</em></a> reference page.</p>
|
||||||
|
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<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
|
<dd><p>The minimum time (in milliseconds) between updates of the
|
||||||
“Processing Math” message.</p>
|
“Processing Math” message.</p>
|
||||||
</dd></dl>
|
</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>
|
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Register.MessageHook()</span></tt> method).</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
|
<dl class="describe">
|
||||||
|
<dt>
|
||||||
|
<tt class="descname">queue</tt></dt>
|
||||||
|
<dd><p>MathJax’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">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">Browser</tt></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>
|
<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>)
|
<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
|
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>
|
is used and the options that you can set.</p>
|
||||||
<table class="docutils field-list" frame="void" rules="none">
|
<table class="docutils field-list" frame="void" rules="none">
|
||||||
<col class="field-name" />
|
<col class="field-name" />
|
||||||
|
@ -180,6 +187,22 @@ is used and the options that you can set.</p>
|
||||||
</table>
|
</table>
|
||||||
</dd></dl>
|
</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’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">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">Register.PreProcessor(callback)</tt></dt>
|
<tt class="descname">Register.PreProcessor(callback)</tt></dt>
|
||||||
|
@ -630,11 +653,6 @@ error on the page.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="ajax.html"
|
<p class="topless"><a href="ajax.html"
|
||||||
title="next chapter">The MathJax.Ajax Object</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="next" title="The MathJax variable" href="variable.html" />
|
<link rel="next" title="The MathJax variable" href="variable.html" />
|
||||||
<link rel="prev" title="Modifying Math on the Page" href="../typeset.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>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="variable.html"
|
<p class="topless"><a href="variable.html"
|
||||||
title="next chapter">The MathJax variable</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="The MathJax API" href="index.html" />
|
<link rel="up" title="The MathJax API" href="index.html" />
|
||||||
<link rel="next" title="The MathJax.OutputJax Class" href="outputjax.html" />
|
<link rel="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>
|
<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">name</tt></dt>
|
<tt class="descname">id</tt></dt>
|
||||||
<dd><p>The name of the jax.</p>
|
<dd><p>The name of the jax.</p>
|
||||||
</dd></dl>
|
</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">"[MathJax]/jax/input/TeX"</span></tt>);</p>
|
<dd><p>The directory where the jax files are stored (e.g., <tt class="docutils literal"><span class="pre">"[MathJax]/jax/input/TeX"</span></tt>);</p>
|
||||||
</dd></dl>
|
</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>
|
||||||
<div class="section" id="methods">
|
<div class="section" id="methods">
|
||||||
<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2>
|
<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2>
|
||||||
<dl class="method">
|
<dl class="method">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">Translate</tt><big>(</big><em>script</em><big>)</big></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"><script></span></tt> of
|
<dd><p>This is the main routine called by MathJax when a <tt class="docutils literal"><span class="pre"><script></span></tt> of the
|
||||||
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>
|
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
|
||||||
method simply loads the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file and returns that callback
|
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’t been
|
||||||
for that load function so that MathJax will know when to try
|
redefined, so when the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file loads, it should override the
|
||||||
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
|
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
|
||||||
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
|
translation.</p>
|
||||||
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>
|
|
||||||
<p>The translation process should include the creation of an
|
<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
|
<a class="reference internal" href="elementjax.html#api-element-jax"><em>Element Jax</em></a> that stores the data needed
|
||||||
for this element.</p>
|
for this element.</p>
|
||||||
|
@ -177,11 +181,6 @@ of the various types from one another.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="outputjax.html"
|
<p class="topless"><a href="outputjax.html"
|
||||||
title="next chapter">The MathJax.OutputJax Class</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="The MathJax API" href="index.html" />
|
<link rel="up" title="The MathJax API" href="index.html" />
|
||||||
<link rel="next" title="The MathJax Object-Oriented Programming Model" href="object.html" />
|
<link rel="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
|
<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>
|
<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>
|
<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">"MyInputJax"</span><span class="p">,</span>
|
<span class="nx">id</span><span class="o">:</span> <span class="s2">"MyInputJax"</span><span class="p">,</span>
|
||||||
<span class="nx">version</span><span class="o">:</span> <span class="s2">"1.0"</span><span class="p">,</span>
|
<span class="nx">version</span><span class="o">:</span> <span class="s2">"1.0"</span><span class="p">,</span>
|
||||||
<span class="p">...</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>
|
<h2>Instance Properties<a class="headerlink" href="#instance-properties" title="Permalink to this headline">¶</a></h2>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">name</tt></dt>
|
<tt class="descname">id</tt></dt>
|
||||||
<dd><p>The name of the jax.</p>
|
<dd><p>The name of the jax.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
|
@ -123,16 +123,16 @@ configuration subsection for the specific jax in question.</p>
|
||||||
<div class="section" id="methods">
|
<div class="section" id="methods">
|
||||||
<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2>
|
<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2>
|
||||||
<dl class="method">
|
<dl class="method">
|
||||||
<dt id="Translate">
|
<dt>
|
||||||
<tt class="descname">Translate</tt><big>(</big><em>script</em><big>)</big><a class="headerlink" href="#Translate" title="Permalink to this definition">¶</a></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
|
<dd><p>This is the method that the <tt class="docutils literal"><span class="pre">MathJax.Hub</span></tt> calls when it needs the
|
||||||
the input or output jax to process the given math <tt class="docutils literal"><span class="pre"><script></span></tt>
|
input or output jax to process the given math <tt class="docutils literal"><span class="pre"><script></span></tt>. Its
|
||||||
call. Its default action is to start loading the jax’s <tt class="docutils literal"><span class="pre">jax.js</span></tt>
|
default action is to start loading the jax’s <tt class="docutils literal"><span class="pre">jax.js</span></tt> file, and
|
||||||
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
|
redefine itself to simplu return the callback for the laod operation
|
||||||
<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
|
(so that further calls to it will cause the processing to wait for the
|
||||||
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
|
callback). Once the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file has loaded, this method is
|
||||||
operation for the specific jax. For an input jax, it should
|
replaced by the jax’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
|
||||||
return the <cite>ElementJax</cite> object that it created.</p>
|
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">
|
<table class="docutils field-list" frame="void" rules="none">
|
||||||
<col class="field-name" />
|
<col class="field-name" />
|
||||||
<col class="field-body" />
|
<col class="field-body" />
|
||||||
|
@ -155,14 +155,19 @@ return the <cite>ElementJax</cite> object that it created.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="method">
|
<dl class="method">
|
||||||
<dt id="noTranslate">
|
<dt id="Translate">
|
||||||
<tt class="descname">noTranslate</tt><big>(</big><em>script</em><big>)</big><a class="headerlink" href="#noTranslate" title="Permalink to this definition">¶</a></dt>
|
<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 temporary routine that is used while the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file
|
<dd><p>This is a stub for a routine that should be defined by the jax’s
|
||||||
is loading. It throws an error indicating the the
|
<tt class="docutils literal"><span class="pre">jax.js</span></tt> file when it is loaded. It should perform the translation
|
||||||
<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’t been redefined. That way, if
|
action for the specific jax. For an input jax, it should return the
|
||||||
the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file failes to load for some reason, you will
|
<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
|
||||||
receive an error trying to process mathematics with this input
|
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>
|
||||||
jax.</p>
|
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">
|
<table class="docutils field-list" frame="void" rules="none">
|
||||||
<col class="field-name" />
|
<col class="field-name" />
|
||||||
<col class="field-body" />
|
<col class="field-body" />
|
||||||
|
@ -177,7 +182,7 @@ jax.</p>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -239,8 +244,8 @@ following:</p>
|
||||||
<li>Post the “[name] Jax Config” message to the startup signal.</li>
|
<li>Post the “[name] Jax Config” message to the startup signal.</li>
|
||||||
<li>Perform the jax’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>Perform the jax’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 “[name] Jax Require” message to the startup signal.</li>
|
<li>Post the “[name] Jax Require” message to the startup signal.</li>
|
||||||
<li>Load the files from the jax’s <tt class="docutils literal"><span class="pre">require</span></tt> array (which may
|
<li>Load the files from the jax’s <tt class="docutils literal"><span class="pre">require</span></tt> and
|
||||||
have been modified during the configuration process).</li>
|
<tt class="docutils literal"><span class="pre">config.extensions</span></tt> arrays.</li>
|
||||||
<li>Post the “[name] Jax Startup” message to the startup signal.</li>
|
<li>Post the “[name] Jax Startup” message to the startup signal.</li>
|
||||||
<li>Perform the jax’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>Perform the jax’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 “[name] Jax Ready” message to the startup signal.</li>
|
<li>Post the “[name] Jax Ready” 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>
|
<tt class="docutils literal"><span class="pre">jax.js</span></tt> file.</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div></blockquote>
|
</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’t called until those files are completely loaded.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -275,11 +284,6 @@ have been modified during the configuration process).</li>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="object.html"
|
<p class="topless"><a href="object.html"
|
||||||
title="next chapter">The MathJax Object-Oriented Programming Model</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="The MathJax API" href="index.html" />
|
<link rel="up" title="The MathJax API" href="index.html" />
|
||||||
<link rel="next" title="The MathJax.HTML Object" href="html.html" />
|
<link rel="next" title="The MathJax.HTML Object" href="html.html" />
|
||||||
|
@ -113,7 +113,7 @@ removed automatically; you must call the
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -142,6 +142,69 @@ removed automatically; you must call the
|
||||||
</table>
|
</table>
|
||||||
</dd></dl>
|
</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 “Loading <em>file</em>” 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> — 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> — the text of the message to be posted</li>
|
||||||
|
<li><strong>n</strong> — 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">
|
<dl class="method">
|
||||||
<dt id="Log">
|
<dt id="Log">
|
||||||
<tt class="descname">Log</tt><big>(</big><big>)</big><a class="headerlink" href="#Log" title="Permalink to this definition">¶</a></dt>
|
<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>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="html.html"
|
<p class="topless"><a href="html.html"
|
||||||
title="next chapter">The MathJax.HTML Object</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,10 +21,10 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="The MathJax API" 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" />
|
<link rel="prev" title="The Base Jax Class" href="jax.html" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
<a href="../genindex.html" title="General Index"
|
<a href="../genindex.html" title="General Index"
|
||||||
accesskey="I">index</a></li>
|
accesskey="I">index</a></li>
|
||||||
<li class="right" >
|
<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>
|
accesskey="N">next</a> |</li>
|
||||||
<li class="right" >
|
<li class="right" >
|
||||||
<a href="jax.html" title="The Base Jax Class"
|
<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"
|
<p class="topless"><a href="jax.html"
|
||||||
title="previous chapter">The Base Jax Class</a></p>
|
title="previous chapter">The Base Jax Class</a></p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="../jsMath.html"
|
<p class="topless"><a href="../HTML-snippets.html"
|
||||||
title="next chapter">Converting to MathJax from jsMath</a></p>
|
title="next chapter">Describing HTML snippets</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>
|
|
||||||
<div id="searchbox" style="display: none">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<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"
|
<a href="../genindex.html" title="General Index"
|
||||||
>index</a></li>
|
>index</a></li>
|
||||||
<li class="right" >
|
<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>
|
>next</a> |</li>
|
||||||
<li class="right" >
|
<li class="right" >
|
||||||
<a href="jax.html" title="The Base Jax Class"
|
<a href="jax.html" title="The Base Jax Class"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="The MathJax API" href="index.html" />
|
<link rel="up" title="The MathJax API" href="index.html" />
|
||||||
<link rel="next" title="The MathJax.ElementJax Class" href="elementjax.html" />
|
<link rel="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>
|
<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">name</tt></dt>
|
<tt class="descname">id</tt></dt>
|
||||||
<dd><p>The name of the jax.</p>
|
<dd><p>The name of the jax.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
|
@ -104,15 +104,12 @@ that class.</p>
|
||||||
<tt class="descname">Translate</tt><big>(</big><em>script</em><big>)</big></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 an element jax is
|
<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>
|
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
|
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’t been
|
||||||
for that load function so that MathJax will know when to try
|
redefined, so when the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file loads, it should override the
|
||||||
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
|
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
|
||||||
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
|
translation.</p>
|
||||||
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>
|
|
||||||
<p>You should use <tt class="docutils literal"><span class="pre">MathJax.Hub.getJaxFor(script)</span></tt> to obtain the
|
<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
|
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
|
stored with the jax), and may insert DOM elements into the
|
||||||
document near the jax’s <tt class="docutils literal"><span class="pre"><script></span></tt> tag.</p>
|
document near the jax’s <tt class="docutils literal"><span class="pre"><script></span></tt> tag.</p>
|
||||||
|
@ -202,11 +199,6 @@ tag associated with the element jax.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="elementjax.html"
|
<p class="topless"><a href="elementjax.html"
|
||||||
title="next chapter">The MathJax.ElementJax Class</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="The MathJax API" href="index.html" />
|
<link rel="up" title="The MathJax API" href="index.html" />
|
||||||
<link rel="next" title="The MathJax.Callback.Signal Class" href="signal.html" />
|
<link rel="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>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="signal.html"
|
<p class="topless"><a href="signal.html"
|
||||||
title="next chapter">The MathJax.Callback.Signal Class</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="The MathJax API" href="index.html" />
|
<link rel="up" title="The MathJax API" href="index.html" />
|
||||||
<link rel="next" title="The MathJax.InputJax Class" href="inputjax.html" />
|
<link rel="next" title="The MathJax.InputJax Class" href="inputjax.html" />
|
||||||
|
@ -290,11 +290,6 @@ message is posted to the signal.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="inputjax.html"
|
<p class="topless"><a href="inputjax.html"
|
||||||
title="next chapter">The MathJax.InputJax Class</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="The MathJax API" href="index.html" />
|
<link rel="up" title="The MathJax API" href="index.html" />
|
||||||
<link rel="next" title="The MathJax.Hub Object" href="hub.html" />
|
<link rel="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>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="hub.html"
|
<p class="topless"><a href="hub.html"
|
||||||
title="next chapter">The MathJax.Hub Object</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" />
|
<link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" />
|
||||||
<link rel="next" title="Using Queues" href="queues.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>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="queues.html"
|
<p class="topless"><a href="queues.html"
|
||||||
title="next chapter">Using Queues</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="The MathJax Processing Model" href="model.html" />
|
<link rel="next" title="What’s New in MathJax v1.1" href="whats-new.html" />
|
||||||
<link rel="prev" title="MathJax Output Formats" href="output.html" />
|
<link rel="prev" title="MathJax Output Formats" href="output.html" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
<a href="genindex.html" title="General Index"
|
<a href="genindex.html" title="General Index"
|
||||||
accesskey="I">index</a></li>
|
accesskey="I">index</a></li>
|
||||||
<li class="right" >
|
<li class="right" >
|
||||||
<a href="model.html" title="The MathJax Processing Model"
|
<a href="whats-new.html" title="What’s New in MathJax v1.1"
|
||||||
accesskey="N">next</a> |</li>
|
accesskey="N">next</a> |</li>
|
||||||
<li class="right" >
|
<li class="right" >
|
||||||
<a href="output.html" title="MathJax Output Formats"
|
<a href="output.html" title="MathJax Output Formats"
|
||||||
|
@ -76,11 +76,11 @@ our groups.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="issue-tracking">
|
<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>
|
<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>
|
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
|
<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
|
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>
|
that the problem persists in the lastest version.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="powered-by-mathjax">
|
<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"
|
<p class="topless"><a href="output.html"
|
||||||
title="previous chapter">MathJax Output Formats</a></p>
|
title="previous chapter">MathJax Output Formats</a></p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="model.html"
|
<p class="topless"><a href="whats-new.html"
|
||||||
title="next chapter">The MathJax Processing Model</a></p>
|
title="next chapter">What’s New in MathJax v1.1</a></p>
|
||||||
<h3>This Page</h3>
|
|
||||||
<ul class="this-page-menu">
|
|
||||||
<li><a href="_sources/community.txt"
|
|
||||||
rel="nofollow">Show Source</a></li>
|
|
||||||
</ul>
|
|
||||||
<div id="searchbox" style="display: none">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<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"
|
<a href="genindex.html" title="General Index"
|
||||||
>index</a></li>
|
>index</a></li>
|
||||||
<li class="right" >
|
<li class="right" >
|
||||||
<a href="model.html" title="The MathJax Processing Model"
|
<a href="whats-new.html" title="What’s New in MathJax v1.1"
|
||||||
>next</a> |</li>
|
>next</a> |</li>
|
||||||
<li class="right" >
|
<li class="right" >
|
||||||
<a href="output.html" title="MathJax Output Formats"
|
<a href="output.html" title="MathJax Output Formats"
|
||||||
|
|
276
docs/html/config-files.html
Normal file
276
docs/html/config-files.html
Normal 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 — 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> »</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"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js?config=default"</span><span class="nt">></script></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 “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 <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">"MMLorHTML.js"</span><span class="p">],</span>
|
||||||
|
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span><span class="s2">"input/MathML"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">,</span><span class="s2">"output/NativeMML"</span><span class="p">],</span>
|
||||||
|
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">,</span><span class="s2">"mml2jax.js"</span><span class="p">,</span><span class="s2">"MathMenu.js"</span><span class="p">,</span><span class="s2">"MathZoom.js"</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">"AMSmath.js"</span><span class="p">,</span><span class="s2">"AMSsymbols.js"</span><span class="p">,</span><span class="s2">"noErrors.js"</span><span class="p">,</span><span class="s2">"noUndefined.js"</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’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">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">],</span>
|
||||||
|
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">,</span><span class="s2">"MathMenu.js"</span><span class="p">,</span><span class="s2">"MathZoom.js"</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">"AMSmath.js"</span><span class="p">,</span><span class="s2">"AMSsymbols.js"</span><span class="p">,</span><span class="s2">"noErrors.js"</span><span class="p">,</span><span class="s2">"noUndefined.js"</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">"MMLorHTML.js"</span><span class="p">],</span>
|
||||||
|
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/MathML"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">,</span><span class="s2">"output/NativeMML"</span><span class="p">],</span>
|
||||||
|
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"mml2jax.js"</span><span class="p">,</span><span class="s2">"MathMenu.js"</span><span class="p">,</span><span class="s2">"MathZoom.js"</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">"MMLorHTML.js"</span><span class="p">],</span>
|
||||||
|
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span><span class="s2">"input/MathML"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">,</span><span class="s2">"output/NativeMML"</span><span class="p">],</span>
|
||||||
|
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">,</span><span class="s2">"mml2jax.js"</span><span class="p">,</span><span class="s2">"MathMenu.js"</span><span class="p">,</span><span class="s2">"MathZoom.js"</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">"AMSmath.js"</span><span class="p">,</span><span class="s2">"AMSsymbols.js"</span><span class="p">,</span><span class="s2">"noErrors.js"</span><span class="p">,</span><span class="s2">"noUndefined.js"</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">"Double-Click"</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">"[Math Error]"</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> »</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="footer">
|
||||||
|
© Copyright 2011 Design Science.
|
||||||
|
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -21,9 +21,9 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="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" />
|
<link rel="prev" title="Installing and Testing MathJax" href="installation.html" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
<a href="genindex.html" title="General Index"
|
<a href="genindex.html" title="General Index"
|
||||||
accesskey="I">index</a></li>
|
accesskey="I">index</a></li>
|
||||||
<li class="right" >
|
<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>
|
accesskey="N">next</a> |</li>
|
||||||
<li class="right" >
|
<li class="right" >
|
||||||
<a href="installation.html" title="Installing and Testing MathJax"
|
<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>
|
<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
|
<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"><script></span></tt> tag that links to the
|
into the page. That is done via a <tt class="docutils literal"><span class="pre"><script></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"><head></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"><head></span></tt>
|
||||||
section of your document:</p>
|
section of your document:</p>
|
||||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span>
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is replaced by the URL of the MathJax
|
<p>where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is replaced by the URL of the copy of MathJax
|
||||||
directory on your server, or (if you are using MathJax locally rather
|
that you are loading. For example, if you are using the MathJax
|
||||||
than through a server) the location of that directory on your hard
|
distributed network service, the tag might be</p>
|
||||||
disk. For example, if the MathJax directory is at the top level of
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span>
|
||||||
your web server’s directory hierarchy, you might use</p>
|
<span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js"</span><span class="nt">></span>
|
||||||
|
<span class="nt"></script></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’s directory hierarchy, you might use</p>
|
||||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span>
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>to load MathJax.</p>
|
<p>to load MathJax.</p>
|
||||||
<p>Although it is possible to load MathJax from a site other than your
|
<p>If you install MathJax on a server in a domain that is different from the
|
||||||
own web server, there are issues involved in doing so that you need to
|
one containing the page that will load MathJax, then there are issues
|
||||||
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
|
involved in doing so that you need to take into consideration. See the
|
||||||
the copy of MathJax at <tt class="docutils literal"><span class="pre">www.mathjax.org</span></tt>, as we do not have the
|
<a class="reference internal" href="installation.html#cross-domain-linking"><em>Notes About Shared Servers</em></a> for more details.</p>
|
||||||
resources to act as a web service for all the sites on the web that
|
<p>When you load MathJax, it is common to include additional parameters for
|
||||||
would like to display mathematics. If you are able to run MathJax
|
MathJax as part of the URL. These control MathJax’s configuration, and are
|
||||||
from your own server, please do so (this will probably give you better
|
discussed in the <a class="reference internal" href="options/index.html#configuration"><em>Configuration Objects</em></a> section. A
|
||||||
response time in any case).</p>
|
typical invocation of MathJax would be</p>
|
||||||
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span>
|
||||||
|
<span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></span>
|
||||||
|
<span class="nt"></script></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’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’s <tt class="docutils literal"><span class="pre"><head></span></tt> block, but it
|
<p>It is best to load MathJax in the document’s <tt class="docutils literal"><span class="pre"><head></span></tt> block, but it
|
||||||
is also possible to load MathJax into the <tt class="docutils literal"><span class="pre"><body></span></tt> section, if
|
is also possible to load MathJax into the <tt class="docutils literal"><span class="pre"><body></span></tt> section, if
|
||||||
needed. If you do this, load it as early as possible, as
|
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
|
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
|
<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>
|
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="configuring-mathjax">
|
<div class="section" id="loading-mathjax-from-the-cdn">
|
||||||
<h2>Configuring MathJax<a class="headerlink" href="#configuring-mathjax" title="Permalink to this headline">¶</a></h2>
|
<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>There are several ways to configure MathJax, but the easiest is to use
|
<p>MathJax is now available as a web service from <tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt>, so you
|
||||||
the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file that comes with MathJax. See the
|
can obtain MathJax from there without needing to install it on your own
|
||||||
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
|
server. The CDN is part of a distributed “cloud” network, so it is
|
||||||
configuration options. You can edit the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file to
|
handled by servers around the world. That means that you should get acces
|
||||||
change any of the settings that you want to customize. When you
|
to a server geographically near you, for a fast, reliable connection.</p>
|
||||||
include MathJax in your page via</p>
|
<p>The CDN hosts the most current version of MathJax, as well as older
|
||||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span>
|
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>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>it will load <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> automatically as one of its
|
<p>Each directory corresponds to an official MathJax release; however,
|
||||||
first actions.</p>
|
hotfixes (urgent bug fixes) will be applied in each release branch as
|
||||||
<p>Alternatively, you can configure MathJax efficiently by calling
|
necessary, even if new releases are not prepared. In other words,
|
||||||
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> when you include MathJax in your page, as
|
<tt class="docutils literal"><span class="pre">1.1-latest</span></tt> will initially point to v1.1, but over time may be updated
|
||||||
follows:</p>
|
with patches that would correspond to releases that might be numbers 1.1a,
|
||||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></span>
|
1.1b, etc., even if such releases are not actually prepared for
|
||||||
|
distribution (they likely won’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"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/1.1-latest/MathJax.js"</span><span class="nt">></script></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"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js"</span><span class="nt">></script></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 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’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>
|
||||||
|
<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’t include
|
||||||
|
the main code, and a “full” 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 “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.</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’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.</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"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span>
|
||||||
|
<span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<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"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span>
|
||||||
|
<span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML,local/local.js"</span><span class="nt">></span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>to first load the main configuraiton, then the local modifications.</p>
|
||||||
|
</div>
|
||||||
|
<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"><script></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"><script></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"><script></span></tt> with <tt class="docutils literal"><span class="pre">type="text/x-mathjax-config"</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"><script </span><span class="na">type=</span><span class="s">"text/x-mathjax-config"</span><span class="nt">></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">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">"tex2jax.js"</span><span class="p">],</span>
|
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">],</span>
|
||||||
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</span><span class="p">],</span>
|
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</span><span class="p">],</span>
|
||||||
<span class="nx">tex2jax</span><span class="o">:</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">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s2">"\\("</span><span class="p">,</span><span class="s2">"\\)"</span><span class="p">]</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">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s2">"\\("</span><span class="p">,</span><span class="s2">"\\)"</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">'$$'</span><span class="p">,</span><span class="s1">'$$'</span><span class="p">],</span> <span class="p">[</span><span class="s2">"\\["</span><span class="p">,</span><span class="s2">"\\]"</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">'$$'</span><span class="p">,</span><span class="s1">'$$'</span><span class="p">],</span> <span class="p">[</span><span class="s2">"\\["</span><span class="p">,</span><span class="s2">"\\]"</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="s2">"HTML-CSS"</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">"TeX"</span><span class="p">]</span> <span class="p">}</span>
|
<span class="s2">"HTML-CSS"</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">"TeX"</span><span class="p">]</span> <span class="p">}</span>
|
||||||
<span class="p">});</span>
|
<span class="p">});</span>
|
||||||
<span class="nt"></script></span>
|
<span class="nt"></script></span>
|
||||||
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>This example includes the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor and configures it
|
<p>This example includes the <cite>tex2jax</cite> preprocessor and configures it to use
|
||||||
to use both the standard TeX and LaTeX math delimiters. It uses the
|
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
|
||||||
TeX input processor and the HTML-CSS output processor, and forces the
|
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
|
HTML-CSS processor to use the TeX fonts rather that other locally installed
|
||||||
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
|
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>
|
||||||
<a class="reference internal" href="#configuration"><em>configuration options</em></a> section (or the comments
|
file) for more information about the configuration options that you can
|
||||||
in the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file) for more information about the
|
include in the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. Note that this
|
||||||
configuration options that you can include in the
|
configuration does <strong>not</strong> load any pre-defined configuration file.</p>
|
||||||
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. Note that if you configure MathJax
|
<p>Note that you can combine in-line configuration with file-based
|
||||||
using this in-line approach, the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file is <strong>not</strong>
|
configuration, simply include <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> scripts as above,
|
||||||
loaded.</p>
|
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>
|
||||||
<p>Finally, if you would like to use several different configuration
|
file. For example, the <cite>tex2jax</cite> preprocessor does <strong>not</strong> the TeX
|
||||||
files (like <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt>, but with different settings in each
|
single-dollar in-line math delimiters by default. You can load one of the
|
||||||
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>,
|
pre-defined configuration files that include the TeX preprocessor, and use
|
||||||
or some other convenient name, and use</p>
|
an in-line configuration block to enable the single-dollar signs:</p>
|
||||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></span>
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/x-mathjax-config"</span><span class="nt">></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">"MathJax-2.js"</span> <span class="p">});</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">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s2">"\\("</span><span class="p">,</span><span class="s2">"\\)"</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"></script></span>
|
||||||
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js?config=TeX-AMS_HTML"</span><span class="nt">></span>
|
||||||
<span class="nt"></script></span>
|
<span class="nt"></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</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>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="common-configurations">
|
<div class="section" id="configuring-mathjax-after-it-is-loaded">
|
||||||
<span id="id1"></span><h2>Common Configurations<a class="headerlink" href="#common-configurations" title="Permalink to this headline">¶</a></h2>
|
<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>The following examples show configurations that are useful for some
|
<p>Because MathJax begins its configuration process immediately after it is
|
||||||
common situations. This is certainly not an exhaustive list, and
|
loaded (so that it can start loading files as quickly as it can), the
|
||||||
there are variations possible for any of them. Again, the comments in
|
configuration blocks for MathJax must come before <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> is loaded,
|
||||||
the <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file can help you decide what settings to
|
so they will be available to MathJax when it starts up. There are
|
||||||
include, even if you are using the in-line configuration method.</p>
|
situations, however, when you might want to put off configuring MathJax
|
||||||
<div class="section" id="the-tex-setup">
|
until later in the page.</p>
|
||||||
<h3>The TeX setup<a class="headerlink" href="#the-tex-setup" title="Permalink to this headline">¶</a></h3>
|
<p>One such situation is when you have a site that loads MathJax as part of a
|
||||||
<p>This example calls the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor to identify
|
theme or template, but want to be able to modify the configuration on
|
||||||
mathematics in the page by looking for TeX and LaTeX math delimiters.
|
specific pages of the site. To accomplish this, you need to ask MathJax
|
||||||
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
|
to delay its startup configuration until some later time. MathJax uses
|
||||||
<tt class="docutils literal"><span class="pre">$$...$$</span></tt> and <tt class="docutils literal"><span class="pre">\[...\]</span></tt> mark displayed equations. Because dollar
|
the <tt class="docutils literal"><span class="pre">delayStartupUntil</span></tt> parameter to control the timing of the startup
|
||||||
signs are used to mark mathematics, if you want to produce an actual
|
sequence. By default, it is set to <tt class="docutils literal"><span class="pre">none</span></tt>, meaning there is no delay
|
||||||
dollar sign in your document, you must “escape” it using a slash:
|
and MathJax starts configuration right away.</p>
|
||||||
<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
|
<p>You can set <tt class="docutils literal"><span class="pre">delayStartupUntil=onload</span></tt> in order to prevent MathJax from
|
||||||
<tt class="docutils literal"><span class="pre">AMSsymbols</span></tt> extensions so that the macros and environments they
|
continuing its startup process until the page’s onLoad handler fires. This
|
||||||
provide are defined for use on the page.</p>
|
allows MathJax to find the <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> blocks that occur
|
||||||
<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>
|
anywhere on the page, not just the ones that appear above the <tt class="docutils literal"><span class="pre"><script></span></tt>
|
||||||
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">,</span><span class="s2">"TeX/AMSmath.js"</span><span class="p">,</span><span class="s2">"TeX/AMSsymbols.js"</span><span class="p">],</span>
|
that loads <tt class="docutils literal"><span class="pre">MathJax.js</span></tt>. It also means that MathJax will not begin
|
||||||
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">],</span>
|
loading any of the files that it needs until then as well, which may delay
|
||||||
<span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span>
|
the displaying of your mathematics, since the onLoad handler doesn’t
|
||||||
<span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s1">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],[</span><span class="s2">"\\("</span><span class="p">,</span><span class="s2">"\\)"</span><span class="p">]],</span>
|
execute until all the images and other media are available. (If you have
|
||||||
<span class="nx">processEscapes</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
|
used a combined configuration file, however, it already includes all the
|
||||||
<span class="p">},</span>
|
main files that MathJax needs, so there is not much loss in delaying the
|
||||||
<span class="p">});</span>
|
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"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span>
|
||||||
|
<span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML&delayStartupUntil=configured"</span><span class="nt">></span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Other extensions that you may consider adding to the <cite>extensions</cite>
|
<p>in your theme’s header file, and</p>
|
||||||
array include: <tt class="docutils literal"><span class="pre">TeX/noErrors.js</span></tt>, which shows the original TeX code
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span><span class="nt">></span>
|
||||||
if an error occurs while processing the mathematics (rather than an
|
<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>
|
||||||
error message), <tt class="docutils literal"><span class="pre">TeX/noUndefined.js</span></tt>, which shows undefined
|
<span class="nt"></script></span>
|
||||||
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"><math</span> <span class="pre">display="block"></span></tt> to indicate displayed equations, and
|
|
||||||
<tt class="docutils literal"><span class="pre"><math</span> <span class="pre">display="inline"></span></tt> or simply <tt class="docutils literal"><span class="pre"><math></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">"mml2jax.js"</span><span class="p">],</span>
|
|
||||||
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/MathML"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">]</span>
|
|
||||||
<span class="p">});</span>
|
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Note that this will work in HTML files, not just XHTML files (MathJax
|
<p>in its footer, so that MathJax will delay setting up until the footer is
|
||||||
works with both), and that the web page need not be served with any
|
reached, but will not have to wait until images and other files are
|
||||||
special MIME-type. Also note that, unless you are using XHTML rather
|
laoded. If you have <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> script tags within the main
|
||||||
than HTML, you should not include a namespace prefix for your
|
body of the document, MathJax will read and process those before
|
||||||
<tt class="docutils literal"><span class="pre"><math></span></tt> tags; for example, you should not use <tt class="docutils literal"><span class="pre"><m:math></span></tt> except
|
continuing its startup. In this way you can use a default configuration
|
||||||
in a file where you have tied the <tt class="docutils literal"><span class="pre">m</span></tt> namespace to the MathML DTD.</p>
|
that can be modified on a page-by-page basis.</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">"tex2jax.js"</span><span class="p">,</span> <span class="s2">"mml2jax.js"</span><span class="p">],</span>
|
|
||||||
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="s2">"input/MathML"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</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’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">"MMLorHTML.js"</span><span class="p">],</span>
|
|
||||||
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">],</span>
|
|
||||||
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">]</span>
|
|
||||||
<span class="p">});</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’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.</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’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">"MMLorHTML.js"</span><span class="p">],</span>
|
|
||||||
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"mml2jax.js"</span><span class="p">],</span>
|
|
||||||
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/MathML"</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">"input/TeX"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</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">"left"</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">'{\\bf R}'</span><span class="p">,</span>
|
|
||||||
<span class="nx">bold</span><span class="o">:</span> <span class="p">[</span><span class="s1">'{\\bf #1}'</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’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 “R”, 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’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>
|
|
||||||
<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>
|
|
||||||
</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>
|
|
||||||
</div>
|
</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’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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -368,19 +413,12 @@ are categorized by the component they affect.</p>
|
||||||
<h3><a href="index.html">Table Of Contents</a></h3>
|
<h3><a href="index.html">Table Of Contents</a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a class="reference internal" href="#">Loading and Configuring MathJax</a><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="#configuring-mathjax">Configuring MathJax</a></li>
|
||||||
<li><a class="reference internal" href="#common-configurations">Common Configurations</a><ul>
|
<li><a class="reference internal" href="#using-a-configuration-file">Using a configuration file</a></li>
|
||||||
<li><a class="reference internal" href="#the-tex-setup">The TeX setup</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="#the-mathml-setup">The MathML setup</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="#both-tex-and-mathml">Both TeX and MathML</a></li>
|
<li><a class="reference internal" href="#details-of-the-mathjax-configuration-process">Details of the MathJax configuration process</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>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -389,13 +427,8 @@ are categorized by the component they affect.</p>
|
||||||
<p class="topless"><a href="installation.html"
|
<p class="topless"><a href="installation.html"
|
||||||
title="previous chapter">Installing and Testing MathJax</a></p>
|
title="previous chapter">Installing and Testing MathJax</a></p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="options/hub.html"
|
<p class="topless"><a href="config-files.html"
|
||||||
title="next chapter">The Core Configuration Options</a></p>
|
title="next chapter">Common Configurations</a></p>
|
||||||
<h3>This Page</h3>
|
|
||||||
<ul class="this-page-menu">
|
|
||||||
<li><a href="_sources/configuration.txt"
|
|
||||||
rel="nofollow">Show Source</a></li>
|
|
||||||
</ul>
|
|
||||||
<div id="searchbox" style="display: none">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<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"
|
<a href="genindex.html" title="General Index"
|
||||||
>index</a></li>
|
>index</a></li>
|
||||||
<li class="right" >
|
<li class="right" >
|
||||||
<a href="options/hub.html" title="The Core Configuration Options"
|
<a href="config-files.html" title="Common Configurations"
|
||||||
>next</a> |</li>
|
>next</a> |</li>
|
||||||
<li class="right" >
|
<li class="right" >
|
||||||
<a href="installation.html" title="Installing and Testing MathJax"
|
<a href="installation.html" title="Installing and Testing MathJax"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="Modifying Math on the Page" href="typeset.html" />
|
<link rel="next" title="Modifying Math on the Page" href="typeset.html" />
|
||||||
<link rel="prev" title="Using Signals" href="signals.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
|
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
|
<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
|
startup script. To do this, you will need to give MathJax an in-line
|
||||||
configuration, so you will not be able to use the
|
configuration.</p>
|
||||||
<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file (though you can add it to your in-line
|
|
||||||
configuration’s <cite>config</cite> array).</p>
|
|
||||||
<p>Here is an example of how to load and configure MathJax dynamically:</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>
|
<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">"script"</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">"script"</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">"text/javascript"</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">"text/javascript"</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">"/MathJax/MathJax.js"</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">"http://cdn.mathjax.org/mathjax/latest/MathJax.js"</span><span class="p">;</span>
|
||||||
|
|
||||||
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Config({'</span> <span class="o">+</span>
|
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Config({'</span> <span class="o">+</span>
|
||||||
<span class="s1">'extensions: ["tex2jax.js"],'</span> <span class="o">+</span>
|
<span class="s1">'extensions: ["tex2jax.js"],'</span> <span class="o">+</span>
|
||||||
|
@ -88,20 +86,18 @@ configuration’s <cite>config</cite> array).</p>
|
||||||
<span class="p">})();</span>
|
<span class="p">})();</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</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
|
<p>You can adjust the <tt class="docutils literal"><span class="pre">config</span></tt> variable to your needs, but be careful to get
|
||||||
MathJax. You can adjust the <tt class="docutils literal"><span class="pre">config</span></tt> variable to your needs, but be
|
the commas right. The <tt class="docutils literal"><span class="pre">window.opera</span></tt> test is because some versions of
|
||||||
careful to get the commas right. The <tt class="docutils literal"><span class="pre">window.opera</span></tt> test is because
|
|
||||||
Opera doesn’t handle setting <tt class="docutils literal"><span class="pre">script.text</span></tt> properly, while Internet
|
Opera doesn’t handle setting <tt class="docutils literal"><span class="pre">script.text</span></tt> properly, while Internet
|
||||||
Explorer doesn’t handle setting the <tt class="docutils literal"><span class="pre">innerHTML</span></tt> of a script tag.</p>
|
Explorer doesn’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>
|
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>
|
<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">"script"</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">"script"</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">"text/javascript"</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">"text/javascript"</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">"/MathJax/MathJax.js"</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">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full"</span><span class="p">;</span>
|
||||||
|
|
||||||
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Config({ config: "MathJax.js" }); '</span> <span class="o">+</span>
|
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Startup.onload();'</span><span class="p">;</span>
|
||||||
<span class="s1">'MathJax.Hub.Startup.onload();'</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">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="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>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Note that the <strong>only</strong> reliable way to configure MathJax is to use an
|
<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>
|
in-line configuration block of the type discussed above. You should
|
||||||
call <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> directly in your code, as it will
|
<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 — it will either run too soon, in which
|
not run at the correct time — it will either run too soon, in which case
|
||||||
case <tt class="docutils literal"><span class="pre">MathJax</span></tt> may not be defined and the function will throw an
|
<tt class="docutils literal"><span class="pre">MathJax</span></tt> may not be defined and the function will throw an error, or it
|
||||||
error, or it will run too late, after MathJax has already finished its
|
will run too late, after MathJax has already finished its configuration
|
||||||
configuration process, so your changes will not have the desired
|
process, so your changes will not have the desired effect.</p>
|
||||||
effect.</p>
|
|
||||||
<div class="section" id="mathjax-and-greasemonkey">
|
<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>
|
<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
|
<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
|
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’t have your GreaseMonkey
|
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
|
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
|
server-based copy. The MathJax CDN works nicely for this.</p>
|
||||||
of a copy of MathJax from your own server.</p>
|
|
||||||
<hr class="docutils" />
|
<hr class="docutils" />
|
||||||
<p>Here is a script that runs MathJax in any document that contains
|
<p>Here is a script that runs MathJax in any document that contains
|
||||||
MathML (whether its includes MathJax or not). That allows
|
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="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">"http://www.w3.org/1998/Math/MathML"</span><span class="p">,</span><span class="s2">"math"</span><span class="p">).</span><span class="nx">length</span> <span class="o">></span> <span class="mi">0</span><span class="p">)))</span> <span class="p">{</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">"http://www.w3.org/1998/Math/MathML"</span><span class="p">,</span><span class="s2">"math"</span><span class="p">).</span><span class="nx">length</span> <span class="o">></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">"script"</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">"script"</span><span class="p">);</span>
|
||||||
<span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">"http://www.yoursite.edu/MathJax/MathJax.js"</span><span class="p">;</span> <span class="c1">// put your URL here</span>
|
<span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full"</span><span class="p">;</span>
|
||||||
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Config({'</span> <span class="o">+</span>
|
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Startup.onload()'</span><span class="p">;</span>
|
||||||
<span class="s1">'extensions:["mml2jax.js"],'</span> <span class="o">+</span>
|
|
||||||
<span class="s1">'jax:["input/MathML","output/HTML-CSS"]'</span> <span class="o">+</span>
|
|
||||||
<span class="s1">'});'</span> <span class="o">+</span>
|
|
||||||
<span class="s1">'MathJax.Hub.Startup.onload()'</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="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">"head"</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="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">"head"</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>
|
||||||
|
@ -181,29 +171,25 @@ converting the math images to their original TeX code.</p>
|
||||||
<span class="c1">//</span>
|
<span class="c1">//</span>
|
||||||
<span class="c1">// Replace the images with MathJax scripts of type math/tex</span>
|
<span class="c1">// Replace the images with MathJax scripts of type math/tex</span>
|
||||||
<span class="c1">//</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">'img'</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">'img'</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">>=</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="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">>=</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="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">"tex"</span><span class="p">)</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">"tex"</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">"script"</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">"math/tex"</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">"script"</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">"math/tex"</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="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="p">}</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">//</span>
|
||||||
<span class="c1">// Load MathJax and have it process the page</span>
|
<span class="c1">// Load MathJax and have it process the page</span>
|
||||||
<span class="c1">//</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">"script"</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">"script"</span><span class="p">);</span>
|
||||||
<span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">"http://www.yoursite.edu/MathJax/MathJax.js"</span><span class="p">;</span> <span class="c1">// put your URL here</span>
|
<span class="nx">script</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="s2">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full"</span><span class="p">;</span>
|
||||||
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Config({'</span> <span class="o">+</span>
|
<span class="kd">var</span> <span class="nx">config</span> <span class="o">=</span> <span class="s1">'MathJax.Hub.Startup.onload()'</span><span class="p">;</span>
|
||||||
<span class="s1">'config: ["MMLorHTML.js"],'</span> <span class="o">+</span>
|
|
||||||
<span class="s1">'extensions:["TeX/noErrors.js","TeX/noUndefined.js",'</span> <span class="o">+</span>
|
|
||||||
<span class="s1">'"TeX/AMSmath.js","TeX/AMSsymbols.js"],'</span> <span class="o">+</span>
|
|
||||||
<span class="s1">'jax:["input/TeX"]'</span> <span class="o">+</span>
|
|
||||||
<span class="s1">'});'</span> <span class="o">+</span>
|
|
||||||
<span class="s1">'MathJax.Hub.Startup.onload()'</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="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">"head"</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="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">"head"</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>
|
<span class="p">}</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -231,11 +217,6 @@ converting the math images to their original TeX code.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="typeset.html"
|
<p class="topless"><a href="typeset.html"
|
||||||
title="next chapter">Modifying Math on the Page</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -94,9 +94,11 @@
|
||||||
<h2 id="F">F</h2>
|
<h2 id="F">F</h2>
|
||||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||||
<td style="width: 33%" valign="top"><dl>
|
<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>
|
<dt><a href="api/ajax.html#fileURL">fileURL()</a></dt>
|
||||||
</dl></td>
|
</dl></td>
|
||||||
<td style="width: 33%" valign="top"><dl>
|
<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>
|
<dt><a href="api/hub.html#formatError">formatError()</a></dt>
|
||||||
</dl></td>
|
</dl></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
|
@ -172,9 +174,6 @@
|
||||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||||
<td style="width: 33%" valign="top"><dl>
|
<td style="width: 33%" valign="top"><dl>
|
||||||
<dt><a href="api/signal.html#NoInterest">NoInterest()</a></dt>
|
<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>
|
</dl></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
|
|
||||||
|
@ -182,6 +181,7 @@
|
||||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||||
<td style="width: 33%" valign="top"><dl>
|
<td style="width: 33%" valign="top"><dl>
|
||||||
<dt><a href="api/signal.html#Post">Post()</a></dt>
|
<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>
|
<dt><a href="api/hub.html#PreProcess">PreProcess()</a></dt>
|
||||||
</dl></td>
|
</dl></td>
|
||||||
<td style="width: 33%" valign="top"><dl>
|
<td style="width: 33%" valign="top"><dl>
|
||||||
|
@ -201,10 +201,11 @@
|
||||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||||
<td style="width: 33%" valign="top"><dl>
|
<td style="width: 33%" valign="top"><dl>
|
||||||
<dt><a href="api/jax.html#Register">Register()</a></dt>
|
<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/hub.html#Reprocess">Reprocess()</a></dt>
|
||||||
<dt><a href="api/ajax.html#Require">Require()</a></dt>
|
|
||||||
</dl></td>
|
</dl></td>
|
||||||
<td style="width: 33%" valign="top"><dl>
|
<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/callback.html#reset">reset()</a></dt>
|
||||||
<dt><a href="api/queue.html#Resume">Resume()</a></dt>
|
<dt><a href="api/queue.html#Resume">Resume()</a></dt>
|
||||||
</dl></td>
|
</dl></td>
|
||||||
|
@ -214,6 +215,7 @@
|
||||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||||
<td style="width: 33%" valign="top"><dl>
|
<td style="width: 33%" valign="top"><dl>
|
||||||
<dt><a href="api/message.html#Set">Set()</a></dt>
|
<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/callback.html#Signal">Signal()</a></dt>
|
||||||
<dt><a href="api/elementjax.html#SourceElement">SourceElement()</a></dt>
|
<dt><a href="api/elementjax.html#SourceElement">SourceElement()</a></dt>
|
||||||
<dt><a href="api/jax.html#Startup">Startup()</a></dt>
|
<dt><a href="api/jax.html#Startup">Startup()</a></dt>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="prev" title="CSS Style Objects" href="CSS-styles.html" />
|
<link rel="prev" title="CSS Style Objects" href="CSS-styles.html" />
|
||||||
</head>
|
</head>
|
||||||
|
@ -120,11 +120,6 @@ formats for mathematical journals, articles, and books.</p>
|
||||||
<h4>Previous topic</h4>
|
<h4>Previous topic</h4>
|
||||||
<p class="topless"><a href="CSS-styles.html"
|
<p class="topless"><a href="CSS-styles.html"
|
||||||
title="previous chapter">CSS Style Objects</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="#" />
|
||||||
<link rel="next" title="What is MathJax?" href="mathjax.html" />
|
<link rel="next" title="What is MathJax?" href="mathjax.html" />
|
||||||
</head>
|
</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="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="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="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>
|
<li class="toctree-l1"><a class="reference internal" href="platforms/index.html">Using MathJax in Web Platforms</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -73,8 +75,18 @@ MathML that works in all modern browsers.</p>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</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’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">
|
<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">
|
<div class="toctree-wrapper compound">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="model.html">The MathJax Processing Model</a></li>
|
<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>
|
<li class="toctree-l1"><a class="reference internal" href="api/index.html">Details of the MathJax API</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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>
|
||||||
<div class="section" id="reference-pages">
|
<div class="section" id="reference-pages">
|
||||||
<h2>Reference Pages<a class="headerlink" href="#reference-pages" title="Permalink to this headline">¶</a></h2>
|
<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>
|
</div>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li><a class="reference internal" href="search.html"><em>Search</em></a></li>
|
<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>
|
</ul>
|
||||||
<hr class="docutils" />
|
<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>
|
||||||
</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>
|
<li><a class="reference internal" href="#basic-usage">Basic Usage</a><ul>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</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>
|
<li><a class="reference internal" href="#advanced-topics">Advanced Topics</a><ul>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
@ -137,11 +153,6 @@ MathML that works in all modern browsers.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="mathjax.html"
|
<p class="topless"><a href="mathjax.html"
|
||||||
title="next chapter">What is MathJax?</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="Loading and Configuring MathJax" href="configuration.html" />
|
<link rel="next" title="Loading and Configuring MathJax" href="configuration.html" />
|
||||||
<link rel="prev" title="Getting Started" href="start.html" />
|
<link rel="prev" title="Getting Started" href="start.html" />
|
||||||
|
@ -51,6 +51,10 @@
|
||||||
|
|
||||||
<div class="section" id="installing-and-testing-mathjax">
|
<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>
|
<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
|
<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
|
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
|
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>
|
is easier to keep your installation up to date with these tools.</p>
|
||||||
<div class="section" id="obtaining-mathjax-via-git">
|
<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>
|
<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>
|
<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
|
<div class="highlight-sh"><div class="highlight"><pre>git clone git://github.com/mathjax/MathJax.git MathJax
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>to obtain and set up a copy of MathJax. Note that there is no longer
|
<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
|
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>
|
the repository itself.</p>
|
||||||
<p>Whenever you want to update MathJax, you can now use</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
|
git remote show origin
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>to check if there are updates to MathJax (this will print several
|
<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
|
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>
|
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
|
git pull origin
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>to udpate your copy of MathJax to the current release version. If you
|
<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
|
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>
|
latest bug fixes and new features as they become available.</p>
|
||||||
<p>This gets you the current development copy of MathJax, which is the
|
<p>This gets you the current development copy of MathJax, which is the version
|
||||||
“bleeding-edge” version that contains all the latest changes to
|
that contains all the latest changes to MathJax. Although we try to make
|
||||||
MathJax. At times, however, these may be less stable than the
|
sure this version is a stable and usable version of MathJax, it is under
|
||||||
“release” version. If you prefer to use the most stable version (that
|
active development, and at times it may be less stable than the “release”
|
||||||
may not include all the latest patches and features), use <tt class="docutils literal"><span class="pre">git</span> <span class="pre">tag</span>
|
version. If you prefer to use the most stable version (that may not
|
||||||
<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"><tag_name></span></tt> to
|
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
|
||||||
checkout that version of MathJax. When you want to upgrade to a new
|
versions and use <tt class="docutils literal"><span class="pre">git</span> <span class="pre">checkout</span> <span class="pre"><tag_name></span></tt> to checkout that version of
|
||||||
release, you will need to repeat this for the latest release tag.</p>
|
MathJax. When you want to upgrade to a new release, you will need to
|
||||||
|
repeat this for the latest release tag.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="obtaining-mathjax-via-svn">
|
<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>
|
<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
|
<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’s <tt class="docutils literal"><span class="pre">svn</span></tt> service to obtain MathJax. If you want to get the
|
to use GitHub’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>
|
latest revision using <tt class="docutils literal"><span class="pre">svn</span></tt>, use the command</p>
|
||||||
<div class="highlight-sh"><div class="highlight"><pre>svn checkout http://svn.github.com/mathjax/MathJax.git mathjax
|
<div class="highlight-sh"><div class="highlight"><pre>svn checkout http://svn.github.com/mathjax/MathJax.git MathJax
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>to obtain and set up a copy of MathJax. Note that there is no longer
|
<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
|
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>
|
the repository itself.</p>
|
||||||
<p>Whenever you want to update MathJax, you can now use</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
|
svn status -u
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>to check if there are updates to MathJax. If MathJax needs updating,
|
<p>to check if there are updates to MathJax. If MathJax needs updating,
|
||||||
use</p>
|
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
|
svn update
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>to udpate your copy of MathJax to the current release version. If you
|
<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
|
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>
|
latest bug fixes and new features as they become available.</p>
|
||||||
<p>This gets you the current development copy of MathJax, which is the
|
<p>This gets you the current development copy of MathJax, which is the version
|
||||||
“bleeding-edge” version that contains all the latest changes to
|
that contains all the latest changes to MathJax. Although we try to make
|
||||||
MathJax. At times, however, these may be less stable than the
|
sure this version is a stable and usable version of MathJax, it is under
|
||||||
“release” version. If you prefer to use one of the tagged releases
|
active development, and at times it may be less stable than the “release”
|
||||||
instead, then either use <tt class="docutils literal"><span class="pre">git</span></tt> as described above, or one of the
|
version. If you prefer to use one of the tagged releases instead, then
|
||||||
archive files as described below. You can use</p>
|
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
|
<div class="highlight-sh"><div class="highlight"><pre>svn checkout http://svn.github.com/mathjax/MathJax.git@nnn mathjax
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</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’s hierarchy. That would
|
to put it at the top level of your web server’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
|
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>
|
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>
|
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 “bleeding-edge” 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>
|
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>
|
||||||
<div class="section" id="testing-your-installation">
|
<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>
|
<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
|
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
|
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
|
message that MathJax appears to be working. If not, you should check
|
||||||
that the files have been transferred to the server completely, that
|
that the files have been transferred to the server completely, and that
|
||||||
the fonts archive has been unpacked in the correct location, and that
|
|
||||||
the permissions allow the server to access the files and folders 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
|
are part of the MathJax directory (be sure to verify the MathJax
|
||||||
folder’s permissions as well). Checking the server logs may help
|
folder’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
|
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
|
separate copy on the departmental machine. MathJax can certainly
|
||||||
be loaded from another server, but there is one imporant caveat —
|
be loaded from another server, but there is one imporant caveat —
|
||||||
Firefox’s same-origin security policy for cross-domain scripting.</p>
|
Firefox’s and IE9’s same-origin security policy for cross-domain scripting.</p>
|
||||||
<p>Firefox’s interpretation of the same-origin policy is more strict than
|
<p>Firefox’s interpretation of the same-origin policy is more strict than most
|
||||||
most other browsers, and it affects how fonts are loaded with the
|
other browsers, and it affects how fonts are loaded with the <cite>@font-face</cite>
|
||||||
<cite>@font-face</cite> CSS directive. MathJax uses this directive to load
|
CSS directive. MathJax uses this directive to load web-based math fonts
|
||||||
web-based math fonts into a page when the user doesn’t have them
|
into a page when the user doesn’t have them installed locally on their own
|
||||||
installed locally on their own computer. Firefox’s security policy,
|
computer. Firefox’s security policy, however, only allows this when the
|
||||||
however, only allows this when the fonts come from the same server as
|
fonts come from the same server as the web page itself, so if you load
|
||||||
the web page itself, so if you load MathJax (and hence its web fonts)
|
MathJax (and hence its web fonts) from a different server, Firefox won’t be
|
||||||
from a different server, Firefox won’t be able to access those web
|
able to access those web fonts. In this case, MathJax will pause while
|
||||||
fonts. In this case, MathJax will pause while waiting for the font to
|
waiting for the font to download (which will never happen); it will time
|
||||||
download (which will never happen) and will time out after about 15
|
out after about 5 seconds and switch to image fonts as a fallback.
|
||||||
seconds for each font it tries to access. Typically that is three or
|
Similarly, IE9 has a similar same-origin policy in its <cite>IE9 standards
|
||||||
four fonts, so your Firefox users will experience a minute or so
|
mode</cite>, so it exhibits this same behavior.</p>
|
||||||
delay before mathematics is displayed, and then it will probably
|
|
||||||
display incorrectly because the browser doesn’t have access to the
|
|
||||||
correct fonts.</p>
|
|
||||||
<p>There is a solution to this, however, if you manage the server where
|
<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
|
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’s
|
server</a>. In the remote server’s
|
||||||
|
@ -207,17 +217,16 @@ Header set Access-Control-Allow-Origin "*"
|
||||||
</IfModule>
|
</IfModule>
|
||||||
</FilesMatch></pre>
|
</FilesMatch></pre>
|
||||||
</div>
|
</div>
|
||||||
<p>and make sure the permissions allow the server to read this file.
|
<p>and make sure the permissions allow the server to read this file. (The
|
||||||
(The file’s name starts with a period, which causes it to be an
|
file’s name starts with a period, which causes it to be an “invisible” file
|
||||||
“invisible” file on unix-based operating systems. Some systems,
|
on unix-based operating systems. Some systems, particularly those with
|
||||||
particularly graphic user interfaces, may not allow you to create such
|
graphical user interfaces, may not allow you to create such files, so you
|
||||||
files, so you might need to use the command-line interface to
|
might need to use the command-line interface to accomplish this.)</p>
|
||||||
accomplish this.)</p>
|
<p>This file should make it possible for pages at other sites to load MathJax
|
||||||
<p>This file should make it possible for pages at other sites to load
|
from this server in such a way that Firefox and IE9 will be able to
|
||||||
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
|
||||||
download the web-based fonts. If you want to restrict the sites that
|
access the web fonts, change the <tt class="docutils literal"><span class="pre">Access-Control-Allow-Origin</span></tt> line to
|
||||||
can access the web fonts, change the <tt class="docutils literal"><span class="pre">Access-Control-Allow-Origin</span></tt>
|
something like:</p>
|
||||||
line to something like:</p>
|
|
||||||
<div class="highlight-python"><pre>Header set Access-Control-Allow-Origin "http://www.math.yourcollege.edu"</pre>
|
<div class="highlight-python"><pre>Header set Access-Control-Allow-Origin "http://www.math.yourcollege.edu"</pre>
|
||||||
</div>
|
</div>
|
||||||
<p>so that only pages at <tt class="docutils literal"><span class="pre">www.math.yourcollege.edu</span></tt> will be able to
|
<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>
|
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>
|
for more details.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="forefox-and-local-fonts">
|
<div class="section" id="firefox-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>
|
<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’s same-origin security policy affects its ability to load
|
<p>Firefox’s same-origin security policy affects its ability to load
|
||||||
web-based fonts, as described above. This has implications not only
|
web-based fonts, as described above. This has implications not only
|
||||||
to cross-domain loading of MathJax, but also to using MathJax locally
|
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’s security
|
restriction, but it is a limitiation imposed by Firefox’s security
|
||||||
model that MathJax can not circumvent. Currently, this is not a
|
model that MathJax can not circumvent. Currently, this is not a
|
||||||
problem for other browsers.</p>
|
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’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’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>
|
||||||
</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="#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="#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="#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>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -272,11 +302,6 @@ problem for other browsers.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="configuration.html"
|
<p class="topless"><a href="configuration.html"
|
||||||
title="next chapter">Loading and Configuring MathJax</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -21,10 +21,10 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="Describing HTML snippets" href="HTML-snippets.html" />
|
<link rel="next" title="The MathJax Processing Model" href="model.html" />
|
||||||
<link rel="prev" title="The MathJax Object-Oriented Programming Model" href="api/object.html" />
|
<link rel="prev" title="Migrating from MathJax v1.0 to v1.1" href="upgrade.html" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -35,10 +35,10 @@
|
||||||
<a href="genindex.html" title="General Index"
|
<a href="genindex.html" title="General Index"
|
||||||
accesskey="I">index</a></li>
|
accesskey="I">index</a></li>
|
||||||
<li class="right" >
|
<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>
|
accesskey="N">next</a> |</li>
|
||||||
<li class="right" >
|
<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>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
</ul>
|
</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
|
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
|
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
|
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’s <tt class="docutils literal"><span class="pre"><span</span>
|
<p>On the other hand, if you are using jsMath’s <tt class="docutils literal"><span class="pre"><span</span>
|
||||||
<span class="pre">class="math">...</span></span></tt> and <tt class="docutils literal"><span class="pre"><div</span> <span class="pre">class="math">...</div></span></tt> tags to
|
<span class="pre">class="math">...</span></span></tt> and <tt class="docutils literal"><span class="pre"><div</span> <span class="pre">class="math">...</div></span></tt> tags to
|
||||||
mark the mathematics in your document, then you should use MathJax’s
|
mark the mathematics in your document, then you should use MathJax’s
|
||||||
<tt class="docutils literal"><span class="pre">jsMath2jax</span></tt> preprocessor when you switch to MathJax. To do this,
|
<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">"jsMath2jax.js"</span></tt> in the <cite>extensions</cite> array of your
|
include <tt class="docutils literal"><span class="pre">"jsMath2jax.js"</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">"input/TeX"</span></tt>.</p>
|
configuration, with the <cite>jax</cite> array set to include <tt class="docutils literal"><span class="pre">"input/TeX"</span></tt>. For
|
||||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"jsMath2jax.js"</span><span class="p">],</span>
|
example,</p>
|
||||||
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="p">...]</span>
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/x-mathjax-config"</span><span class="nt">></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">"jsMath2jax.js"</span><span class="p">]</span>
|
||||||
|
<span class="p">});</span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
|
<span class="nt"><script</span>
|
||||||
|
<span class="nt"> </span><span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"</span><span class="nt">></span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</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
|
<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>
|
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"><span></span></tt> and <tt class="docutils literal"><span class="pre"><div></span></tt> tags
|
||||||
|
to producing the corresponding MathJax <tt class="docutils literal"><span class="pre"><script></span></tt> tags. You would use
|
||||||
|
<tt class="docutils literal"><span class="pre"><script</span> <span class="pre">type="math/tex"></span></tt> in place of <tt class="docutils literal"><span class="pre"><span</span> <span class="pre">class="math"></span></tt> and
|
||||||
|
<tt class="docutils literal"><span class="pre"><script</span> <span class="pre">type="math/tex;</span> <span class="pre">mode=display"></span></tt> in place of <tt class="docutils literal"><span class="pre"><div</span>
|
||||||
|
<span class="pre">class="math"></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>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,16 +96,11 @@ configuration options</em></a> section.</p>
|
||||||
<div class="sphinxsidebar">
|
<div class="sphinxsidebar">
|
||||||
<div class="sphinxsidebarwrapper">
|
<div class="sphinxsidebarwrapper">
|
||||||
<h4>Previous topic</h4>
|
<h4>Previous topic</h4>
|
||||||
<p class="topless"><a href="api/object.html"
|
<p class="topless"><a href="upgrade.html"
|
||||||
title="previous chapter">The MathJax Object-Oriented Programming Model</a></p>
|
title="previous chapter">Migrating from MathJax v1.0 to v1.1</a></p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="HTML-snippets.html"
|
<p class="topless"><a href="model.html"
|
||||||
title="next chapter">Describing HTML snippets</a></p>
|
title="next chapter">The MathJax Processing Model</a></p>
|
||||||
<h3>This Page</h3>
|
|
||||||
<ul class="this-page-menu">
|
|
||||||
<li><a href="_sources/jsMath.txt"
|
|
||||||
rel="nofollow">Show Source</a></li>
|
|
||||||
</ul>
|
|
||||||
<div id="searchbox" style="display: none">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<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"
|
<a href="genindex.html" title="General Index"
|
||||||
>index</a></li>
|
>index</a></li>
|
||||||
<li class="right" >
|
<li class="right" >
|
||||||
<a href="HTML-snippets.html" title="Describing HTML snippets"
|
<a href="model.html" title="The MathJax Processing Model"
|
||||||
>next</a> |</li>
|
>next</a> |</li>
|
||||||
<li class="right" >
|
<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>
|
>previous</a> |</li>
|
||||||
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="Getting Started" href="start.html" />
|
<link rel="next" title="Getting Started" href="start.html" />
|
||||||
<link rel="prev" title="MathJax Documentation" href="index.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>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="start.html"
|
<p class="topless"><a href="start.html"
|
||||||
title="next chapter">Getting Started</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="MathJax Output Formats" href="output.html" />
|
<link rel="next" title="MathJax Output Formats" href="output.html" />
|
||||||
<link rel="prev" title="MathJax TeX and LaTeX Support" href="tex.html" />
|
<link rel="prev" title="MathJax TeX and LaTeX Support" href="tex.html" />
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
<div class="section" id="mathjax-mathml-support">
|
<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>
|
<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
|
<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"><math></span></tt> tags within
|
output processor. The first of these looks for <tt class="docutils literal"><span class="pre"><math></span></tt> tags within
|
||||||
your document and marks them for later processing by MathJax. The
|
your document and marks them for later processing by MathJax. The
|
||||||
second converts the MathML to the internal format used by MathJax, and
|
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’t have native MathML support.
|
MathML available in browsers that don’t have native MathML support.
|
||||||
It is also possible to have MathJax select the output processor for
|
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
|
you so that MathML is used in those browsers that support it, while
|
||||||
HTML-CSS is used for those that don’t. See the <a class="reference internal" href="configuration.html#common-configurations"><em>common
|
HTML-CSS is used for those that don’t. See the <a class="reference internal" href="config-files.html#common-configurations"><em>common
|
||||||
configurations</em></a> section for details and
|
configurations</em></a> section for details and
|
||||||
examples.</p>
|
examples.</p>
|
||||||
<p>Of course it is also possible to use all three components together.
|
<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
|
difficult. MathJax handles the setup and properly marks the
|
||||||
mathematics so that the browser will render it as MathML. In
|
mathematics so that the browser will render it as MathML. In
|
||||||
addition, MathJax provides its contextual menu for the MathML, which
|
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
|
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">
|
<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>
|
<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
|
<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>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="output.html"
|
<p class="topless"><a href="output.html"
|
||||||
title="next chapter">MathJax Output Formats</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -21,10 +21,10 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="The MathJax Startup Sequence" href="startup.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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
<a href="startup.html" title="The MathJax Startup Sequence"
|
<a href="startup.html" title="The MathJax Startup Sequence"
|
||||||
accesskey="N">next</a> |</li>
|
accesskey="N">next</a> |</li>
|
||||||
<li class="right" >
|
<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>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
</ul>
|
</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"><</span></tt>, in mathematics and asn an HTML special character (that starts
|
<tt class="docutils literal"><span class="pre"><</span></tt>, in mathematics and asn an HTML special character (that starts
|
||||||
an HTML tag).</p>
|
an HTML tag).</p>
|
||||||
<div class="section" id="how-mathematics-is-stored-in-the-page">
|
<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
|
<p>In order to identify mathematics in the page, MathJax uses special
|
||||||
<tt class="docutils literal"><span class="pre"><script></span></tt> tags to enclose the mathematics. This is done because
|
<tt class="docutils literal"><span class="pre"><script></span></tt> tags to enclose the mathematics. This is done because
|
||||||
such tags can be located easily, and because their content is not
|
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>
|
</ul>
|
||||||
|
|
||||||
<h4>Previous topic</h4>
|
<h4>Previous topic</h4>
|
||||||
<p class="topless"><a href="community.html"
|
<p class="topless"><a href="jsMath.html"
|
||||||
title="previous chapter">The MathJax Community</a></p>
|
title="previous chapter">Converting to MathJax from jsMath</a></p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="startup.html"
|
<p class="topless"><a href="startup.html"
|
||||||
title="next chapter">The MathJax Startup Sequence</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<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"
|
<a href="startup.html" title="The MathJax Startup Sequence"
|
||||||
>next</a> |</li>
|
>next</a> |</li>
|
||||||
<li class="right" >
|
<li class="right" >
|
||||||
<a href="community.html" title="The MathJax Community"
|
<a href="jsMath.html" title="Converting to MathJax from jsMath"
|
||||||
>previous</a> |</li>
|
>previous</a> |</li>
|
||||||
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="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="next" title="Using MathJax in popular web platforms" href="../platforms/index.html" />
|
||||||
<link rel="prev" title="The MathZoom extension" href="MathZoom.html" />
|
<link rel="prev" title="The MathZoom extension" href="MathZoom.html" />
|
||||||
</head>
|
</head>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<a href="MathZoom.html" title="The MathZoom extension"
|
<a href="MathZoom.html" title="The MathZoom extension"
|
||||||
accesskey="P">previous</a> |</li>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" accesskey="U">Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -220,11 +220,6 @@ The default is 1.5 seconds.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="../platforms/index.html"
|
<p class="topless"><a href="../platforms/index.html"
|
||||||
title="next chapter">Using MathJax in popular web platforms</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<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"
|
<a href="MathZoom.html" title="The MathZoom extension"
|
||||||
>previous</a> |</li>
|
>previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" >Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="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="next" title="The NativeMML output processor" href="NativeMML.html" />
|
||||||
<link rel="prev" title="The MathML input processor" href="MathML.html" />
|
<link rel="prev" title="The MathML input processor" href="MathML.html" />
|
||||||
</head>
|
</head>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<a href="MathML.html" title="The MathML input processor"
|
<a href="MathML.html" title="The MathML input processor"
|
||||||
accesskey="P">previous</a> |</li>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" accesskey="U">Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -78,6 +78,14 @@ factor. The user can also adjust this value using the contextual
|
||||||
menu item associated with the typeset mathematics.</p>
|
menu item associated with the typeset mathematics.</p>
|
||||||
</dd></dl>
|
</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">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">availableFonts: ["STIX","TeX"]</tt></dt>
|
<tt class="descname">availableFonts: ["STIX","TeX"]</tt></dt>
|
||||||
|
@ -197,11 +205,6 @@ where the tooltip will be placed.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="NativeMML.html"
|
<p class="topless"><a href="NativeMML.html"
|
||||||
title="next chapter">The NativeMML output processor</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<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"
|
<a href="MathML.html" title="The MathML input processor"
|
||||||
>previous</a> |</li>
|
>previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" >Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="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="next" title="The MathMenu extension" href="MathMenu.html" />
|
||||||
<link rel="prev" title="The NativeMML output processor" href="NativeMML.html" />
|
<link rel="prev" title="The NativeMML output processor" href="NativeMML.html" />
|
||||||
</head>
|
</head>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<a href="NativeMML.html" title="The NativeMML output processor"
|
<a href="NativeMML.html" title="The NativeMML output processor"
|
||||||
accesskey="P">previous</a> |</li>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" accesskey="U">Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -99,11 +99,6 @@ complicated output generated by MathJax, so its setting is
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="MathMenu.html"
|
<p class="topless"><a href="MathMenu.html"
|
||||||
title="next chapter">The MathMenu extension</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<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"
|
<a href="NativeMML.html" title="The NativeMML output processor"
|
||||||
>previous</a> |</li>
|
>previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" >Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="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="next" title="The HTML-CSS output processor" href="HTML-CSS.html" />
|
||||||
<link rel="prev" title="The TeX input processor" href="TeX.html" />
|
<link rel="prev" title="The TeX input processor" href="TeX.html" />
|
||||||
</head>
|
</head>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<a href="TeX.html" title="The TeX input processor"
|
<a href="TeX.html" title="The TeX input processor"
|
||||||
accesskey="P">previous</a> |</li>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" accesskey="U">Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -88,11 +88,6 @@ spacing would be used (rather than TeX spacing rules).</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="HTML-CSS.html"
|
<p class="topless"><a href="HTML-CSS.html"
|
||||||
title="next chapter">The HTML-CSS output processor</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<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"
|
<a href="TeX.html" title="The TeX input processor"
|
||||||
>previous</a> |</li>
|
>previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" >Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="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="next" title="The MathZoom extension" href="MathZoom.html" />
|
||||||
<link rel="prev" title="The MMLorHTML configuration options" href="MMLorHTML.html" />
|
<link rel="prev" title="The MMLorHTML configuration options" href="MMLorHTML.html" />
|
||||||
</head>
|
</head>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<a href="MMLorHTML.html" title="The MMLorHTML configuration options"
|
<a href="MMLorHTML.html" title="The MMLorHTML configuration options"
|
||||||
accesskey="P">previous</a> |</li>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" accesskey="U">Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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>
|
<p>would set the <tt class="docutils literal"><span class="pre">delay</span></tt> option to 600 milliseconds.</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<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
|
<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
|
submenus in the contextual menu: when the mouse is over a submenu
|
||||||
label for this long, the menu will appear. (The submenu also will
|
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>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="MathZoom.html"
|
<p class="topless"><a href="MathZoom.html"
|
||||||
title="next chapter">The MathZoom extension</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<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"
|
<a href="MMLorHTML.html" title="The MMLorHTML configuration options"
|
||||||
>previous</a> |</li>
|
>previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" >Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="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="next" title="The FontWarnings extension" href="FontWarnings.html" />
|
||||||
<link rel="prev" title="The MathMenu extension" href="MathMenu.html" />
|
<link rel="prev" title="The MathMenu extension" href="MathMenu.html" />
|
||||||
</head>
|
</head>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<a href="MathMenu.html" title="The MathMenu extension"
|
<a href="MathMenu.html" title="The MathMenu extension"
|
||||||
accesskey="P">previous</a> |</li>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" accesskey="U">Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -103,11 +103,6 @@ style in a JavaScript object.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="FontWarnings.html"
|
<p class="topless"><a href="FontWarnings.html"
|
||||||
title="next chapter">The FontWarnings extension</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<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"
|
<a href="MathMenu.html" title="The MathMenu extension"
|
||||||
>previous</a> |</li>
|
>previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" >Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="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="next" title="The MMLorHTML configuration options" href="MMLorHTML.html" />
|
||||||
<link rel="prev" title="The HTML-CSS output processor" href="HTML-CSS.html" />
|
<link rel="prev" title="The HTML-CSS output processor" href="HTML-CSS.html" />
|
||||||
</head>
|
</head>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<a href="HTML-CSS.html" title="The HTML-CSS output processor"
|
<a href="HTML-CSS.html" title="The HTML-CSS output processor"
|
||||||
accesskey="P">previous</a> |</li>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" accesskey="U">Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -127,11 +127,6 @@ CSS style in a JavaScript object.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="MMLorHTML.html"
|
<p class="topless"><a href="MMLorHTML.html"
|
||||||
title="next chapter">The MMLorHTML configuration options</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<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"
|
<a href="HTML-CSS.html" title="The HTML-CSS output processor"
|
||||||
>previous</a> |</li>
|
>previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" >Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="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="next" title="The MathML input processor" href="MathML.html" />
|
||||||
<link rel="prev" title="The jsMath2jax Preprocessor" href="jsMath2jax.html" />
|
<link rel="prev" title="The jsMath2jax Preprocessor" href="jsMath2jax.html" />
|
||||||
</head>
|
</head>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<a href="jsMath2jax.html" title="The jsMath2jax Preprocessor"
|
<a href="jsMath2jax.html" title="The jsMath2jax Preprocessor"
|
||||||
accesskey="P">previous</a> |</li>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" accesskey="U">Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -117,6 +117,24 @@ which produces a bold-face “R”, and <tt class="docutils literal"><sp
|
||||||
parameter and set it in the bold-face font.</p>
|
parameter and set it in the bold-face font.</p>
|
||||||
</dd></dl>
|
</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’s in MathJax’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>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -131,11 +149,6 @@ parameter and set it in the bold-face font.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="MathML.html"
|
<p class="topless"><a href="MathML.html"
|
||||||
title="next chapter">The MathML input processor</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<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"
|
<a href="jsMath2jax.html" title="The jsMath2jax Preprocessor"
|
||||||
>previous</a> |</li>
|
>previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" >Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|
|
@ -21,11 +21,11 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="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="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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -39,10 +39,10 @@
|
||||||
<a href="tex2jax.html" title="The tex2jax Preprocessor"
|
<a href="tex2jax.html" title="The tex2jax Preprocessor"
|
||||||
accesskey="N">next</a> |</li>
|
accesskey="N">next</a> |</li>
|
||||||
<li class="right" >
|
<li class="right" >
|
||||||
<a href="../configuration.html" title="Loading and Configuring MathJax"
|
<a href="index.html" title="Configuration Objects"
|
||||||
accesskey="P">previous</a> |</li>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" accesskey="U">Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -192,7 +192,11 @@ displayed equations.</p>
|
||||||
configuration, styles, jax, and so on) as soon as it can. If you
|
configuration, styles, jax, and so on) as soon as it can. If you
|
||||||
expect to be doing additional configuration on the page, however,
|
expect to be doing additional configuration on the page, however,
|
||||||
you may want to have it wait until the page’s onload hander is
|
you may want to have it wait until the page’s onload hander is
|
||||||
called. If so, set this to <tt class="docutils literal"><span class="pre">"onload"</span></tt>.</p>
|
called. If so, set this to <tt class="docutils literal"><span class="pre">"onload"</span></tt>. You can also set this to
|
||||||
|
<tt class="docutils literal"><span class="pre">"configured"</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>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
|
@ -284,6 +288,16 @@ how these are specified in JavaScript.</p>
|
||||||
|
|
||||||
</dd></dl>
|
</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>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -293,16 +307,11 @@ how these are specified in JavaScript.</p>
|
||||||
<div class="sphinxsidebar">
|
<div class="sphinxsidebar">
|
||||||
<div class="sphinxsidebarwrapper">
|
<div class="sphinxsidebarwrapper">
|
||||||
<h4>Previous topic</h4>
|
<h4>Previous topic</h4>
|
||||||
<p class="topless"><a href="../configuration.html"
|
<p class="topless"><a href="index.html"
|
||||||
title="previous chapter">Loading and Configuring MathJax</a></p>
|
title="previous chapter">Configuration Objects</a></p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="tex2jax.html"
|
<p class="topless"><a href="tex2jax.html"
|
||||||
title="next chapter">The tex2jax Preprocessor</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<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"
|
<a href="tex2jax.html" title="The tex2jax Preprocessor"
|
||||||
>next</a> |</li>
|
>next</a> |</li>
|
||||||
<li class="right" >
|
<li class="right" >
|
||||||
<a href="../configuration.html" title="Loading and Configuring MathJax"
|
<a href="index.html" title="Configuration Objects"
|
||||||
>previous</a> |</li>
|
>previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" >Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|
191
docs/html/options/index.html
Normal file
191
docs/html/options/index.html
Normal 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 — 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> »</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">"input/TeX"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</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">"left"</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">'{\\bf R}'</span><span class="p">,</span>
|
||||||
|
<span class="nx">bold</span><span class="o">:</span> <span class="p">[</span><span class="s1">'{\\bf #1}'</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’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 “R”, 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’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> »</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="footer">
|
||||||
|
© Copyright 2011 Design Science.
|
||||||
|
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -21,9 +21,9 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="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="next" title="The TeX input processor" href="TeX.html" />
|
||||||
<link rel="prev" title="The mml2jax Preprocessor" href="mml2jax.html" />
|
<link rel="prev" title="The mml2jax Preprocessor" href="mml2jax.html" />
|
||||||
</head>
|
</head>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<a href="mml2jax.html" title="The mml2jax Preprocessor"
|
<a href="mml2jax.html" title="The mml2jax Preprocessor"
|
||||||
accesskey="P">previous</a> |</li>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" accesskey="U">Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -110,11 +110,6 @@ details on how to represent HTML code in this way.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="TeX.html"
|
<p class="topless"><a href="TeX.html"
|
||||||
title="next chapter">The TeX input processor</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<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"
|
<a href="mml2jax.html" title="The mml2jax Preprocessor"
|
||||||
>previous</a> |</li>
|
>previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" >Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="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="next" title="The jsMath2jax Preprocessor" href="jsMath2jax.html" />
|
||||||
<link rel="prev" title="The tex2jax Preprocessor" href="tex2jax.html" />
|
<link rel="prev" title="The tex2jax Preprocessor" href="tex2jax.html" />
|
||||||
</head>
|
</head>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<a href="tex2jax.html" title="The tex2jax Preprocessor"
|
<a href="tex2jax.html" title="The tex2jax Preprocessor"
|
||||||
accesskey="P">previous</a> |</li>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" accesskey="U">Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -110,11 +110,6 @@ details on how to represent HTML code in this way.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="jsMath2jax.html"
|
<p class="topless"><a href="jsMath2jax.html"
|
||||||
title="next chapter">The jsMath2jax Preprocessor</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<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"
|
<a href="tex2jax.html" title="The tex2jax Preprocessor"
|
||||||
>previous</a> |</li>
|
>previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" >Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="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="next" title="The mml2jax Preprocessor" href="mml2jax.html" />
|
||||||
<link rel="prev" title="The Core Configuration Options" href="hub.html" />
|
<link rel="prev" title="The Core Configuration Options" href="hub.html" />
|
||||||
</head>
|
</head>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<a href="hub.html" title="The Core Configuration Options"
|
<a href="hub.html" title="The Core Configuration Options"
|
||||||
accesskey="P">previous</a> |</li>
|
accesskey="P">previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" accesskey="U">Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" accesskey="U">Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -205,11 +205,6 @@ been marked as ignored above.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="mml2jax.html"
|
<p class="topless"><a href="mml2jax.html"
|
||||||
title="next chapter">The mml2jax Preprocessor</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<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"
|
<a href="hub.html" title="The Core Configuration Options"
|
||||||
>previous</a> |</li>
|
>previous</a> |</li>
|
||||||
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
<li><a href="../configuration.html" >Loading and Configuring MathJax</a> »</li>
|
<li><a href="index.html" >Configuration Objects</a> »</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="The MathJax Community" href="community.html" />
|
<link rel="next" title="The MathJax Community" href="community.html" />
|
||||||
<link rel="prev" title="MathJax MathML Support" href="mathml.html" />
|
<link rel="prev" title="MathJax MathML Support" href="mathml.html" />
|
||||||
|
@ -57,9 +57,16 @@
|
||||||
<li>Using a browser’s native MathML support.</li>
|
<li>Using a browser’s native MathML support.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>These are implemented by the <cite>HTML-CSS</cite> and <cite>NativeMML</cite> output
|
<p>These are implemented by the <cite>HTML-CSS</cite> and <cite>NativeMML</cite> output
|
||||||
processors. You select which one you want to use by including either
|
processors.</p>
|
||||||
<tt class="docutils literal"><span class="pre">"output/HTML-CSS"</span></tt> or <tt class="docutils literal"><span class="pre">"output/NativeMML"</span></tt> in the <cite>jax</cite> array of
|
<p>If you are using one of the combined configuration files, then this will
|
||||||
your MathJax configuration. For example</p>
|
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">"output/HTML-CSS"</span></tt>
|
||||||
|
or <tt class="docutils literal"><span class="pre">"output/NativeMML"</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">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">]</span>
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">]</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -69,7 +76,7 @@ in your document.</p>
|
||||||
major browsers, with results that are consistent across browsers and
|
major browsers, with results that are consistent across browsers and
|
||||||
operating systems. This is MathJax’s primary output mode. It’s major
|
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
|
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
|
HTML-CSS processor has not yet been optimized for speed, so you can
|
||||||
expect some improvement in the future. Note that IE8 in “IE8
|
expect some improvement in the future. Note that IE8 in “IE8
|
||||||
standards mode” is an order of magnitude slower than any other browser
|
standards mode” 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
|
with simple equations, but fails with more complex formulas, so we
|
||||||
don’t recommend using the NativeMML output processor with Opera. Safari,
|
don’t recommend using the NativeMML output processor with Opera. Safari,
|
||||||
Chrome, Konqueror, and most other browsers don’t support MathML
|
Chrome, Konqueror, and most other browsers don’t support MathML
|
||||||
natively.</p>
|
natively, but may in the future, since MathML is part of the HTML5
|
||||||
<p>The advantage of the NativeMML output Processor is its speed, since
|
specification.</p>
|
||||||
native MathML support is much faster than using complicated HTML and
|
<p>The advantage of the NativeMML output Processor is its speed, since native
|
||||||
CSS to lay out mathematics via an interpreted language like JavaScript
|
MathML support is much faster than using complicated HTML and CSS to lay
|
||||||
(as the HTML-CSS output processor does). The disadvantage is that you
|
out mathematics, as the HTML-CSS output processor does. The disadvantage
|
||||||
are dependent on the browser’s MathML implementation for your
|
is that you are dependent on the browser’s MathML implementation for your
|
||||||
rendering, and these vary in quality of output and completeness of
|
rendering, and these vary in quality of output and completeness of
|
||||||
implementation. MathJax may rely on features that are not available
|
implementation. MathJax may rely on features that are not available in
|
||||||
in some renderers (for example, Firefox’s MathML support does not
|
some renderers (for example, Firefox’s MathML support does not implement
|
||||||
implement some of the named widths, such as
|
some of the named widths, such as <tt class="docutils literal"><span class="pre">negativethinmathspace</span></tt>). The results
|
||||||
<tt class="docutils literal"><span class="pre">negativethinmathspace</span></tt>). The results using the NativeMML output
|
using the NativeMML output processor may have spacing or other rendering
|
||||||
processor may have spacing or other rendering problems that are
|
problems that are outside of MathJax’s control.</p>
|
||||||
outside of MathJax’s control.</p>
|
|
||||||
<div class="section" id="automatic-selection-of-the-output-processor">
|
<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>
|
<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
|
<p>Since not all browsers support MathML natively, it would be unwise to
|
||||||
choose the NativeMML output processor unless you are sure of your
|
choose the NativeMML output processor unless you are sure of your
|
||||||
audience’s browser capabilities. MathJax can help with that, however,
|
audience’s browser capabilities. MathJax can help with that, however,
|
||||||
since there is a special configuration file that will choose between
|
since a number of its combined configuration files will select NativeMML
|
||||||
NativeMML and HTML-CSS depending on the browser in use. To invoke it,
|
output when the browser supports it, and HTML-CSS output otherwise. These
|
||||||
add <tt class="docutils literal"><span class="pre">"MMLorHTML.js"</span></tt> to your configurations <cite>config</cite> array, and <strong>do
|
are the configuration files that end in <tt class="docutils literal"><span class="pre">_HTMLorMML</span></tt>.</p>
|
||||||
not</strong> include an output processor in your <cite>jax</cite> array; MathJax will
|
<p>If you are doing your own configuration, there is a special configuration
|
||||||
fill that in for you based on the abilities of your user’s browser.</p>
|
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">"MMLorHTML.js"</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’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">"MMLorHTML.js"</span><span class="p">],</span>
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">"MMLorHTML.js"</span><span class="p">],</span>
|
||||||
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">]</span>
|
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">]</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>You can customize which choice to make on a browser-by-browser basis
|
<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
|
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="configuration.html#configuration"><em>Configuring MathJax</em></a> section for futher
|
<a class="reference internal" href="options/MMLorHTML.html#configure-mmlorhtml"><em>Configuring MMLorHTML</em></a> section for futher
|
||||||
details.</p>
|
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"><script </span><span class="na">type=</span><span class="s">"text/x-mathjax-config"</span><span class="nt">></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">"HTML"</span> <span class="p">}</span> <span class="p">}</span>
|
||||||
|
<span class="p">});</span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span>
|
||||||
|
<span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></span>
|
||||||
|
<span class="nt"></script></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
|
<p>MathJax produces MathML that models the underlying mathematics as best
|
||||||
it can, rather than using complicated hacks to improve output for a
|
it can, rather than using complicated hacks to improve output for a
|
||||||
particular MathML implementation. When you make the choice to use the
|
particular MathML implementation. When you make the choice to use the
|
||||||
NativeMML output processor, you are making a trade-off: gaining speed
|
NativeMML output processor, you are making a trade-off: gaining speed
|
||||||
at the expense of quality and reliability, a decision that should not
|
at the expense of quality and reliability, a decision that should not
|
||||||
be taken lightly. Note, however, that a user can employ the MathJax
|
be taken lightly.</p>
|
||||||
contectual menu to select the other other renderer if he or she
|
|
||||||
wishes.</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="html-css-with-ie8">
|
<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>
|
<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
|
<p>Internet Explorer 8 has at least eight different rendering modes in which
|
||||||
which can operate, and that are triggered by the <cite>DOCTYPE</cite> of the
|
it can operate, and that are triggered by the <cite>DOCTYPE</cite> of the document
|
||||||
document being viewed. Its “quirks” mode is its fastest mode, and its
|
being viewed. Its “quirks” mode is its fastest mode, and its “IE8
|
||||||
“IE8 standards” mode is its slowest. This is the mode triggered by
|
standards” mode is its slowest. This is the mode triggered by strict HTML
|
||||||
strict HTML document types, and since most modern content management
|
document types, and since most modern content management systems now
|
||||||
systems now include a <cite>DOCTYPE</cite> that activates “standards” mode, IE8
|
include a <cite>DOCTYPE</cite> that activates “standards” mode, IE8 will operate in
|
||||||
will operate in its slowest manner. This is particularly apparent
|
its slowest manner. This is particularly apparent when MathJax is used,
|
||||||
when MathJax is used, since IE8 in standards mode runs 20 to 30 times
|
since IE8 in standards mode runs 20 to 30 times slower than it does in its
|
||||||
slower than it does in its IE7 emulation mode, and 60 times slower
|
IE7 emulation mode, and 60 times slower than in quirks mode, on the sample
|
||||||
than in quirks mode.</p>
|
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
|
<p>Most users find this speed reduction unacceptable when there is much
|
||||||
mathematics on the page. To overcome this problem, you may wish to
|
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
|
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
|
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
|
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>
|
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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -175,11 +202,6 @@ the mathematics much more quickly.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="community.html"
|
<p class="topless"><a href="community.html"
|
||||||
title="next chapter">The MathJax Community</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="next" title="Installing MathJax in WordPress" href="wordpress.html" />
|
<link rel="next" title="Installing MathJax in WordPress" href="wordpress.html" />
|
||||||
<link rel="prev" title="The FontWarnings extension" href="../options/FontWarnings.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">
|
<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>
|
<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
|
<p>Most web-based content-management systems include a theme or template
|
||||||
layer that determines how the pages look, and that loads information
|
layer that determines how the pages look, and that loads information
|
||||||
common to all pages. Such theme files provide one popular way to
|
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 are not, you may need to have an administrator do these steps for
|
||||||
you.</p>
|
you.</p>
|
||||||
<p>To enable MathJax in your web platform, add the line:</p>
|
<p>To enable MathJax in your web platform, add the line:</p>
|
||||||
<div class="highlight-python"><pre><script type="text/javascript" src="path-to-MathJax/MathJax.js"></script></pre>
|
<div class="highlight-python"><pre><script type="text/javascript"
|
||||||
|
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></pre>
|
||||||
</div>
|
</div>
|
||||||
<p>(where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is the web-address of the main MathJax
|
<p>either just before the <tt class="docutils literal"><span class="pre"></head></span></tt> tag in your theme file, or at the end of
|
||||||
directory for your server) either just before the <tt class="docutils literal"><span class="pre"></head></span></tt> tag in
|
the file if it contains no <tt class="docutils literal"><span class="pre"></head></span></tt>.</p>
|
||||||
your theme file, or at the end of the file if it contains no
|
|
||||||
<tt class="docutils literal"><span class="pre"></head></span></tt>.</p>
|
|
||||||
<p>The theme files for various popular platforms are:</p>
|
<p>The theme files for various popular platforms are:</p>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<div><dl class="docutils">
|
<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
|
<p>Keep in mind that this will enable MathJax for your current
|
||||||
theme/template only. If you change themes or update your theme, you
|
theme/template only. If you change themes or update your theme, you
|
||||||
will have to repeat these steps.</p>
|
will have to repeat these steps.</p>
|
||||||
|
</div>
|
||||||
<div class="section" id="insructions-for-specific-platforms">
|
<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>
|
<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
|
<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>
|
<h3><a href="../index.html">Table Of Contents</a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a class="reference internal" href="#">Using MathJax in popular web platforms</a><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>
|
<li><a class="reference internal" href="#insructions-for-specific-platforms">Insructions for Specific Platforms</a><ul>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
@ -125,11 +135,6 @@ instructions for these are given via the links below.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="wordpress.html"
|
<p class="topless"><a href="wordpress.html"
|
||||||
title="next chapter">Installing MathJax in WordPress</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="Using MathJax in popular web platforms" href="index.html" />
|
<link rel="up" title="Using MathJax in popular web platforms" href="index.html" />
|
||||||
<link rel="next" title="MathJax TeX and LaTeX Support" href="../tex.html" />
|
<link rel="next" title="MathJax TeX and LaTeX Support" href="../tex.html" />
|
||||||
|
@ -53,8 +53,6 @@
|
||||||
|
|
||||||
<div class="section" id="using-mathjax-in-movable-type">
|
<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>
|
<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">
|
<ol class="arabic">
|
||||||
<li><p class="first">Open Moveable Type Admin interface for the site on which you want to enable
|
<li><p class="first">Open Moveable Type Admin interface for the site on which you want to enable
|
||||||
MathJax.</p>
|
MathJax.</p>
|
||||||
|
@ -72,19 +70,20 @@ and open the <cite>HTML Head</cite> template.</p>
|
||||||
</div></blockquote>
|
</div></blockquote>
|
||||||
</li>
|
</li>
|
||||||
<li><p class="first">At the end of the file, insert</p>
|
<li><p class="first">At the end of the file, insert</p>
|
||||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span>
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span>
|
||||||
|
<span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is replaced by the web-address of the
|
<p>to load MathJax from our distributed netowrk service.</p>
|
||||||
main MathJax dorectory on your server.</p>
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<div><img alt="../_images/mt_head.png" src="../_images/mt_head.png" />
|
<div><img alt="../_images/mt_head.png" src="../_images/mt_head.png" />
|
||||||
</div></blockquote>
|
</div></blockquote>
|
||||||
</li>
|
</li>
|
||||||
<li><p class="first">Save the file. This should enable MathJax, so you should be able
|
<li><p class="first">Save the file. This will enable MathJax with both TeX and MathML
|
||||||
to start adding mathematical content to your pages. Use the
|
input, so you should be able to start adding mathematical content to
|
||||||
<tt class="docutils literal"><span class="pre">config/MathJas.js</span></tt> file in the MathJax directory to configure
|
your pages. If you need to adjust the configuraiton, see
|
||||||
MathJax to your needs (see <a class="reference internal" href="../configuration.html#configuration"><em>Configuring MathJax</em></a> for details).</p>
|
<a class="reference internal" href="../configuration.html#loading"><em>Configuring MathJax</em></a> for more details.</p>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
@ -101,11 +100,6 @@ MathJax to your needs (see <a class="reference internal" href="../configuration.
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="../tex.html"
|
<p class="topless"><a href="../tex.html"
|
||||||
title="next chapter">MathJax TeX and LaTeX Support</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="../_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="../_static/doctools.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="top" title="MathJax v1.1 documentation" href="../index.html" />
|
||||||
<link rel="up" title="Using MathJax in popular web platforms" href="index.html" />
|
<link rel="up" title="Using MathJax in popular web platforms" href="index.html" />
|
||||||
<link rel="next" title="Using MathJax in Movable Type" href="movable-type.html" />
|
<link rel="next" title="Using MathJax in Movable Type" href="movable-type.html" />
|
||||||
|
@ -53,8 +53,8 @@
|
||||||
|
|
||||||
<div class="section" id="installing-mathjax-in-wordpress">
|
<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>
|
<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
|
<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
|
||||||
your server (see <a class="reference internal" href="../installation.html#installation"><em>Installing MathJax</em></a>).</p>
|
better choice than editing the theme directly.</p>
|
||||||
<ol class="arabic">
|
<ol class="arabic">
|
||||||
<li><p class="first">Open the WordPress admin interface.</p>
|
<li><p class="first">Open the WordPress admin interface.</p>
|
||||||
</li>
|
</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.
|
<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,
|
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"></head></span></tt>. If you find it, insert</p>
|
<tt class="docutils literal"><span class="pre"></head></span></tt>. If you find it, insert</p>
|
||||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span>
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span>
|
||||||
|
<span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>just before that. Otherwise, insert the same code at the very
|
<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
|
bottom of the file.</p>
|
||||||
by the web-address of the main MathJax directory on your server,
|
|
||||||
e.g., <tt class="docutils literal"><span class="pre">src="/mathjax/MathJax.js"</span></tt>.</p>
|
|
||||||
</li>
|
</li>
|
||||||
<li><p class="first">Save the file. This should enable MathJax, so you should be able to
|
<li><p class="first">Save the file. This will enable MathJax with both TeX and MathML
|
||||||
start adding mathematical content to your pages. Use the
|
input, so you should be able to start adding mathematical content to
|
||||||
<tt class="docutils literal"><span class="pre">config/MathJas.js</span></tt> file in the MathJax directory to configure
|
your pages. If you need to adjust the configuraiton, see
|
||||||
MathJax to your needs (see <a class="reference internal" href="../configuration.html#configuration"><em>Configuring MathJax</em></a> for details).</p>
|
<a class="reference internal" href="../configuration.html#loading"><em>Configuring MathJax</em></a> for more details.</p>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
@ -102,11 +102,6 @@ MathJax to your needs (see <a class="reference internal" href="../configuration.
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="movable-type.html"
|
<p class="topless"><a href="movable-type.html"
|
||||||
title="next chapter">Using MathJax in Movable Type</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="../search.html" method="get">
|
<form class="search" action="../search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" />
|
<link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" />
|
||||||
<link rel="next" title="Using Signals" href="signals.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>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="signals.html"
|
<p class="topless"><a href="signals.html"
|
||||||
title="next chapter">Using Signals</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<script type="text/javascript" src="_static/underscore.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="_static/doctools.js"></script>
|
||||||
<script type="text/javascript" src="_static/searchtools.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" />
|
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" />
|
<link rel="up" title="Synchronizing your code with MathJax" href="synchronize.html" />
|
||||||
<link rel="next" title="Loading MathJax Dynamically" href="dynamic.html" />
|
<link rel="next" title="Loading MathJax Dynamically" href="dynamic.html" />
|
||||||
|
@ -213,11 +213,6 @@ structure and methods of the signal object.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="dynamic.html"
|
<p class="topless"><a href="dynamic.html"
|
||||||
title="next chapter">Loading MathJax Dynamically</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="Installing and Testing MathJax" href="installation.html" />
|
<link rel="next" title="Installing and Testing MathJax" href="installation.html" />
|
||||||
<link rel="prev" title="What is MathJax?" href="mathjax.html" />
|
<link rel="prev" title="What is MathJax?" href="mathjax.html" />
|
||||||
|
@ -52,8 +52,50 @@
|
||||||
<div class="section" id="getting-started">
|
<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>
|
<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
|
<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
|
using TeX and LaTeX notation, or as MathML, and you can even use both
|
||||||
need to do the following things:</p>
|
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"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></script></span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>into the <tt class="docutils literal"><span class="pre"><head></span></tt> block of your document. (It can also go in the
|
||||||
|
<tt class="docutils literal"><span class="pre"><body></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’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">
|
<ol class="arabic simple">
|
||||||
<li>Obtain a copy of MathJax and make it available on your server.</li>
|
<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>
|
<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
|
<li>Put mathematics into your web pages so that MathJax can display
|
||||||
it.</li>
|
it.</li>
|
||||||
</ol>
|
</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">
|
<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
|
<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
|
the <a class="reference external" href="http://www.mathjax.org/download/">MathJax download page</a> (you
|
||||||
should obtain a file names something like
|
should obtain a file named something like
|
||||||
<tt class="docutils literal"><span class="pre">mathjax-MathJax-v1.0-X-XXXXXXXX.zip</span></tt>, where the X’s are
|
<tt class="docutils literal"><span class="pre">mathjax-MathJax-v1.1-X-XXXXXXXX.zip</span></tt>, where the X’s are
|
||||||
random-looking letters and numbers). This archive includes both the
|
random-looking letters and numbers). This archive includes both the
|
||||||
MathJax code and the MathJax webfonts, so it is the only file you
|
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
|
need. Note that this is different from earlier releases, which had
|
||||||
separate from the rest of the code).</p>
|
the fonts separate from the rest of the code.</p>
|
||||||
<p>Unpack the archive and place the resulting MathJax folder onto your
|
<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 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
|
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>
|
from within any page on your server.</p>
|
||||||
<p>Note: While this is the easiest way to set up MathJax initially, there
|
<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
|
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>
|
MathJax up-to-date. That uses the <a class="reference external" href="http://git-scm.com/">Git</a> version
|
||||||
version control system, and is described in the <a class="reference internal" href="installation.html#getting-mathjax-git"><em>Installing
|
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
|
||||||
MathJax</em></a> document. If you prefer using
|
of MathJax (see <a class="reference internal" href="installation.html#getting-mathjax-svn"><em>Installing MathJax via SVN</em></a>).</p>
|
||||||
<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
|
<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
|
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
|
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">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
|
<tt class="docutils literal"><span class="pre">index.html</span></tt> file, after a few moments you should see a message
|
||||||
MathJax appears to be working. If not, check that the files have been
|
indicating that MathJax appears to be working. If not, check that the
|
||||||
transferred to the server completely and that the permissions allow
|
files have been transferred to the server completely and that the
|
||||||
the server to access the files and folders that are part of the
|
permissions allow the server to access the files and folders that are
|
||||||
MathJax directory. (Be sure to verify the MathJax folder’s permissions
|
part of the MathJax directory. (Be sure to verify the MathJax
|
||||||
as well.) Check the server log files for any errors that pertain to
|
folder’s permissions as well.) Check the server log files for any
|
||||||
the MathJax installation; this may help locate problems in the
|
errors that pertain to the MathJax installation; this may help locate
|
||||||
permission or locations of files.</p>
|
problems in the permission or locations of files.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="configuring-mathjax">
|
<div class="section" id="configuring-your-copy-of-mathjax">
|
||||||
<h2>Configuring MathJax<a class="headerlink" href="#configuring-mathjax" title="Permalink to this headline">¶</a></h2>
|
<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
|
<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
|
will load the file <tt class="docutils literal"><span class="pre">config/TeX-AMS-MML_HTMLorMML.js</span></tt> (i.e., the file
|
||||||
<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>
|
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
|
||||||
folder). This file contains the configuration parameters that
|
main <tt class="docutils literal"><span class="pre">MathJax</span></tt> folder). This file preloads all the most comply-used
|
||||||
control how MathJax operates. There are comments in it that
|
components of MathJax, allowing it to process mathematics that is in
|
||||||
explain each of the parameters, and you can edit the file to suit
|
the TeX or LaTeX format, or in MathML notation. It will produce
|
||||||
your needs.</p>
|
output in MathML form if the user’s browser supports that, and will use
|
||||||
<p>The default settings are appropriate for pages that use TeX as the
|
HTML-with-CSS to render the mathematics otherwise.</p>
|
||||||
input language, but you might still want to adjust some settings; for
|
<p>There are a number of other prebuilt configuration files that you can
|
||||||
example, you might want to include some additional extensions such as
|
choose from as well, or you could use the <tt class="docutils literal"><span class="pre">config/default.js</span></tt> file and
|
||||||
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
|
customize the settings yourself. The combined configuration files are
|
||||||
file should help you do this, but more detailed instructions 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
|
||||||
included in the <a class="reference internal" href="configuration.html#configuration"><em>Configuring MathJax</em></a> document.
|
<a class="reference internal" href="options/index.html#configuration"><em>Configuration Options</em></a>.</p>
|
||||||
There are also ways to configure MathJax other than by using the
|
<p>Note: The configuration process has changed in MathJax v1.1, so if you have
|
||||||
<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file; these are descibed on that page as well.</p>
|
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>
|
||||||
<div class="section" id="linking-mathjax-into-a-web-page">
|
<div class="section" id="linking-your-copy-of-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>
|
<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>
|
<p>You can include MathJax in your web page by putting</p>
|
||||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js"</span><span class="nt">></script></span>
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>in your document’s <tt class="docutils literal"><span class="pre"><head></span></tt> block. Here, <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> should
|
<p>in your document’s <tt class="docutils literal"><span class="pre"><head></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
|
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’s web
|
put the <tt class="docutils literal"><span class="pre">MathJax</span></tt> directory at the top level of you server’s web
|
||||||
site, you could use</p>
|
site, you could use</p>
|
||||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span>
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>to load MathJax in your page. For example, your page could look like</p>
|
<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"><html></span>
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span>
|
||||||
<span class="nt"><head></span>
|
<span class="nt"><head></span>
|
||||||
...
|
...
|
||||||
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span>
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></script></span>
|
||||||
<span class="nt"></head></span>
|
<span class="nt"></head></span>
|
||||||
<span class="nt"><body></span>
|
<span class="nt"><body></span>
|
||||||
...
|
...
|
||||||
|
@ -144,37 +183,36 @@ site, you could use</p>
|
||||||
<span class="nt"></html></span>
|
<span class="nt"></html></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Although it is possible to load MathJax from a site other than your
|
<p>If you have installed MathJax on a server that is in a different
|
||||||
own web server, there are issues involved in doing so that you need to
|
domain from the one serving the page that loads MathJax, be sure 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
|
read the <a class="reference internal" href="installation.html#cross-domain-linking"><em>Notes About Shared Servers</em></a> for
|
||||||
the copy of MathJax at <tt class="docutils literal"><span class="pre">www.mathjax.org</span></tt>, as we do not have the
|
more details. In that case, you may wish to consider using the
|
||||||
resources to act as a web service for all the sites on the web that
|
<a class="reference internal" href="#mathjax-cdn"><em>MathJax CDN</em></a> rather than installing your own copy
|
||||||
would like to display mathematics. If you are able to run MathJax
|
of MathJax.</p>
|
||||||
from your own server, please do so (this will probably give you better
|
</div>
|
||||||
response time in any case).</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="putting-mathematics-in-a-web-page">
|
<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>
|
<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
|
<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>
|
||||||
notation, or MathML notation (or both); the configuration file tells
|
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
|
||||||
MathJax which you want to use, and how you plan to indicate the
|
the same page; the MathJax configuration tells MathJax which you want
|
||||||
mathematics when you are using TeX notation. The following sections
|
to use, and how you plan to indicate the mathematics when you are
|
||||||
tell you how to use each of these formats.</p>
|
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">
|
<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>
|
<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>
|
<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
|
||||||
format, include <tt class="docutils literal"><span class="pre">"input/TeX"</span></tt> in your configuration’s <cite>jax</cite> array,
|
indicated using <em>math delimiters</em> that surround the mathematics,
|
||||||
and add <tt class="docutils literal"><span class="pre">"tex2jax.js"</span></tt> to the <cite>extensions</cite> array so that MathJax
|
telling MathJax what part of your page represents mathematics and what
|
||||||
will look for TeX-style math delimiters to identify the mathematics on
|
is normal text. There are two types of equations: ones that occur
|
||||||
the page.</p>
|
within a paragraph (in-line mathematics), and larger equations that
|
||||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2math.js"</span><span class="p">],</span>
|
appear separated from the rest of the text on lines by themselves
|
||||||
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</span><span class="p">]</span>
|
(displayed mathematics).</p>
|
||||||
</pre></div>
|
<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
|
||||||
</div>
|
displayed mathematics, and <tt class="docutils literal"><span class="pre">\(...\)</span></tt> for in-line mathematics. Note
|
||||||
<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>
|
in particular that the <tt class="docutils literal"><span class="pre">$...$</span></tt> in-line delimiters are <strong>not</strong> used
|
||||||
for displayed mathematics, and <tt class="docutils literal"><span class="pre">\(...\)</span></tt> for in-line mathematics.
|
by default. That is because dollar signs appear too often in
|
||||||
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
|
|
||||||
non-mathematical settings, which could cause some text to be treated
|
non-mathematical settings, which could cause some text to be treated
|
||||||
as mathematics unexpectedly. For example, with single-dollar
|
as mathematics unexpectedly. For example, with single-dollar
|
||||||
delimiters, ”... the cost is $2.50 for the first one, and $2.00 for
|
delimiters, ”... the cost is $2.50 for the first one, and $2.00 for
|
||||||
|
@ -182,72 +220,81 @@ each additional one ...” would cause the phrase “2.50 for the first
|
||||||
one, and” to be treated as mathematics since it falls between dollar
|
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
|
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>
|
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">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s1">'\\('</span><span class="p">,</span><span class="s1">'\\)'</span><span class="p">]]}</span>
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/x-mathjax-config"</span><span class="nt">></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">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s1">'\\('</span><span class="p">,</span><span class="s1">'\\)'</span><span class="p">]]}</span>
|
||||||
|
<span class="p">});</span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascipt"</span> <span class="na">src=</span><span class="s">"path-to-mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</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
|
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>
|
parameters that you can specify for the <cite>tex2jax</cite> preprocessor,
|
||||||
<p>Here is a complete sample page containing TeX mathematics (which
|
which is the component of MathJax that identifies TeX notation within
|
||||||
assumes that <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> is configured as described above):</p>
|
the page). See the <a class="reference internal" href="tex.html#tex-support"><em>TeX and LaTeX</em></a> page for
|
||||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span>
|
more on MathJax’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"><!DOCTYPE html></span>
|
||||||
|
<span class="nt"><html></span>
|
||||||
<span class="nt"><head></span>
|
<span class="nt"><head></span>
|
||||||
<span class="nt"><title></span>MathJax TeX Test Page<span class="nt"></title></span>
|
<span class="nt"><title></span>MathJax TeX Test Page<span class="nt"></title></span>
|
||||||
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span>
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/x-mathjax-config"</span><span class="nt">></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">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s1">'\\('</span><span class="p">,</span><span class="s1">'\\)'</span><span class="p">]]}});</span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span>
|
||||||
|
<span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
<span class="nt"></head></span>
|
<span class="nt"></head></span>
|
||||||
<span class="nt"><body></span>
|
<span class="nt"><body></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}.$$
|
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
|
||||||
<span class="nt"></body></span>
|
<span class="nt"></body></span>
|
||||||
<span class="nt"></html></span>
|
<span class="nt"></html></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>There are a number of extensions for the TeX input processor that you
|
<p>Since the TeX notation is part of the text of the page, there are some
|
||||||
might want to add to the <cite>extensions</cite> array. These include:</p>
|
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">
|
<ul class="simple">
|
||||||
<li><cite>TeX/AMSmath.js</cite>, which defines the AMS math environments and
|
<li><cite>TeX/AMSmath.js</cite>, which defines the AMS math environments and
|
||||||
macros,</li>
|
macros,</li>
|
||||||
<li><cite>TeX/AMSsymbols.js</cite>, which defines the macros for the symbols in
|
<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
|
<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>
|
an error message when there is a problem processing the TeX, and</li>
|
||||||
<li><cite>TeX/noUndefined.js</cite>, which prevents undefined macros from
|
<li><cite>TeX/noUndefined.js</cite>, which prevents undefined macros from
|
||||||
producing an error message, and instead shows the macro name in red.</li>
|
producing an error message, and instead shows the macro name in red.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>For example,</p>
|
<p>Other extensions may be loaded automatically when needed.</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">"tex2math.js"</span><span class="p">,</span><span class="s2">"TeX/noErrors.js"</span><span class="p">,</span><span class="s2">"TeX/noUndefined.js"</span><span class="p">,</span>
|
|
||||||
<span class="s2">"TeX/AMSmath.js"</span><span class="p">,</span><span class="s2">"TeX/AMSsymbols.js"</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>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="mathml-input">
|
<div class="section" id="mathml-input">
|
||||||
<h3>MathML input<a class="headerlink" href="#mathml-input" title="Permalink to this headline">¶</a></h3>
|
<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
|
<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
|
||||||
<tt class="docutils literal"><span class="pre">"input/MathML"</span></tt> in your configuration’s <cite>jax</cite> array, and add
|
mathematics using standard <tt class="docutils literal"><span class="pre"><math></span></tt> tags, where <tt class="docutils literal"><span class="pre"><math</span>
|
||||||
<tt class="docutils literal"><span class="pre">"mml2jax.js"</span></tt> to the <cite>extensions</cite> array so that MathJax will
|
<span class="pre">display="block"></span></tt> represents displayed mathematics and <tt class="docutils literal"><span class="pre"><math</span>
|
||||||
locate the <tt class="docutils literal"><span class="pre"><math></span></tt> elements in the page automatically.</p>
|
<span class="pre">display="inline"></span></tt> or just <tt class="docutils literal"><span class="pre"><math></span></tt> represents in-line mathematics.</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">"mml2jax.js"</span><span class="p">],</span>
|
|
||||||
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/MathML"</span><span class="p">,</span> <span class="s2">"output/HTML-CSS"</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"><math></span></tt> tags, where <tt class="docutils literal"><span class="pre"><math</span> <span class="pre">display="block"></span></tt> represents
|
|
||||||
displayed mathematics and <tt class="docutils literal"><span class="pre"><math</span> <span class="pre">display="inline"></span></tt> or just
|
|
||||||
<tt class="docutils literal"><span class="pre"><math></span></tt> represents in-line mathematics.</p>
|
|
||||||
<p>Note that this will work in HTML files, not just XHTML files (MathJax
|
<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
|
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
|
special MIME-type. Also note that, unless you are using XHTML rather
|
||||||
than HTML, you should not include a namespace prefix for your
|
than HTML, you should not include a namespace prefix for your
|
||||||
<tt class="docutils literal"><span class="pre"><math></span></tt> tags; for example, you should not use <tt class="docutils literal"><span class="pre"><m:math></span></tt> except
|
<tt class="docutils literal"><span class="pre"><math></span></tt> tags; for example, you should not use <tt class="docutils literal"><span class="pre"><m:math></span></tt> except
|
||||||
in a file where you have tied the <tt class="docutils literal"><span class="pre">m</span></tt> namespace to the MathML DTD.</p>
|
in a file where you have tied the <tt class="docutils literal"><span class="pre">m</span></tt> namespace to the MathML DTD.</p>
|
||||||
<p>Here is a complete sample page containing MathML mathematics (which
|
<p>Here is a complete sample page containing MathML mathematics (also
|
||||||
assumes that <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> is configured as described above):</p>
|
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="nt"><html></span>
|
<div class="highlight-html"><div class="highlight"><pre><span class="cp"><!DOCTYPE html></span>
|
||||||
|
<span class="nt"><html></span>
|
||||||
<span class="nt"><head></span>
|
<span class="nt"><head></span>
|
||||||
<span class="nt"><title></span>MathJax MathML Test Page<span class="nt"></title></span>
|
<span class="nt"><title></span>MathJax MathML Test Page<span class="nt"></title></span>
|
||||||
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></span>
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span>
|
||||||
|
<span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
<span class="nt"></head></span>
|
<span class="nt"></head></span>
|
||||||
<span class="nt"><body></span>
|
<span class="nt"><body></span>
|
||||||
|
|
||||||
|
@ -281,8 +328,22 @@ there are two solutions to <span class="nt"><math></span>
|
||||||
<span class="nt"></html></span>
|
<span class="nt"></html></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>The <tt class="docutils literal"><span class="pre">mml2jax</span></tt> has only a few configuration options; see the
|
<p>When entering MathML notation in an HTML page (rather than an XHTML
|
||||||
<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>
|
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"><mspace</span> <span class="na">width=</span><span class="s">"thinmathspace"</span><span class="nt">></mspace></span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>rather than <tt class="docutils literal"><span class="pre"><mspace</span> <span class="pre">width="5pt"</span> <span class="pre">/></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’s MathML support.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="where-to-go-from-here">
|
<div class="section" id="where-to-go-from-here">
|
||||||
|
@ -291,7 +352,7 @@ there are two solutions to <span class="nt"><math></span>
|
||||||
MathJax installed and configured on your web server, and you should be
|
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
|
able to use it to write web pages that include mathematics. At this
|
||||||
point, you can start making pages that contain mathematical content!</p>
|
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>
|
MathJax</em></a>.</p>
|
||||||
<p>If you are trying to use MathJax in blog or wiki software or in some
|
<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
|
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>
|
<h3><a href="index.html">Table Of Contents</a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a class="reference internal" href="#">Getting Started</a><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="#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="#configuring-your-copy-of-mathjax">Configuring your copy of 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="#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="#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="#tex-and-latex-input">TeX and LaTeX input</a></li>
|
||||||
<li><a class="reference internal" href="#mathml-input">MathML input</a></li>
|
<li><a class="reference internal" href="#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>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="installation.html"
|
<p class="topless"><a href="installation.html"
|
||||||
title="next chapter">Installing and Testing MathJax</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="Synchronizing your code with MathJax" href="synchronize.html" />
|
<link rel="next" title="Synchronizing your code with MathJax" href="synchronize.html" />
|
||||||
<link rel="prev" title="The MathJax Processing Model" href="model.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">
|
<ol class="arabic simple" start="2">
|
||||||
<li>Perform the configuration actions:<ul>
|
<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>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"><script></span></tt> that loaded MathJax,
|
<li>Load any configuration files specified via <tt class="docutils literal"><span class="pre">config=</span></tt> as a script parameter</li>
|
||||||
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"><script></span></tt>
|
<li>Execute the content of the <tt class="docutils literal"><span class="pre"><script></span></tt> that loaded MathJax, if it is not empty</li>
|
||||||
is 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>If the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.delayStartupUntil</span></tt> value is set,
|
<li>Execute any <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> script blocks</li>
|
||||||
wait until its condition is met</li>
|
|
||||||
<li>load the files listed in the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.config</span></tt> array</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>
|
<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Config</span></tt> startup signal</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -156,12 +155,16 @@ the name of the extension)</li>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
<ol class="arabic simple" start="7">
|
<ol class="arabic simple" start="7">
|
||||||
<li>Wait for the onload handler to fire</li>
|
<li>Set the MathJax menu’s renderer value based on the jax that have been
|
||||||
|
loaded</li>
|
||||||
</ol>
|
</ol>
|
||||||
<ol class="arabic simple" start="8">
|
<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>
|
||||||
<ol class="arabic simple" start="9">
|
<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>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">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>
|
<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’s ID</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</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>
|
<li>Post the <tt class="docutils literal"><span class="pre">End</span></tt> startup signal</li>
|
||||||
</ol>
|
</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>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -196,11 +208,6 @@ with the math element’s ID</li>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="synchronize.html"
|
<p class="topless"><a href="synchronize.html"
|
||||||
title="next chapter">Synchronizing your code with MathJax</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="Using Callbacks" href="callbacks.html" />
|
<link rel="next" title="Using Callbacks" href="callbacks.html" />
|
||||||
<link rel="prev" title="The MathJax Startup Sequence" href="startup.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
|
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>
|
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>
|
reference page for more details.</p>
|
||||||
<p><strong>Signals</strong> are another means of synchronizing your own code with
|
<p><strong>Signals</strong> are another means of synchronizing your own code with MathJax.
|
||||||
MathJax. Many of the important actions that MathJax takes (like
|
Many of the important actions that MathJax takes (like typesetting new math
|
||||||
typesetting new math on the page, or loading an external component)
|
on the page, or loading an external component) are “announced” by posting a
|
||||||
are “announced” by posting a message to a special object called a
|
message to a special object called a <cite>Signal</cite>. Your code can register an
|
||||||
<cite>Signal</cite>. Your code can register an interest in receiving one or more
|
interest in receiving one or more of these signals by providing a callback
|
||||||
of these signals by providing a callback to be called when the signal
|
to be called when the signal is posted. When the signal arrives, MathJax
|
||||||
is posted. When the signal arrives, MathJax will call your code.
|
will call your code. This works somewhat like an event handler, except
|
||||||
This works somewhat like an event handler, except that many different
|
that many different types of events can go through the same signal, and the
|
||||||
types of events can go through the same signal, and the signals have a
|
signals have a “memory”, meaning that if you register an interest in a
|
||||||
“memory”, meaning that if you register an interest in a particular
|
particular type of signal and that signal has already occurred, you will be
|
||||||
type of signal and that signal has already occurred, you will be told
|
told about the past occurrances as well as any future ones. See the
|
||||||
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
|
||||||
<a class="reference internal" href="api/signal.html#api-signal"><em>Signal Object</em></a> reference page for more details.
|
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>
|
||||||
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>
|
directory for a working example of using signals.</p>
|
||||||
<p>Each of these is explained in more detail in the links below:</p>
|
<p>Each of these is explained in more detail in the links below:</p>
|
||||||
<div class="toctree-wrapper compound">
|
<div class="toctree-wrapper compound">
|
||||||
|
@ -118,11 +117,6 @@ directory for a working example of using signals.</p>
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="callbacks.html"
|
<p class="topless"><a href="callbacks.html"
|
||||||
title="next chapter">Using Callbacks</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="MathJax MathML Support" href="mathml.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" />
|
<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">
|
<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>
|
<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
|
<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
|
||||||
<cite>tex2jax</cite> preprocessor, and the TeX input processor. The first of
|
parts: the <cite>tex2jax</cite> preprocessor, and the <cite>TeX</cite> input processor. The
|
||||||
these looks for mathematics within your web page (indicated by math
|
first of these looks for mathematics within your web page (indicated by
|
||||||
delimiters like <tt class="docutils literal"><span class="pre">$$...$$</span></tt>) and marks the mathematics for later
|
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
|
processing by MathJax. The TeX input processor is what converts the TeX
|
||||||
TeX notation into MathJax’s internal format, where one of MathJax’s
|
notation into MathJax’s internal format, where one of MathJax’s output
|
||||||
output processors then displays it in the web page.</p>
|
processors then displays it in the web page.</p>
|
||||||
<p>The <cite>tex2jax</cite> preprocessor can be configured to look for whatever
|
<p>The <cite>tex2jax</cite> preprocessor can be configured to look for whatever
|
||||||
markers you want to use for your math delimiters. See the
|
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
|
<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
|
<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
|
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>
|
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, ”... 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:</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">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s1">'\\('</span><span class="p">,</span><span class="s1">'\\)'</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">
|
<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>
|
<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
|
<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">
|
<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>
|
<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
|
<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
|
implemented in the core TeX input processor. Some less-used commands
|
||||||
are defined in extensions to the TeX processor. MathJax will load
|
are defined in extensions to the TeX processor. MathJax will load
|
||||||
some extensions automatically when you first use the commands they
|
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
|
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
|
this extension itself when you use those macros). Not all extensions
|
||||||
are set up to load automatically, however, so you may need to request
|
are set up to load automatically, however, so you may need to request
|
||||||
some extensions explicitly yourself.</p>
|
some extensions explicitly yourself.</p>
|
||||||
<p>To enable any of the TeX extensions, simply add the appropriate string
|
<p>To enable any of the TeX extensions, simply add the appropriate string
|
||||||
(e.g., <cite>“TeX/AMSmath.js”</cite>) to your config’s <cite>extensions</cite> array. The
|
(e.g., <tt class="docutils literal"><span class="pre">"AMSmath.js"</span></tt>) to the <cite>extensions</cite> array in the <tt class="docutils literal"><span class="pre">TeX</span></tt> block
|
||||||
main extensions are described below.</p>
|
of your configuration. If you use one of the combined configuration files,
|
||||||
<div class="section" id="amsmath-and-amssymbol">
|
like <tt class="docutils literal"><span class="pre">TeX-AMS_HTML</span></tt>, this will already include several of the extensions
|
||||||
<h3>AMSmath and AMSsymbol<a class="headerlink" href="#amsmath-and-amssymbol" title="Permalink to this headline">¶</a></h3>
|
automatically, but you can include others using a mathjax configuration
|
||||||
<p>The <cite>AMSmath</cite> extension implements AMS math environments and macros,
|
script prior to loading MathJax. For example</p>
|
||||||
and the <cite>AMSsymbol</cite> extension implements macros for accessing the AMS
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/x-mathjax-config"</span><span class="nt">></span>
|
||||||
symbol fonts. To use these extensions, add them to your <cite>extensions</cite> array.</p>
|
<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">"autobold.js"</span><span class="p">]</span> <span class="p">}});</span>
|
||||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"TeX/AMSmath.js"</span><span class="p">,</span> <span class="s2">"TeX/AMSsymbol.js"</span><span class="p">,</span> <span class="p">...]</span>
|
<span class="nt"></script></span>
|
||||||
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span>
|
||||||
|
<span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"</span><span class="nt">></span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>See the list of commands at the end of this document for details about
|
<p>will load the <cite>autobold</cite> TeX extension in addition to those already
|
||||||
what commands are implemented in these extensions.</p>
|
included in the <tt class="docutils literal"><span class="pre">TeX-AMS_HTML</span></tt> configuration file.</p>
|
||||||
<p>The <cite>AMSmath</cite> extension will be loaded automatically when you first
|
<p>The main extensions are described below.</p>
|
||||||
use one of the math environments it defines, but you will have to load
|
<div class="section" id="amsmath-and-amssymbol">
|
||||||
it explicitly if you want to use the other macros that it defines.
|
<h3>AMSmath and AMSsymbol<a class="headerlink" href="#amsmath-and-amssymbol" title="Permalink to this headline">¶</a></h3>
|
||||||
The <cite>AMSsymbols</cite> extension is not loaded automatically, so you must
|
<p>The <cite>AMSmath</cite> extension implements AMS math environments and macros, and
|
||||||
include it explicitly if you want to use the macros it defines.</p>
|
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">"AMSmath.js"</span><span class="p">,</span> <span class="s2">"AMSsymbol.js"</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>
|
||||||
<div class="section" id="autobold">
|
<div class="section" id="autobold">
|
||||||
<h3>Autobold<a class="headerlink" href="#autobold" title="Permalink to this headline">¶</a></h3>
|
<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
|
<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>
|
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">"TeX/autobold.js"</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">"autobold.js"</span><span class="p">]</span>
|
||||||
|
<span class="p">}</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
|
<p>This extension is <strong>not</strong> loaded by the combined configuration files.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="noerrors">
|
<div class="section" id="noerrors">
|
||||||
<h3>noErrors<a class="headerlink" href="#noerrors" title="Permalink to this headline">¶</a></h3>
|
<h3>noErrors<a class="headerlink" href="#noerrors" title="Permalink to this headline">¶</a></h3>
|
||||||
|
@ -166,9 +222,12 @@ 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 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
|
whether to put all the TeX on one line or use multiple lines (if the
|
||||||
original text contained line breaks).</p>
|
original text contained line breaks).</p>
|
||||||
<p>To enable the <cite>noErrors</cite> extension and configure it, use</p>
|
<p>This extension is loaded by all the combined configuration files that
|
||||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"TeX/noErrors.js"</span><span class="p">,</span> <span class="p">...],</span>
|
include the TeX input processor. To enable the <cite>noErrors</cite> extension in
|
||||||
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
|
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">"noErrors.js"</span><span class="p">],</span>
|
||||||
<span class="nx">noErrors</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">""</span><span class="p">,</span><span class="s2">""</span><span class="p">],</span> <span class="c1">// or ["$","$"] or ["\\(","\\)"]</span>
|
<span class="nx">inlineDelimiters</span><span class="o">:</span> <span class="p">[</span><span class="s2">""</span><span class="p">,</span><span class="s2">""</span><span class="p">],</span> <span class="c1">// or ["$","$"] or ["\\(","\\)"]</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">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>
|
||||||
|
@ -207,12 +266,15 @@ the paragraph, use</p>
|
||||||
<div class="section" id="noundefined">
|
<div class="section" id="noundefined">
|
||||||
<h3>noUndefined<a class="headerlink" href="#noundefined" title="Permalink to this headline">¶</a></h3>
|
<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
|
<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 “X” with a subscript consiting of the
|
<tt class="docutils literal"><span class="pre">$X_{\xxx}$</span></tt> would display as an “X” with a subscript consiting of the
|
||||||
text <tt class="docutils literal"><span class="pre">\xxx</span></tt> in red.</p>
|
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>
|
<p>This extension is loaded by all the combined configuration files that
|
||||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"TeX/noUndefined.js"</span><span class="p">,</span> <span class="p">...],</span>
|
include the TeX input processor. To enable the <cite>noUndefined</cite> extension
|
||||||
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
|
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">"noUndefined.js"</span><span class="p">],</span>
|
||||||
<span class="nx">noUndefined</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">attributes</span><span class="o">:</span> <span class="p">{</span>
|
||||||
<span class="nx">mathcolor</span><span class="o">:</span> <span class="s2">"red"</span><span class="p">,</span>
|
<span class="nx">mathcolor</span><span class="o">:</span> <span class="s2">"red"</span><span class="p">,</span>
|
||||||
|
@ -220,12 +282,12 @@ text <tt class="docutils literal"><span class="pre">\xxx</span></tt> in red.</p>
|
||||||
<span class="nx">mathsize</span><span class="o">:</span> <span class="s2">"90%"</span>
|
<span class="nx">mathsize</span><span class="o">:</span> <span class="s2">"90%"</span>
|
||||||
<span class="p">}</span>
|
<span class="p">}</span>
|
||||||
<span class="p">}</span>
|
<span class="p">}</span>
|
||||||
<span class="p">}</span>
|
<span class="p">}</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>The <tt class="docutils literal"><span class="pre">attributes</span></tt> setting specifies attributes to apply to the
|
<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
|
<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">"red"</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">"red"</span></tt>, but do not set any
|
||||||
other attributes. This example sets the background to a light pink,
|
other attributes. This example sets the background to a light pink,
|
||||||
and reduces the font size slightly.</p>
|
and reduces the font size slightly.</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -937,6 +999,7 @@ S
|
||||||
<span class="k">\subset</span>
|
<span class="k">\subset</span>
|
||||||
<span class="k">\subseteq</span>
|
<span class="k">\subseteq</span>
|
||||||
<span class="k">\subseteqq</span> AMSsymbols
|
<span class="k">\subseteqq</span> AMSsymbols
|
||||||
|
<span class="k">\subsetneq</span> AMSsymbols
|
||||||
<span class="k">\substack</span> AMSmath
|
<span class="k">\substack</span> AMSmath
|
||||||
<span class="k">\succ</span>
|
<span class="k">\succ</span>
|
||||||
<span class="k">\succapprox</span> AMSsymbols
|
<span class="k">\succapprox</span> AMSsymbols
|
||||||
|
@ -952,6 +1015,7 @@ S
|
||||||
<span class="k">\supset</span>
|
<span class="k">\supset</span>
|
||||||
<span class="k">\supseteq</span>
|
<span class="k">\supseteq</span>
|
||||||
<span class="k">\supseteqq</span> AMSsymbols
|
<span class="k">\supseteqq</span> AMSsymbols
|
||||||
|
<span class="k">\supsetneq</span> AMSsymbols
|
||||||
<span class="k">\surd</span>
|
<span class="k">\surd</span>
|
||||||
<span class="k">\swarrow</span>
|
<span class="k">\swarrow</span>
|
||||||
|
|
||||||
|
@ -1089,6 +1153,7 @@ Z
|
||||||
<h3><a href="index.html">Table Of Contents</a></h3>
|
<h3><a href="index.html">Table Of Contents</a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a class="reference internal" href="#">MathJax TeX and LaTeX Support</a><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-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="#tex-and-latex-extensions">TeX and LaTeX extensions</a><ul>
|
||||||
<li><a class="reference internal" href="#amsmath-and-amssymbol">AMSmath and AMSsymbol</a></li>
|
<li><a class="reference internal" href="#amsmath-and-amssymbol">AMSmath and AMSsymbol</a></li>
|
||||||
|
@ -1109,11 +1174,6 @@ Z
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="mathml.html"
|
<p class="topless"><a href="mathml.html"
|
||||||
title="next chapter">MathJax MathML Support</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<script type="text/javascript" src="_static/jquery.js"></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/underscore.js"></script>
|
||||||
<script type="text/javascript" src="_static/doctools.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="top" title="MathJax v1.1 documentation" href="index.html" />
|
||||||
<link rel="next" title="The MathJax API" href="api/index.html" />
|
<link rel="next" title="The MathJax API" href="api/index.html" />
|
||||||
<link rel="prev" title="Loading MathJax Dynamically" href="dynamic.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>
|
</div>
|
||||||
<p>to change the student’s answer to be the typeset version of whatever
|
<p>to change the student’s answer to be the typeset version of whatever
|
||||||
is in the <tt class="docutils literal"><span class="pre">studentAnswer</span></tt> variable.</p>
|
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"><html></span>
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><html></span>
|
||||||
<span class="nt"><head></span>
|
<span class="nt"><head></span>
|
||||||
<span class="nt"><title></span>MathJax Dynamic Math Test Page<span class="nt"></title></span>
|
<span class="nt"><title></span>MathJax Dynamic Math Test Page<span class="nt"></title></span>
|
||||||
|
|
||||||
<span class="nt"><script </span><span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></span>
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/x-mathjax-config"</span><span class="nt">></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">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">"tex2jax.js"</span><span class="p">],</span>
|
<span class="nx">tex2jax</span><span class="o">:</span> <span class="p">{</span>
|
||||||
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">],</span>
|
<span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[[</span><span class="s2">"$"</span><span class="p">,</span><span class="s2">"$"</span><span class="p">],[</span><span class="s2">"\\("</span><span class="p">,</span><span class="s2">"\\)"</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">"$"</span><span class="p">,</span><span class="s2">"$"</span><span class="p">],[</span><span class="s2">"\\("</span><span class="p">,</span><span class="s2">"\\)"</span><span class="p">]]}</span>
|
<span class="p">}</span>
|
||||||
<span class="p">});</span>
|
<span class="p">});</span>
|
||||||
<span class="nt"></script></span>
|
<span class="nt"></script></span>
|
||||||
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span>
|
||||||
|
<span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full"</span><span class="nt">></span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
|
|
||||||
<span class="nt"></head></span>
|
<span class="nt"></head></span>
|
||||||
<span class="nt"><body></span>
|
<span class="nt"><body></span>
|
||||||
|
@ -275,11 +279,6 @@ You typed: ${}$
|
||||||
<h4>Next topic</h4>
|
<h4>Next topic</h4>
|
||||||
<p class="topless"><a href="api/index.html"
|
<p class="topless"><a href="api/index.html"
|
||||||
title="next chapter">The MathJax API</a></p>
|
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">
|
<div id="searchbox" style="display: none">
|
||||||
<h3>Quick search</h3>
|
<h3>Quick search</h3>
|
||||||
<form class="search" action="search.html" method="get">
|
<form class="search" action="search.html" method="get">
|
||||||
|
|
306
docs/html/upgrade.html
Normal file
306
docs/html/upgrade.html
Normal 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 — 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="What’s 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="What’s New in MathJax v1.1"
|
||||||
|
accesskey="P">previous</a> |</li>
|
||||||
|
<li><a href="index.html">MathJax v1.1 documentation</a> »</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 “cloud” 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"><script></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"><script></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="text/x-mathjax-config"</span></tt> rather than <tt class="docutils literal"><span class="pre">type="text/javascript"</span></tt>.
|
||||||
|
For example,</p>
|
||||||
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></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">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">],</span>
|
||||||
|
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">]</span>
|
||||||
|
<span class="p">});</span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>would become</p>
|
||||||
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/x-mathjax-config"</span><span class="nt">></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">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">],</span>
|
||||||
|
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">]</span>
|
||||||
|
<span class="p">});</span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></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"><script></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"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></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"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js?config=default"</span><span class="nt">></script></span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>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.</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’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"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></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">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">],</span>
|
||||||
|
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">,</span><span class="s2">"AMSmath.js"</span><span class="p">,</span><span class="s2">"AMSsymbols.js"</span><span class="p">]</span>
|
||||||
|
<span class="p">});</span>
|
||||||
|
<span class="nt"></script></span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>could be replaced by the single line</p>
|
||||||
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js?config=TeX-AMS_HTML"</span><span class="nt">></script></span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>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
|
||||||
|
<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"><script </span><span class="na">type=</span><span class="s">"text/x-mathjax-config"</span><span class="nt">></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">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s1">'\\('</span><span class="p">,</span><span class="s1">'\\)'</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"></script></span>
|
||||||
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js?config=TeX-AMS_HTML"</span><span class="nt">></script></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"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span>
|
||||||
|
<span class="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></span>
|
||||||
|
<span class="nt"></scrip></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’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"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></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">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">],</span>
|
||||||
|
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">]</span>
|
||||||
|
<span class="p">});</span>
|
||||||
|
<span class="nt"></script></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"><script </span><span class="na">type=</span><span class="s">"text/x-mathjax-config"</span><span class="nt">></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">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">],</span>
|
||||||
|
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</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">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s1">'\\('</span><span class="p">,</span><span class="s1">'\\)'</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"></script></span>
|
||||||
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js"</span><span class="nt">></script></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"><script </span><span class="na">type=</span><span class="s">"text/x-mathjax-config"</span><span class="nt">></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">'$'</span><span class="p">,</span><span class="s1">'$'</span><span class="p">],</span> <span class="p">[</span><span class="s1">'\\('</span><span class="p">,</span><span class="s1">'\\)'</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"></script></span>
|
||||||
|
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"/MathJax/MathJax.js?config=TeX-AMS_HTML"</span><span class="nt">></script></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’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="What’s New in MathJax v1.1"
|
||||||
|
>previous</a> |</li>
|
||||||
|
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="footer">
|
||||||
|
© 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
264
docs/html/whats-new.html
Normal 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>What’s New in MathJax v1.1 — 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> »</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’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’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’t be downlaoded, you don’t
|
||||||
|
have to wait so long.</li>
|
||||||
|
<li>Rollover to image fonts if a web font fails to load (so you don’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’t have to be loaded on pages that don’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’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">&lt;</span></tt> and <tt class="docutils literal"><span class="pre">&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"><mo></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"><mspace></span></tt> and <tt class="docutils literal"><span class="pre"><mtext></span></tt> as space-like.</li>
|
||||||
|
<li>Improved support for <tt class="docutils literal"><span class="pre"><maction></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="tex2jax_ignore"</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’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’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> »</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="footer">
|
||||||
|
© Copyright 2011 Design Science.
|
||||||
|
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user