Merge remote branch 'dpvc/docs-update'
This commit is contained in:
commit
0e698717b5
|
@ -64,7 +64,7 @@ rather than just <tt class="docutils literal"><span class="pre">ul</span> <span
|
||||||
<p>The value used to define the CSS style can either be a string
|
<p>The value used to define the CSS style can either be a string
|
||||||
containing the CSS definition, or a javascript object that is itself a
|
containing the CSS definition, or a javascript object that is itself a
|
||||||
collection of <cite>name:value</cite> pairs, where the <cite>name</cite> is the attribute
|
collection of <cite>name:value</cite> pairs, where the <cite>name</cite> is the attribute
|
||||||
being defined and <cite>value</cite> is the value that attibute should be given.
|
being defined and <cite>value</cite> is the value that attribute should be given.
|
||||||
Note that, since this is a JavaScript object, the pairs are separated
|
Note that, since this is a JavaScript object, the pairs are separated
|
||||||
by commas (not semi-colons) and the values are enclosed in quotation
|
by commas (not semi-colons) and the values are enclosed in quotation
|
||||||
marks. If the name contains dashes, it should be enclosed in
|
marks. If the name contains dashes, it should be enclosed in
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<span id="html-snippets"></span><h1>Describing HTML snippets<a class="headerlink" href="#describing-html-snippets" title="Permalink to this headline">¶</a></h1>
|
<span id="html-snippets"></span><h1>Describing HTML snippets<a class="headerlink" href="#describing-html-snippets" title="Permalink to this headline">¶</a></h1>
|
||||||
<p>A number of MathJax configuration options allow you to specify an HTML
|
<p>A number of MathJax configuration options allow you to specify an HTML
|
||||||
snippet using a JavaScript object. This lets you include HTML in your
|
snippet using a JavaScript object. This lets you include HTML in your
|
||||||
configutation files even though they are not HTML files themselves.
|
configuration files even though they are not HTML files themselves.
|
||||||
The format is fairly simple, but flexible enough to let you represent
|
The format is fairly simple, but flexible enough to let you represent
|
||||||
complicated HTML trees.</p>
|
complicated HTML trees.</p>
|
||||||
<p>An HTML snippet is an array consisting of a series of elements that format
|
<p>An HTML snippet is an array consisting of a series of elements that format
|
||||||
|
|
|
@ -18,7 +18,7 @@ rather than just ``ul li``.
|
||||||
The value used to define the CSS style can either be a string
|
The value used to define the CSS style can either be a string
|
||||||
containing the CSS definition, or a javascript object that is itself a
|
containing the CSS definition, or a javascript object that is itself a
|
||||||
collection of `name:value` pairs, where the `name` is the attribute
|
collection of `name:value` pairs, where the `name` is the attribute
|
||||||
being defined and `value` is the value that attibute should be given.
|
being defined and `value` is the value that attribute should be given.
|
||||||
Note that, since this is a JavaScript object, the pairs are separated
|
Note that, since this is a JavaScript object, the pairs are separated
|
||||||
by commas (not semi-colons) and the values are enclosed in quotation
|
by commas (not semi-colons) and the values are enclosed in quotation
|
||||||
marks. If the name contains dashes, it should be enclosed in
|
marks. If the name contains dashes, it should be enclosed in
|
||||||
|
|
|
@ -6,7 +6,7 @@ Describing HTML snippets
|
||||||
|
|
||||||
A number of MathJax configuration options allow you to specify an HTML
|
A number of MathJax configuration options allow you to specify an HTML
|
||||||
snippet using a JavaScript object. This lets you include HTML in your
|
snippet using a JavaScript object. This lets you include HTML in your
|
||||||
configutation files even though they are not HTML files themselves.
|
configuration files even though they are not HTML files themselves.
|
||||||
The format is fairly simple, but flexible enough to let you represent
|
The format is fairly simple, but flexible enough to let you represent
|
||||||
complicated HTML trees.
|
complicated HTML trees.
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ Methods
|
||||||
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 of 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.
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ Methods
|
||||||
.. method:: loadHook(file,callback)
|
.. method:: loadHook(file,callback)
|
||||||
|
|
||||||
Registers a callback to be executed when the given file is
|
Registers a callback to be executed when the given file is
|
||||||
loaded. The file load operation need to be started when this
|
loaded. The file load operation needs to be started when this
|
||||||
method is called, so it can be used to register a hook for a file
|
method is called, so it can be used to register a hook for a file
|
||||||
that may be loaded in the future.
|
that may be loaded in the future.
|
||||||
|
|
||||||
|
@ -156,11 +156,11 @@ Methods
|
||||||
|
|
||||||
.. method:: Preloading(file1[,file2...])
|
.. method:: Preloading(file1[,file2...])
|
||||||
|
|
||||||
Used withing combined configuration files to indicate what files are
|
Used with combined configuration files to indicate what files are
|
||||||
in the configuration file. Marks the files are loading (since there
|
in the configuration file. Marks the files as loading (since there
|
||||||
will never be an explicit :meth:`Load()` or :meth:`Require()` call for
|
will never be an explicit :meth:`Load()` or :meth:`Require()` call for
|
||||||
then), so that load-hooks and other load-related events can be
|
them), so that load-hooks and other load-related events can be
|
||||||
properly processed.
|
properly processed when the :meth:`loadComplete()` occurs.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
- **file1, file2, ...** --- the names of the files in the combined file
|
- **file1, file2, ...** --- the names of the files in the combined file
|
||||||
|
|
|
@ -35,7 +35,7 @@ A callback specification is any one of the following:
|
||||||
.. describe:: fn
|
.. describe:: fn
|
||||||
|
|
||||||
A function that is to be called when the callback is executed.
|
A function that is to be called when the callback is executed.
|
||||||
No additional data is passed to it (other that what it is
|
No additional data is passed to it (other than what it is
|
||||||
called with at the time the callback is executed), and `this`
|
called with at the time the callback is executed), and `this`
|
||||||
will be the window object.
|
will be the window object.
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ of a file), or in response to a user action. For example:
|
||||||
function f(x) {alert("x contains "+x)};
|
function f(x) {alert("x contains "+x)};
|
||||||
function DelayedX(time) {
|
function DelayedX(time) {
|
||||||
var x = "hi";
|
var x = "hi";
|
||||||
setTimeout(MathJax.Callback([f, x], time);
|
setTimeout(MathJax.Callback([f, x], time));
|
||||||
}
|
}
|
||||||
|
|
||||||
The ``DelayedX`` function arranges for the function ``f`` to be called at
|
The ``DelayedX`` function arranges for the function ``f`` to be called at
|
||||||
|
@ -174,7 +174,7 @@ Callback Object Properties
|
||||||
.. describe:: called
|
.. describe:: called
|
||||||
|
|
||||||
Set to ``true`` after the callback has been called, and undefined
|
Set to ``true`` after the callback has been called, and undefined
|
||||||
otherwise. A callback will not be exectued a second time unless
|
otherwise. A callback will not be executed a second time unless
|
||||||
the callback's :meth:`reset()` method is called first, or its
|
the callback's :meth:`reset()` method is called first, or its
|
||||||
``autoReset`` property is set to ``true``.
|
``autoReset`` property is set to ``true``.
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ MathJax.Callback Methods
|
||||||
|
|
||||||
Calls each callback in the `hooks` array (or the single hook if it
|
Calls each callback in the `hooks` array (or the single hook if it
|
||||||
is not an array), passing it the arguments stored in the data
|
is not an array), passing it the arguments stored in the data
|
||||||
array. It `reset` is ``true``, then the callback's
|
array. If `reset` is ``true``, then the callback's
|
||||||
:meth:`reset()` method will be called before each hook is
|
:meth:`reset()` method will be called before each hook is
|
||||||
executed. If any of the hooks returns a `Callback` object, then
|
executed. If any of the hooks returns a `Callback` object, then
|
||||||
it collects those callbacks and returns a new callback that will
|
it collects those callbacks and returns a new callback that will
|
||||||
|
|
|
@ -34,7 +34,7 @@ Class Properties
|
||||||
|
|
||||||
.. describe:: directory
|
.. describe:: directory
|
||||||
|
|
||||||
The directory where the jax files are stored (e.g., ``"[MathJax]/jax/element/mml"``);
|
The directory where the jax files are stored (e.g., ``"[MathJax]/jax/element/mml"``).
|
||||||
|
|
||||||
|
|
||||||
Instance Properties
|
Instance Properties
|
||||||
|
@ -80,19 +80,19 @@ Methods
|
||||||
.. Method:: Text(text[,callback])
|
.. Method:: Text(text[,callback])
|
||||||
|
|
||||||
Sets the input text for this element to the given text and
|
Sets the input text for this element to the given text and
|
||||||
reprocesses the mathematics. (I.e., update the equation to the
|
reprocesses the mathematics. (I.e., updates the equation to the
|
||||||
new one given by `text`). When the processing is complete, the
|
new one given by `text`). When the processing is complete, the
|
||||||
`callback`, if any, is called.
|
`callback`, if any, is called.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
- **text** --- the new mathematic source string for the element
|
- **text** --- the new mathematics source string for the element
|
||||||
- **callback** --- the callback specification
|
- **callback** --- the callback specification
|
||||||
:Returns: the callback object
|
:Returns: the callback object
|
||||||
|
|
||||||
.. Method:: Reprocess([callback])
|
.. Method:: Reprocess([callback])
|
||||||
:noindex:
|
:noindex:
|
||||||
|
|
||||||
Remove the output and produce it again. This may be necessary if
|
Removes the output and produces it again. This may be necessary if
|
||||||
there are changes to the CSS styles that would affect the layout
|
there are changes to the CSS styles that would affect the layout
|
||||||
of the mathematics, for example. The `callback`, if any, is
|
of the mathematics, for example. The `callback`, if any, is
|
||||||
called when the process completes.
|
called when the process completes.
|
||||||
|
|
|
@ -5,7 +5,7 @@ The MathJax.HTML Object
|
||||||
***********************
|
***********************
|
||||||
|
|
||||||
The ``MathJax.HTML`` object provides routines for creating HTML
|
The ``MathJax.HTML`` object provides routines for creating HTML
|
||||||
elements and adding them to the page, and int particular, it contains
|
elements and adding them to the page, and in particular, it contains
|
||||||
the code that processes MathJax's :ref:`HTML snippets <html-snippets>`
|
the code that processes MathJax's :ref:`HTML snippets <html-snippets>`
|
||||||
and turns them into actual DOM objects. It also implements the
|
and turns them into actual DOM objects. It also implements the
|
||||||
methods used to manage the cookies used by MathJax.
|
methods used to manage the cookies used by MathJax.
|
||||||
|
@ -108,7 +108,7 @@ Methods
|
||||||
discussed below.
|
discussed below.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
- **name** --- the name that identifies the coookie
|
- **name** --- the name that identifies the cookie
|
||||||
- **data** --- object containing the data to store in the cookie
|
- **data** --- object containing the data to store in the cookie
|
||||||
:Returns: ``null``
|
:Returns: ``null``
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ loading is asynchronous, a number of the methods below may return
|
||||||
before their actions are completed. For this reason, they include
|
before their actions are completed. For this reason, they include
|
||||||
callback functions that are called when the action completes. These
|
callback functions that are called when the action completes. These
|
||||||
can be used to synchronize actions that require the mathematics to be
|
can be used to synchronize actions that require the mathematics to be
|
||||||
completed before those action occur. See the :ref:`Using Callbacks
|
completed before those actions occur. See the :ref:`Using Callbacks
|
||||||
<using-callbacks>` documentation for more details.
|
<using-callbacks>` documentation for more details.
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,9 +58,9 @@ Properties
|
||||||
|
|
||||||
These are boolean values that indicate whether the browser is
|
These are boolean values that indicate whether the browser is
|
||||||
running on a Macintosh computer or a Windows computer. They
|
running on a Macintosh computer or a Windows computer. They
|
||||||
will both be ``false`` for a Linux computer
|
will both be ``false`` for a Linux computer.
|
||||||
|
|
||||||
.. describe:: isForefox, isSafari, isChrome, isOpera, isMSIE, isKonqueror
|
.. describe:: isFirefox, isSafari, isChrome, isOpera, isMSIE, isKonqueror
|
||||||
|
|
||||||
These are ``true`` when the browser is the indicated one, and
|
These are ``true`` when the browser is the indicated one, and
|
||||||
``false`` otherwise.
|
``false`` otherwise.
|
||||||
|
@ -80,7 +80,7 @@ Properties
|
||||||
browsers and whose values are the functions to be performed.
|
browsers and whose values are the functions to be performed.
|
||||||
Each function is passed one parameter, which is the
|
Each function is passed one parameter, which is the
|
||||||
``MathJax.Hub.Browser`` object. You do not need to include
|
``MathJax.Hub.Browser`` object. You do not need to include
|
||||||
every browser as one of your choices (only those for which you
|
every browser as one of your choices --- only those for which you
|
||||||
need to do special processing. For example:
|
need to do special processing. For example:
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
@ -148,8 +148,8 @@ Methods
|
||||||
Registers a listener for a particular message being sent to the
|
Registers a listener for a particular message being sent to the
|
||||||
startup signal (where initialization and component startup
|
startup signal (where initialization and component startup
|
||||||
messages are sent). When the message equals the `type`, the
|
messages are sent). When the message equals the `type`, the
|
||||||
`callback will be called with the message as its parameter.
|
`callback` will be called with the message as its parameter.
|
||||||
See the :ref:`Using Signals <using-signals>` dcocumentation for
|
See the :ref:`Using Signals <using-signals>` documentation for
|
||||||
more details.
|
more details.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
|
@ -163,7 +163,7 @@ Methods
|
||||||
completely loaded and processed. (The callback is called when the
|
completely loaded and processed. (The callback is called when the
|
||||||
file makes its :meth:`MathJax.Ajax.loadComplete()` call.) The
|
file makes its :meth:`MathJax.Ajax.loadComplete()` call.) The
|
||||||
`file` should be the complete file name, e.g.,
|
`file` should be the complete file name, e.g.,
|
||||||
``"[MathJax]/config/MathJax.js"``.
|
``"[MathJax]/config/default.js"``.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
- **file** --- the name of the file to wait for
|
- **file** --- the name of the file to wait for
|
||||||
|
@ -304,8 +304,8 @@ Methods
|
||||||
|
|
||||||
Returns ``0`` if the element is not a ``<script>`` that can be
|
Returns ``0`` if the element is not a ``<script>`` that can be
|
||||||
processed by MathJax or the result of an output jax, returns ``-1``
|
processed by MathJax or the result of an output jax, returns ``-1``
|
||||||
if element is an unprocessed ``<script>`` tag that could be
|
if the element is an unprocessed ``<script>`` tag that could be
|
||||||
handled by MathJax, and returns ``1`` if element is a processed
|
handled by MathJax, and returns ``1`` if the element is a processed
|
||||||
``<script>`` tag or an element that is the result of an output jax.
|
``<script>`` tag or an element that is the result of an output jax.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
|
@ -316,7 +316,7 @@ Methods
|
||||||
|
|
||||||
Inserts data from the `src` object into the `dst` object. The
|
Inserts data from the `src` object into the `dst` object. The
|
||||||
`key:value` pairs in `src` are (recursively) copied into `dst`, so
|
`key:value` pairs in `src` are (recursively) copied into `dst`, so
|
||||||
that if `value` is itself an object, its contents is copied into
|
that if `value` is itself an object, its content is copied into
|
||||||
the corresponding object in `dst`. That is, objects within `src`
|
the corresponding object in `dst`. That is, objects within `src`
|
||||||
are merged into the corresponding objects in `dst` (they don't
|
are merged into the corresponding objects in `dst` (they don't
|
||||||
replace them).
|
replace them).
|
||||||
|
@ -333,7 +333,7 @@ Methods
|
||||||
The `script` is a reference to the ``<script>`` tag where the
|
The `script` is a reference to the ``<script>`` tag where the
|
||||||
error occurred, and `error` is the ``Error`` object for the error.
|
error occurred, and `error` is the ``Error`` object for the error.
|
||||||
The default action is to insert an HTML snippet at the location of
|
The default action is to insert an HTML snippet at the location of
|
||||||
the script, but this routine can be overriden durring MathJax
|
the script, but this routine can be overriden during MathJax
|
||||||
configuration in order to perform some other action.
|
configuration in order to perform some other action.
|
||||||
``MathJax.Hub.lastError`` holds the ``error`` value of the last
|
``MathJax.Hub.lastError`` holds the ``error`` value of the last
|
||||||
error on the page.
|
error on the page.
|
||||||
|
|
|
@ -7,12 +7,14 @@ The MathJax API
|
||||||
The following links document the various components that make up
|
The following links document the various components that make up
|
||||||
MathJax. These are implemented as JavaScript objects contained within
|
MathJax. These are implemented as JavaScript objects contained within
|
||||||
the single global variable, ``MathJax``. Although JavaScript includes
|
the single global variable, ``MathJax``. Although JavaScript includes
|
||||||
an objects with some inheritance capabilities, they do not constitute
|
an object system with some inheritance capabilities, they do not
|
||||||
a full object-oriented programming model, so MathJax implements
|
constitute a full object-oriented programming model, so MathJax
|
||||||
its own object library. This means there is an ambiguity when we
|
implements its own object library. This means there is an ambiguity
|
||||||
speak of an "object", as it could be either a native JavaScript
|
when we speak of an "object", as it could be either a native
|
||||||
object, or a MathJax object. We will use `Object` (capitalized) or
|
JavaScript object, or a MathJax object. When the distinction is
|
||||||
`MathJax.Object` for, when the distinction is important.
|
importat, we will use `Object` (capitalized) or `MathJax.Object` for
|
||||||
|
the latter; the javascript object will always be listed in lower
|
||||||
|
case.
|
||||||
|
|
||||||
You may also want to view the :ref:`advanced topics <advanced-topics>`
|
You may also want to view the :ref:`advanced topics <advanced-topics>`
|
||||||
on the main MathJax documentation page.
|
on the main MathJax documentation page.
|
||||||
|
|
|
@ -45,7 +45,7 @@ Properties
|
||||||
|
|
||||||
.. describe:: directory
|
.. describe:: directory
|
||||||
|
|
||||||
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
|
.. describe:: elementJax
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ Class Properties
|
||||||
|
|
||||||
.. describe:: directory
|
.. describe:: directory
|
||||||
|
|
||||||
The name of the jax directory (usually ``"[MathJax]/jax").
|
The name of the jax directory (usually ``"[MathJax]/jax"``).
|
||||||
Overridden in the subclass to be the specific directory for the
|
Overridden in the subclass to be the specific directory for the
|
||||||
class, e.g. ``"[MathJax]/jax/input"``.
|
class, e.g. ``"[MathJax]/jax/input"``.
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ Methods
|
||||||
This is the method that the ``MathJax.Hub`` calls when it needs the
|
This is the method that the ``MathJax.Hub`` calls when it needs the
|
||||||
input or output jax to process the given math ``<script>``. Its
|
input or output jax to process the given math ``<script>``. Its
|
||||||
default action is to start loading the jax's ``jax.js`` file, and
|
default action is to start loading the jax's ``jax.js`` file, and
|
||||||
redefine itself to simplu return the callback for the laod operation
|
redefine itself to simply return the callback for the load operation
|
||||||
(so that further calls to it will cause the processing to wait for the
|
(so that further calls to it will cause the processing to wait for the
|
||||||
callback). Once the ``jax.js`` file has loaded, this method is
|
callback). Once the ``jax.js`` file has loaded, this method is
|
||||||
replaced by the jax's :meth:`Translate()` method, so that subsequent calls
|
replaced by the jax's :meth:`Translate()` method, so that subsequent calls
|
||||||
|
@ -89,11 +89,11 @@ Methods
|
||||||
This is a stub for a routine that should be defined by the jax's
|
This is a stub for a routine that should be defined by the jax's
|
||||||
``jax.js`` file when it is loaded. It should perform the translation
|
``jax.js`` file when it is loaded. It should perform the translation
|
||||||
action for the specific jax. For an input jax, it should return the
|
action for the specific jax. For an input jax, it should return the
|
||||||
`ElementJax` object that it created. The :meth:`Translate()` mehtod is
|
`ElementJax` object that it created. The :meth:`Translate()` method is
|
||||||
never called directly by MathJax; during the :meth:`loadComplete()`
|
never called directly by MathJax; during the :meth:`loadComplete()`
|
||||||
call, this funciton is copied to the :meth:`Process()` method, and is
|
call, this function is copied to the :meth:`Process()` method, and is
|
||||||
called via that name. The default :meth:`Translate()` method throws an
|
called via that name. The default :meth:`Translate()` method throws an
|
||||||
error indicating that the :meth:`Translate()` meth was not been
|
error indicating that the :meth:`Translate()` method was not
|
||||||
redefined. That way, if the ``jax.js`` file fails to load for some
|
redefined. That way, if the ``jax.js`` file fails to load for some
|
||||||
reason, you will receive an error trying to process mathematics with
|
reason, you will receive an error trying to process mathematics with
|
||||||
this jax.
|
this jax.
|
||||||
|
@ -147,7 +147,7 @@ Methods
|
||||||
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
|
Note that the configuration process (the :meth:`Config()` call) can
|
||||||
|
|
|
@ -25,7 +25,7 @@ set via
|
||||||
});
|
});
|
||||||
|
|
||||||
Because of a bug in Internet Explorer, in order to change the side of
|
Because of a bug in Internet Explorer, in order to change the side of
|
||||||
the screen where the the message occurs, you must also set the side
|
the screen where the message occurs, you must also set the side
|
||||||
for ``#MathJax_MSIE_Frame``, as in
|
for ``#MathJax_MSIE_Frame``, as in
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
@ -44,7 +44,7 @@ displayed on screen, it gets an id number that is used when you want
|
||||||
to remove or change that message. That way, when a message is
|
to remove or change that message. That way, when a message is
|
||||||
removed, the previous message (if any) can be redisplayed if it hasn't
|
removed, the previous message (if any) can be redisplayed if it hasn't
|
||||||
been removed. This allows for intermittent messages (like file
|
been removed. This allows for intermittent messages (like file
|
||||||
loading messages) to obscure longer-term message (like "Processing
|
loading messages) to obscure longer-term messages (like "Processing
|
||||||
Math" messages) temporarily.
|
Math" messages) temporarily.
|
||||||
|
|
||||||
|
|
||||||
|
@ -92,14 +92,14 @@ Methods
|
||||||
directory).
|
directory).
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
- **file** --- the name of the file being loaded.
|
- **file** --- the name of the file being loaded
|
||||||
:Returns: the message id number for the message created.
|
:Returns: the message id number for the message created
|
||||||
|
|
||||||
.. method:: filterText(text,n)
|
.. method:: filterText(text,n)
|
||||||
|
|
||||||
This method is called on each message before it is displayed. It can
|
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
|
be used to modify (e.g., shorten) the various messages before they are
|
||||||
displayed. The default action is to check of the ``messageStyle``
|
displayed. The default action is to check if the ``messageStyle``
|
||||||
configuration parameter is ``simple``, and if so, convert loading and
|
configuration parameter is ``simple``, and if so, convert loading and
|
||||||
processing messages to a simpler form. This method can be overridden
|
processing messages to a simpler form. This method can be overridden
|
||||||
to perform other sanitization of the message strings.
|
to perform other sanitization of the message strings.
|
||||||
|
|
|
@ -6,7 +6,7 @@ The MathJax.Callback.Queue Class
|
||||||
|
|
||||||
The ``MathJax.Callback.Queue`` object is one of the key mechanisms
|
The ``MathJax.Callback.Queue`` object is one of the key mechanisms
|
||||||
used by MathJax to synchronize its actions with those that occur
|
used by MathJax to synchronize its actions with those that occur
|
||||||
asynchronously, like loading files and stylesheets. A `Queue` obejct
|
asynchronously, like loading files and stylesheets. A `Queue` object
|
||||||
is used to coordinate a sequence of actions so that they are performed
|
is used to coordinate a sequence of actions so that they are performed
|
||||||
one after another, even when one action has to wait for an
|
one after another, even when one action has to wait for an
|
||||||
asynchronous process to complete. This guarantees that operations are
|
asynchronous process to complete. This guarantees that operations are
|
||||||
|
@ -66,7 +66,7 @@ Methods
|
||||||
.. method:: Suspend()
|
.. method:: Suspend()
|
||||||
|
|
||||||
Increments the `running` property, indicating that any commands that
|
Increments the `running` property, indicating that any commands that
|
||||||
are added the queue should not be executed immediately, but should
|
are added to the queue should not be executed immediately, but should
|
||||||
be queued for later execution (when its :meth:`Resume()` is
|
be queued for later execution (when its :meth:`Resume()` is
|
||||||
called). This method is used internally; you should not need to
|
called). This method is used internally; you should not need to
|
||||||
call it yourself.
|
call it yourself.
|
||||||
|
@ -86,7 +86,7 @@ Methods
|
||||||
(passing it the original callback) is queued instead, and it
|
(passing it the original callback) is queued instead, and it
|
||||||
simply returns the callback it was passed. Since the queue will
|
simply returns the callback it was passed. Since the queue will
|
||||||
wait for a callback if it is the return value of one of the
|
wait for a callback if it is the return value of one of the
|
||||||
commands it executes, this effectively make the queue wait for the
|
commands it executes, this effectively makes the queue wait for the
|
||||||
original callback at that point in the command queue.
|
original callback at that point in the command queue.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
|
|
|
@ -7,9 +7,9 @@ The MathJax.Callback.Signal Class
|
||||||
The ``MathJax.Callback.Signal`` object is one of the key mechanisms
|
The ``MathJax.Callback.Signal`` object is one of the key mechanisms
|
||||||
used by MathJax to synchronize its actions with those that occur
|
used by MathJax to synchronize its actions with those that occur
|
||||||
asynchronously, like loading files and stylesheets. A `Signal` object
|
asynchronously, like loading files and stylesheets. A `Signal` object
|
||||||
is used to pulicise the fact that MathJax has performed certain
|
is used to publicize the fact that MathJax has performed certain
|
||||||
actions, giving other code running the the web page the chance to
|
actions, giving other code running the web page the chance to react to
|
||||||
react to those actions. See :ref:`Synchronizing with MathJax
|
those actions. See :ref:`Synchronizing with MathJax
|
||||||
<synchronization>` for more details, and :ref:`Using Signals
|
<synchronization>` for more details, and :ref:`Using Signals
|
||||||
<using-signals>` in particular for examples of how to specify and use
|
<using-signals>` in particular for examples of how to specify and use
|
||||||
MathJax `Signal` objects.
|
MathJax `Signal` objects.
|
||||||
|
@ -30,7 +30,7 @@ Properties
|
||||||
|
|
||||||
.. describe:: posted
|
.. describe:: posted
|
||||||
|
|
||||||
Array used internally to stored the post history so that when new
|
Array used internally to store the post history so that when new
|
||||||
listeners express interests in this signal, they can be informed
|
listeners express interests in this signal, they can be informed
|
||||||
of the signals that have been posted so far. This can be cleared
|
of the signals that have been posted so far. This can be cleared
|
||||||
using the signal's :meth:`Clear()` method.
|
using the signal's :meth:`Clear()` method.
|
||||||
|
@ -39,7 +39,7 @@ Properties
|
||||||
|
|
||||||
Array of callbacks to the listeners who have expressed interest in
|
Array of callbacks to the listeners who have expressed interest in
|
||||||
hearing about posts to this signal. When a post occurs, the
|
hearing about posts to this signal. When a post occurs, the
|
||||||
listeners are called in each turn, passing them the message that
|
listeners are called, each in turn, passing them the message that
|
||||||
was posted.
|
was posted.
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ Methods
|
||||||
Posts a message to all the listeners for the signal. The listener
|
Posts a message to all the listeners for the signal. The listener
|
||||||
callbacks are called in turn (with the message as an argument),
|
callbacks are called in turn (with the message as an argument),
|
||||||
and if any return a `Callback` object, the posting will be
|
and if any return a `Callback` object, the posting will be
|
||||||
suspended until the callback is exectured. In this way, the
|
suspended until the callback is executed. In this way, the
|
||||||
:meth:`Post()` call can operate asynchronously, and so the
|
:meth:`Post()` call can operate asynchronously, and so the
|
||||||
`callback` parameter is used to synchronize with its operation;
|
`callback` parameter is used to synchronize with its operation;
|
||||||
the `callback` will be called when all the listeners have responded
|
the `callback` will be called when all the listeners have responded
|
||||||
|
@ -133,7 +133,7 @@ Methods
|
||||||
function that must check the message each time it is called.
|
function that must check the message each time it is called.
|
||||||
Although the `message` here is a string, if a message posted to the
|
Although the `message` here is a string, if a message posted to the
|
||||||
signal is an array, then only the first element of that array is
|
signal is an array, then only the first element of that array is
|
||||||
used to match against message. That way, if a message contains an
|
used to match against the message. That way, if a message contains an
|
||||||
identifier plus arguments, the hook will match the identifier and
|
identifier plus arguments, the hook will match the identifier and
|
||||||
still get called with the complete set of arguments.
|
still get called with the complete set of arguments.
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ Main MathJax Components
|
||||||
|
|
||||||
.. describe:: MathJax.Message
|
.. describe:: MathJax.Message
|
||||||
|
|
||||||
Contains the code to handle the intermittant message window that
|
Contains the code to handle the intermittent message window that
|
||||||
periodically appears in the lower left-hand corner of the window.
|
periodically appears in the lower left-hand corner of the window.
|
||||||
|
|
||||||
.. describe:: MathJax.HTML
|
.. describe:: MathJax.HTML
|
||||||
|
@ -65,7 +65,7 @@ Main MathJax Components
|
||||||
.. describe:: MathJax.ElementJax
|
.. describe:: MathJax.ElementJax
|
||||||
|
|
||||||
The base class for all element `jax` objects. Subclasses for
|
The base class for all element `jax` objects. Subclasses for
|
||||||
specific element jax are creates as sub-objects of
|
specific element jax are created as sub-objects of
|
||||||
``MathJax.ElementJax``. For example, the mml element jax loads
|
``MathJax.ElementJax``. For example, the mml element jax loads
|
||||||
itself as ``MathJax.ElementJax.mml``.
|
itself as ``MathJax.ElementJax.mml``.
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,9 @@ callback specifications as arguments and return callback structures.
|
||||||
These routines always will return a callback even when none was
|
These routines always will return a callback even when none was
|
||||||
specified in the arguments, and in that case, the callback is a "do
|
specified in the arguments, and in that case, the callback is a "do
|
||||||
nothing" callback. The reason for this is so that the resulting
|
nothing" callback. The reason for this is so that the resulting
|
||||||
callback can be used can be used in a `MathJax.Callback.Queue` for
|
callback can be used in a `MathJax.Callback.Queue` for synchronization
|
||||||
synchronization purposes, so that the actions following it in the
|
purposes, so that the actions following it in the queue will not be
|
||||||
queue will not be performed until after the callback has been fired.
|
performed until after the callback has been fired.
|
||||||
|
|
||||||
For example, the :meth:`MathJax.Ajax.Require()` method can be used to
|
For example, the :meth:`MathJax.Ajax.Require()` method can be used to
|
||||||
load external files, and it returns a callback that is called when the
|
load external files, and it returns a callback that is called when the
|
||||||
|
@ -36,7 +36,7 @@ and wait for them all to be loaded before performing some action, you
|
||||||
can create a `Queue` into which you push the results of the
|
can create a `Queue` into which you push the results of the
|
||||||
:meth:`MathJax.Ajax.Require()` calls, and then push a callback for the
|
:meth:`MathJax.Ajax.Require()` calls, and then push a callback for the
|
||||||
action. The final action will not be performed until all the
|
action. The final action will not be performed until all the
|
||||||
file-load callbacks (which preceed it int he queue) have been called;
|
file-load callbacks (which precede it in the queue) have been called;
|
||||||
i.e., the action will not occur until all the files are loaded.
|
i.e., the action will not occur until all the files are loaded.
|
||||||
|
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ For example,
|
||||||
|
|
||||||
creates an object that contains three items, a `firstname`, and
|
creates an object that contains three items, a `firstname`, and
|
||||||
`lastname`, and a method that shows the person's full name in an
|
`lastname`, and a method that shows the person's full name in an
|
||||||
alert. So ``aPerson.fullName()`` would cause an alert with the text
|
alert. So ``aPerson.showName()`` would cause an alert with the text
|
||||||
``John Smith`` to appear. Note, however that this only works if the
|
``John Smith`` to appear. Note, however that this only works if the
|
||||||
method is called as ``aPerson.showName()``; if instead you did
|
method is called as ``aPerson.showName()``; if instead you did
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ well by including them in the array that specifies the callback:
|
||||||
|
|
||||||
MathJax.Ajax.Require("filename",["method",object,arg1,arg2,...]);
|
MathJax.Ajax.Require("filename",["method",object,arg1,arg2,...]);
|
||||||
|
|
||||||
This approach is useful when you are pushing a callback for one one
|
This approach is useful when you are pushing a callback for one of
|
||||||
MathJax's Hub routines into the MathJax processing queue. For example,
|
MathJax's Hub routines into the MathJax processing queue. For example,
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
@ -221,7 +221,7 @@ you. For example,
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
|
||||||
function myTimer (x) {alert("x = "+x)}
|
function f(x) {alert("x = "+x)}
|
||||||
setTimeout(MathJax.Callback([f,"Hello World!"]),500);
|
setTimeout(MathJax.Callback([f,"Hello World!"]),500);
|
||||||
|
|
||||||
would create a callback that calls ``f("Hello World!")``, and
|
would create a callback that calls ``f("Hello World!")``, and
|
||||||
|
|
|
@ -7,7 +7,7 @@ the wider community of MathJax users. The MathJax project maintains
|
||||||
forums where users can ask questions about how to use MathJax, make
|
forums where users can ask questions about how to use MathJax, make
|
||||||
suggestions about future features for MathJax, and present their own
|
suggestions about future features for MathJax, and present their own
|
||||||
solutions to problems that they have faced. There is also a
|
solutions to problems that they have faced. There is also a
|
||||||
bug-traking system where you can report errors that you have found
|
bug-tracking system where you can report errors that you have found
|
||||||
with MathJax in your environment.
|
with MathJax in your environment.
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ place to find the examples you are looking for.
|
||||||
If you want to discuss MathJax development, please use the `MathJax Dev Google
|
If you want to discuss MathJax development, please use the `MathJax Dev Google
|
||||||
Group <http://groups.google.com/group/mathjax-dev>`_. We made this group
|
Group <http://groups.google.com/group/mathjax-dev>`_. We made this group
|
||||||
to discuss anything beyond what an end-user might be interested in, so if you
|
to discuss anything beyond what an end-user might be interested in, so if you
|
||||||
having any suggestions or questions about MathJax performance, technology, or
|
have any suggestions or questions about MathJax performance, technology, or
|
||||||
design, feel free to submit it to the group.
|
design, feel free to submit it to the group.
|
||||||
|
|
||||||
The community is only as good as the users who participate, so if
|
The community is only as good as the users who participate, so if
|
||||||
|
@ -46,7 +46,7 @@ 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-git>` 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 latest version.
|
||||||
|
|
||||||
|
|
||||||
.. _badge:
|
.. _badge:
|
||||||
|
|
|
@ -160,8 +160,8 @@ The ``Accessible`` configuration file
|
||||||
================================================
|
================================================
|
||||||
|
|
||||||
This configuration file is essentially the same as
|
This configuration file is essentially the same as
|
||||||
``TeX-AMS-MML_HTMLorMML`` except that it includes configuration that is
|
``TeX-AMS-MML_HTMLorMML`` except that it includes options that are
|
||||||
designed for assitive technology, particularly for those with visual
|
designed for assistive technology, particularly for those with visual
|
||||||
challenges. It is equivalent to the following configuration:
|
challenges. It is equivalent to the following configuration:
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
@ -178,7 +178,7 @@ challenges. It is equivalent to the following configuration:
|
||||||
errorSettings: { message: ["[Math Error]"] }
|
errorSettings: { message: ["[Math Error]"] }
|
||||||
});
|
});
|
||||||
|
|
||||||
This turns off the MathJax contextual Message for Internet Explorer, since
|
This turns off the MathJax contextual menu for Internet Explorer, since
|
||||||
it can interfere with some screen readers. It also sets the zoom trigger
|
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
|
to double-click, so that readers can see a larger version of the
|
||||||
mathematics but double-clicking on any equation.
|
mathematics but double-clicking on any equation.
|
||||||
|
|
|
@ -40,9 +40,10 @@ one containing the page that will load MathJax, then there are issues
|
||||||
involved in doing so that you need to take into consideration. See the
|
involved in doing so that you need to take into consideration. See the
|
||||||
:ref:`Notes About Shared Servers <cross-domain-linking>` for more details.
|
:ref:`Notes About Shared Servers <cross-domain-linking>` for more details.
|
||||||
|
|
||||||
When you load MathJax, it is common to include additional parameters for
|
When you load MathJax, it is common to request a specific
|
||||||
MathJax as part of the URL. These control MathJax's configuration, and are
|
configuration file as discussed in the section on :ref:`Using a
|
||||||
discussed in the :ref:`Configuration Objects <configuration>` section. A
|
Configuration File <config-files>` below, and in more detail in the
|
||||||
|
:ref:`Common Configurations <common-configurations>` section. A
|
||||||
typical invocation of MathJax would be
|
typical invocation of MathJax would be
|
||||||
|
|
||||||
.. code-block:: html
|
.. code-block:: html
|
||||||
|
@ -57,7 +58,8 @@ notation, and produces output using MathML if the browser supports that,
|
||||||
or HTML-with-CSS otherwise. If you **don't** load an explicit
|
or HTML-with-CSS otherwise. If you **don't** load an explicit
|
||||||
configuration file, you will need to include an in-line configuration
|
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
|
block in order to tell MathJax how to read and display the mathematics on
|
||||||
your pages. See the section below for details.
|
your pages. See the section below on :ref:`Using In-line Configuration
|
||||||
|
Options <inline-config>` for details.
|
||||||
|
|
||||||
It is best to load MathJax in the document's ``<head>`` block, but it
|
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
|
||||||
|
@ -88,8 +90,8 @@ to a server geographically near you, for a fast, reliable connection.
|
||||||
|
|
||||||
The CDN hosts the most current version of MathJax, as well as older
|
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
|
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
|
MathJax is improved, or you can stay with one of the release versions so
|
||||||
that you pages always use the same version of MathJax.
|
that your pages always use the same version of MathJax.
|
||||||
|
|
||||||
The URL that you use to obtain MathJax determines the version that you
|
The URL that you use to obtain MathJax determines the version that you
|
||||||
get. The CDN has the following directory structure:
|
get. The CDN has the following directory structure:
|
||||||
|
@ -112,7 +114,7 @@ with patches that would correspond to releases that might be numbers 1.1a,
|
||||||
distribution (they likely won't be).
|
distribution (they likely won't be).
|
||||||
|
|
||||||
We may occasionally introduce directories for betas, as indicated above,
|
We may occasionally introduce directories for betas, as indicated above,
|
||||||
but they will be temprorary, and will be removed after the official
|
but they will be temporary, and will be removed after the official
|
||||||
release.
|
release.
|
||||||
|
|
||||||
To load from a particular release, use the directory for that release.
|
To load from a particular release, use the directory for that release.
|
||||||
|
@ -132,18 +134,24 @@ versions, while
|
||||||
will always be the most current stable release, so it will go from v1.1 to
|
will always be the most current stable release, so it will go from v1.1 to
|
||||||
v1.2 automatically when that is released. Note that all the versions
|
v1.2 automatically when that is released. Note that all the versions
|
||||||
available on the CDN are stable versions; the development version is not
|
available on the CDN are stable versions; the development version is not
|
||||||
hosted on the CDN.
|
hosted on the CDN. (If you wish to use the development version of
|
||||||
|
MathJax, you will need to install your own copy; see :ref:`Installing
|
||||||
|
and Testing MathJax <installation>` for information on how to do that.)
|
||||||
|
|
||||||
The use of ``cdn.mathjax.org`` is governed by its `terms of service
|
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
|
<http://www.mathjax.org/download/mathjax-cdn-terms-of-service/>`_, so be
|
||||||
sure to read that before linking to the MathJax CDN server.
|
sure to read that before linking to the MathJax CDN server.
|
||||||
|
|
||||||
|
If you wish to use the MathJax CDN but use your own configuration file
|
||||||
|
rather than one of the pre-defined ones, see the information at the end
|
||||||
|
of the :ref:`Using a configuration file <config-files>` section below.
|
||||||
|
|
||||||
|
|
||||||
Configuring MathJax
|
Configuring MathJax
|
||||||
===================
|
===================
|
||||||
|
|
||||||
There are two ways to configure MathJax: via a configuration file, or by
|
There are two ways to configure MathJax: via a configuration file, or by
|
||||||
including configuration commands wthin the web page itself. These can be
|
including configuration commands within the web page itself. These can be
|
||||||
used independently, or in combination. For example, you can load a main
|
used independently, or in combination. For example, you can load a main
|
||||||
pre-defined configuration file, but include in-line commands to
|
pre-defined configuration file, but include in-line commands to
|
||||||
adjust the configuration to your needs.
|
adjust the configuration to your needs.
|
||||||
|
@ -178,7 +186,7 @@ stored in the ``MathJax/config`` directory. Among these are the following
|
||||||
|
|
||||||
.. describe:: TeX-AMS_HTML.js
|
.. describe:: TeX-AMS_HTML.js
|
||||||
|
|
||||||
Allows math to be specified in TeX or LaTeX notation (with the
|
Allows math to be specified in TeX or LaTeX notation, with the
|
||||||
`AMSmath` and `AMSsymbols` packages included, and produces output
|
`AMSmath` and `AMSsymbols` packages included, and produces output
|
||||||
using the HTML-CSS output processor.
|
using the HTML-CSS output processor.
|
||||||
|
|
||||||
|
@ -208,7 +216,7 @@ component will require a separate file to be loaded, and that can cause
|
||||||
delays before the mathematics is displayed. The combined configuration
|
delays before the mathematics is displayed. The combined configuration
|
||||||
files load the majority of the needed files all as one large file, reducing
|
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
|
the number of network requests that are needed. That means you will
|
||||||
probably be getting the componets that MathJax needs faster than you would
|
probably be getting the components that MathJax needs faster than you would
|
||||||
without the combined file, but you may be loading components that are never
|
without the combined file, but you may be loading components that are never
|
||||||
actually used; that is the trade off.
|
actually used; that is the trade off.
|
||||||
|
|
||||||
|
@ -219,7 +227,7 @@ output processors. For example, with ``TeX-AMS_HTML.js`` and
|
||||||
``TeX-AMS_HTML-full.js``, the latter includes the complete HTML-CSS output
|
``TeX-AMS_HTML-full.js``, the latter includes the complete HTML-CSS output
|
||||||
processor. The "full" configuration files are substantially larger (on
|
processor. The "full" configuration files are substantially larger (on
|
||||||
the order of 70KB), so you need to decide whether it is worth loading the
|
the order of 70KB), so you need to decide whether it is worth loading the
|
||||||
full configuraiton for your pages.
|
full configuration for your pages.
|
||||||
|
|
||||||
If most of your pages include mathematics, then it is to your advantage to
|
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
|
load the full version, but if you are including MathJax in a theme file for
|
||||||
|
@ -261,9 +269,10 @@ can use
|
||||||
src="path-to-MathJax/MathJax.js?config=TeX-AMS_HTML,local/local">
|
src="path-to-MathJax/MathJax.js?config=TeX-AMS_HTML,local/local">
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
to first load the main configuraiton, then the local modifications. You
|
to first load the main configuration, then the local modifications.
|
||||||
can also load MathJax from the CDN and a local configuration from your own
|
|
||||||
server:
|
You can also load MathJax from the MathJax CDN server but use a configuration from
|
||||||
|
your own local server:
|
||||||
|
|
||||||
.. code-block:: html
|
.. code-block:: html
|
||||||
|
|
||||||
|
@ -271,6 +280,24 @@ server:
|
||||||
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML,http://myserver.com/MathJax/config/local/local.js">
|
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML,http://myserver.com/MathJax/config/local/local.js">
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Because the ``local.js`` file is not on the CDN server, you must give
|
||||||
|
the complete URL to the local configuration file. Note that you also
|
||||||
|
have to edit the :meth:`loadComplete()` call that is at the bottom of
|
||||||
|
the configuration file to change it from
|
||||||
|
``[MathJax]/config/local/local.js`` to the complete URL as you give it
|
||||||
|
in the ``config`` parameter:
|
||||||
|
|
||||||
|
.. code-block:: javascript
|
||||||
|
|
||||||
|
MathJax.Ajax.loadComplete("http://myserver.com/MathJax/config/local/local.js");
|
||||||
|
|
||||||
|
That is because the ``[MathJax]`` in the original URL refers to the
|
||||||
|
root directory where ``MathJax.js`` was loaded, which is on the CDN,
|
||||||
|
not your local server, and so you need to tell MathJax the actual
|
||||||
|
location of your configuration file.
|
||||||
|
|
||||||
|
|
||||||
|
.. _inline-config:
|
||||||
|
|
||||||
Using in-line configuration options
|
Using in-line configuration options
|
||||||
===================================
|
===================================
|
||||||
|
@ -315,7 +342,7 @@ For instance,
|
||||||
This example includes the `tex2jax` preprocessor and configures it to use
|
This example includes the `tex2jax` preprocessor and configures it to use
|
||||||
both the standard :term:`TeX` and :term:`LaTeX` math delimiters. It uses
|
both the standard :term:`TeX` and :term:`LaTeX` math delimiters. It uses
|
||||||
the `TeX` input processor and the `HTML-CSS` output processor, and forces the
|
the `TeX` input processor and the `HTML-CSS` output processor, and forces the
|
||||||
HTML-CSS processor to use the TeX fonts rather that other locally installed
|
HTML-CSS processor to use the TeX fonts rather than other locally installed
|
||||||
fonts (e.g., :term:`STIX` fonts). See the :ref:`configuration options
|
fonts (e.g., :term:`STIX` fonts). See the :ref:`configuration options
|
||||||
<configuration>` section (or the comments in the ``config/default.js``
|
<configuration>` section (or the comments in the ``config/default.js``
|
||||||
file) for more information about the configuration options that you can
|
file) for more information about the configuration options that you can
|
||||||
|
@ -323,9 +350,9 @@ include in the :meth:`MathJax.Hub.Config()` call. Note that this
|
||||||
configuration does **not** load any pre-defined configuration file.
|
configuration does **not** load any pre-defined configuration file.
|
||||||
|
|
||||||
Note that you can combine in-line configuration with file-based
|
Note that you can combine in-line configuration with file-based
|
||||||
configuration, simply include ``text/x-mathjax-config`` scripts as above,
|
configuration; simply include ``text/x-mathjax-config`` scripts as above,
|
||||||
but also include ``config=filename`` when you load the ``MathJax.js``
|
but also include ``config=filename`` when you load the ``MathJax.js``
|
||||||
file. For example, the `tex2jax` preprocessor does **not** the TeX
|
file. For example, the `tex2jax` preprocessor does **not** enable the TeX
|
||||||
single-dollar in-line math delimiters by default. You can load one of the
|
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
|
pre-defined configuration files that include the TeX preprocessor, and use
|
||||||
an in-line configuration block to enable the single-dollar signs:
|
an in-line configuration block to enable the single-dollar signs:
|
||||||
|
@ -376,11 +403,12 @@ 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
|
main files that MathJax needs, so there is not much loss in delaying the
|
||||||
startup.)
|
startup.)
|
||||||
|
|
||||||
You can set ``delayStartupUntil=configured`` in order to delay the startup
|
You can set ``delayStartupUntil=configured`` in order to delay the
|
||||||
configuration until the :meth:`MathJax.Hub.Configured()` method is
|
startup configuration until the :meth:`MathJax.Hub.Configured()`
|
||||||
called. This allows you to delay startup until later on the page, but
|
method is called. This allows you to delay startup until later on the
|
||||||
then restart MathJax configuration process as soon as possible rather than
|
page, but then restart the MathJax configuration process as soon as
|
||||||
waiting for the entire page to load. For example, you could use
|
possible rather than waiting for the entire page to load. For
|
||||||
|
example, you could use
|
||||||
|
|
||||||
.. code-block:: html
|
.. code-block:: html
|
||||||
|
|
||||||
|
@ -398,7 +426,7 @@ in your theme's header file, and
|
||||||
|
|
||||||
in its footer, so that MathJax will delay setting up until the footer is
|
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
|
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
|
loaded. If you have ``text/x-mathjax-config`` script tags within the main
|
||||||
body of the document, MathJax will read and process those before
|
body of the document, MathJax will read and process those before
|
||||||
continuing its startup. In this way you can use a default configuration
|
continuing its startup. In this way you can use a default configuration
|
||||||
that can be modified on a page-by-page basis.
|
that can be modified on a page-by-page basis.
|
||||||
|
|
|
@ -45,7 +45,7 @@ Here is an example of how to load and configure MathJax dynamically:
|
||||||
|
|
||||||
You can adjust the ``config`` variable to your needs, but be careful to get
|
You can adjust the ``config`` variable to your needs, but be careful to get
|
||||||
the commas right. The ``window.opera`` test is because some versions of
|
the commas right. The ``window.opera`` test is because some versions of
|
||||||
Opera doesn't handle setting ``script.text`` properly, while Internet
|
Opera don'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=filename`` method to
|
Here is a version that uses the ``config=filename`` method to
|
||||||
|
@ -97,9 +97,9 @@ server-based copy. The MathJax CDN works nicely for this.
|
||||||
----
|
----
|
||||||
|
|
||||||
Here is a script that runs MathJax in any document that contains
|
Here is a script that runs MathJax in any document that contains
|
||||||
MathML (whether its includes MathJax or not). That allows
|
MathML (whether it includes MathJax or not). That allows
|
||||||
browsers that don't have native MathML support to view any web pages
|
browsers that don't have native MathML support to view any web pages
|
||||||
with MathML, even if they say it only works in Forefox and
|
with MathML, even if they say it only works in Firefox and
|
||||||
IE+MathPlayer.
|
IE+MathPlayer.
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
|
|
@ -29,7 +29,7 @@ Glossary
|
||||||
particular message is sent along the signal channel.
|
particular message is sent along the signal channel.
|
||||||
|
|
||||||
HTML-CSS
|
HTML-CSS
|
||||||
MathJax output form that employs only on HTML and CSS 2.1,
|
MathJax output form that relys only on HTML and CSS 2.1,
|
||||||
allowing MathJax to remain compatible across all browsers.
|
allowing MathJax to remain compatible across all browsers.
|
||||||
|
|
||||||
jax
|
jax
|
||||||
|
|
|
@ -50,7 +50,7 @@ date or out of date). If MathJax needs updating, use
|
||||||
cd MathJax
|
cd MathJax
|
||||||
git pull origin
|
git pull origin
|
||||||
|
|
||||||
to udpate your copy of MathJax to the current release version. If you
|
to update 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.
|
||||||
|
|
||||||
|
@ -91,10 +91,10 @@ tag. Use
|
||||||
cd MathJax
|
cd MathJax
|
||||||
git branch
|
git branch
|
||||||
|
|
||||||
to get a list of the available branches. There be separate branches
|
to get a list of the available branches. There are separate branches
|
||||||
for the main releases, but with ``-latest`` appended. These contain
|
for the main releases, but with ``-latest`` appended. These contain
|
||||||
all the patches for that particular release. You can check out one of
|
all the patches for that particular release. You can check out one of
|
||||||
the branchs just as you would a tagged copy. For example, the branch
|
the branches just as you would a tagged copy. For example, the branch
|
||||||
for the ``v1.1`` tagged release is ``v1.1-latest``. To get this
|
for the ``v1.1`` tagged release is ``v1.1-latest``. To get this
|
||||||
release, use
|
release, use
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ use
|
||||||
cd MathJax
|
cd MathJax
|
||||||
svn update
|
svn update
|
||||||
|
|
||||||
to udpate your copy of MathJax to the current release version. If you
|
to update 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.
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ described below. You can use
|
||||||
|
|
||||||
to check out revision number `nnn`, but it is not easy to tell what
|
to check out revision number `nnn`, but it is not easy to tell what
|
||||||
svn revision number is associated with a particular release. GitHub's
|
svn revision number is associated with a particular release. GitHub's
|
||||||
``svn`` service doesn't appear to allow you to sepecify a particular
|
``svn`` service doesn't appear to allow you to specify a particular
|
||||||
tagged version.
|
tagged version.
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,13 +194,13 @@ right), you can also select the ``Download .tar.gz`` or ``Download
|
||||||
MathJax that contains all the latest changes and bug-fixes. You can
|
MathJax that contains all the latest changes and bug-fixes. You can
|
||||||
also get older tagged versions (if there are any).
|
also get older tagged versions (if there are any).
|
||||||
|
|
||||||
If a packaged release recevies any important updates, then those
|
If a packaged release receives any important updates, then those
|
||||||
updates will be part of the `branch` for that version. The link to
|
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
|
the ``.zip`` file in the download list will be the original release
|
||||||
version, not the patched version. To obtain the patched version, use
|
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
|
the `Branches` drop down menu (at the far left of the menus within the
|
||||||
page) to select the release branch that you want (for example
|
page) to select the release branch that you want (for example
|
||||||
``v1.1-latest``), and then use the downlaod button and the ``Downlaod
|
``v1.1-latest``), and then use the download button and the ``Download
|
||||||
.tar.gz`` or ``Download .zip`` button to get the latest patched
|
.tar.gz`` or ``Download .zip`` button to get the latest patched
|
||||||
version of that release.
|
version of that release.
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ a different site. For example, a departmental server at
|
||||||
``www.math.yourcollege.edu`` might like to use a college-wide
|
``www.math.yourcollege.edu`` might like to use a college-wide
|
||||||
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 important caveat ---
|
||||||
Firefox's and IE9'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 most
|
Firefox's interpretation of the same-origin policy is more strict than most
|
||||||
|
@ -259,7 +259,7 @@ mode`, so it exhibits this same behavior.
|
||||||
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/`` folder, create a file called
|
||||||
``.htaccess`` that contains the following lines:
|
``.htaccess`` that contains the following lines:
|
||||||
::
|
::
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ from your hard disk. Firefox's interpretation of the same-origin
|
||||||
policy for local files is that the "same domain" for a page is the
|
policy for local files is that the "same domain" for a page is the
|
||||||
directory where that page exists, or any of its subdirectories. So if
|
directory where that page exists, or any of its subdirectories. So if
|
||||||
you use MathJax in a page with a ``file://`` URL, and if MathJax is
|
you use MathJax in a page with a ``file://`` URL, and if MathJax is
|
||||||
loaded from a diretory other than the one containing the original
|
loaded from a directory other than the one containing the original
|
||||||
page, then MathJax will not be able to access the web-based fonts in
|
page, then MathJax will not be able to access the web-based fonts in
|
||||||
Firefox. In that case, MathJax will fall back on image fonts to
|
Firefox. In that case, MathJax will fall back on image fonts to
|
||||||
display the mathematics.
|
display the mathematics.
|
||||||
|
|
|
@ -22,10 +22,10 @@ image-based, and so it is available for search engines, meaning that
|
||||||
your equations can be searchable, just like the text of your pages.
|
your equations can be searchable, just like the text of your pages.
|
||||||
MathJax allows page authors to write formulas using TeX and LaTeX
|
MathJax allows page authors to write formulas using TeX and LaTeX
|
||||||
notation, or `MathML <http://www.w3.org/TR/MathML3>`_, a World Wide
|
notation, or `MathML <http://www.w3.org/TR/MathML3>`_, a World Wide
|
||||||
Web Constortium standard for representing mathematics in XML format.
|
Web Consortium standard for representing mathematics in XML format.
|
||||||
MathJax will even convert TeX notation into MathML, so that it can be
|
MathJax will even convert TeX notation into MathML, so that it can be
|
||||||
rendered more quickly by those browsers that support MathML natively,
|
rendered more quickly by those browsers that support MathML natively,
|
||||||
or so that you can copy and past it into other programs.
|
or so that you can copy and paste it into other programs.
|
||||||
|
|
||||||
MathJax is modular, so it loads components only when necessary, and
|
MathJax is modular, so it loads components only when necessary, and
|
||||||
can be extended to include new capabilities as needed. MathJax is
|
can be extended to include new capabilities as needed. MathJax is
|
||||||
|
|
|
@ -16,7 +16,7 @@ Because of MathJax's modular design, you do not need to use all three
|
||||||
of these components. For example, you could use the `tex2jax`
|
of these components. For example, you could use the `tex2jax`
|
||||||
preprocessor and the TeX input processor, but the NativeMML output
|
preprocessor and the TeX input processor, but the NativeMML output
|
||||||
processor, so that your mathematics is entered in TeX format, but
|
processor, so that your mathematics is entered in TeX format, but
|
||||||
displayed as MathML. Or you could use the `mml2jax` reprocessor and
|
displayed as MathML. Or you could use the `mml2jax` preprocessor and
|
||||||
MathML input processor with the HTML-CSS output processor to make
|
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
|
||||||
|
@ -42,7 +42,7 @@ even with a pure MathML workflow.
|
||||||
MathML in HTML pages
|
MathML in HTML pages
|
||||||
====================
|
====================
|
||||||
|
|
||||||
For MathML that is handled via the pre-processor, you should not use
|
For MathML that is handled via the preprocessor, you should not use
|
||||||
the named MathML entities, but rather use the numeric entities like
|
the named MathML entities, but rather use the numeric entities like
|
||||||
``√`` or unicode characters embedded in the page itself. The
|
``√`` or unicode characters embedded in the page itself. The
|
||||||
reason is that entities are replaced by the browser before MathJax
|
reason is that entities are replaced by the browser before MathJax
|
||||||
|
@ -87,7 +87,7 @@ The deficiencies include:
|
||||||
``msgroup``, ``msrow``, ``mscarries``, and ``mscarry``.
|
``msgroup``, ``msrow``, ``mscarries``, and ``mscarry``.
|
||||||
|
|
||||||
- Limited support for line breaking (they are only allowed in direct
|
- Limited support for line breaking (they are only allowed in direct
|
||||||
children of ``mrow`` or implied ``mrow`` elements.
|
children of ``mrow`` or implied ``mrow`` elements).
|
||||||
|
|
||||||
- No support for alignment groups in table.
|
- No support for alignment groups in table.
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ preprocessors for :ref:`TeX notation <TeX-support>`, :ref:`MathML
|
||||||
notation <MathML-support>`, and the :ref:`jsMath notation
|
notation <MathML-support>`, and the :ref:`jsMath notation
|
||||||
<jsMath-support>` that uses `span` and `div` tags.
|
<jsMath-support>` that uses `span` and `div` tags.
|
||||||
|
|
||||||
For pages that are constructed programatically, such as HTML
|
For pages that are constructed programmatically, such as HTML
|
||||||
pages that result from running a processor on text in some other
|
pages that result from running a processor on text in some other
|
||||||
format (e.g., pages produced from Markdown documents, or via programs
|
format (e.g., pages produced from Markdown documents, or via programs
|
||||||
like `tex4ht`), it would be best to use MathJax's special tags
|
like `tex4ht`), it would be best to use MathJax's special tags
|
||||||
|
@ -46,7 +46,7 @@ directly, as described below, rather than having MathJax run
|
||||||
another preprocessor. This will speed up the final display of the
|
another preprocessor. This will speed up the final display of the
|
||||||
mathematics, since the extra preprocessing step would not be needed,
|
mathematics, since the extra preprocessing step would not be needed,
|
||||||
and it also avoids the conflict between the use of the less-than sign,
|
and it also avoids the conflict between the use of the less-than sign,
|
||||||
``<``, in mathematics and asn an HTML special character (that starts
|
``<``, in mathematics and as an HTML special character (that starts
|
||||||
an HTML tag).
|
an HTML tag).
|
||||||
|
|
||||||
|
|
||||||
|
@ -192,21 +192,21 @@ by MathJax (called an `element jax`). This internal format is
|
||||||
essentially MathML (represented as JavaScript objects), so an input
|
essentially MathML (represented as JavaScript objects), so an input
|
||||||
jax acts as a translator into MathML.
|
jax acts as a translator into MathML.
|
||||||
|
|
||||||
**Output jax** convert that internal element jax format into a specific
|
**Output jax** convert that internal element jax format into a
|
||||||
output format. For example, the NativeMML output jax inserts MathML
|
specific output format. For example, the NativeMML output jax inserts
|
||||||
tags into the page to represent the mathematics, while the HTML-CSS
|
MathML tags into the page to represent the mathematics, while the
|
||||||
output jax uses HTML with CSS styling to lay out the mathematics so
|
HTML-CSS output jax uses HTML with CSS styling to lay out the
|
||||||
that it can be displayed even in browsers that dont understand
|
mathematics so that it can be displayed even in browsers that don't
|
||||||
MathML. Output jax could be produced that render the mathematics
|
understand MathML. Output jax could be produced that render the
|
||||||
using SVG, for example, or that speak an equation for the blind
|
mathematics using SVG, for example, or that speak an equation for
|
||||||
users. The MathJax contextual menu can be used to switch between the
|
blind users. The MathJax contextual menu can be used to switch
|
||||||
output jax that are available.
|
between the output jax that are available.
|
||||||
|
|
||||||
Each input and output jax has a small configuration file that is
|
Each input and output jax has a small configuration file that is
|
||||||
loaded when that input jax is included in the `jax` array in the
|
loaded when that input jax is included in the `jax` array in the
|
||||||
MathJax configuration, and a larger file that implements the core
|
MathJax configuration, and a larger file that implements the core
|
||||||
functionality of that particular jax. The latter file is loaded
|
functionality of that particular jax. The latter file is loaded
|
||||||
when the first time the jax is needed by MathJax to process some
|
the first time the jax is needed by MathJax to process some
|
||||||
mathematics.
|
mathematics.
|
||||||
|
|
||||||
The **MathJax Hub** keeps track of the internal representations of the
|
The **MathJax Hub** keeps track of the internal representations of the
|
||||||
|
|
|
@ -83,16 +83,16 @@ would set the ``fadeoutTime`` option to 2000 milliseconds (2 seconds).
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
refers to the ``closeBox``, ``fonts`` and ``webfonts`` snippets in
|
refers to the ``closeBox``, ``fonts`` and ``webfonts`` snippets
|
||||||
declared in the ``HTML`` section.
|
declared in the ``HTML`` section.
|
||||||
|
|
||||||
.. describe:: HTML: { ... }
|
.. describe:: HTML: { ... }
|
||||||
|
|
||||||
This object defines HTML snippets that are common to more than one
|
This object defines HTML snippets that are common to more than one
|
||||||
message in the ``Message`` section above. They can be called in
|
message in the ``Message`` section above. They can be included in
|
||||||
by using ``["name"]`` in an HTML snippet, where `name` refers to
|
other HTML snippets by by using ``["name"]`` in an HTML snippet,
|
||||||
the name of the snippet in the ``HTML`` block. The pre-defined
|
where `name` refers to the name of the snippet in the ``HTML``
|
||||||
snippets are:
|
block. The pre-defined snippets are:
|
||||||
|
|
||||||
.. describe:: closeBox
|
.. describe:: closeBox
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
|
||||||
|
|
||||||
.. describe:: minScaleAdjust: 50
|
.. describe:: minScaleAdjust: 50
|
||||||
|
|
||||||
This gives a minimum scale (as a percent) for the scaling used my
|
This gives a minimum scale (as a percent) for the scaling used by
|
||||||
MathJax to match the equation to the surrounding text. This will
|
MathJax to match the equation to the surrounding text. This will
|
||||||
prevent MathJax from making the mathematics too small.
|
prevent MathJax from making the mathematics too small.
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
|
||||||
This is the web-based font to use when none of the fonts listed
|
This is the web-based font to use when none of the fonts listed
|
||||||
above are available on the user's computer. Note that currently
|
above are available on the user's computer. Note that currently
|
||||||
only the `TeX` font is available in a web-based form (they are
|
only the `TeX` font is available in a web-based form (they are
|
||||||
stored in the ``fonts/HTML-CSS`` folder in the MathJax directory.
|
stored in the ``fonts/HTML-CSS`` folder in the MathJax directory).
|
||||||
Set this to ``null`` to disable web fonts.
|
Set this to ``null`` to disable web fonts.
|
||||||
|
|
||||||
.. describe:: imageFont: "TeX"
|
.. describe:: imageFont: "TeX"
|
||||||
|
@ -65,7 +65,7 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
|
||||||
This is the font to use for image fallback mode (when none of the
|
This is the font to use for image fallback mode (when none of the
|
||||||
fonts listed above are available and the browser doesn't support
|
fonts listed above are available and the browser doesn't support
|
||||||
web-fonts via the ``@font-face`` CSS directive). Note that currently
|
web-fonts via the ``@font-face`` CSS directive). Note that currently
|
||||||
only the TeX font is available as an image font (they are stores
|
only the TeX font is available as an image font (they are stored
|
||||||
in the ``fonts/HTML-CSS`` directory).
|
in the ``fonts/HTML-CSS`` directory).
|
||||||
|
|
||||||
Set this to ``null`` if you want to prevent the use of image fonts
|
Set this to ``null`` if you want to prevent the use of image fonts
|
||||||
|
|
|
@ -20,7 +20,7 @@ in your :meth:`MathJax.Hub.Config()` call. For example
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
would set the ``prefer`` option so that Opera browser would prefer
|
would set the ``prefer`` option so that the Opera browser would prefer
|
||||||
MathML to HTML-CSS output (while leaving the settings for other
|
MathML to HTML-CSS output (while leaving the settings for other
|
||||||
browsers unchanged).
|
browsers unchanged).
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ would set the ``delay`` option to 600 milliseconds.
|
||||||
.. describe:: showRenderer: true
|
.. describe:: showRenderer: true
|
||||||
|
|
||||||
This controls whether the "Math Renderer" item will be displayed in
|
This controls whether the "Math Renderer" item will be displayed in
|
||||||
the the "Settings" submenu of the mathematics contextual menu. It
|
the "Settings" submenu of the mathematics contextual menu. It
|
||||||
allows the user to change between the `HTML-CSS` and `NativeMML`
|
allows the user to change between the `HTML-CSS` and `NativeMML`
|
||||||
output processors for the mathematics on the page. Set to
|
output processors for the mathematics on the page. Set to
|
||||||
``false`` to prevent this menu item from showing.
|
``false`` to prevent this menu item from showing.
|
||||||
|
@ -43,9 +43,9 @@ would set the ``delay`` option to 600 milliseconds.
|
||||||
.. describe:: showContext: false
|
.. describe:: showContext: false
|
||||||
|
|
||||||
This controls whether the "Contextual Menu" item will be displayed
|
This controls whether the "Contextual Menu" item will be displayed
|
||||||
in the the "Settings" submenu of the mathematics contextual menu.
|
in the "Settings" submenu of the mathematics contextual menu.
|
||||||
It allows the user to decide whether the MathJax menu or the
|
It allows the user to decide whether the MathJax menu or the
|
||||||
browser's default contextual manu will be shown when the context
|
browser's default contextual menu will be shown when the context
|
||||||
menu click occurs over mathematics typeset by MathJax. (The main
|
menu click occurs over mathematics typeset by MathJax. (The main
|
||||||
reason to allow pass-through to the browser's menu is to gain
|
reason to allow pass-through to the browser's menu is to gain
|
||||||
access to the MathPlayer contextual menu when the NativeMML output
|
access to the MathPlayer contextual menu when the NativeMML output
|
||||||
|
@ -56,7 +56,7 @@ would set the ``delay`` option to 600 milliseconds.
|
||||||
.. describe:: showFontMenu: false
|
.. describe:: showFontMenu: false
|
||||||
|
|
||||||
This controls whether the "Font Preference" item will be displayed
|
This controls whether the "Font Preference" item will be displayed
|
||||||
in the the "Settings" submenu of the mathematics contextual menu.
|
in the "Settings" submenu of the mathematics contextual menu.
|
||||||
This submenu lets the user select what font to use in the
|
This submenu lets the user select what font to use in the
|
||||||
mathematics produced by the `HTML-CSS` output processor. Note that
|
mathematics produced by the `HTML-CSS` output processor. Note that
|
||||||
changing the selection in the font menu will cause the page to
|
changing the selection in the font menu will cause the page to
|
||||||
|
|
|
@ -18,13 +18,13 @@ in your :meth:`MathJax.Hub.Config()` call. For example
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
would set the ``sale`` option to 105 percent.
|
would set the ``scale`` option to 105 percent.
|
||||||
|
|
||||||
.. describe:: scale: 100
|
.. describe:: scale: 100
|
||||||
|
|
||||||
The scaling factor (as a percentage) of math with respect to the
|
The scaling factor (as a percentage) of math with respect to the
|
||||||
surrounding text. Since the `NativeMML` output relies on the
|
surrounding text. Since the `NativeMML` output relies on the
|
||||||
browser's natiove MathML support, MathJax does not control the
|
browser's native MathML support, MathJax does not control the
|
||||||
font size used in the mathematics. You may need to set this value
|
font size used in the mathematics. You may need to set this value
|
||||||
to compensate for the size selected by the browser. The user can
|
to compensate for the size selected by the browser. The user can
|
||||||
also adjust this value using the contextual menu item associated
|
also adjust this value using the contextual menu item associated
|
||||||
|
@ -49,7 +49,7 @@ would set the ``sale`` option to 105 percent.
|
||||||
|
|
||||||
There is a separate menu setting for MSIE since the code to handle
|
There is a separate menu setting for MSIE since the code to handle
|
||||||
that is a bit delicate; if it turns out to have unexpected
|
that is a bit delicate; if it turns out to have unexpected
|
||||||
consequences, you can turn it off without turing off other the
|
consequences, you can turn it off without turning off the
|
||||||
menu support in other browsers.
|
menu support in other browsers.
|
||||||
|
|
||||||
.. describe:: styles: {}
|
.. describe:: styles: {}
|
||||||
|
|
|
@ -64,12 +64,12 @@ 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 sets it in the bold-face font.
|
||||||
|
|
||||||
.. describe:: MAXMACROS: 10000
|
.. describe:: MAXMACROS: 10000
|
||||||
|
|
||||||
Because a definition of the form ``\def\x{\x} \x`` would cause MathJax
|
Because a definition of the form ``\def\x{\x} \x`` would cause MathJax
|
||||||
to loop infinitely, the `MAXMACROS` constant will limit the nuber of
|
to loop infinitely, the `MAXMACROS` constant will limit the number of
|
||||||
macro substitutions allowed in any expression processed by MathJax.
|
macro substitutions allowed in any expression processed by MathJax.
|
||||||
|
|
||||||
.. describe:: MAXBUFFER: 5*1024
|
.. describe:: MAXBUFFER: 5*1024
|
||||||
|
|
|
@ -52,11 +52,11 @@ behavior of MathJax. They are given with their default values.
|
||||||
are not using one of the preprocessors, you need to insert
|
are not using one of the preprocessors, you need to insert
|
||||||
something extra into your HTML file in order to avoid a bug in
|
something extra into your HTML file in order to avoid a bug in
|
||||||
Internet Explorer. IE removes spaces from the DOM that it thinks
|
Internet Explorer. IE removes spaces from the DOM that it thinks
|
||||||
are redundent, and since a ``<script>`` tag usually doesn't add
|
are redundant, and since a ``<script>`` tag usually doesn't add
|
||||||
content to the page, if there is a space before and after a
|
content to the page, if there is a space before and after a
|
||||||
MathJax ``<script>`` tag, IE will remove the first space. When
|
MathJax ``<script>`` tag, IE will remove the first space. When
|
||||||
MathJax inserts the typeset mathematics, this means there will be
|
MathJax inserts the typeset mathematics, this means there will be
|
||||||
no space before it and the preceeding text. In order to avoid
|
no space before it and the preceding text. In order to avoid
|
||||||
this, you should include some "guard characters" before or after
|
this, you should include some "guard characters" before or after
|
||||||
the math SCRIPT tag; define the patterns you want to use below.
|
the math SCRIPT tag; define the patterns you want to use below.
|
||||||
Note that these are used as regular expressions, so you will need
|
Note that these are used as regular expressions, so you will need
|
||||||
|
@ -81,14 +81,14 @@ behavior of MathJax. They are given with their default values.
|
||||||
|
|
||||||
.. describe:: preRemoveClass: "MathJax_Preview"
|
.. describe:: preRemoveClass: "MathJax_Preview"
|
||||||
|
|
||||||
The CSS class for a math preview to be removed preceeding a
|
This is the CSS class name for math previews that will be removed
|
||||||
MathJax SCRIPT tag. If the tag just before the MathJax
|
preceding a MathJax SCRIPT tag. If the tag just before the
|
||||||
``<script>`` tag is of this class, its contents are removed when
|
MathJax ``<script>`` tag is of this class, its contents are
|
||||||
MathJax processes the ``<script>`` tag. This allows you to
|
removed when MathJax processes the ``<script>`` tag. This allows
|
||||||
include a math preview in a form that will be displayed prior to
|
you to include a math preview in a form that will be displayed
|
||||||
MathJax performing its typesetting. It also avoids the Internet
|
prior to MathJax performing its typesetting. It also avoids the
|
||||||
Explorer space-removal bug, and can be used in place of ``preJax``
|
Internet Explorer space-removal bug, and can be used in place of
|
||||||
and ``postJax`` if that is more convenient.
|
``preJax`` and ``postJax`` if that is more convenient.
|
||||||
|
|
||||||
For example
|
For example
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ behavior of MathJax. They are given with their default values.
|
||||||
|
|
||||||
.. describe:: showProcessingMessages: true
|
.. describe:: showProcessingMessages: true
|
||||||
|
|
||||||
This value controls whether the `Processing Math: nn%` message are
|
This value controls whether the `Processing Math: nn%` messages are
|
||||||
displayed in the lower left-hand corner. Set to ``false`` to
|
displayed in the lower left-hand corner. Set to ``false`` to
|
||||||
prevent those messages (though file loading and other messages
|
prevent those messages (though file loading and other messages
|
||||||
will still be shown).
|
will still be shown).
|
||||||
|
@ -128,10 +128,10 @@ behavior of MathJax. They are given with their default values.
|
||||||
|
|
||||||
.. describe:: delayStartupUntil: "none"
|
.. describe:: delayStartupUntil: "none"
|
||||||
|
|
||||||
Normally MathJax will perform its starup commands (loading of
|
Normally MathJax will perform its startup commands (loading of
|
||||||
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 handler is
|
||||||
called. If so, set this to ``"onload"``. You can also set this to
|
called. If so, set this to ``"onload"``. You can also set this to
|
||||||
``"configured"``, in which case, MathJax will delay its startup until
|
``"configured"``, in which case, MathJax will delay its startup until
|
||||||
you explicitly call :meth:`MathJax.Hub.Configured()`. See
|
you explicitly call :meth:`MathJax.Hub.Configured()`. See
|
||||||
|
@ -195,7 +195,7 @@ behavior of MathJax. They are given with their default values.
|
||||||
than simply crash, MathJax can report an error and go on. The
|
than simply crash, MathJax can report an error and go on. The
|
||||||
options you can set include:
|
options you can set include:
|
||||||
|
|
||||||
.. describe:: message: ["[Math Processing Error"]]
|
.. describe:: message: ["[Math Processing Error]"]
|
||||||
|
|
||||||
This is an HTML snippet that will be inserted at the location
|
This is an HTML snippet that will be inserted at the location
|
||||||
of the mathematics for any formula that causes MathJax to
|
of the mathematics for any formula that causes MathJax to
|
||||||
|
|
|
@ -42,7 +42,7 @@ For example,
|
||||||
});
|
});
|
||||||
|
|
||||||
is a configuration that includes two settings for the MathJax Hub (one
|
is a configuration that includes two settings for the MathJax Hub (one
|
||||||
for `showProcessingMessages` and one of the `jax` array), and a
|
for `showProcessingMessages` and one for the `jax` array), and a
|
||||||
configuration object for the TeX input processor. The latter includes
|
configuration object for the TeX input processor. The latter includes
|
||||||
a setting for the TeX input processor's `TagSide` option (to set tags
|
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
|
on the left rather than the right) and a setting for `Macros`, which
|
||||||
|
@ -50,7 +50,7 @@ defines new TeX macros (in this case, two macros, one called ``\RR``
|
||||||
that produces a bold "R", and one called ``\bold`` that puts is
|
that produces a bold "R", and one called ``\bold`` that puts is
|
||||||
argument in bold face).
|
argument in bold face).
|
||||||
|
|
||||||
The ``config/MathJax.js`` file is another example that shows nearly
|
The ``config/default.js`` file is another example that shows nearly
|
||||||
all the configuration options for all of MathJax's components.
|
all the configuration options for all of MathJax's components.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ preprocessor.
|
||||||
.. describe:: inlineMath: [['\\\(','\\\)']]
|
.. describe:: inlineMath: [['\\\(','\\\)']]
|
||||||
|
|
||||||
Array of pairs of strings that are to be used as in-line math
|
Array of pairs of strings that are to be used as in-line math
|
||||||
delimters. The first in each pair is the initial delimiter and
|
delimiters. The first in each pair is the initial delimiter and
|
||||||
the second is the terminal delimiter. You can have as many pairs
|
the second is the terminal delimiter. You can have as many pairs
|
||||||
as you want. For example,
|
as you want. For example,
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ preprocessor.
|
||||||
|
|
||||||
.. describe:: displayMath: [ ['$$','$$'], ['\\\[','\\\]'] ]
|
.. describe:: displayMath: [ ['$$','$$'], ['\\\[','\\\]'] ]
|
||||||
|
|
||||||
Array of pairs of strings that are to be used as delimters for
|
Array of pairs of strings that are to be used as delimiters for
|
||||||
displayed equations. The first in each pair is the initial
|
displayed equations. The first in each pair is the initial
|
||||||
delimiter and the second is the terminal delimiter. You can have
|
delimiter and the second is the terminal delimiter. You can have
|
||||||
as many pairs as you want.
|
as many pairs as you want.
|
||||||
|
@ -74,7 +74,7 @@ preprocessor.
|
||||||
.. describe:: processEnvironments: true
|
.. describe:: processEnvironments: true
|
||||||
|
|
||||||
When ``true``, `tex2jax` looks not only for the in-line and
|
When ``true``, `tex2jax` looks not only for the in-line and
|
||||||
display math delimters, but also for LaTeX environments
|
display math delimiters, but also for LaTeX environments
|
||||||
(``\begin{something}...\end{something}``) and marks them for
|
(``\begin{something}...\end{something}``) and marks them for
|
||||||
processing by MathJax. When ``false``, LaTeX environments will
|
processing by MathJax. When ``false``, LaTeX environments will
|
||||||
not be processed outside of math mode.
|
not be processed outside of math mode.
|
||||||
|
|
|
@ -32,8 +32,8 @@ in your document.
|
||||||
|
|
||||||
The HTML-CSS output processor produces high-quality output in all
|
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. Its major
|
||||||
advantage is its quality and consistency; it's drawback is that it is
|
advantage is its quality and consistency; its drawback is that it is
|
||||||
slower than 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
|
||||||
|
@ -77,7 +77,7 @@ are the configuration files that end in ``_HTMLorMML``.
|
||||||
If you are doing your own configuration, there is a special configuration
|
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
|
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
|
depending on the browser in use. To invoke it, add ``"MMLorHTML.js"`` to
|
||||||
your configurations `config` array, and **do not** include an output
|
your configuration's `config` array, and **do not** include an output
|
||||||
processor in your `jax` array; MathJax will fill that in for you based on
|
processor in your `jax` array; MathJax will fill that in for you based on
|
||||||
the abilities of your user's browser.
|
the abilities of your user's browser.
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ the abilities of your user's browser.
|
||||||
|
|
||||||
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/default.js`` file or the
|
or a global basis. See the ``config/default.js`` file or the
|
||||||
:ref:`Configuring MMLorHTML <configure-MMLorHTML>` section for futher
|
:ref:`Configuring MMLorHTML <configure-MMLorHTML>` section for further
|
||||||
details. As an example, this configuration tells MathJax to use HTML-CSS
|
details. As an example, this configuration tells MathJax to use HTML-CSS
|
||||||
output rather than native MathML support for Firefox:
|
output rather than native MathML support for Firefox:
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ output rather than native MathML support for Firefox:
|
||||||
With this configuration, MathML output will be used only for IE with the
|
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
|
MathPlayer plugin (Firefox is the only other browser to have native MathML
|
||||||
support that is sufficient for use with MathJax). Note, however, that a
|
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
|
user can employ the MathJax contextual menu to select the other renderer if
|
||||||
he or she wishes.
|
he or she wishes.
|
||||||
|
|
||||||
MathJax produces MathML that models the underlying mathematics as best
|
MathJax produces MathML that models the underlying mathematics as best
|
||||||
|
@ -144,11 +144,11 @@ mode. You can accomplish this by including the line
|
||||||
|
|
||||||
at the top of the ``<head>`` section of your HTML documents. This
|
at the top of the ``<head>`` section of your HTML documents. This
|
||||||
lets you keep the strict `DOCTYPE` for validation purposes, while
|
lets you keep the strict `DOCTYPE` for validation purposes, while
|
||||||
still managing to get reasonable perforance from Internet Explorer
|
still managing to get reasonable performance from Internet Explorer
|
||||||
8. Note that this line must come at the beginning of the ``<head>``,
|
8. Note that this line must come at the beginning of the ``<head>``,
|
||||||
before any stylesheets or other content are loaded.
|
before any stylesheets or other content are loaded.
|
||||||
|
|
||||||
Altertnatively, you can use the `MMLorHTML` configuration file
|
Alternatively, you can use the `MMLorHTML` configuration file
|
||||||
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 `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
|
||||||
|
|
|
@ -21,7 +21,7 @@ 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
|
||||||
include MathJax in your web templates in the absense of
|
include MathJax in your web templates in the absence of
|
||||||
MathJax-specific plugins for the system you are using. To take
|
MathJax-specific plugins for the system you are using. To take
|
||||||
advantage of this approach, you will need access to your theme files,
|
advantage of this approach, you will need access to your theme files,
|
||||||
which probably means you need to be an administrator for the site; if
|
which probably means you need to be an administrator for the site; if
|
||||||
|
@ -64,8 +64,8 @@ theme/template only. If you change themes or update your theme, you
|
||||||
will have to repeat these steps.
|
will have to repeat these steps.
|
||||||
|
|
||||||
|
|
||||||
Insructions for Specific Platforms
|
Instructions for Specific Platforms
|
||||||
==================================
|
===================================
|
||||||
|
|
||||||
Some programs, such as WordPress and Moveable Type, allow you to edit
|
Some programs, such as WordPress and Moveable Type, allow you to edit
|
||||||
template files from inside their administrator interfaces. Specific
|
template files from inside their administrator interfaces. Specific
|
||||||
|
|
|
@ -26,13 +26,13 @@ Using MathJax in Movable Type
|
||||||
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
|
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
to load MathJax from our distributed netowrk service.
|
to load MathJax from our distributed network service.
|
||||||
|
|
||||||
.. image:: ../images/mt_head.png
|
.. image:: ../images/mt_head.png
|
||||||
|
|
||||||
5. Save the file. This will enable MathJax with both TeX and MathML
|
5. Save the file. This will enable MathJax with both TeX and MathML
|
||||||
input, so you should be able to start adding mathematical content to
|
input, so you should be able to start adding mathematical content to
|
||||||
your pages. If you need to adjust the configuraiton, see
|
your pages. If you need to adjust the configuration, see
|
||||||
:ref:`Configuring MathJax <loading>` for more details.
|
:ref:`Configuring MathJax <loading>` for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,5 +38,5 @@ better choice than editing the theme directly.
|
||||||
|
|
||||||
4. Save the file. This will enable MathJax with both TeX and MathML
|
4. Save the file. This will enable MathJax with both TeX and MathML
|
||||||
input, so you should be able to start adding mathematical content to
|
input, so you should be able to start adding mathematical content to
|
||||||
your pages. If you need to adjust the configuraiton, see
|
your pages. If you need to adjust the configuration, see
|
||||||
:ref:`Configuring MathJax <loading>` for more details.
|
:ref:`Configuring MathJax <loading>` for more details.
|
||||||
|
|
|
@ -8,7 +8,7 @@ The `callback queue` is one of MathJax's main tools for synchronizing
|
||||||
its actions, both internally, and with external programs, like
|
its actions, both internally, and with external programs, like
|
||||||
javascript code that you may write as part of dynamic web pages.
|
javascript code that you may write as part of dynamic web pages.
|
||||||
Because many actions in MathJax (like loading files) operate
|
Because many actions in MathJax (like loading files) operate
|
||||||
asynchornously, MathJax needs a way to coordinate those actions so
|
asynchronously, MathJax needs a way to coordinate those actions so
|
||||||
that they occur in the right order. The
|
that they occur in the right order. The
|
||||||
`MathJax.Callback.Queue` object provides that mechanism.
|
`MathJax.Callback.Queue` object provides that mechanism.
|
||||||
|
|
||||||
|
@ -69,11 +69,11 @@ that could operate asynchronously. For example:
|
||||||
[f, 2]
|
[f, 2]
|
||||||
);
|
);
|
||||||
|
|
||||||
Here, the command ``MathJax.Ajax.require("extensions/AMSmath.js")`` is
|
Here, the command ``MathJax.Ajax.Require("[MathJax]/extensions/AMSmath.js")``
|
||||||
queued between two calls to ``f``. The first call to ``f(1)`` will be
|
is queued between two calls to ``f``. The first call to ``f(1)`` will
|
||||||
made immediately, then the :meth:`MathJax.Ajax.Require` statement will
|
be made immediately, then the :meth:`MathJax.Ajax.Require` statement
|
||||||
be performed. Since the ``Require`` method loads a file, it operates
|
will be performed. Since the ``Require`` method loads a file, it
|
||||||
asynchronously, and its return value is a `MathJax.Callback`
|
operates asynchronously, and its return value is a `MathJax.Callback`
|
||||||
object that will be called when the file is loaded. The call to
|
object that will be called when the file is loaded. The call to
|
||||||
``f(2)`` will not be made until that callback is performed,
|
``f(2)`` will not be made until that callback is performed,
|
||||||
effectively synchronizing the second call to ``f`` with the completion
|
effectively synchronizing the second call to ``f`` with the completion
|
||||||
|
@ -197,13 +197,13 @@ instead are defined in extensions that are loaded automatically when
|
||||||
needed. The typesetting of an expression containing one of these TeX
|
needed. The typesetting of an expression containing one of these TeX
|
||||||
commands can cause the typesetting process to be suspended while the
|
commands can cause the typesetting process to be suspended while the
|
||||||
file is loaded, and then restarted when the extension has become
|
file is loaded, and then restarted when the extension has become
|
||||||
evailable.
|
available.
|
||||||
|
|
||||||
As a result, any call to :meth:`MathJax.Hub.Typeset()` (or
|
As a result, any call to :meth:`MathJax.Hub.Typeset()` (or
|
||||||
:meth:`MathJax.Hub.Process()`, or :meth:`MathJax.Hub.Update()`, etc.)
|
:meth:`MathJax.Hub.Process()`, or :meth:`MathJax.Hub.Update()`, etc.)
|
||||||
could return long before the mathematics is actually typeset, and the
|
could return long before the mathematics is actually typeset, and the
|
||||||
rest of your code may run before the mathematics is available. If you
|
rest of your code may run before the mathematics is available. If you
|
||||||
have code that relys on the mathematics being visible on screen, you
|
have code that relies on the mathematics being visible on screen, you
|
||||||
will need to break that out into a separate operation that is
|
will need to break that out into a separate operation that is
|
||||||
synchronized with the typesetting via the MathJax queue.
|
synchronized with the typesetting via the MathJax queue.
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ Using Signals
|
||||||
*************
|
*************
|
||||||
|
|
||||||
Because much of MathJax operates asynchronously, it is important for
|
Because much of MathJax operates asynchronously, it is important for
|
||||||
MathJax to be able to indicated to other components operating on the
|
MathJax to be able to indicate to other components operating on the
|
||||||
page that certain actions have been taken. For example, as MathJax is
|
page that certain actions have been taken. For example, as MathJax is
|
||||||
starting up, it loads external files such as its configuration files
|
starting up, it loads external files such as its configuration files
|
||||||
and the various input and output :term:`jax` that are used on the
|
and the various input and output :term:`jax` that are used on the
|
||||||
|
@ -59,7 +59,7 @@ have the listener perform the configuration when the message arrives.
|
||||||
But even if the extension *has* already been loaded, this will still
|
But even if the extension *has* already been loaded, this will still
|
||||||
work, because the listener will receive the ready signal even if it
|
work, because the listener will receive the ready signal even if it
|
||||||
has already been posted. In this way, listening for signals is a
|
has already been posted. In this way, listening for signals is a
|
||||||
robust method of synchonizing code components no matter when they are
|
robust method of synchronizing code components no matter when they are
|
||||||
loaded and run.
|
loaded and run.
|
||||||
|
|
||||||
In some cases, it may be inappropriate for a new listener to receive
|
In some cases, it may be inappropriate for a new listener to receive
|
||||||
|
@ -106,7 +106,7 @@ details of the messages sent during startup. See also the
|
||||||
``test/sample-signals.html`` file (and its source) for examples of
|
``test/sample-signals.html`` file (and its source) for examples of
|
||||||
using signals. This example lists all the signals that occur while
|
using signals. This example lists all the signals that occur while
|
||||||
MathJax is processing that page, so it gives useful information about
|
MathJax is processing that page, so it gives useful information about
|
||||||
the details of the signals produced by variuous components.
|
the details of the signals produced by various components.
|
||||||
|
|
||||||
In this example, the listener starts loading an extra configuration
|
In this example, the listener starts loading an extra configuration
|
||||||
file (from the same directory as the web page). Since it returns
|
file (from the same directory as the web page). Since it returns
|
||||||
|
|
|
@ -47,7 +47,7 @@ that, and otherwise use HTML-with-CSS to display the mathematics.
|
||||||
This is the most general configuration, and should suffice for most
|
This is the most general configuration, and should suffice for most
|
||||||
people's needs. Other configurations are available, however, and you
|
people's needs. Other configurations are available, however, and you
|
||||||
can also provide additional configuration parameters to taylor one of
|
can also provide additional configuration parameters to taylor one of
|
||||||
the confiogurations to your needs. More details can be found in the
|
the configurations to your needs. More details can be found in the
|
||||||
:ref:`Loading and Configuring MathJax <loading>` instructions.
|
:ref:`Loading and Configuring MathJax <loading>` instructions.
|
||||||
|
|
||||||
The use of ``cdn.mathjax.org`` is governed by its `terms of service
|
The use of ``cdn.mathjax.org`` is governed by its `terms of service
|
||||||
|
@ -123,7 +123,7 @@ 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/TeX-AMS-MML_HTMLorMML.js`` (i.e., the file
|
will load the file ``config/TeX-AMS-MML_HTMLorMML.js`` (i.e., the file
|
||||||
named ``TeX-AMS-MML_HTMLorMML.js`` in the ``config`` folder of the
|
named ``TeX-AMS-MML_HTMLorMML.js`` in the ``config`` folder of the
|
||||||
main ``MathJax`` folder). This file preloads all the most comply-used
|
main ``MathJax`` folder). This file preloads all the most commonly-used
|
||||||
components of MathJax, allowing it to process mathematics that is in
|
components of MathJax, allowing it to process mathematics that is in
|
||||||
the TeX or LaTeX format, or in MathML notation. It will produce
|
the TeX or LaTeX format, or in MathML notation. It will produce
|
||||||
output in MathML form if the user's browser supports that, and will use
|
output in MathML form if the user's browser supports that, and will use
|
||||||
|
@ -138,7 +138,7 @@ described more fully in :ref:`Common Configurations
|
||||||
|
|
||||||
Note: The configuration process has changed in MathJax v1.1, so if you have
|
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
|
existing pages that use MathJax, you may need to modify the tag that
|
||||||
loads MathJax so that is conforms with the new configuration process.
|
loads MathJax so that it conforms with the new configuration process.
|
||||||
See :ref:`Installing and Configuring MathJax <installation>` for more
|
See :ref:`Installing and Configuring MathJax <installation>` for more
|
||||||
details.
|
details.
|
||||||
|
|
||||||
|
@ -227,13 +227,13 @@ math mode, you must enable that explicitly in your configuration:
|
||||||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
|
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascipt" src="path-to-mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
<script type="text/javascript" src="path-to-mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||||
|
|
||||||
See the ``config/default.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
|
which is the component of MathJax that identifies TeX notation within
|
||||||
the page). See the :ref:`TeX and LaTeX <TeX-support>` page for
|
the page. See the :ref:`TeX and LaTeX <TeX-support>` page for
|
||||||
more on MathJax's support for TeX.
|
more on MathJax's support for TeX.
|
||||||
|
|
||||||
Here is a complete sample page containing TeX mathematics (also available
|
Here is a complete sample page containing TeX mathematics (also available
|
||||||
|
|
|
@ -22,14 +22,14 @@ initiates an action, waits for it to complete, and then goes on, you
|
||||||
break the function into two parts: a first part that sets up and
|
break the function into two parts: a first part that sets up and
|
||||||
initiates the action, and a second that runs after the action is
|
initiates the action, and a second that runs after the action is
|
||||||
finished. Callbacks are similar to event handlers that you attach to
|
finished. Callbacks are similar to event handlers that you attach to
|
||||||
DOM elements, and are called when an certain action occurs. See the
|
DOM elements, and are called when a certain action occurs. See the
|
||||||
:ref:`Callback Object <api-callback>` reference page for details of
|
:ref:`Callback Object <api-callback>` reference page for details of
|
||||||
how to specify a callback.
|
how to specify a callback.
|
||||||
|
|
||||||
**Queues** are MathJax's means of synchronizing actions that must be
|
**Queues** are MathJax's means of synchronizing actions that must be
|
||||||
performed sequentially, even when they involve asynchronous events
|
performed sequentially, even when they involve asynchronous events
|
||||||
like loading files or dynamically creating stylesheets. The actions
|
like loading files or dynamically creating stylesheets. The actions
|
||||||
that you put in the queue are `Callback` objects that will be perfomed
|
that you put in the queue are `Callback` objects that will be performed
|
||||||
in sequence, with MathJax handling the linking of one action to the
|
in sequence, with MathJax handling the linking of one action to the
|
||||||
next. MathJax maintains a master queue that you can use to
|
next. MathJax maintains a master queue that you can use to
|
||||||
synchronize with MathJax, but you can also create your own private
|
synchronize with MathJax, but you can also create your own private
|
||||||
|
@ -47,7 +47,7 @@ will call your code. This works somewhat like an event handler, except
|
||||||
that many different types of events can go through the same signal, and the
|
that many different types of events can go through the same signal, and the
|
||||||
signals have a "memory", meaning that if you register an interest in a
|
signals have a "memory", meaning that if you register an interest in a
|
||||||
particular type of signal and that signal has already occurred, you will be
|
particular type of signal and that signal has already occurred, you will be
|
||||||
told about the past occurrances as well as any future ones. See the
|
told about the past occurrences 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. See
|
||||||
also the ``test/sample-signals.html`` file in the MathJax ``test``
|
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.
|
||||||
|
|
|
@ -39,7 +39,7 @@ you need a LaTeX-to-HTML converter, you should consider `other options
|
||||||
TeX and LaTeX math delimiters
|
TeX and LaTeX math delimiters
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
By default, the `tex2jax` preprocesor defines the LaTeX math delimiters,
|
By default, the `tex2jax` preprocessor defines the LaTeX math delimiters,
|
||||||
which are ``\(...\)`` for in-line math, and ``\[...\]`` for displayed
|
which are ``\(...\)`` for in-line math, and ``\[...\]`` for displayed
|
||||||
equations. It also defines the TeX delimiters ``$$...$$`` for displayed
|
equations. It also defines the TeX delimiters ``$$...$$`` for displayed
|
||||||
equations, but it does **not** define ``$...$`` as in-line math
|
equations, but it does **not** define ``$...$`` as in-line math
|
||||||
|
@ -72,7 +72,7 @@ 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
|
which is the component of MathJax that identifies TeX notation within
|
||||||
the page).
|
the page.
|
||||||
|
|
||||||
|
|
||||||
TeX and LaTeX in HTML documents
|
TeX and LaTeX in HTML documents
|
||||||
|
@ -99,10 +99,10 @@ beginning of a tag named ``y`` (even though there is no such tag in
|
||||||
HTML). When this happens, the browser will think the tag continues up
|
HTML). When this happens, the browser will think the tag continues up
|
||||||
to the next ``>`` in the document (typically the end of the next
|
to the next ``>`` in the document (typically the end of the next
|
||||||
actual tag in the HTML file), and you may notice that you are missing
|
actual tag in the HTML file), and you may notice that you are missing
|
||||||
part of the text of the document. In the example above, the `` we
|
part of the text of the document. In the example above, the "``we
|
||||||
have ...`` will not be displayed because the browser thinks it is
|
have ...``" will not be displayed because the browser thinks it is
|
||||||
part of the tag starting at ``<y``. This is one indication you can
|
part of the tag starting at ``<y``. This is one indication you can
|
||||||
use to spot this prooblem; it is a common error and should be avoided.
|
use to spot this problem; it is a common error and should be avoided.
|
||||||
|
|
||||||
Usually, it is sufficient to simply put spaces around these symbols to
|
Usually, it is sufficient to simply put spaces around these symbols to
|
||||||
cause the browser to avoid them, so
|
cause the browser to avoid them, so
|
||||||
|
@ -261,7 +261,7 @@ the paragraph, use
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
You may also wish to set the font family, as the default is "serif"
|
You may also wish to set the font family, as the default is "serif".
|
||||||
|
|
||||||
|
|
||||||
noUndefined
|
noUndefined
|
||||||
|
@ -269,13 +269,13 @@ 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 generating error messages. 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 consisting of the
|
||||||
text ``\xxx`` in red.
|
text ``\xxx`` in red.
|
||||||
|
|
||||||
This extension is loaded by all the combined configuration files that
|
This extension is loaded by all the combined configuration files that
|
||||||
include the TeX input processor. To enable the `noUndefined` extension
|
include the TeX input processor. To enable the `noUndefined` extension
|
||||||
in your own configuration, or to modify its parameters, add something like
|
in your own configuration, or to modify its parameters, add something like
|
||||||
the following ro your :meth:`MathJax.Hub.Config()` call:
|
the following to your :meth:`MathJax.Hub.Config()` call:
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
|
||||||
|
@ -899,7 +899,6 @@ N
|
||||||
\nolimits
|
\nolimits
|
||||||
\normalsize
|
\normalsize
|
||||||
\not
|
\not
|
||||||
\notag AMSmath
|
|
||||||
\notag [AMSmath]
|
\notag [AMSmath]
|
||||||
\notin
|
\notin
|
||||||
\nparallel AMSsymbols
|
\nparallel AMSsymbols
|
||||||
|
@ -1119,7 +1118,6 @@ T
|
||||||
|
|
||||||
.. code-block:: latex
|
.. code-block:: latex
|
||||||
|
|
||||||
\tag AMSmath
|
|
||||||
\tag [AMSmath]
|
\tag [AMSmath]
|
||||||
\tan
|
\tan
|
||||||
\tanh
|
\tanh
|
||||||
|
@ -1273,7 +1271,7 @@ Environments
|
||||||
------------
|
------------
|
||||||
|
|
||||||
LaTeX environments of the form ``\begin{XXX} ... \end{XXX}`` are
|
LaTeX environments of the form ``\begin{XXX} ... \end{XXX}`` are
|
||||||
preovided where ``XXX`` is one of the following:
|
provided where ``XXX`` is one of the following:
|
||||||
|
|
||||||
.. code-block:: latex
|
.. code-block:: latex
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ MathJax operates asynchonously (see :ref:`Synchronizing with MathJax
|
||||||
your call to :meth:`MathJax.Hub.Typeset()` is synchronized with the
|
your call to :meth:`MathJax.Hub.Typeset()` is synchronized with the
|
||||||
other actions that MathJax is taking. For example, it may already be
|
other actions that MathJax is taking. For example, it may already be
|
||||||
typesetting portions of the page, or it may be waiting for an output
|
typesetting portions of the page, or it may be waiting for an output
|
||||||
jax to load, etc., and so you need to queue to typeset action to be
|
jax to load, etc., and so you need to queue the typeset action to be
|
||||||
performed after MathJax has finished whatever else it may be doing.
|
performed after MathJax has finished whatever else it may be doing.
|
||||||
That may be immediately, but it may not, and there is no way to tell.
|
That may be immediately, but it may not, and there is no way to tell.
|
||||||
|
|
||||||
|
@ -32,13 +32,13 @@ To queue the typeset action, use the command
|
||||||
This will cause MathJax to typeset the page when it is next able to do
|
This will cause MathJax to typeset the page when it is next able to do
|
||||||
so. It guarantees that the typesetting will synchronize properly
|
so. It guarantees that the typesetting will synchronize properly
|
||||||
with the loading of jax, extensions, fonts, stylesheets, and other
|
with the loading of jax, extensions, fonts, stylesheets, and other
|
||||||
asynchornous activity, and is the only truely safe way to ask MathJax
|
asynchronous activity, and is the only truly safe way to ask MathJax
|
||||||
to process additional material.
|
to process additional material.
|
||||||
|
|
||||||
The :meth:`MathJax.Hub.Typeset()` command also accepts a parameter
|
The :meth:`MathJax.Hub.Typeset()` command also accepts a parameter
|
||||||
that is a DOM element whose contents is to be typeset. That could be
|
that is a DOM element whose content is to be typeset. That could be
|
||||||
a paragraph, or a ``<div>`` element, or even a MathJax math
|
a paragraph, or a ``<div>`` element, or even a MathJax math
|
||||||
``<script>`` tag. It could also be a the DOM `id` of such an object, in
|
``<script>`` tag. It could also be the DOM `id` of such an object, in
|
||||||
which case, MathJax will look up the DOM element for you. So
|
which case, MathJax will look up the DOM element for you. So
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
@ -60,7 +60,7 @@ Note that the :meth:`MathJax.Hub.Queue()` method will return
|
||||||
immediately, regardless of whether the typesetting has taken place or
|
immediately, regardless of whether the typesetting has taken place or
|
||||||
not, so you can not assume that the mathematics is visible after you
|
not, so you can not assume that the mathematics is visible after you
|
||||||
make this call. That means that things like the size of the container
|
make this call. That means that things like the size of the container
|
||||||
for the mathematics may not yet reflect the size of the typeet
|
for the mathematics may not yet reflect the size of the typeset
|
||||||
mathematics. If you need to perform actions that depend on the
|
mathematics. If you need to perform actions that depend on the
|
||||||
mathematics being typeset, you should push *those* actions onto the
|
mathematics being typeset, you should push *those* actions onto the
|
||||||
``MathJax.Hub.queue`` as well.
|
``MathJax.Hub.queue`` as well.
|
||||||
|
@ -78,7 +78,7 @@ Manipulating Individual Math Elements
|
||||||
If you are not changing a complete DOM structure, but simply want to
|
If you are not changing a complete DOM structure, but simply want to
|
||||||
update the contents of a single mathematical equation, you do not need
|
update the contents of a single mathematical equation, you do not need
|
||||||
to use ``innerHTML`` and :meth:`MathJax.Hub.Typeset()` to preprocess
|
to use ``innerHTML`` and :meth:`MathJax.Hub.Typeset()` to preprocess
|
||||||
and process an elements new content. Instead, you can ask MathJax to
|
and process an element's new content. Instead, you can ask MathJax to
|
||||||
find the `element jax` for the math element on the page, and use its
|
find the `element jax` for the math element on the page, and use its
|
||||||
methods to modify and update the mathematics that it displays.
|
methods to modify and update the mathematics that it displays.
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ within dollar signs (it will be blank). A student has typed
|
||||||
something elsewhere on the page, and you want to typeset their answer
|
something elsewhere on the page, and you want to typeset their answer
|
||||||
in the location of the mathematics that is already there. You could
|
in the location of the mathematics that is already there. You could
|
||||||
replace the entire contents of the `MathDiv` element and call
|
replace the entire contents of the `MathDiv` element and call
|
||||||
:meth:`MathJax.Hub.Typeset()` as described above, but there is more
|
:meth:`MathJax.Hub.Typeset()` as described above, but there is a more
|
||||||
efficient approach, which is to ask MathJax for the element jax for
|
efficient approach, which is to ask MathJax for the element jax for
|
||||||
the mathematics, and call its method for replacing the formula shown
|
the mathematics, and call its method for replacing the formula shown
|
||||||
by that element. For example:
|
by that element. For example:
|
||||||
|
@ -105,20 +105,21 @@ by that element. For example:
|
||||||
var math = MathJax.Hub.getAllJax("MathDiv")[0];
|
var math = MathJax.Hub.getAllJax("MathDiv")[0];
|
||||||
MathJax.Hub.Queue(["Text",math,"x+1"]);
|
MathJax.Hub.Queue(["Text",math,"x+1"]);
|
||||||
|
|
||||||
This looks up the list of math elements in `MathDiv` element (there is
|
This looks up the list of math elements in the `MathDiv` element
|
||||||
only one) and takes the first one (element 0) and stores it in
|
(there is only one) and takes the first one (element 0) and stores it
|
||||||
``math``. This is an `element jax` object (see the :ref:`Element Jax
|
in ``math``. This is an `element jax` object (see the :ref:`Element
|
||||||
<api-element-jax>` specification for details), which has a
|
Jax <api-element-jax>` specification for details), which has a
|
||||||
:meth:`Text()` method that can be used to set the input text of the
|
:meth:`Text()` method that can be used to set the input text of the
|
||||||
math element, and retypeset it.
|
math element, and retypeset it.
|
||||||
|
|
||||||
Again, since the typesetting should be synchronized with other actions
|
Again, since the typesetting should be synchronized with other actions
|
||||||
of MathJax, the call should be pushed onto the ``MathJax.Hub.queue``,
|
of MathJax, the call should be pushed onto the MathJax processing
|
||||||
as shown above, rather than called directly. The example above
|
queue using :meth:`MathJax.Hub.Queue()`, as shown above, rather than
|
||||||
performs the equivalent of ``math.Text("x+1")`` as soon as MathJax is
|
called directly. The example above performs the equivalent of
|
||||||
able to do so. Any additional actions the rely on the equation
|
``math.Text("x+1")`` as soon as MathJax is able to do so. Any
|
||||||
``x+1`` actually showing on screen should also be pushed onto the
|
additional actions that rely on the expression ``x+1`` actually
|
||||||
queue so that they will not occur before the math is typeset.
|
showing on screen should also be pushed onto the queue so that they
|
||||||
|
will not occur before the math is typeset.
|
||||||
|
|
||||||
The actions you can perform on an element jax include:
|
The actions you can perform on an element jax include:
|
||||||
|
|
||||||
|
@ -140,7 +141,7 @@ The actions you can perform on an element jax include:
|
||||||
.. describe:: SourceElement()
|
.. describe:: SourceElement()
|
||||||
|
|
||||||
to obtain a reference to the original
|
to obtain a reference to the original
|
||||||
``<script>`` object that is assocaited with this element jax.
|
``<script>`` object that is associated with this element jax.
|
||||||
|
|
||||||
|
|
||||||
Note that once you have located an element jax, you can keep using it
|
Note that once you have located an element jax, you can keep using it
|
||||||
|
@ -153,7 +154,7 @@ displayed.
|
||||||
|
|
||||||
To get the element jax the first time, you need to be sure that you
|
To get the element jax the first time, you need to be sure that you
|
||||||
ask MathJax for it **after** MathJax has processed the page the first
|
ask MathJax for it **after** MathJax has processed the page the first
|
||||||
time. This is another sitaution where you want to use the MathJax
|
time. This is another situation where you want to use the MathJax
|
||||||
queue. If your startup code performs the commands
|
queue. If your startup code performs the commands
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
|
|
@ -59,7 +59,7 @@ details.
|
||||||
If your page simply loads ``MathJax.js`` and relies on
|
If your page simply loads ``MathJax.js`` and relies on
|
||||||
``config/MathJax.js``, then you will need to modify your ``<script>`` tag
|
``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
|
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
|
default configuration file; you are required to explicitly specify the
|
||||||
configuration file if you use one. Furthermore, the name of 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
|
``config/MathJax.js`` file was a source of confusion, so it has been
|
||||||
renamed ``config/default.js`` instead. Thus, if you used
|
renamed ``config/default.js`` instead. Thus, if you used
|
||||||
|
@ -163,7 +163,7 @@ Of course, you can load any configuration file that you wish, or use a
|
||||||
|
|
||||||
The use of ``cdn.mathjax.org`` is governed by its `terms of service
|
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
|
<http://www.mathjax.org/download/mathjax-cdn-terms-of-service/>`_, so be
|
||||||
sure to read that before linked to the MathJax CDN server.
|
sure to read that before linking to the MathJax CDN server.
|
||||||
|
|
||||||
|
|
||||||
Change in default TeX delimiters
|
Change in default TeX delimiters
|
||||||
|
@ -255,5 +255,5 @@ development continues.
|
||||||
|
|
||||||
We apologize for the inconvenience of having to switch distributions, but
|
We apologize for the inconvenience of having to switch distributions, but
|
||||||
the git-to-svn bridge we tried to implement to keep both copies in synch
|
the git-to-svn bridge we tried to implement to keep both copies in synch
|
||||||
turned out to be unreliable, and so the SourceForge disrtibution was
|
turned out to be unreliable, and so the SourceForge distribution was
|
||||||
retired in favor of the GitHub site.
|
retired in favor of the GitHub site.
|
|
@ -6,7 +6,7 @@ What's New in MathJax v1.1
|
||||||
|
|
||||||
MathJax version 1.1 includes a number of important improvements and
|
MathJax version 1.1 includes a number of important improvements and
|
||||||
enhancements over version 1.0. We have worked hard to fix bugs, improve
|
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
|
support for browsers and mobile devices, process TeX and MathML better, and
|
||||||
increase MathJax's performance.
|
increase MathJax's performance.
|
||||||
|
|
||||||
In addition to these changes, MathJax.org now offers MathJax as a network
|
In addition to these changes, MathJax.org now offers MathJax as a network
|
||||||
|
@ -20,9 +20,9 @@ The following sections outline the changes in v1.1:
|
||||||
Optimization
|
Optimization
|
||||||
============
|
============
|
||||||
|
|
||||||
* Combined configuraiton files that load all the needed files in one piece
|
* Combined configuration files that load all the needed files in one piece
|
||||||
rather than loading them individually. This simplifies configuration
|
rather than loading them individually. This simplifies configuration
|
||||||
and speeds up typsetting of the mathematics on the page.
|
and speeds up typesetting of the mathematics on the page.
|
||||||
|
|
||||||
* Improved responsiveness to mouse events during typesetting.
|
* Improved responsiveness to mouse events during typesetting.
|
||||||
|
|
||||||
|
@ -36,14 +36,14 @@ Optimization
|
||||||
to wait for *every* font to fail.
|
to wait for *every* font to fail.
|
||||||
|
|
||||||
* The MathJax files are now packed only with `yuicompressor` rather than a
|
* The MathJax files are now packed only with `yuicompressor` rather than a
|
||||||
custom compressor. The CDN serves gzipped versions, which compressed
|
custom compressor. The CDN serves gzipped versions, which end up being
|
||||||
better than the gzipped custom-packed files.
|
smaller than the gzipped custom-packed files.
|
||||||
|
|
||||||
* Improved rendering speed in IE by removing ``position:relative`` from
|
* Improved rendering speed in IE by removing ``position:relative`` from
|
||||||
the style for mathematics.
|
the style for mathematics.
|
||||||
|
|
||||||
* Improve rendering speed for most browsers by isolating the mathematics
|
* Improved rendering speed for most browsers by isolating the mathematics
|
||||||
from page during typesetting (avoids full page reflows).
|
from the page during typesetting (avoids full page reflows).
|
||||||
|
|
||||||
|
|
||||||
Enhancements
|
Enhancements
|
||||||
|
@ -65,7 +65,7 @@ Enhancements
|
||||||
|
|
||||||
* Improved About box.
|
* Improved About box.
|
||||||
|
|
||||||
* add a minimum scaling factor (so math won't get too small)
|
* Added a minimum scaling factor (so math won't get too small).
|
||||||
|
|
||||||
|
|
||||||
TeX Support
|
TeX Support
|
||||||
|
@ -93,7 +93,7 @@ MathML Support
|
||||||
* Better support for MathML namespaces.
|
* Better support for MathML namespaces.
|
||||||
* Properly handle comments within MathML in IE.
|
* Properly handle comments within MathML in IE.
|
||||||
* Properly consider ``<mspace>`` and ``<mtext>`` as space-like.
|
* Properly consider ``<mspace>`` and ``<mtext>`` as space-like.
|
||||||
* Improved support for ``<maction>`` with embelished operators.
|
* Improved support for ``<maction>`` with embellished operators.
|
||||||
|
|
||||||
|
|
||||||
Other Bug Fixes
|
Other Bug Fixes
|
||||||
|
@ -102,7 +102,7 @@ Other Bug Fixes
|
||||||
* Fixed CSS bleed through with zoom and other situations.
|
* Fixed CSS bleed through with zoom and other situations.
|
||||||
* Fixed problems with ``showMathMenuMSIE`` when set to ``false``.
|
* Fixed problems with ``showMathMenuMSIE`` when set to ``false``.
|
||||||
* Replaced illegal prefix characters in cookie name.
|
* Replaced illegal prefix characters in cookie name.
|
||||||
* Improve placement of surd for square roots and n-th roots.
|
* Improved placement of surd for square roots and n-th roots.
|
||||||
* Fixed layer obscuring math from MathPlayer for screen readers.
|
* Fixed layer obscuring math from MathPlayer for screen readers.
|
||||||
* Newlines in CDATA comments are now handled properly.
|
* Newlines in CDATA comments are now handled properly.
|
||||||
* Resolved conflict between `jsMath2jax` and `tex2jax` both processing the
|
* Resolved conflict between `jsMath2jax` and `tex2jax` both processing the
|
||||||
|
@ -135,7 +135,7 @@ Browser Support
|
||||||
* Added Firefox 4 detection and configuration.
|
* Added Firefox 4 detection and configuration.
|
||||||
* Fix for extra line-break bug when displayed equations are in
|
* Fix for extra line-break bug when displayed equations are in
|
||||||
preformatted text.
|
preformatted text.
|
||||||
* Update fonts so that FF 3.6.13 and above can read them.
|
* Updated fonts so that FF 3.6.13 and above can read them.
|
||||||
|
|
||||||
|
|
||||||
**Internet Explorer**
|
**Internet Explorer**
|
||||||
|
@ -148,7 +148,7 @@ Browser Support
|
||||||
|
|
||||||
**iPhone/iPad**
|
**iPhone/iPad**
|
||||||
|
|
||||||
* Add support for OTF web fonts in iOS4.2.
|
* Added support for OTF web fonts in iOS4.2.
|
||||||
|
|
||||||
**Nokia**
|
**Nokia**
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ Browser Support
|
||||||
|
|
||||||
* Prevent Opera from using STIX fonts unless explicitly requested via the
|
* Prevent Opera from using STIX fonts unless explicitly requested via the
|
||||||
font menu (since Opera can't display many of the characters).
|
font menu (since Opera can't display many of the characters).
|
||||||
* Fix for bad em-size detection in 10.61.
|
* Fixed bad em-size detection in 10.61.
|
||||||
* Fixed a problem with the About dialog in Opera 11.
|
* Fixed a problem with the About dialog in Opera 11.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@ 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 <tt class="xref py py-meth 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 of the load
|
||||||
(<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
|
(<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">
|
||||||
|
@ -260,7 +260,7 @@ puts a warning message into the MathJax message box on screen.</p>
|
||||||
<dt id="loadHook">
|
<dt id="loadHook">
|
||||||
<tt class="descname">loadHook</tt><big>(</big><em>file</em>, <em>callback</em><big>)</big><a class="headerlink" href="#loadHook" title="Permalink to this definition">¶</a></dt>
|
<tt class="descname">loadHook</tt><big>(</big><em>file</em>, <em>callback</em><big>)</big><a class="headerlink" href="#loadHook" title="Permalink to this definition">¶</a></dt>
|
||||||
<dd><p>Registers a callback to be executed when the given file is
|
<dd><p>Registers a callback to be executed when the given file is
|
||||||
loaded. The file load operation need to be started when this
|
loaded. The file load operation needs to be started when this
|
||||||
method is called, so it can be used to register a hook for a file
|
method is called, so it can be used to register a hook for a file
|
||||||
that may be loaded in the future.</p>
|
that may be loaded in the future.</p>
|
||||||
<table class="docutils field-list" frame="void" rules="none">
|
<table class="docutils field-list" frame="void" rules="none">
|
||||||
|
@ -283,11 +283,11 @@ that may be loaded in the future.</p>
|
||||||
<dl class="method">
|
<dl class="method">
|
||||||
<dt id="Preloading">
|
<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>
|
<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
|
<dd><p>Used with combined configuration files to indicate what files are
|
||||||
in the configuration file. Marks the files are loading (since there
|
in the configuration file. Marks the files as 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
|
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
|
them), so that load-hooks and other load-related events can be
|
||||||
properly processed.</p>
|
properly processed when the <a class="reference internal" href="#loadComplete" title="loadComplete"><tt class="xref py py-meth docutils literal"><span class="pre">loadComplete()</span></tt></a> occurs.</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" />
|
||||||
|
|
|
@ -78,7 +78,7 @@ specification into a Callback object if needed.</p>
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">fn</tt></dt>
|
<tt class="descname">fn</tt></dt>
|
||||||
<dd><p>A function that is to be called when the callback is executed.
|
<dd><p>A function that is to be called when the callback is executed.
|
||||||
No additional data is passed to it (other that what it is
|
No additional data is passed to it (other than what it is
|
||||||
called with at the time the callback is executed), and <cite>this</cite>
|
called with at the time the callback is executed), and <cite>this</cite>
|
||||||
will be the window object.</p>
|
will be the window object.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
@ -189,7 +189,7 @@ of a file), or in response to a user action. For example:</p>
|
||||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">f</span><span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"x contains "</span><span class="o">+</span><span class="nx">x</span><span class="p">)};</span>
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">f</span><span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"x contains "</span><span class="o">+</span><span class="nx">x</span><span class="p">)};</span>
|
||||||
<span class="kd">function</span> <span class="nx">DelayedX</span><span class="p">(</span><span class="nx">time</span><span class="p">)</span> <span class="p">{</span>
|
<span class="kd">function</span> <span class="nx">DelayedX</span><span class="p">(</span><span class="nx">time</span><span class="p">)</span> <span class="p">{</span>
|
||||||
<span class="kd">var</span> <span class="nx">x</span> <span class="o">=</span> <span class="s2">"hi"</span><span class="p">;</span>
|
<span class="kd">var</span> <span class="nx">x</span> <span class="o">=</span> <span class="s2">"hi"</span><span class="p">;</span>
|
||||||
<span class="nx">setTimeout</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">([</span><span class="nx">f</span><span class="p">,</span> <span class="nx">x</span><span class="p">],</span> <span class="nx">time</span><span class="p">);</span>
|
<span class="nx">setTimeout</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">([</span><span class="nx">f</span><span class="p">,</span> <span class="nx">x</span><span class="p">],</span> <span class="nx">time</span><span class="p">));</span>
|
||||||
<span class="p">}</span>
|
<span class="p">}</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -225,7 +225,7 @@ function.</p>
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">called</tt></dt>
|
<tt class="descname">called</tt></dt>
|
||||||
<dd><p>Set to <tt class="docutils literal"><span class="pre">true</span></tt> after the callback has been called, and undefined
|
<dd><p>Set to <tt class="docutils literal"><span class="pre">true</span></tt> after the callback has been called, and undefined
|
||||||
otherwise. A callback will not be exectued a second time unless
|
otherwise. A callback will not be executed a second time unless
|
||||||
the callback’s <a class="reference internal" href="#reset" title="reset"><tt class="xref py py-meth docutils literal"><span class="pre">reset()</span></tt></a> method is called first, or its
|
the callback’s <a class="reference internal" href="#reset" title="reset"><tt class="xref py py-meth docutils literal"><span class="pre">reset()</span></tt></a> method is called first, or its
|
||||||
<tt class="docutils literal"><span class="pre">autoReset</span></tt> property is set to <tt class="docutils literal"><span class="pre">true</span></tt>.</p>
|
<tt class="docutils literal"><span class="pre">autoReset</span></tt> property is set to <tt class="docutils literal"><span class="pre">true</span></tt>.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
@ -293,7 +293,7 @@ commands.</p>
|
||||||
<tt class="descname">executeHooks</tt><big>(</big><em>hooks</em><span class="optional">[</span>, <em>data</em><span class="optional">[</span>, <em>reset</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#executeHooks" title="Permalink to this definition">¶</a></dt>
|
<tt class="descname">executeHooks</tt><big>(</big><em>hooks</em><span class="optional">[</span>, <em>data</em><span class="optional">[</span>, <em>reset</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#executeHooks" title="Permalink to this definition">¶</a></dt>
|
||||||
<dd><p>Calls each callback in the <cite>hooks</cite> array (or the single hook if it
|
<dd><p>Calls each callback in the <cite>hooks</cite> array (or the single hook if it
|
||||||
is not an array), passing it the arguments stored in the data
|
is not an array), passing it the arguments stored in the data
|
||||||
array. It <cite>reset</cite> is <tt class="docutils literal"><span class="pre">true</span></tt>, then the callback’s
|
array. If <cite>reset</cite> is <tt class="docutils literal"><span class="pre">true</span></tt>, then the callback’s
|
||||||
<a class="reference internal" href="#reset" title="reset"><tt class="xref py py-meth docutils literal"><span class="pre">reset()</span></tt></a> method will be called before each hook is
|
<a class="reference internal" href="#reset" title="reset"><tt class="xref py py-meth docutils literal"><span class="pre">reset()</span></tt></a> method will be called before each hook is
|
||||||
executed. If any of the hooks returns a <cite>Callback</cite> object, then
|
executed. If any of the hooks returns a <cite>Callback</cite> object, then
|
||||||
it collects those callbacks and returns a new callback that will
|
it collects those callbacks and returns a new callback that will
|
||||||
|
|
|
@ -82,7 +82,7 @@ that class.</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">directory</tt></dt>
|
<tt class="descname">directory</tt></dt>
|
||||||
<dd><p>The directory where the jax files are stored (e.g., <tt class="docutils literal"><span class="pre">"[MathJax]/jax/element/mml"</span></tt>);</p>
|
<dd><p>The directory where the jax files are stored (e.g., <tt class="docutils literal"><span class="pre">"[MathJax]/jax/element/mml"</span></tt>).</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -137,7 +137,7 @@ rather than <tt class="docutils literal"><span class="pre">MathJax.Hub</span></t
|
||||||
<dt id="Text">
|
<dt id="Text">
|
||||||
<tt class="descname">Text</tt><big>(</big><em>text</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Text" title="Permalink to this definition">¶</a></dt>
|
<tt class="descname">Text</tt><big>(</big><em>text</em><span class="optional">[</span>, <em>callback</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Text" title="Permalink to this definition">¶</a></dt>
|
||||||
<dd><p>Sets the input text for this element to the given text and
|
<dd><p>Sets the input text for this element to the given text and
|
||||||
reprocesses the mathematics. (I.e., update the equation to the
|
reprocesses the mathematics. (I.e., updates the equation to the
|
||||||
new one given by <cite>text</cite>). When the processing is complete, the
|
new one given by <cite>text</cite>). When the processing is complete, the
|
||||||
<cite>callback</cite>, if any, is called.</p>
|
<cite>callback</cite>, if any, is called.</p>
|
||||||
<table class="docutils field-list" frame="void" rules="none">
|
<table class="docutils field-list" frame="void" rules="none">
|
||||||
|
@ -145,7 +145,7 @@ new one given by <cite>text</cite>). When the processing is complete, the
|
||||||
<col class="field-body" />
|
<col class="field-body" />
|
||||||
<tbody valign="top">
|
<tbody valign="top">
|
||||||
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple">
|
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple">
|
||||||
<li><strong>text</strong> — the new mathematic source string for the element</li>
|
<li><strong>text</strong> — the new mathematics source string for the element</li>
|
||||||
<li><strong>callback</strong> — the callback specification</li>
|
<li><strong>callback</strong> — the callback specification</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
|
@ -160,7 +160,7 @@ new one given by <cite>text</cite>). When the processing is complete, the
|
||||||
<dl class="method">
|
<dl class="method">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">Reprocess</tt><big>(</big><span class="optional">[</span><em>callback</em><span class="optional">]</span><big>)</big></dt>
|
<tt class="descname">Reprocess</tt><big>(</big><span class="optional">[</span><em>callback</em><span class="optional">]</span><big>)</big></dt>
|
||||||
<dd><p>Remove the output and produce it again. This may be necessary if
|
<dd><p>Removes the output and produces it again. This may be necessary if
|
||||||
there are changes to the CSS styles that would affect the layout
|
there are changes to the CSS styles that would affect the layout
|
||||||
of the mathematics, for example. The <cite>callback</cite>, if any, is
|
of the mathematics, for example. The <cite>callback</cite>, if any, is
|
||||||
called when the process completes.</p>
|
called when the process completes.</p>
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
<div class="section" id="the-mathjax-html-object">
|
<div class="section" id="the-mathjax-html-object">
|
||||||
<span id="api-html"></span><h1>The MathJax.HTML Object<a class="headerlink" href="#the-mathjax-html-object" title="Permalink to this headline">¶</a></h1>
|
<span id="api-html"></span><h1>The MathJax.HTML Object<a class="headerlink" href="#the-mathjax-html-object" title="Permalink to this headline">¶</a></h1>
|
||||||
<p>The <tt class="docutils literal"><span class="pre">MathJax.HTML</span></tt> object provides routines for creating HTML
|
<p>The <tt class="docutils literal"><span class="pre">MathJax.HTML</span></tt> object provides routines for creating HTML
|
||||||
elements and adding them to the page, and int particular, it contains
|
elements and adding them to the page, and in particular, it contains
|
||||||
the code that processes MathJax’s <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>HTML snippets</em></a>
|
the code that processes MathJax’s <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>HTML snippets</em></a>
|
||||||
and turns them into actual DOM objects. It also implements the
|
and turns them into actual DOM objects. It also implements the
|
||||||
methods used to manage the cookies used by MathJax.</p>
|
methods used to manage the cookies used by MathJax.</p>
|
||||||
|
@ -217,7 +217,7 @@ discussed below.</p>
|
||||||
<col class="field-body" />
|
<col class="field-body" />
|
||||||
<tbody valign="top">
|
<tbody valign="top">
|
||||||
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple">
|
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple">
|
||||||
<li><strong>name</strong> — the name that identifies the coookie</li>
|
<li><strong>name</strong> — the name that identifies the cookie</li>
|
||||||
<li><strong>data</strong> — object containing the data to store in the cookie</li>
|
<li><strong>data</strong> — object containing the data to store in the cookie</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -63,7 +63,7 @@ loading is asynchronous, a number of the methods below may return
|
||||||
before their actions are completed. For this reason, they include
|
before their actions are completed. For this reason, they include
|
||||||
callback functions that are called when the action completes. These
|
callback functions that are called when the action completes. These
|
||||||
can be used to synchronize actions that require the mathematics to be
|
can be used to synchronize actions that require the mathematics to be
|
||||||
completed before those action occur. See the <a class="reference internal" href="../callbacks.html#using-callbacks"><em>Using Callbacks</em></a> documentation for more details.</p>
|
completed before those actions occur. See the <a class="reference internal" href="../callbacks.html#using-callbacks"><em>Using Callbacks</em></a> documentation for more details.</p>
|
||||||
<div class="section" id="properties">
|
<div class="section" id="properties">
|
||||||
<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">
|
||||||
|
@ -114,12 +114,12 @@ additional properties and methods concerning the browser:</p>
|
||||||
<tt class="descname">isMac and isPC</tt></dt>
|
<tt class="descname">isMac and isPC</tt></dt>
|
||||||
<dd><p>These are boolean values that indicate whether the browser is
|
<dd><p>These are boolean values that indicate whether the browser is
|
||||||
running on a Macintosh computer or a Windows computer. They
|
running on a Macintosh computer or a Windows computer. They
|
||||||
will both be <tt class="docutils literal"><span class="pre">false</span></tt> for a Linux computer</p>
|
will both be <tt class="docutils literal"><span class="pre">false</span></tt> for a Linux computer.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">isForefox, isSafari, isChrome, isOpera, isMSIE, isKonqueror</tt></dt>
|
<tt class="descname">isFirefox, isSafari, isChrome, isOpera, isMSIE, isKonqueror</tt></dt>
|
||||||
<dd><p>These are <tt class="docutils literal"><span class="pre">true</span></tt> when the browser is the indicated one, and
|
<dd><p>These are <tt class="docutils literal"><span class="pre">true</span></tt> when the browser is the indicated one, and
|
||||||
<tt class="docutils literal"><span class="pre">false</span></tt> otherwise.</p>
|
<tt class="docutils literal"><span class="pre">false</span></tt> otherwise.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
@ -142,7 +142,7 @@ for instance.</p>
|
||||||
browsers and whose values are the functions to be performed.
|
browsers and whose values are the functions to be performed.
|
||||||
Each function is passed one parameter, which is the
|
Each function is passed one parameter, which is the
|
||||||
<tt class="docutils literal"><span class="pre">MathJax.Hub.Browser</span></tt> object. You do not need to include
|
<tt class="docutils literal"><span class="pre">MathJax.Hub.Browser</span></tt> object. You do not need to include
|
||||||
every browser as one of your choices (only those for which you
|
every browser as one of your choices — only those for which you
|
||||||
need to do special processing. For example:</p>
|
need to do special processing. 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">Browser</span><span class="p">.</span><span class="nx">Select</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">Hub</span><span class="p">.</span><span class="nx">Browser</span><span class="p">.</span><span class="nx">Select</span><span class="p">(</span>
|
||||||
<span class="nx">MSIE</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">browser</span><span class="p">)</span> <span class="p">{</span>
|
<span class="nx">MSIE</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">browser</span><span class="p">)</span> <span class="p">{</span>
|
||||||
|
@ -256,8 +256,8 @@ parameter.</p>
|
||||||
<dd><p>Registers a listener for a particular message being sent to the
|
<dd><p>Registers a listener for a particular message being sent to the
|
||||||
startup signal (where initialization and component startup
|
startup signal (where initialization and component startup
|
||||||
messages are sent). When the message equals the <cite>type</cite>, the
|
messages are sent). When the message equals the <cite>type</cite>, the
|
||||||
<cite>callback will be called with the message as its parameter.
|
<cite>callback</cite> will be called with the message as its parameter.
|
||||||
See the :ref:`Using Signals <using-signals></cite> dcocumentation for
|
See the <a class="reference internal" href="../signals.html#using-signals"><em>Using Signals</em></a> documentation for
|
||||||
more details.</p>
|
more details.</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" />
|
||||||
|
@ -283,7 +283,7 @@ more details.</p>
|
||||||
completely loaded and processed. (The callback is called when the
|
completely loaded and processed. (The callback is called when the
|
||||||
file makes its <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.loadComplete()</span></tt> call.) The
|
file makes its <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.loadComplete()</span></tt> call.) The
|
||||||
<cite>file</cite> should be the complete file name, e.g.,
|
<cite>file</cite> should be the complete file name, e.g.,
|
||||||
<tt class="docutils literal"><span class="pre">"[MathJax]/config/MathJax.js"</span></tt>.</p>
|
<tt class="docutils literal"><span class="pre">"[MathJax]/config/default.js"</span></tt>.</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" />
|
||||||
|
@ -555,8 +555,8 @@ element, or a reference to the DOM element itself.</p>
|
||||||
<tt class="descname">isJax</tt><big>(</big><em>element</em><big>)</big><a class="headerlink" href="#isJax" title="Permalink to this definition">¶</a></dt>
|
<tt class="descname">isJax</tt><big>(</big><em>element</em><big>)</big><a class="headerlink" href="#isJax" title="Permalink to this definition">¶</a></dt>
|
||||||
<dd><p>Returns <tt class="docutils literal"><span class="pre">0</span></tt> if the element is not a <tt class="docutils literal"><span class="pre"><script></span></tt> that can be
|
<dd><p>Returns <tt class="docutils literal"><span class="pre">0</span></tt> if the element is not a <tt class="docutils literal"><span class="pre"><script></span></tt> that can be
|
||||||
processed by MathJax or the result of an output jax, returns <tt class="docutils literal"><span class="pre">-1</span></tt>
|
processed by MathJax or the result of an output jax, returns <tt class="docutils literal"><span class="pre">-1</span></tt>
|
||||||
if element is an unprocessed <tt class="docutils literal"><span class="pre"><script></span></tt> tag that could be
|
if the element is an unprocessed <tt class="docutils literal"><span class="pre"><script></span></tt> tag that could be
|
||||||
handled by MathJax, and returns <tt class="docutils literal"><span class="pre">1</span></tt> if element is a processed
|
handled by MathJax, and returns <tt class="docutils literal"><span class="pre">1</span></tt> if the element is a processed
|
||||||
<tt class="docutils literal"><span class="pre"><script></span></tt> tag or an element that is the result of an output jax.</p>
|
<tt class="docutils literal"><span class="pre"><script></span></tt> tag or an element that is the result of an output 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" />
|
||||||
|
@ -579,7 +579,7 @@ handled by MathJax, and returns <tt class="docutils literal"><span class="pre">1
|
||||||
<tt class="descname">Insert</tt><big>(</big><em>dst</em>, <em>src</em><big>)</big><a class="headerlink" href="#Insert" title="Permalink to this definition">¶</a></dt>
|
<tt class="descname">Insert</tt><big>(</big><em>dst</em>, <em>src</em><big>)</big><a class="headerlink" href="#Insert" title="Permalink to this definition">¶</a></dt>
|
||||||
<dd><p>Inserts data from the <cite>src</cite> object into the <cite>dst</cite> object. The
|
<dd><p>Inserts data from the <cite>src</cite> object into the <cite>dst</cite> object. The
|
||||||
<cite>key:value</cite> pairs in <cite>src</cite> are (recursively) copied into <cite>dst</cite>, so
|
<cite>key:value</cite> pairs in <cite>src</cite> are (recursively) copied into <cite>dst</cite>, so
|
||||||
that if <cite>value</cite> is itself an object, its contents is copied into
|
that if <cite>value</cite> is itself an object, its content is copied into
|
||||||
the corresponding object in <cite>dst</cite>. That is, objects within <cite>src</cite>
|
the corresponding object in <cite>dst</cite>. That is, objects within <cite>src</cite>
|
||||||
are merged into the corresponding objects in <cite>dst</cite> (they don’t
|
are merged into the corresponding objects in <cite>dst</cite> (they don’t
|
||||||
replace them).</p>
|
replace them).</p>
|
||||||
|
@ -608,7 +608,7 @@ of a math element (i.e., an error in the MathJax code itself).
|
||||||
The <cite>script</cite> is a reference to the <tt class="docutils literal"><span class="pre"><script></span></tt> tag where the
|
The <cite>script</cite> is a reference to the <tt class="docutils literal"><span class="pre"><script></span></tt> tag where the
|
||||||
error occurred, and <cite>error</cite> is the <tt class="docutils literal"><span class="pre">Error</span></tt> object for the error.
|
error occurred, and <cite>error</cite> is the <tt class="docutils literal"><span class="pre">Error</span></tt> object for the error.
|
||||||
The default action is to insert an HTML snippet at the location of
|
The default action is to insert an HTML snippet at the location of
|
||||||
the script, but this routine can be overriden durring MathJax
|
the script, but this routine can be overriden during MathJax
|
||||||
configuration in order to perform some other action.
|
configuration in order to perform some other action.
|
||||||
<tt class="docutils literal"><span class="pre">MathJax.Hub.lastError</span></tt> holds the <tt class="docutils literal"><span class="pre">error</span></tt> value of the last
|
<tt class="docutils literal"><span class="pre">MathJax.Hub.lastError</span></tt> holds the <tt class="docutils literal"><span class="pre">error</span></tt> value of the last
|
||||||
error on the page.</p>
|
error on the page.</p>
|
||||||
|
|
|
@ -54,12 +54,14 @@
|
||||||
<p>The following links document the various components that make up
|
<p>The following links document the various components that make up
|
||||||
MathJax. These are implemented as JavaScript objects contained within
|
MathJax. These are implemented as JavaScript objects contained within
|
||||||
the single global variable, <tt class="docutils literal"><span class="pre">MathJax</span></tt>. Although JavaScript includes
|
the single global variable, <tt class="docutils literal"><span class="pre">MathJax</span></tt>. Although JavaScript includes
|
||||||
an objects with some inheritance capabilities, they do not constitute
|
an object system with some inheritance capabilities, they do not
|
||||||
a full object-oriented programming model, so MathJax implements
|
constitute a full object-oriented programming model, so MathJax
|
||||||
its own object library. This means there is an ambiguity when we
|
implements its own object library. This means there is an ambiguity
|
||||||
speak of an “object”, as it could be either a native JavaScript
|
when we speak of an “object”, as it could be either a native
|
||||||
object, or a MathJax object. We will use <cite>Object</cite> (capitalized) or
|
JavaScript object, or a MathJax object. When the distinction is
|
||||||
<cite>MathJax.Object</cite> for, when the distinction is important.</p>
|
importat, we will use <cite>Object</cite> (capitalized) or <cite>MathJax.Object</cite> for
|
||||||
|
the latter; the javascript object will always be listed in lower
|
||||||
|
case.</p>
|
||||||
<p>You may also want to view the <a class="reference internal" href="../index.html#advanced-topics"><em>advanced topics</em></a>
|
<p>You may also want to view the <a class="reference internal" href="../index.html#advanced-topics"><em>advanced topics</em></a>
|
||||||
on the main MathJax documentation page.</p>
|
on the main MathJax documentation page.</p>
|
||||||
<div class="toctree-wrapper compound">
|
<div class="toctree-wrapper compound">
|
||||||
|
|
|
@ -92,7 +92,7 @@ that class.</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">directory</tt></dt>
|
<tt class="descname">directory</tt></dt>
|
||||||
<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">
|
<dl class="describe">
|
||||||
|
|
|
@ -72,9 +72,9 @@ other jax classes.</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">directory</tt></dt>
|
<tt class="descname">directory</tt></dt>
|
||||||
<dd><p>The name of the jax directory (usually <tt class="docutils literal"><span class="pre">"[MathJax]/jax").</span>
|
<dd><p>The name of the jax directory (usually <tt class="docutils literal"><span class="pre">"[MathJax]/jax"</span></tt>).
|
||||||
<span class="pre">Overridden</span> <span class="pre">in</span> <span class="pre">the</span> <span class="pre">subclass</span> <span class="pre">to</span> <span class="pre">be</span> <span class="pre">the</span> <span class="pre">specific</span> <span class="pre">directory</span> <span class="pre">for</span> <span class="pre">the</span>
|
Overridden in the subclass to be the specific directory for the
|
||||||
<span class="pre">class,</span> <span class="pre">e.g.</span> <span class="pre">``"[MathJax]/jax/input"</span></tt>.</p>
|
class, e.g. <tt class="docutils literal"><span class="pre">"[MathJax]/jax/input"</span></tt>.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
|
@ -128,7 +128,7 @@ configuration subsection for the specific jax in question.</p>
|
||||||
<dd><p>This is the method that the <tt class="docutils literal"><span class="pre">MathJax.Hub</span></tt> calls when it needs the
|
<dd><p>This is the method that the <tt class="docutils literal"><span class="pre">MathJax.Hub</span></tt> calls when it needs the
|
||||||
input or output jax to process the given math <tt class="docutils literal"><span class="pre"><script></span></tt>. Its
|
input or output jax to process the given math <tt class="docutils literal"><span class="pre"><script></span></tt>. Its
|
||||||
default action is to start loading the jax’s <tt class="docutils literal"><span class="pre">jax.js</span></tt> file, and
|
default action is to start loading the jax’s <tt class="docutils literal"><span class="pre">jax.js</span></tt> file, and
|
||||||
redefine itself to simplu return the callback for the laod operation
|
redefine itself to simply return the callback for the load operation
|
||||||
(so that further calls to it will cause the processing to wait for the
|
(so that further calls to it will cause the processing to wait for the
|
||||||
callback). Once the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file has loaded, this method is
|
callback). Once the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file has loaded, this method is
|
||||||
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
|
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
|
||||||
|
@ -160,11 +160,11 @@ to <a class="reference internal" href="hub.html#Process" title="Process"><tt cla
|
||||||
<dd><p>This is a stub for a routine that should be defined by the jax’s
|
<dd><p>This is a stub for a routine that should be defined by the jax’s
|
||||||
<tt class="docutils literal"><span class="pre">jax.js</span></tt> file when it is loaded. It should perform the translation
|
<tt class="docutils literal"><span class="pre">jax.js</span></tt> file when it is loaded. It should perform the translation
|
||||||
action for the specific jax. For an input jax, it should return the
|
action for the specific jax. For an input jax, it should return the
|
||||||
<cite>ElementJax</cite> object that it created. The <a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> mehtod is
|
<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> method is
|
||||||
never called directly by MathJax; during the <a class="reference internal" href="ajax.html#loadComplete" title="loadComplete"><tt class="xref py py-meth docutils literal"><span class="pre">loadComplete()</span></tt></a>
|
never called directly by MathJax; during the <a class="reference internal" href="ajax.html#loadComplete" title="loadComplete"><tt class="xref py py-meth docutils literal"><span class="pre">loadComplete()</span></tt></a>
|
||||||
call, this funciton is copied to the <a class="reference internal" href="hub.html#Process" title="Process"><tt class="xref py py-meth docutils literal"><span class="pre">Process()</span></tt></a> method, and is
|
call, this function 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
|
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
|
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> method was not
|
||||||
redefined. That way, if the <tt class="docutils literal"><span class="pre">jax.js</span></tt> file fails to load for some
|
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
|
reason, you will receive an error trying to process mathematics with
|
||||||
this jax.</p>
|
this jax.</p>
|
||||||
|
@ -249,7 +249,7 @@ following:</p>
|
||||||
<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>
|
||||||
<li>perform the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.loadComplete()</span></tt> call for the
|
<li>Perform the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.loadComplete()</span></tt> call for the
|
||||||
<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>
|
||||||
|
|
|
@ -71,7 +71,7 @@ set via</p>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Because of a bug in Internet Explorer, in order to change the side of
|
<p>Because of a bug in Internet Explorer, in order to change the side of
|
||||||
the screen where the the message occurs, you must also set the side
|
the screen where the message occurs, you must also set the side
|
||||||
for <tt class="docutils literal"><span class="pre">#MathJax_MSIE_Frame</span></tt>, as in</p>
|
for <tt class="docutils literal"><span class="pre">#MathJax_MSIE_Frame</span></tt>, as in</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>
|
<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">styles</span><span class="o">:</span> <span class="p">{</span>
|
<span class="nx">styles</span><span class="o">:</span> <span class="p">{</span>
|
||||||
|
@ -87,7 +87,7 @@ displayed on screen, it gets an id number that is used when you want
|
||||||
to remove or change that message. That way, when a message is
|
to remove or change that message. That way, when a message is
|
||||||
removed, the previous message (if any) can be redisplayed if it hasn’t
|
removed, the previous message (if any) can be redisplayed if it hasn’t
|
||||||
been removed. This allows for intermittent messages (like file
|
been removed. This allows for intermittent messages (like file
|
||||||
loading messages) to obscure longer-term message (like “Processing
|
loading messages) to obscure longer-term messages (like “Processing
|
||||||
Math” messages) temporarily.</p>
|
Math” messages) temporarily.</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>
|
||||||
|
@ -168,11 +168,11 @@ directory).</p>
|
||||||
<col class="field-body" />
|
<col class="field-body" />
|
||||||
<tbody valign="top">
|
<tbody valign="top">
|
||||||
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple">
|
<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>
|
<li><strong>file</strong> — the name of the file being loaded</li>
|
||||||
</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 number for the message created.</p>
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -184,7 +184,7 @@ directory).</p>
|
||||||
<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>
|
<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
|
<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
|
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>
|
displayed. The default action is to check if 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
|
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
|
processing messages to a simpler form. This method can be overridden
|
||||||
to perform other sanitization of the message strings.</p>
|
to perform other sanitization of the message strings.</p>
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<span id="api-queue"></span><h1>The MathJax.Callback.Queue Class<a class="headerlink" href="#the-mathjax-callback-queue-class" title="Permalink to this headline">¶</a></h1>
|
<span id="api-queue"></span><h1>The MathJax.Callback.Queue Class<a class="headerlink" href="#the-mathjax-callback-queue-class" title="Permalink to this headline">¶</a></h1>
|
||||||
<p>The <tt class="docutils literal"><span class="pre">MathJax.Callback.Queue</span></tt> object is one of the key mechanisms
|
<p>The <tt class="docutils literal"><span class="pre">MathJax.Callback.Queue</span></tt> object is one of the key mechanisms
|
||||||
used by MathJax to synchronize its actions with those that occur
|
used by MathJax to synchronize its actions with those that occur
|
||||||
asynchronously, like loading files and stylesheets. A <cite>Queue</cite> obejct
|
asynchronously, like loading files and stylesheets. A <cite>Queue</cite> object
|
||||||
is used to coordinate a sequence of actions so that they are performed
|
is used to coordinate a sequence of actions so that they are performed
|
||||||
one after another, even when one action has to wait for an
|
one after another, even when one action has to wait for an
|
||||||
asynchronous process to complete. This guarantees that operations are
|
asynchronous process to complete. This guarantees that operations are
|
||||||
|
@ -120,17 +120,16 @@ synchronization, say as an entry in some other queue).</p>
|
||||||
<dl class="method">
|
<dl class="method">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">Process</tt><big>(</big><big>)</big></dt>
|
<tt class="descname">Process</tt><big>(</big><big>)</big></dt>
|
||||||
<dd><blockquote>
|
<dd><p>Process the commands in the queue, provided the queue is not
|
||||||
<div>Process the commands in the queue, provided the queue is not
|
|
||||||
waiting for another command to complete. This method is used
|
waiting for another command to complete. This method is used
|
||||||
internally; you should not need to call it yourself.</div></blockquote>
|
internally; you should not need to call it yourself.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="method">
|
<dl class="method">
|
||||||
<dt id="Suspend">
|
<dt id="Suspend">
|
||||||
<tt class="descname">Suspend</tt><big>(</big><big>)</big><a class="headerlink" href="#Suspend" title="Permalink to this definition">¶</a></dt>
|
<tt class="descname">Suspend</tt><big>(</big><big>)</big><a class="headerlink" href="#Suspend" title="Permalink to this definition">¶</a></dt>
|
||||||
<dd><p>Increments the <cite>running</cite> property, indicating that any commands that
|
<dd><p>Increments the <cite>running</cite> property, indicating that any commands that
|
||||||
are added the queue should not be executed immediately, but should
|
are added to the queue should not be executed immediately, but should
|
||||||
be queued for later execution (when its <a class="reference internal" href="#Resume" title="Resume"><tt class="xref py py-meth docutils literal"><span class="pre">Resume()</span></tt></a> is
|
be queued for later execution (when its <a class="reference internal" href="#Resume" title="Resume"><tt class="xref py py-meth docutils literal"><span class="pre">Resume()</span></tt></a> is
|
||||||
called). This method is used internally; you should not need to
|
called). This method is used internally; you should not need to
|
||||||
call it yourself.</p>
|
call it yourself.</p>
|
||||||
|
@ -154,7 +153,7 @@ rather than a callback specification. A callback to this function
|
||||||
(passing it the original callback) is queued instead, and it
|
(passing it the original callback) is queued instead, and it
|
||||||
simply returns the callback it was passed. Since the queue will
|
simply returns the callback it was passed. Since the queue will
|
||||||
wait for a callback if it is the return value of one of the
|
wait for a callback if it is the return value of one of the
|
||||||
commands it executes, this effectively make the queue wait for the
|
commands it executes, this effectively makes the queue wait for the
|
||||||
original callback at that point in the command queue.</p>
|
original callback at that point in the command queue.</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" />
|
||||||
|
|
|
@ -56,9 +56,9 @@
|
||||||
<p>The <tt class="docutils literal"><span class="pre">MathJax.Callback.Signal</span></tt> object is one of the key mechanisms
|
<p>The <tt class="docutils literal"><span class="pre">MathJax.Callback.Signal</span></tt> object is one of the key mechanisms
|
||||||
used by MathJax to synchronize its actions with those that occur
|
used by MathJax to synchronize its actions with those that occur
|
||||||
asynchronously, like loading files and stylesheets. A <cite>Signal</cite> object
|
asynchronously, like loading files and stylesheets. A <cite>Signal</cite> object
|
||||||
is used to pulicise the fact that MathJax has performed certain
|
is used to publicize the fact that MathJax has performed certain
|
||||||
actions, giving other code running the the web page the chance to
|
actions, giving other code running the web page the chance to react to
|
||||||
react to those actions. See <a class="reference internal" href="../synchronize.html#synchronization"><em>Synchronizing with MathJax</em></a> for more details, and <a class="reference internal" href="../signals.html#using-signals"><em>Using Signals</em></a> in particular for examples of how to specify and use
|
those actions. See <a class="reference internal" href="../synchronize.html#synchronization"><em>Synchronizing with MathJax</em></a> for more details, and <a class="reference internal" href="../signals.html#using-signals"><em>Using Signals</em></a> in particular for examples of how to specify and use
|
||||||
MathJax <cite>Signal</cite> objects.</p>
|
MathJax <cite>Signal</cite> objects.</p>
|
||||||
<p>The <cite>Callback Signal</cite> object is a subclass of the <a class="reference internal" href="queue.html#api-queue"><em>Callback Queue</em></a> object.</p>
|
<p>The <cite>Callback Signal</cite> object is a subclass of the <a class="reference internal" href="queue.html#api-queue"><em>Callback Queue</em></a> object.</p>
|
||||||
<div class="section" id="properties">
|
<div class="section" id="properties">
|
||||||
|
@ -75,7 +75,7 @@ the signal return references to the same object.</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">posted</tt></dt>
|
<tt class="descname">posted</tt></dt>
|
||||||
<dd><p>Array used internally to stored the post history so that when new
|
<dd><p>Array used internally to store the post history so that when new
|
||||||
listeners express interests in this signal, they can be informed
|
listeners express interests in this signal, they can be informed
|
||||||
of the signals that have been posted so far. This can be cleared
|
of the signals that have been posted so far. This can be cleared
|
||||||
using the signal’s <a class="reference internal" href="message.html#Clear" title="Clear"><tt class="xref py py-meth docutils literal"><span class="pre">Clear()</span></tt></a> method.</p>
|
using the signal’s <a class="reference internal" href="message.html#Clear" title="Clear"><tt class="xref py py-meth docutils literal"><span class="pre">Clear()</span></tt></a> method.</p>
|
||||||
|
@ -86,7 +86,7 @@ using the signal’s <a class="reference internal" href="message.html#Clear"
|
||||||
<tt class="descname">listeners</tt></dt>
|
<tt class="descname">listeners</tt></dt>
|
||||||
<dd><p>Array of callbacks to the listeners who have expressed interest in
|
<dd><p>Array of callbacks to the listeners who have expressed interest in
|
||||||
hearing about posts to this signal. When a post occurs, the
|
hearing about posts to this signal. When a post occurs, the
|
||||||
listeners are called in each turn, passing them the message that
|
listeners are called, each in turn, passing them the message that
|
||||||
was posted.</p>
|
was posted.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ was posted.</p>
|
||||||
<dd><p>Posts a message to all the listeners for the signal. The listener
|
<dd><p>Posts a message to all the listeners for the signal. The listener
|
||||||
callbacks are called in turn (with the message as an argument),
|
callbacks are called in turn (with the message as an argument),
|
||||||
and if any return a <cite>Callback</cite> object, the posting will be
|
and if any return a <cite>Callback</cite> object, the posting will be
|
||||||
suspended until the callback is exectured. In this way, the
|
suspended until the callback is executed. In this way, the
|
||||||
<a class="reference internal" href="#Post" title="Post"><tt class="xref py py-meth docutils literal"><span class="pre">Post()</span></tt></a> call can operate asynchronously, and so the
|
<a class="reference internal" href="#Post" title="Post"><tt class="xref py py-meth docutils literal"><span class="pre">Post()</span></tt></a> call can operate asynchronously, and so the
|
||||||
<cite>callback</cite> parameter is used to synchronize with its operation;
|
<cite>callback</cite> parameter is used to synchronize with its operation;
|
||||||
the <cite>callback</cite> will be called when all the listeners have responded
|
the <cite>callback</cite> will be called when all the listeners have responded
|
||||||
|
@ -224,7 +224,7 @@ the given message. This is a little easier than having to write a
|
||||||
function that must check the message each time it is called.
|
function that must check the message each time it is called.
|
||||||
Although the <cite>message</cite> here is a string, if a message posted to the
|
Although the <cite>message</cite> here is a string, if a message posted to the
|
||||||
signal is an array, then only the first element of that array is
|
signal is an array, then only the first element of that array is
|
||||||
used to match against message. That way, if a message contains an
|
used to match against the message. That way, if a message contains an
|
||||||
identifier plus arguments, the hook will match the identifier and
|
identifier plus arguments, the hook will match the identifier and
|
||||||
still get called with the complete set of arguments.</p>
|
still get called with the complete set of arguments.</p>
|
||||||
<p>Returns the <cite>Callback</cite> object that was produced.</p>
|
<p>Returns the <cite>Callback</cite> object that was produced.</p>
|
||||||
|
|
|
@ -77,7 +77,7 @@ operate asynchronously is handled here.</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">MathJax.Message</tt></dt>
|
<tt class="descname">MathJax.Message</tt></dt>
|
||||||
<dd><p>Contains the code to handle the intermittant message window that
|
<dd><p>Contains the code to handle the intermittent message window that
|
||||||
periodically appears in the lower left-hand corner of the window.</p>
|
periodically appears in the lower left-hand corner of the window.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ itself as <tt class="docutils literal"><span class="pre">MathJax.OutputJax["
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">MathJax.ElementJax</tt></dt>
|
<tt class="descname">MathJax.ElementJax</tt></dt>
|
||||||
<dd><p>The base class for all element <cite>jax</cite> objects. Subclasses for
|
<dd><p>The base class for all element <cite>jax</cite> objects. Subclasses for
|
||||||
specific element jax are creates as sub-objects of
|
specific element jax are created as sub-objects of
|
||||||
<tt class="docutils literal"><span class="pre">MathJax.ElementJax</span></tt>. For example, the mml element jax loads
|
<tt class="docutils literal"><span class="pre">MathJax.ElementJax</span></tt>. For example, the mml element jax loads
|
||||||
itself as <tt class="docutils literal"><span class="pre">MathJax.ElementJax.mml</span></tt>.</p>
|
itself as <tt class="docutils literal"><span class="pre">MathJax.ElementJax.mml</span></tt>.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
|
@ -72,9 +72,9 @@ callback specifications as arguments and return callback structures.
|
||||||
These routines always will return a callback even when none was
|
These routines always will return a callback even when none was
|
||||||
specified in the arguments, and in that case, the callback is a “do
|
specified in the arguments, and in that case, the callback is a “do
|
||||||
nothing” callback. The reason for this is so that the resulting
|
nothing” callback. The reason for this is so that the resulting
|
||||||
callback can be used can be used in a <cite>MathJax.Callback.Queue</cite> for
|
callback can be used in a <cite>MathJax.Callback.Queue</cite> for synchronization
|
||||||
synchronization purposes, so that the actions following it in the
|
purposes, so that the actions following it in the queue will not be
|
||||||
queue will not be performed until after the callback has been fired.</p>
|
performed until after the callback has been fired.</p>
|
||||||
<p>For example, the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> method can be used to
|
<p>For example, the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> method can be used to
|
||||||
load external files, and it returns a callback that is called when the
|
load external files, and it returns a callback that is called when the
|
||||||
file has been loaded and executed. If you want to load several files
|
file has been loaded and executed. If you want to load several files
|
||||||
|
@ -82,7 +82,7 @@ and wait for them all to be loaded before performing some action, you
|
||||||
can create a <cite>Queue</cite> into which you push the results of the
|
can create a <cite>Queue</cite> into which you push the results of the
|
||||||
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> calls, and then push a callback for the
|
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> calls, and then push a callback for the
|
||||||
action. The final action will not be performed until all the
|
action. The final action will not be performed until all the
|
||||||
file-load callbacks (which preceed it int he queue) have been called;
|
file-load callbacks (which precede it in the queue) have been called;
|
||||||
i.e., the action will not occur until all the files are loaded.</p>
|
i.e., the action will not occur until all the files are loaded.</p>
|
||||||
<div class="section" id="specifying-a-callback">
|
<div class="section" id="specifying-a-callback">
|
||||||
<h2>Specifying a Callback<a class="headerlink" href="#specifying-a-callback" title="Permalink to this headline">¶</a></h2>
|
<h2>Specifying a Callback<a class="headerlink" href="#specifying-a-callback" title="Permalink to this headline">¶</a></h2>
|
||||||
|
@ -151,7 +151,7 @@ the object without knowing explicitly where the object is stored.</p>
|
||||||
</div>
|
</div>
|
||||||
<p>creates an object that contains three items, a <cite>firstname</cite>, and
|
<p>creates an object that contains three items, a <cite>firstname</cite>, and
|
||||||
<cite>lastname</cite>, and a method that shows the person’s full name in an
|
<cite>lastname</cite>, and a method that shows the person’s full name in an
|
||||||
alert. So <tt class="docutils literal"><span class="pre">aPerson.fullName()</span></tt> would cause an alert with the text
|
alert. So <tt class="docutils literal"><span class="pre">aPerson.showName()</span></tt> would cause an alert with the text
|
||||||
<tt class="docutils literal"><span class="pre">John</span> <span class="pre">Smith</span></tt> to appear. Note, however that this only works if the
|
<tt class="docutils literal"><span class="pre">John</span> <span class="pre">Smith</span></tt> to appear. Note, however that this only works if the
|
||||||
method is called as <tt class="docutils literal"><span class="pre">aPerson.showName()</span></tt>; if instead you did</p>
|
method is called as <tt class="docutils literal"><span class="pre">aPerson.showName()</span></tt>; if instead you did</p>
|
||||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">f</span> <span class="o">=</span> <span class="nx">aPerson</span><span class="p">.</span><span class="nx">showName</span><span class="p">;</span> <span class="c1">// assign f the function from aPerson</span>
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">f</span> <span class="o">=</span> <span class="nx">aPerson</span><span class="p">.</span><span class="nx">showName</span><span class="p">;</span> <span class="c1">// assign f the function from aPerson</span>
|
||||||
|
@ -197,7 +197,7 @@ well by including them in the array that specifies the callback:</p>
|
||||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"filename"</span><span class="p">,[</span><span class="s2">"method"</span><span class="p">,</span><span class="nx">object</span><span class="p">,</span><span class="nx">arg1</span><span class="p">,</span><span class="nx">arg2</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">Ajax</span><span class="p">.</span><span class="nx">Require</span><span class="p">(</span><span class="s2">"filename"</span><span class="p">,[</span><span class="s2">"method"</span><span class="p">,</span><span class="nx">object</span><span class="p">,</span><span class="nx">arg1</span><span class="p">,</span><span class="nx">arg2</span><span class="p">,...]);</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>This approach is useful when you are pushing a callback for one one
|
<p>This approach is useful when you are pushing a callback for one of
|
||||||
MathJax’s Hub routines into the MathJax processing queue. For example,</p>
|
MathJax’s Hub routines into the MathJax processing queue. 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">Queue</span><span class="p">([</span><span class="s2">"Typeset"</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="s2">"MathDiv"</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">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Typeset"</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="s2">"MathDiv"</span><span class="p">]);</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
@ -227,7 +227,7 @@ when it is called, Internet Explorer does not implement that feature,
|
||||||
so you can’t rely on it.) You can use a <cite>Callback</cite> object to
|
so you can’t rely on it.) You can use a <cite>Callback</cite> object to
|
||||||
do this, and the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback()</span></tt> method will create one for
|
do this, and the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback()</span></tt> method will create one for
|
||||||
you. For example,</p>
|
you. For example,</p>
|
||||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">myTimer</span> <span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"x = "</span><span class="o">+</span><span class="nx">x</span><span class="p">)}</span>
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">f</span><span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="nx">alert</span><span class="p">(</span><span class="s2">"x = "</span><span class="o">+</span><span class="nx">x</span><span class="p">)}</span>
|
||||||
<span class="nx">setTimeout</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">([</span><span class="nx">f</span><span class="p">,</span><span class="s2">"Hello World!"</span><span class="p">]),</span><span class="mi">500</span><span class="p">);</span>
|
<span class="nx">setTimeout</span><span class="p">(</span><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Callback</span><span class="p">([</span><span class="nx">f</span><span class="p">,</span><span class="s2">"Hello World!"</span><span class="p">]),</span><span class="mi">500</span><span class="p">);</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -56,7 +56,7 @@ the wider community of MathJax users. The MathJax project maintains
|
||||||
forums where users can ask questions about how to use MathJax, make
|
forums where users can ask questions about how to use MathJax, make
|
||||||
suggestions about future features for MathJax, and present their own
|
suggestions about future features for MathJax, and present their own
|
||||||
solutions to problems that they have faced. There is also a
|
solutions to problems that they have faced. There is also a
|
||||||
bug-traking system where you can report errors that you have found
|
bug-tracking system where you can report errors that you have found
|
||||||
with MathJax in your environment.</p>
|
with MathJax in your environment.</p>
|
||||||
<div class="section" id="forums">
|
<div class="section" id="forums">
|
||||||
<span id="community-forums"></span><h2>Forums<a class="headerlink" href="#forums" title="Permalink to this headline">¶</a></h2>
|
<span id="community-forums"></span><h2>Forums<a class="headerlink" href="#forums" title="Permalink to this headline">¶</a></h2>
|
||||||
|
@ -68,7 +68,7 @@ place to find the examples you are looking for.</p>
|
||||||
<p>If you want to discuss MathJax development, please use the <a class="reference external" href="http://groups.google.com/group/mathjax-dev">MathJax Dev Google
|
<p>If you want to discuss MathJax development, please use the <a class="reference external" href="http://groups.google.com/group/mathjax-dev">MathJax Dev Google
|
||||||
Group</a>. We made this group
|
Group</a>. We made this group
|
||||||
to discuss anything beyond what an end-user might be interested in, so if you
|
to discuss anything beyond what an end-user might be interested in, so if you
|
||||||
having any suggestions or questions about MathJax performance, technology, or
|
have any suggestions or questions about MathJax performance, technology, or
|
||||||
design, feel free to submit it to the group.</p>
|
design, feel free to submit it to the group.</p>
|
||||||
<p>The community is only as good as the users who participate, so if
|
<p>The community is only as good as the users who participate, so if
|
||||||
you have something to offer, please take time to make a post on one of
|
you have something to offer, please take time to make a post on one of
|
||||||
|
@ -81,7 +81,7 @@ 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-git"><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 latest version.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="powered-by-mathjax">
|
<div class="section" id="powered-by-mathjax">
|
||||||
<span id="badge"></span><h2>“Powered by MathJax”<a class="headerlink" href="#powered-by-mathjax" title="Permalink to this headline">¶</a></h2>
|
<span id="badge"></span><h2>“Powered by MathJax”<a class="headerlink" href="#powered-by-mathjax" title="Permalink to this headline">¶</a></h2>
|
||||||
|
|
|
@ -183,8 +183,8 @@ details on the options that control the <tt class="docutils literal"><span class
|
||||||
<div class="section" id="the-accessible-configuration-file">
|
<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>
|
<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
|
<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
|
<tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt> except that it includes options that are
|
||||||
designed for assitive technology, particularly for those with visual
|
designed for assistive technology, particularly for those with visual
|
||||||
challenges. It is equivalent to the following configuration:</p>
|
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>
|
<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">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">"MMLorHTML.js"</span><span class="p">],</span>
|
||||||
|
@ -199,7 +199,7 @@ challenges. It is equivalent to the following configuration:</p>
|
||||||
<span class="p">});</span>
|
<span class="p">});</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>This turns off the MathJax contextual Message for Internet Explorer, since
|
<p>This turns off the MathJax contextual menu for Internet Explorer, since
|
||||||
it can interfere with some screen readers. It also sets the zoom trigger
|
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
|
to double-click, so that readers can see a larger version of the
|
||||||
mathematics but double-clicking on any equation.</p>
|
mathematics but double-clicking on any equation.</p>
|
||||||
|
|
|
@ -79,9 +79,10 @@ web server’s directory hierarchy, you might use</p>
|
||||||
one containing the page that will load MathJax, then there are issues
|
one containing the page that will load MathJax, then there are issues
|
||||||
involved in doing so that you need to take into consideration. See the
|
involved in doing so that you need to take into consideration. See the
|
||||||
<a class="reference internal" href="installation.html#cross-domain-linking"><em>Notes About Shared Servers</em></a> for more details.</p>
|
<a class="reference internal" href="installation.html#cross-domain-linking"><em>Notes About Shared Servers</em></a> for more details.</p>
|
||||||
<p>When you load MathJax, it is common to include additional parameters for
|
<p>When you load MathJax, it is common to request a specific
|
||||||
MathJax as part of the URL. These control MathJax’s configuration, and are
|
configuration file as discussed in the section on <a class="reference internal" href="#config-files"><em>Using a
|
||||||
discussed in the <a class="reference internal" href="options/index.html#configuration"><em>Configuration Objects</em></a> section. A
|
Configuration File</em></a> below, and in more detail in the
|
||||||
|
<a class="reference internal" href="config-files.html#common-configurations"><em>Common Configurations</em></a> section. A
|
||||||
typical invocation of MathJax would be</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>
|
<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="na">src=</span><span class="s">"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></span>
|
||||||
|
@ -94,7 +95,8 @@ 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
|
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
|
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
|
block in order to tell MathJax how to read and display the mathematics on
|
||||||
your pages. See the section below for details.</p>
|
your pages. See the section below on <a class="reference internal" href="#inline-config"><em>Using In-line Configuration
|
||||||
|
Options</em></a> for details.</p>
|
||||||
<p>It is best to load MathJax in the document’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
|
||||||
|
@ -116,8 +118,8 @@ handled by servers around the world. That means that you should get access
|
||||||
to a server geographically near you, for a fast, reliable connection.</p>
|
to a server geographically near you, for a fast, reliable connection.</p>
|
||||||
<p>The CDN hosts the most current version of MathJax, as well as older
|
<p>The CDN hosts the most current version of MathJax, as well as older
|
||||||
versions, so you can either link to a version that stays up-to-date as
|
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
|
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>
|
that your pages always use the same version of MathJax.</p>
|
||||||
<p>The URL that you use to obtain MathJax determines the version that you
|
<p>The URL that you use to obtain MathJax determines the version that you
|
||||||
get. The CDN has the following directory structure:</p>
|
get. The CDN has the following directory structure:</p>
|
||||||
<div class="highlight-sh"><div class="highlight"><pre>mathjax/ <span class="c"># project-name</span>
|
<div class="highlight-sh"><div class="highlight"><pre>mathjax/ <span class="c"># project-name</span>
|
||||||
|
@ -136,7 +138,7 @@ 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
|
1.1b, etc., even if such releases are not actually prepared for
|
||||||
distribution (they likely won’t be).</p>
|
distribution (they likely won’t be).</p>
|
||||||
<p>We may occasionally introduce directories for betas, as indicated above,
|
<p>We may occasionally introduce directories for betas, as indicated above,
|
||||||
but they will be temprorary, and will be removed after the official
|
but they will be temporary, and will be removed after the official
|
||||||
release.</p>
|
release.</p>
|
||||||
<p>To load from a particular release, use the directory for that release.
|
<p>To load from a particular release, use the directory for that release.
|
||||||
For example,</p>
|
For example,</p>
|
||||||
|
@ -151,14 +153,19 @@ versions, while</p>
|
||||||
<p>will always be the most current stable release, so it will go from v1.1 to
|
<p>will always be the most current stable release, so it will go from v1.1 to
|
||||||
v1.2 automatically when that is released. Note that all the versions
|
v1.2 automatically when that is released. Note that all the versions
|
||||||
available on the CDN are stable versions; the development version is not
|
available on the CDN are stable versions; the development version is not
|
||||||
hosted on the CDN.</p>
|
hosted on the CDN. (If you wish to use the development version of
|
||||||
|
MathJax, you will need to install your own copy; see <a class="reference internal" href="installation.html#installation"><em>Installing
|
||||||
|
and Testing MathJax</em></a> for information on how to do that.)</p>
|
||||||
<p>The use of <tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt> is governed by its <a class="reference external" href="http://www.mathjax.org/download/mathjax-cdn-terms-of-service/">terms of service</a>, so be
|
<p>The use of <tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt> is governed by its <a class="reference external" href="http://www.mathjax.org/download/mathjax-cdn-terms-of-service/">terms of service</a>, so be
|
||||||
sure to read that before linking to the MathJax CDN server.</p>
|
sure to read that before linking to the MathJax CDN server.</p>
|
||||||
|
<p>If you wish to use the MathJax CDN but use your own configuration file
|
||||||
|
rather than one of the pre-defined ones, see the information at the end
|
||||||
|
of the <a class="reference internal" href="#config-files"><em>Using a configuration file</em></a> section below.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="configuring-mathjax">
|
<div class="section" id="configuring-mathjax">
|
||||||
<h2>Configuring MathJax<a class="headerlink" href="#configuring-mathjax" title="Permalink to this headline">¶</a></h2>
|
<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
|
<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
|
including configuration commands within the web page itself. These can be
|
||||||
used independently, or in combination. For example, you can load a main
|
used independently, or in combination. For example, you can load a main
|
||||||
pre-defined configuration file, but include in-line commands to
|
pre-defined configuration file, but include in-line commands to
|
||||||
adjust the configuration to your needs.</p>
|
adjust the configuration to your needs.</p>
|
||||||
|
@ -192,7 +199,7 @@ MathML if the browser supports it, and HTML-with-CSS otherwise.</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">TeX-AMS_HTML.js</tt></dt>
|
<tt class="descname">TeX-AMS_HTML.js</tt></dt>
|
||||||
<dd><p>Allows math to be specified in TeX or LaTeX notation (with the
|
<dd><p>Allows math to be specified in TeX or LaTeX notation, with the
|
||||||
<cite>AMSmath</cite> and <cite>AMSsymbols</cite> packages included, and produces output
|
<cite>AMSmath</cite> and <cite>AMSsymbols</cite> packages included, and produces output
|
||||||
using the HTML-CSS output processor.</p>
|
using the HTML-CSS output processor.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
@ -225,7 +232,7 @@ component will require a separate file to be loaded, and that can cause
|
||||||
delays before the mathematics is displayed. The combined configuration
|
delays before the mathematics is displayed. The combined configuration
|
||||||
files load the majority of the needed files all as one large file, reducing
|
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
|
the number of network requests that are needed. That means you will
|
||||||
probably be getting the componets that MathJax needs faster than you would
|
probably be getting the components that MathJax needs faster than you would
|
||||||
without the combined file, but you may be loading components that are never
|
without the combined file, but you may be loading components that are never
|
||||||
actually used; that is the trade off.</p>
|
actually used; that is the trade off.</p>
|
||||||
<p>Each of the combined configuration files comes in two flavors: the ones
|
<p>Each of the combined configuration files comes in two flavors: the ones
|
||||||
|
@ -235,7 +242,7 @@ output processors. For example, with <tt class="docutils literal"><span class="
|
||||||
<tt class="docutils literal"><span class="pre">TeX-AMS_HTML-full.js</span></tt>, the latter includes the complete HTML-CSS output
|
<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
|
processor. The “full” configuration files are substantially larger (on
|
||||||
the order of 70KB), so you need to decide whether it is worth loading the
|
the order of 70KB), so you need to decide whether it is worth loading the
|
||||||
full configuraiton for your pages.</p>
|
full configuration for your pages.</p>
|
||||||
<p>If most of your pages include mathematics, then it is to your advantage to
|
<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
|
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
|
a blog or wiki that only includes mathematics occasionally, then perhaps it
|
||||||
|
@ -270,17 +277,30 @@ can use</p>
|
||||||
<span class="nt"></script></span>
|
<span class="nt"></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>to first load the main configuraiton, then the local modifications. You
|
<p>to first load the main configuration, then the local modifications.</p>
|
||||||
can also load MathJax from the CDN and a local configuration from your own
|
<p>You can also load MathJax from the MathJax CDN server but use a configuration from
|
||||||
server:</p>
|
your own local server:</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>
|
<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,http://myserver.com/MathJax/config/local/local.js"</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,http://myserver.com/MathJax/config/local/local.js"</span><span class="nt">></span>
|
||||||
<span class="nt"></script></span>
|
<span class="nt"></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
|
<p>Because the <tt class="docutils literal"><span class="pre">local.js</span></tt> file is not on the CDN server, you must give
|
||||||
|
the complete URL to the local configuration file. Note that you also
|
||||||
|
have to edit the <a class="reference internal" href="api/ajax.html#loadComplete" title="loadComplete"><tt class="xref py py-meth docutils literal"><span class="pre">loadComplete()</span></tt></a> call that is at the bottom of
|
||||||
|
the configuration file to change it from
|
||||||
|
<tt class="docutils literal"><span class="pre">[MathJax]/config/local/local.js</span></tt> to the complete URL as you give it
|
||||||
|
in the <tt class="docutils literal"><span class="pre">config</span></tt> parameter:</p>
|
||||||
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Ajax</span><span class="p">.</span><span class="nx">loadComplete</span><span class="p">(</span><span class="s2">"http://myserver.com/MathJax/config/local/local.js"</span><span class="p">);</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>That is because the <tt class="docutils literal"><span class="pre">[MathJax]</span></tt> in the original URL refers to the
|
||||||
|
root directory where <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> was loaded, which is on the CDN,
|
||||||
|
not your local server, and so you need to tell MathJax the actual
|
||||||
|
location of your configuration file.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="using-in-line-configuration-options">
|
<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>
|
<span id="inline-config"></span><h2>Using in-line configuration options<a class="headerlink" href="#using-in-line-configuration-options" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>The second way to configure MathJax is through <cite>in-line configuration</cite>,
|
<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
|
that puts the configuration options within the web page itself. This
|
||||||
process has changed in version 1.1 to make it compatible with HTML5.
|
process has changed in version 1.1 to make it compatible with HTML5.
|
||||||
|
@ -317,15 +337,15 @@ process them in order as they appear in the document.</p>
|
||||||
<p>This example includes the <cite>tex2jax</cite> preprocessor and configures it to use
|
<p>This example includes the <cite>tex2jax</cite> preprocessor and configures it to use
|
||||||
both the standard <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a> and <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a> math delimiters. It uses
|
both the standard <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a> and <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a> math delimiters. It uses
|
||||||
the <cite>TeX</cite> input processor and the <cite>HTML-CSS</cite> output processor, and forces the
|
the <cite>TeX</cite> input processor and the <cite>HTML-CSS</cite> output processor, and forces the
|
||||||
HTML-CSS processor to use the TeX fonts rather that other locally installed
|
HTML-CSS processor to use the TeX fonts rather than other locally installed
|
||||||
fonts (e.g., <a class="reference internal" href="glossary.html#term-stix"><em class="xref std std-term">STIX</em></a> fonts). See the <a class="reference internal" href="options/index.html#configuration"><em>configuration options</em></a> section (or the comments in the <tt class="docutils literal"><span class="pre">config/default.js</span></tt>
|
fonts (e.g., <a class="reference internal" href="glossary.html#term-stix"><em class="xref std std-term">STIX</em></a> fonts). See the <a class="reference internal" href="options/index.html#configuration"><em>configuration options</em></a> section (or the comments in the <tt class="docutils literal"><span class="pre">config/default.js</span></tt>
|
||||||
file) for more information about the configuration options that you can
|
file) for more information about the configuration options that you can
|
||||||
include in the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. Note that this
|
include in the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. Note that this
|
||||||
configuration does <strong>not</strong> load any pre-defined configuration file.</p>
|
configuration does <strong>not</strong> load any pre-defined configuration file.</p>
|
||||||
<p>Note that you can combine in-line configuration with file-based
|
<p>Note that you can combine in-line configuration with file-based
|
||||||
configuration, simply include <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> scripts as above,
|
configuration; simply include <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> scripts as above,
|
||||||
but also include <tt class="docutils literal"><span class="pre">config=filename</span></tt> when you load the <tt class="docutils literal"><span class="pre">MathJax.js</span></tt>
|
but also include <tt class="docutils literal"><span class="pre">config=filename</span></tt> when you load the <tt class="docutils literal"><span class="pre">MathJax.js</span></tt>
|
||||||
file. For example, the <cite>tex2jax</cite> preprocessor does <strong>not</strong> the TeX
|
file. For example, the <cite>tex2jax</cite> preprocessor does <strong>not</strong> enable the TeX
|
||||||
single-dollar in-line math delimiters by default. You can load one of the
|
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
|
pre-defined configuration files that include the TeX preprocessor, and use
|
||||||
an in-line configuration block to enable the single-dollar signs:</p>
|
an in-line configuration block to enable the single-dollar signs:</p>
|
||||||
|
@ -368,11 +388,12 @@ execute until all the images and other media are available. (If you have
|
||||||
used a combined configuration file, however, it already includes all the
|
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
|
main files that MathJax needs, so there is not much loss in delaying the
|
||||||
startup.)</p>
|
startup.)</p>
|
||||||
<p>You can set <tt class="docutils literal"><span class="pre">delayStartupUntil=configured</span></tt> in order to delay the startup
|
<p>You can set <tt class="docutils literal"><span class="pre">delayStartupUntil=configured</span></tt> in order to delay the
|
||||||
configuration until the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Configured()</span></tt> method is
|
startup configuration until the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Configured()</span></tt>
|
||||||
called. This allows you to delay startup until later on the page, but
|
method is called. This allows you to delay startup until later on the
|
||||||
then restart MathJax configuration process as soon as possible rather than
|
page, but then restart the MathJax configuration process as soon as
|
||||||
waiting for the entire page to load. For example, you could use</p>
|
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>
|
<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="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>
|
<span class="nt"></script></span>
|
||||||
|
@ -386,7 +407,7 @@ waiting for the entire page to load. For example, you could use</p>
|
||||||
</div>
|
</div>
|
||||||
<p>in its footer, so that MathJax will delay setting up until the footer is
|
<p>in its footer, so that MathJax will delay setting up until the footer is
|
||||||
reached, but will not have to wait until images and other files are
|
reached, but will not have to wait until images and other files are
|
||||||
laoded. If you have <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> script tags within the main
|
loaded. If you have <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> script tags within the main
|
||||||
body of the document, MathJax will read and process those before
|
body of the document, MathJax will read and process those before
|
||||||
continuing its startup. In this way you can use a default configuration
|
continuing its startup. In this way you can use a default configuration
|
||||||
that can be modified on a page-by-page basis.</p>
|
that can be modified on a page-by-page basis.</p>
|
||||||
|
|
|
@ -88,7 +88,7 @@ configuration.</p>
|
||||||
</div>
|
</div>
|
||||||
<p>You can adjust the <tt class="docutils literal"><span class="pre">config</span></tt> variable to your needs, but be careful to get
|
<p>You can adjust the <tt class="docutils literal"><span class="pre">config</span></tt> variable to your needs, but be careful to get
|
||||||
the commas right. The <tt class="docutils literal"><span class="pre">window.opera</span></tt> test is because some versions of
|
the commas right. The <tt class="docutils literal"><span class="pre">window.opera</span></tt> test is because some versions of
|
||||||
Opera doesn’t handle setting <tt class="docutils literal"><span class="pre">script.text</span></tt> properly, while Internet
|
Opera don’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=filename</span></tt> method 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>
|
||||||
|
@ -132,9 +132,9 @@ script load a local copy of MathJax, so you have to refer to a
|
||||||
server-based copy. The MathJax CDN works nicely for this.</p>
|
server-based copy. The MathJax CDN works nicely for this.</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 it includes MathJax or not). That allows
|
||||||
browsers that don’t have native MathML support to view any web pages
|
browsers that don’t have native MathML support to view any web pages
|
||||||
with MathML, even if they say it only works in Forefox and
|
with MathML, even if they say it only works in Firefox and
|
||||||
IE+MathPlayer.</p>
|
IE+MathPlayer.</p>
|
||||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="c1">// ==UserScript==</span>
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="c1">// ==UserScript==</span>
|
||||||
<span class="c1">// @name MathJax MathML</span>
|
<span class="c1">// @name MathJax MathML</span>
|
||||||
|
|
|
@ -66,7 +66,7 @@ messages. Your code can register an “interest” in a signal,
|
||||||
or can register a <a class="reference internal" href="#term-callback"><em class="xref std std-term">callback</em></a> to be called when a
|
or can register a <a class="reference internal" href="#term-callback"><em class="xref std std-term">callback</em></a> to be called when a
|
||||||
particular message is sent along the signal channel.</dd>
|
particular message is sent along the signal channel.</dd>
|
||||||
<dt id="term-html-css">HTML-CSS</dt>
|
<dt id="term-html-css">HTML-CSS</dt>
|
||||||
<dd>MathJax output form that employs only on HTML and CSS 2.1,
|
<dd>MathJax output form that relys only on HTML and CSS 2.1,
|
||||||
allowing MathJax to remain compatible across all browsers.</dd>
|
allowing MathJax to remain compatible across all browsers.</dd>
|
||||||
<dt id="term-jax">jax</dt>
|
<dt id="term-jax">jax</dt>
|
||||||
<dd>MathJax’s input and output processors are called “jax”, as is
|
<dd>MathJax’s input and output processors are called “jax”, as is
|
||||||
|
|
|
@ -121,7 +121,7 @@ MathML that works in all modern browsers.</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<hr class="docutils" />
|
<hr class="docutils" />
|
||||||
<p>This version of the documentation was built March 09, 2011.</p>
|
<p>This version of the documentation was built March 29, 2011.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ date or out of date). If MathJax needs updating, use</p>
|
||||||
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 update 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 version
|
<p>This gets you the current development copy of MathJax, which is the version
|
||||||
|
@ -109,10 +109,14 @@ are applied (we try hard not to patch the stable releases, but sometimes
|
||||||
there is a crucial change that needs to be made). If you want to use the
|
there is a crucial change that needs to be made). If you want to use the
|
||||||
patched version of a release, then check out the branch rather than the
|
patched version of a release, then check out the branch rather than the
|
||||||
tag. Use</p>
|
tag. Use</p>
|
||||||
<p>to get a list of the available branches. There be separate branches
|
<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>MathJax
|
||||||
|
git branch
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>to get a list of the available branches. There are separate branches
|
||||||
for the main releases, but with <tt class="docutils literal"><span class="pre">-latest</span></tt> appended. These contain
|
for the main releases, but with <tt class="docutils literal"><span class="pre">-latest</span></tt> appended. These contain
|
||||||
all the patches for that particular release. You can check out one of
|
all the patches for that particular release. You can check out one of
|
||||||
the branchs just as you would a tagged copy. For example, the branch
|
the branches just as you would a tagged copy. For example, the branch
|
||||||
for the <tt class="docutils literal"><span class="pre">v1.1</span></tt> tagged release is <tt class="docutils literal"><span class="pre">v1.1-latest</span></tt>. To get this
|
for the <tt class="docutils literal"><span class="pre">v1.1</span></tt> tagged release is <tt class="docutils literal"><span class="pre">v1.1-latest</span></tt>. To get this
|
||||||
release, use</p>
|
release, 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
|
||||||
|
@ -147,7 +151,7 @@ use</p>
|
||||||
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 update 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 version
|
<p>This gets you the current development copy of MathJax, which is the version
|
||||||
|
@ -162,7 +166,7 @@ described below. You can use</p>
|
||||||
</div>
|
</div>
|
||||||
<p>to check out revision number <cite>nnn</cite>, but it is not easy to tell what
|
<p>to check out revision number <cite>nnn</cite>, but it is not easy to tell what
|
||||||
svn revision number is associated with a particular release. GitHub’s
|
svn revision number is associated with a particular release. GitHub’s
|
||||||
<tt class="docutils literal"><span class="pre">svn</span></tt> service doesn’t appear to allow you to sepecify a particular
|
<tt class="docutils literal"><span class="pre">svn</span></tt> service doesn’t appear to allow you to specify a particular
|
||||||
tagged version.</p>
|
tagged version.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="obtaining-mathjax-via-an-archive">
|
<div class="section" id="obtaining-mathjax-via-an-archive">
|
||||||
|
@ -186,13 +190,13 @@ right), you can also select the <tt class="docutils literal"><span class="pre">D
|
||||||
<span class="pre">.zip</span></tt> buttons to get a copy of the current development 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. You can
|
MathJax that contains all the latest changes and bug-fixes. You can
|
||||||
also get older tagged versions (if there are any).</p>
|
also get older tagged versions (if there are any).</p>
|
||||||
<p>If a packaged release recevies any important updates, then those
|
<p>If a packaged release receives any important updates, then those
|
||||||
updates will be part of the <cite>branch</cite> for that version. The link to
|
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
|
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
|
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
|
the <cite>Branches</cite> drop down menu (at the far left of the menus within the
|
||||||
page) to select the release branch that you want (for example
|
page) to select the release branch that you want (for example
|
||||||
<tt class="docutils literal"><span class="pre">v1.1-latest</span></tt>), and then use the downlaod button and the <tt class="docutils literal"><span class="pre">Downlaod</span>
|
<tt class="docutils literal"><span class="pre">v1.1-latest</span></tt>), and then use the download button and the <tt class="docutils literal"><span class="pre">Download</span>
|
||||||
<span class="pre">.tar.gz</span></tt> or <tt class="docutils literal"><span class="pre">Download</span> <span class="pre">.zip</span></tt> button to get the latest patched
|
<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>
|
version of that release.</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -225,7 +229,7 @@ a different site. For example, a departmental server at
|
||||||
<tt class="docutils literal"><span class="pre">www.math.yourcollege.edu</span></tt> might like to use a college-wide
|
<tt class="docutils literal"><span class="pre">www.math.yourcollege.edu</span></tt> might like to use a college-wide
|
||||||
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 important caveat —
|
||||||
Firefox’s and IE9’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 most
|
<p>Firefox’s interpretation of the same-origin policy is more strict than most
|
||||||
other browsers, and it affects how fonts are loaded with the <cite>@font-face</cite>
|
other browsers, and it affects how fonts are loaded with the <cite>@font-face</cite>
|
||||||
|
@ -242,7 +246,7 @@ mode</cite>, so it exhibits this same behavior.</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
|
||||||
<tt class="docutils literal"><span class="pre">MathJax/fonts/HTML-CSS/TeX/otf</span></tt> folder, create a file called
|
<tt class="docutils literal"><span class="pre">MathJax/fonts/</span></tt> folder, create a file called
|
||||||
<tt class="docutils literal"><span class="pre">.htaccess</span></tt> that contains the following lines:</p>
|
<tt class="docutils literal"><span class="pre">.htaccess</span></tt> that contains the following lines:</p>
|
||||||
<div class="highlight-python"><pre><FilesMatch "\.(ttf|otf|eot)$">
|
<div class="highlight-python"><pre><FilesMatch "\.(ttf|otf|eot)$">
|
||||||
<IfModule mod_headers.c>
|
<IfModule mod_headers.c>
|
||||||
|
@ -276,7 +280,7 @@ from your hard disk. Firefox’s interpretation of the same-origin
|
||||||
policy for local files is that the “same domain” for a page is the
|
policy for local files is that the “same domain” for a page is the
|
||||||
directory where that page exists, or any of its subdirectories. So if
|
directory where that page exists, or any of its subdirectories. So if
|
||||||
you use MathJax in a page with a <tt class="docutils literal"><span class="pre">file://</span></tt> URL, and if MathJax is
|
you use MathJax in a page with a <tt class="docutils literal"><span class="pre">file://</span></tt> URL, and if MathJax is
|
||||||
loaded from a diretory other than the one containing the original
|
loaded from a directory other than the one containing the original
|
||||||
page, then MathJax will not be able to access the web-based fonts in
|
page, then MathJax will not be able to access the web-based fonts in
|
||||||
Firefox. In that case, MathJax will fall back on image fonts to
|
Firefox. In that case, MathJax will fall back on image fonts to
|
||||||
display the mathematics.</p>
|
display the mathematics.</p>
|
||||||
|
|
|
@ -70,10 +70,10 @@ image-based, and so it is available for search engines, meaning that
|
||||||
your equations can be searchable, just like the text of your pages.
|
your equations can be searchable, just like the text of your pages.
|
||||||
MathJax allows page authors to write formulas using TeX and LaTeX
|
MathJax allows page authors to write formulas using TeX and LaTeX
|
||||||
notation, or <a class="reference external" href="http://www.w3.org/TR/MathML3">MathML</a>, a World Wide
|
notation, or <a class="reference external" href="http://www.w3.org/TR/MathML3">MathML</a>, a World Wide
|
||||||
Web Constortium standard for representing mathematics in XML format.
|
Web Consortium standard for representing mathematics in XML format.
|
||||||
MathJax will even convert TeX notation into MathML, so that it can be
|
MathJax will even convert TeX notation into MathML, so that it can be
|
||||||
rendered more quickly by those browsers that support MathML natively,
|
rendered more quickly by those browsers that support MathML natively,
|
||||||
or so that you can copy and past it into other programs.</p>
|
or so that you can copy and paste it into other programs.</p>
|
||||||
<p>MathJax is modular, so it loads components only when necessary, and
|
<p>MathJax is modular, so it loads components only when necessary, and
|
||||||
can be extended to include new capabilities as needed. MathJax is
|
can be extended to include new capabilities as needed. MathJax is
|
||||||
highly configurable, allowing authors to customize it for the special
|
highly configurable, allowing authors to customize it for the special
|
||||||
|
|
|
@ -62,7 +62,7 @@ that it can be displayed by the browser’s native MathML support.</p>
|
||||||
of these components. For example, you could use the <cite>tex2jax</cite>
|
of these components. For example, you could use the <cite>tex2jax</cite>
|
||||||
preprocessor and the TeX input processor, but the NativeMML output
|
preprocessor and the TeX input processor, but the NativeMML output
|
||||||
processor, so that your mathematics is entered in TeX format, but
|
processor, so that your mathematics is entered in TeX format, but
|
||||||
displayed as MathML. Or you could use the <cite>mml2jax</cite> reprocessor and
|
displayed as MathML. Or you could use the <cite>mml2jax</cite> preprocessor and
|
||||||
MathML input processor with the HTML-CSS output processor to make
|
MathML 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
|
||||||
|
@ -84,7 +84,7 @@ the source markup, and so on, so there is added value to using MathJax
|
||||||
even with 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 preprocessor, you should not use
|
||||||
the named MathML entities, but rather use the numeric entities like
|
the named MathML entities, but rather use the numeric entities like
|
||||||
<tt class="docutils literal"><span class="pre">&#x221A;</span></tt> or unicode characters embedded in the page itself. The
|
<tt class="docutils literal"><span class="pre">&#x221A;</span></tt> or unicode characters embedded in the page itself. The
|
||||||
reason is that entities are replaced by the browser before MathJax
|
reason is that entities are replaced by the browser before MathJax
|
||||||
|
@ -122,7 +122,7 @@ coming.</p>
|
||||||
<li>No support for the elementary math tags: <tt class="docutils literal"><span class="pre">mstack</span></tt>, <tt class="docutils literal"><span class="pre">mlongdiv</span></tt>,
|
<li>No support for the elementary math tags: <tt class="docutils literal"><span class="pre">mstack</span></tt>, <tt class="docutils literal"><span class="pre">mlongdiv</span></tt>,
|
||||||
<tt class="docutils literal"><span class="pre">msgroup</span></tt>, <tt class="docutils literal"><span class="pre">msrow</span></tt>, <tt class="docutils literal"><span class="pre">mscarries</span></tt>, and <tt class="docutils literal"><span class="pre">mscarry</span></tt>.</li>
|
<tt class="docutils literal"><span class="pre">msgroup</span></tt>, <tt class="docutils literal"><span class="pre">msrow</span></tt>, <tt class="docutils literal"><span class="pre">mscarries</span></tt>, and <tt class="docutils literal"><span class="pre">mscarry</span></tt>.</li>
|
||||||
<li>Limited support for line breaking (they are only allowed in direct
|
<li>Limited support for line breaking (they are only allowed in direct
|
||||||
children of <tt class="docutils literal"><span class="pre">mrow</span></tt> or implied <tt class="docutils literal"><span class="pre">mrow</span></tt> elements.</li>
|
children of <tt class="docutils literal"><span class="pre">mrow</span></tt> or implied <tt class="docutils literal"><span class="pre">mrow</span></tt> elements).</li>
|
||||||
<li>No support for alignment groups in table.</li>
|
<li>No support for alignment groups in table.</li>
|
||||||
<li>No support for right-to-left rendering.</li>
|
<li>No support for right-to-left rendering.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -82,7 +82,7 @@ run a preprocessor to locate the math delimiters and replace them by
|
||||||
the special tags that it uses to mark the formulas. There are
|
the special tags that it uses to mark the formulas. There are
|
||||||
preprocessors for <a class="reference internal" href="tex.html#tex-support"><em>TeX notation</em></a>, <a class="reference internal" href="mathml.html#mathml-support"><em>MathML
|
preprocessors for <a class="reference internal" href="tex.html#tex-support"><em>TeX notation</em></a>, <a class="reference internal" href="mathml.html#mathml-support"><em>MathML
|
||||||
notation</em></a>, and the <a class="reference internal" href="jsMath.html#jsmath-support"><em>jsMath notation</em></a> that uses <cite>span</cite> and <cite>div</cite> tags.</p>
|
notation</em></a>, and the <a class="reference internal" href="jsMath.html#jsmath-support"><em>jsMath notation</em></a> that uses <cite>span</cite> and <cite>div</cite> tags.</p>
|
||||||
<p>For pages that are constructed programatically, such as HTML
|
<p>For pages that are constructed programmatically, such as HTML
|
||||||
pages that result from running a processor on text in some other
|
pages that result from running a processor on text in some other
|
||||||
format (e.g., pages produced from Markdown documents, or via programs
|
format (e.g., pages produced from Markdown documents, or via programs
|
||||||
like <cite>tex4ht</cite>), it would be best to use MathJax’s special tags
|
like <cite>tex4ht</cite>), it would be best to use MathJax’s special tags
|
||||||
|
@ -90,7 +90,7 @@ directly, as described below, rather than having MathJax run
|
||||||
another preprocessor. This will speed up the final display of the
|
another preprocessor. This will speed up the final display of the
|
||||||
mathematics, since the extra preprocessing step would not be needed,
|
mathematics, since the extra preprocessing step would not be needed,
|
||||||
and it also avoids the conflict between the use of the less-than sign,
|
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 as 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">
|
||||||
<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>
|
<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>
|
||||||
|
@ -209,20 +209,20 @@ the math notation entered by the author into the internal format used
|
||||||
by MathJax (called an <cite>element jax</cite>). This internal format is
|
by MathJax (called an <cite>element jax</cite>). This internal format is
|
||||||
essentially MathML (represented as JavaScript objects), so an input
|
essentially MathML (represented as JavaScript objects), so an input
|
||||||
jax acts as a translator into MathML.</p>
|
jax acts as a translator into MathML.</p>
|
||||||
<p><strong>Output jax</strong> convert that internal element jax format into a specific
|
<p><strong>Output jax</strong> convert that internal element jax format into a
|
||||||
output format. For example, the NativeMML output jax inserts MathML
|
specific output format. For example, the NativeMML output jax inserts
|
||||||
tags into the page to represent the mathematics, while the HTML-CSS
|
MathML tags into the page to represent the mathematics, while the
|
||||||
output jax uses HTML with CSS styling to lay out the mathematics so
|
HTML-CSS output jax uses HTML with CSS styling to lay out the
|
||||||
that it can be displayed even in browsers that dont understand
|
mathematics so that it can be displayed even in browsers that don’t
|
||||||
MathML. Output jax could be produced that render the mathematics
|
understand MathML. Output jax could be produced that render the
|
||||||
using SVG, for example, or that speak an equation for the blind
|
mathematics using SVG, for example, or that speak an equation for
|
||||||
users. The MathJax contextual menu can be used to switch between the
|
blind users. The MathJax contextual menu can be used to switch
|
||||||
output jax that are available.</p>
|
between the output jax that are available.</p>
|
||||||
<p>Each input and output jax has a small configuration file that is
|
<p>Each input and output jax has a small configuration file that is
|
||||||
loaded when that input jax is included in the <cite>jax</cite> array in the
|
loaded when that input jax is included in the <cite>jax</cite> array in the
|
||||||
MathJax configuration, and a larger file that implements the core
|
MathJax configuration, and a larger file that implements the core
|
||||||
functionality of that particular jax. The latter file is loaded
|
functionality of that particular jax. The latter file is loaded
|
||||||
when the first time the jax is needed by MathJax to process some
|
the first time the jax is needed by MathJax to process some
|
||||||
mathematics.</p>
|
mathematics.</p>
|
||||||
<p>The <strong>MathJax Hub</strong> keeps track of the internal representations of the
|
<p>The <strong>MathJax Hub</strong> keeps track of the internal representations of the
|
||||||
various mathematical equations on the page, and can be queried to
|
various mathematical equations on the page, and can be queried to
|
||||||
|
|
|
@ -119,32 +119,32 @@ messages). These are defined below in the <tt class="docutils literal"><span cl
|
||||||
referenced using <tt class="docutils literal"><span class="pre">["name"]</span></tt> within the snippet, where <cite>name</cite> is
|
referenced using <tt class="docutils literal"><span class="pre">["name"]</span></tt> within the snippet, where <cite>name</cite> is
|
||||||
the name of one of the snippets defined in the <tt class="docutils literal"><span class="pre">HTML</span></tt>
|
the name of one of the snippets defined in the <tt class="docutils literal"><span class="pre">HTML</span></tt>
|
||||||
configuration block. For example</p>
|
configuration block. For example</p>
|
||||||
<div class="highlight-javascript"><pre> Message: {
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">Message</span><span class="o">:</span> <span class="p">{</span>
|
||||||
noFonts: [
|
<span class="nx">noFonts</span><span class="o">:</span> <span class="p">[</span>
|
||||||
["closeBox"],
|
<span class="p">[</span><span class="s2">"closeBox"</span><span class="p">],</span>
|
||||||
"MathJax is unable to locate a font to use to display ",
|
<span class="s2">"MathJax is unable to locate a font to use to display "</span><span class="p">,</span>
|
||||||
"its mathematics, and image fonts are not available, so it ",
|
<span class="s2">"its mathematics, and image fonts are not available, so it "</span><span class="p">,</span>
|
||||||
"is falling back on generic unicode characters in hopes that ",
|
<span class="s2">"is falling back on generic unicode characters in hopes that "</span><span class="p">,</span>
|
||||||
"your browser will be able to display them. Some characters ",
|
<span class="s2">"your browser will be able to display them. Some characters "</span><span class="p">,</span>
|
||||||
"may not show up properly, or possibly not at all.",
|
<span class="s2">"may not show up properly, or possibly not at all."</span><span class="p">,</span>
|
||||||
["fonts"],
|
<span class="p">[</span><span class="s2">"fonts"</span><span class="p">],</span>
|
||||||
["webfonts"]
|
<span class="p">[</span><span class="s2">"webfonts"</span><span class="p">]</span>
|
||||||
]
|
<span class="p">]</span>
|
||||||
}
|
<span class="p">}</span>
|
||||||
|
</pre></div>
|
||||||
refers to the ``closeBox``, ``fonts`` and ``webfonts`` snippets in
|
|
||||||
declared in the ``HTML`` section.</pre>
|
|
||||||
</div>
|
</div>
|
||||||
|
<p>refers to the <tt class="docutils literal"><span class="pre">closeBox</span></tt>, <tt class="docutils literal"><span class="pre">fonts</span></tt> and <tt class="docutils literal"><span class="pre">webfonts</span></tt> snippets
|
||||||
|
declared in the <tt class="docutils literal"><span class="pre">HTML</span></tt> section.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">HTML: { ... }</tt></dt>
|
<tt class="descname">HTML: { ... }</tt></dt>
|
||||||
<dd><p>This object defines HTML snippets that are common to more than one
|
<dd><p>This object defines HTML snippets that are common to more than one
|
||||||
message in the <tt class="docutils literal"><span class="pre">Message</span></tt> section above. They can be called in
|
message in the <tt class="docutils literal"><span class="pre">Message</span></tt> section above. They can be included in
|
||||||
by using <tt class="docutils literal"><span class="pre">["name"]</span></tt> in an HTML snippet, where <cite>name</cite> refers to
|
other HTML snippets by by using <tt class="docutils literal"><span class="pre">["name"]</span></tt> in an HTML snippet,
|
||||||
the name of the snippet in the <tt class="docutils literal"><span class="pre">HTML</span></tt> block. The pre-defined
|
where <cite>name</cite> refers to the name of the snippet in the <tt class="docutils literal"><span class="pre">HTML</span></tt>
|
||||||
snippets are:</p>
|
block. The pre-defined snippets are:</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">closeBox</tt></dt>
|
<tt class="descname">closeBox</tt></dt>
|
||||||
|
|
|
@ -81,7 +81,7 @@ menu item associated with the typeset mathematics.</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">minScaleAdjust: 50</tt></dt>
|
<tt class="descname">minScaleAdjust: 50</tt></dt>
|
||||||
<dd><p>This gives a minimum scale (as a percent) for the scaling used my
|
<dd><p>This gives a minimum scale (as a percent) for the scaling used by
|
||||||
MathJax to match the equation to the surrounding text. This will
|
MathJax to match the equation to the surrounding text. This will
|
||||||
prevent MathJax from making the mathematics too small.</p>
|
prevent MathJax from making the mathematics too small.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
@ -112,7 +112,7 @@ than one is available on the user’s computer.</p>
|
||||||
<dd><p>This is the web-based font to use when none of the fonts listed
|
<dd><p>This is the web-based font to use when none of the fonts listed
|
||||||
above are available on the user’s computer. Note that currently
|
above are available on the user’s computer. Note that currently
|
||||||
only the <cite>TeX</cite> font is available in a web-based form (they are
|
only the <cite>TeX</cite> font is available in a web-based form (they are
|
||||||
stored in the <tt class="docutils literal"><span class="pre">fonts/HTML-CSS</span></tt> folder in the MathJax directory.
|
stored in the <tt class="docutils literal"><span class="pre">fonts/HTML-CSS</span></tt> folder in the MathJax directory).
|
||||||
Set this to <tt class="docutils literal"><span class="pre">null</span></tt> to disable web fonts.</p>
|
Set this to <tt class="docutils literal"><span class="pre">null</span></tt> to disable web fonts.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ Set this to <tt class="docutils literal"><span class="pre">null</span></tt> to d
|
||||||
<dd><p>This is the font to use for image fallback mode (when none of the
|
<dd><p>This is the font to use for image fallback mode (when none of the
|
||||||
fonts listed above are available and the browser doesn’t support
|
fonts listed above are available and the browser doesn’t support
|
||||||
web-fonts via the <tt class="docutils literal"><span class="pre">@font-face</span></tt> CSS directive). Note that currently
|
web-fonts via the <tt class="docutils literal"><span class="pre">@font-face</span></tt> CSS directive). Note that currently
|
||||||
only the TeX font is available as an image font (they are stores
|
only the TeX font is available as an image font (they are stored
|
||||||
in the <tt class="docutils literal"><span class="pre">fonts/HTML-CSS</span></tt> directory).</p>
|
in the <tt class="docutils literal"><span class="pre">fonts/HTML-CSS</span></tt> directory).</p>
|
||||||
<p>Set this to <tt class="docutils literal"><span class="pre">null</span></tt> if you want to prevent the use of image fonts
|
<p>Set this to <tt class="docutils literal"><span class="pre">null</span></tt> if you want to prevent the use of image fonts
|
||||||
(e.g., you have deleted or not installed the image fonts on your
|
(e.g., you have deleted or not installed the image fonts on your
|
||||||
|
|
|
@ -67,7 +67,7 @@ in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.H
|
||||||
<span class="p">});</span>
|
<span class="p">});</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>would set the <tt class="docutils literal"><span class="pre">prefer</span></tt> option so that Opera browser would prefer
|
<p>would set the <tt class="docutils literal"><span class="pre">prefer</span></tt> option so that the Opera browser would prefer
|
||||||
MathML to HTML-CSS output (while leaving the settings for other
|
MathML to HTML-CSS output (while leaving the settings for other
|
||||||
browsers unchanged).</p>
|
browsers unchanged).</p>
|
||||||
<p>Note that if you use the <tt class="docutils literal"><span class="pre">MMLorHTML.js</span></tt> configuration file, you should
|
<p>Note that if you use the <tt class="docutils literal"><span class="pre">MMLorHTML.js</span></tt> configuration file, you should
|
||||||
|
|
|
@ -86,7 +86,7 @@ selects that item, the browser opens a new window with this URL.</p>
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">showRenderer: true</tt></dt>
|
<tt class="descname">showRenderer: true</tt></dt>
|
||||||
<dd><p>This controls whether the “Math Renderer” item will be displayed in
|
<dd><p>This controls whether the “Math Renderer” item will be displayed in
|
||||||
the the “Settings” submenu of the mathematics contextual menu. It
|
the “Settings” submenu of the mathematics contextual menu. It
|
||||||
allows the user to change between the <cite>HTML-CSS</cite> and <cite>NativeMML</cite>
|
allows the user to change between the <cite>HTML-CSS</cite> and <cite>NativeMML</cite>
|
||||||
output processors for the mathematics on the page. Set to
|
output processors for the mathematics on the page. Set to
|
||||||
<tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p>
|
<tt class="docutils literal"><span class="pre">false</span></tt> to prevent this menu item from showing.</p>
|
||||||
|
@ -96,9 +96,9 @@ output processors for the mathematics on the page. Set to
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">showContext: false</tt></dt>
|
<tt class="descname">showContext: false</tt></dt>
|
||||||
<dd><p>This controls whether the “Contextual Menu” item will be displayed
|
<dd><p>This controls whether the “Contextual Menu” item will be displayed
|
||||||
in the the “Settings” submenu of the mathematics contextual menu.
|
in the “Settings” submenu of the mathematics contextual menu.
|
||||||
It allows the user to decide whether the MathJax menu or the
|
It allows the user to decide whether the MathJax menu or the
|
||||||
browser’s default contextual manu will be shown when the context
|
browser’s default contextual menu will be shown when the context
|
||||||
menu click occurs over mathematics typeset by MathJax. (The main
|
menu click occurs over mathematics typeset by MathJax. (The main
|
||||||
reason to allow pass-through to the browser’s menu is to gain
|
reason to allow pass-through to the browser’s menu is to gain
|
||||||
access to the MathPlayer contextual menu when the NativeMML output
|
access to the MathPlayer contextual menu when the NativeMML output
|
||||||
|
@ -110,7 +110,7 @@ processor is used in Internet Explorer with the <a class="reference external" hr
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">showFontMenu: false</tt></dt>
|
<tt class="descname">showFontMenu: false</tt></dt>
|
||||||
<dd><p>This controls whether the “Font Preference” item will be displayed
|
<dd><p>This controls whether the “Font Preference” item will be displayed
|
||||||
in the the “Settings” submenu of the mathematics contextual menu.
|
in the “Settings” submenu of the mathematics contextual menu.
|
||||||
This submenu lets the user select what font to use in the
|
This submenu lets the user select what font to use in the
|
||||||
mathematics produced by the <cite>HTML-CSS</cite> output processor. Note that
|
mathematics produced by the <cite>HTML-CSS</cite> output processor. Note that
|
||||||
changing the selection in the font menu will cause the page to
|
changing the selection in the font menu will cause the page to
|
||||||
|
|
|
@ -65,13 +65,13 @@ in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.H
|
||||||
<span class="p">});</span>
|
<span class="p">});</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>would set the <tt class="docutils literal"><span class="pre">sale</span></tt> option to 105 percent.</p>
|
<p>would set the <tt class="docutils literal"><span class="pre">scale</span></tt> option to 105 percent.</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">scale: 100</tt></dt>
|
<tt class="descname">scale: 100</tt></dt>
|
||||||
<dd><p>The scaling factor (as a percentage) of math with respect to the
|
<dd><p>The scaling factor (as a percentage) of math with respect to the
|
||||||
surrounding text. Since the <cite>NativeMML</cite> output relies on the
|
surrounding text. Since the <cite>NativeMML</cite> output relies on the
|
||||||
browser’s natiove MathML support, MathJax does not control the
|
browser’s native MathML support, MathJax does not control the
|
||||||
font size used in the mathematics. You may need to set this value
|
font size used in the mathematics. You may need to set this value
|
||||||
to compensate for the size selected by the browser. The user can
|
to compensate for the size selected by the browser. The user can
|
||||||
also adjust this value using the contextual menu item associated
|
also adjust this value using the contextual menu item associated
|
||||||
|
@ -99,7 +99,7 @@ more details.</p>
|
||||||
<tt class="descname">showMathMenuMSIE: true</tt></dt>
|
<tt class="descname">showMathMenuMSIE: true</tt></dt>
|
||||||
<dd><p>There is a separate menu setting for MSIE since the code to handle
|
<dd><p>There is a separate menu setting for MSIE since the code to handle
|
||||||
that is a bit delicate; if it turns out to have unexpected
|
that is a bit delicate; if it turns out to have unexpected
|
||||||
consequences, you can turn it off without turing off other the
|
consequences, you can turn it off without turning off the
|
||||||
menu support in other browsers.</p>
|
menu support in other browsers.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
|
|
|
@ -114,14 +114,14 @@ from acting as javascript escape characters.</p>
|
||||||
</div>
|
</div>
|
||||||
<p>would ask the TeX processor to define two new macros: <tt class="docutils literal"><span class="pre">\RR</span></tt>,
|
<p>would ask the TeX processor to define two new macros: <tt class="docutils literal"><span class="pre">\RR</span></tt>,
|
||||||
which produces a bold-face “R”, and <tt class="docutils literal"><span class="pre">\bold{...}</span></tt>, which takes one
|
which produces a bold-face “R”, and <tt class="docutils literal"><span class="pre">\bold{...}</span></tt>, which takes one
|
||||||
parameter and set it in the bold-face font.</p>
|
parameter and sets it in the bold-face font.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">MAXMACROS: 10000</tt></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
|
<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
|
to loop infinitely, the <cite>MAXMACROS</cite> constant will limit the number of
|
||||||
macro substitutions allowed in any expression processed by MathJax.</p>
|
macro substitutions allowed in any expression processed by MathJax.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
|
|
|
@ -109,11 +109,11 @@ time.</p>
|
||||||
are not using one of the preprocessors, you need to insert
|
are not using one of the preprocessors, you need to insert
|
||||||
something extra into your HTML file in order to avoid a bug in
|
something extra into your HTML file in order to avoid a bug in
|
||||||
Internet Explorer. IE removes spaces from the DOM that it thinks
|
Internet Explorer. IE removes spaces from the DOM that it thinks
|
||||||
are redundent, and since a <tt class="docutils literal"><span class="pre"><script></span></tt> tag usually doesn’t add
|
are redundant, and since a <tt class="docutils literal"><span class="pre"><script></span></tt> tag usually doesn’t add
|
||||||
content to the page, if there is a space before and after a
|
content to the page, if there is a space before and after a
|
||||||
MathJax <tt class="docutils literal"><span class="pre"><script></span></tt> tag, IE will remove the first space. When
|
MathJax <tt class="docutils literal"><span class="pre"><script></span></tt> tag, IE will remove the first space. When
|
||||||
MathJax inserts the typeset mathematics, this means there will be
|
MathJax inserts the typeset mathematics, this means there will be
|
||||||
no space before it and the preceeding text. In order to avoid
|
no space before it and the preceding text. In order to avoid
|
||||||
this, you should include some “guard characters” before or after
|
this, you should include some “guard characters” before or after
|
||||||
the math SCRIPT tag; define the patterns you want to use below.
|
the math SCRIPT tag; define the patterns you want to use below.
|
||||||
Note that these are used as regular expressions, so you will need
|
Note that these are used as regular expressions, so you will need
|
||||||
|
@ -138,14 +138,14 @@ scripts must be enclosed in double brackets.</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">preRemoveClass: "MathJax_Preview"</tt></dt>
|
<tt class="descname">preRemoveClass: "MathJax_Preview"</tt></dt>
|
||||||
<dd><p>The CSS class for a math preview to be removed preceeding a
|
<dd><p>This is the CSS class name for math previews that will be removed
|
||||||
MathJax SCRIPT tag. If the tag just before the MathJax
|
preceding a MathJax SCRIPT tag. If the tag just before the
|
||||||
<tt class="docutils literal"><span class="pre"><script></span></tt> tag is of this class, its contents are removed when
|
MathJax <tt class="docutils literal"><span class="pre"><script></span></tt> tag is of this class, its contents are
|
||||||
MathJax processes the <tt class="docutils literal"><span class="pre"><script></span></tt> tag. This allows you to
|
removed when MathJax processes the <tt class="docutils literal"><span class="pre"><script></span></tt> tag. This allows
|
||||||
include a math preview in a form that will be displayed prior to
|
you to include a math preview in a form that will be displayed
|
||||||
MathJax performing its typesetting. It also avoids the Internet
|
prior to MathJax performing its typesetting. It also avoids the
|
||||||
Explorer space-removal bug, and can be used in place of <tt class="docutils literal"><span class="pre">preJax</span></tt>
|
Internet Explorer space-removal bug, and can be used in place of
|
||||||
and <tt class="docutils literal"><span class="pre">postJax</span></tt> if that is more convenient.</p>
|
<tt class="docutils literal"><span class="pre">preJax</span></tt> and <tt class="docutils literal"><span class="pre">postJax</span></tt> if that is more convenient.</p>
|
||||||
<p>For example</p>
|
<p>For example</p>
|
||||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><span</span> <span class="na">class=</span><span class="s">"MathJax_Preview"</span><span class="nt">></span>[math]<span class="nt"></span><script </span><span class="na">type=</span><span class="s">"math/tex"</span><span class="nt">></span><span class="p">...</span><span class="nt"></script></span>
|
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><span</span> <span class="na">class=</span><span class="s">"MathJax_Preview"</span><span class="nt">></span>[math]<span class="nt"></span><script </span><span class="na">type=</span><span class="s">"math/tex"</span><span class="nt">></span><span class="p">...</span><span class="nt"></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
@ -158,7 +158,7 @@ to typeset it.</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">showProcessingMessages: true</tt></dt>
|
<tt class="descname">showProcessingMessages: true</tt></dt>
|
||||||
<dd><p>This value controls whether the <cite>Processing Math: nn%</cite> message are
|
<dd><p>This value controls whether the <cite>Processing Math: nn%</cite> messages are
|
||||||
displayed in the lower left-hand corner. Set to <tt class="docutils literal"><span class="pre">false</span></tt> to
|
displayed in the lower left-hand corner. Set to <tt class="docutils literal"><span class="pre">false</span></tt> to
|
||||||
prevent those messages (though file loading and other messages
|
prevent those messages (though file loading and other messages
|
||||||
will still be shown).</p>
|
will still be shown).</p>
|
||||||
|
@ -188,10 +188,10 @@ displayed equations.</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">delayStartupUntil: "none"</tt></dt>
|
<tt class="descname">delayStartupUntil: "none"</tt></dt>
|
||||||
<dd><p>Normally MathJax will perform its starup commands (loading of
|
<dd><p>Normally MathJax will perform its startup commands (loading of
|
||||||
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 handler is
|
||||||
called. If so, set this to <tt class="docutils literal"><span class="pre">"onload"</span></tt>. You can also set this to
|
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
|
<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
|
you explicitly call <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Configured()</span></tt>. See
|
||||||
|
@ -269,7 +269,7 @@ than simply crash, MathJax can report an error and go on. The
|
||||||
options you can set include:</p>
|
options you can set include:</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">message: ["[Math Processing Error"]]</tt></dt>
|
<tt class="descname">message: ["[Math Processing Error]"]</tt></dt>
|
||||||
<dd><p>This is an HTML snippet that will be inserted at the location
|
<dd><p>This is an HTML snippet that will be inserted at the location
|
||||||
of the mathematics for any formula that causes MathJax to
|
of the mathematics for any formula that causes MathJax to
|
||||||
produce an internal error (i.e., an error in the MathJax code
|
produce an internal error (i.e., an error in the MathJax code
|
||||||
|
|
|
@ -84,14 +84,14 @@ configuration options for the component.</p>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>is a configuration that includes two settings for the MathJax Hub (one
|
<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
|
for <cite>showProcessingMessages</cite> and one for the <cite>jax</cite> array), and a
|
||||||
configuration object for the TeX input processor. The latter includes
|
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
|
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
|
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>
|
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
|
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>
|
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
|
<p>The <tt class="docutils literal"><span class="pre">config/default.js</span></tt> file is another example that shows nearly
|
||||||
all the configuration options for all of MathJax’s components.</p>
|
all the configuration options for all of MathJax’s components.</p>
|
||||||
<div class="section" id="configuration-options-by-component">
|
<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>
|
<h2>Configuration Options by Component<a class="headerlink" href="#configuration-options-by-component" title="Permalink to this headline">¶</a></h2>
|
||||||
|
|
|
@ -78,7 +78,7 @@ The default is the whole document.</p>
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">inlineMath: [['\(','\)']]</tt></dt>
|
<tt class="descname">inlineMath: [['\(','\)']]</tt></dt>
|
||||||
<dd><p>Array of pairs of strings that are to be used as in-line math
|
<dd><p>Array of pairs of strings that are to be used as in-line math
|
||||||
delimters. The first in each pair is the initial delimiter and
|
delimiters. The first in each pair is the initial delimiter and
|
||||||
the second is the terminal delimiter. You can have as many pairs
|
the second is the terminal delimiter. You can have as many pairs
|
||||||
as you want. For example,</p>
|
as you want. For example,</p>
|
||||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">'$'</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>
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">inlineMath</span><span class="o">:</span> <span class="p">[</span> <span class="p">[</span><span class="s1">'$'</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>
|
||||||
|
@ -98,7 +98,7 @@ include text, not tags, as your math delimiters.</p>
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">displayMath: [ ['$$','$$'], ['\[','\]'] ]</tt></dt>
|
<tt class="descname">displayMath: [ ['$$','$$'], ['\[','\]'] ]</tt></dt>
|
||||||
<dd><p>Array of pairs of strings that are to be used as delimters for
|
<dd><p>Array of pairs of strings that are to be used as delimiters for
|
||||||
displayed equations. The first in each pair is the initial
|
displayed equations. The first in each pair is the initial
|
||||||
delimiter and the second is the terminal delimiter. You can have
|
delimiter and the second is the terminal delimiter. You can have
|
||||||
as many pairs as you want.</p>
|
as many pairs as you want.</p>
|
||||||
|
@ -124,7 +124,7 @@ sign in the rendered document.</p>
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">processEnvironments: true</tt></dt>
|
<tt class="descname">processEnvironments: true</tt></dt>
|
||||||
<dd><p>When <tt class="docutils literal"><span class="pre">true</span></tt>, <cite>tex2jax</cite> looks not only for the in-line and
|
<dd><p>When <tt class="docutils literal"><span class="pre">true</span></tt>, <cite>tex2jax</cite> looks not only for the in-line and
|
||||||
display math delimters, but also for LaTeX environments
|
display math delimiters, but also for LaTeX environments
|
||||||
(<tt class="docutils literal"><span class="pre">\begin{something}...\end{something}</span></tt>) and marks them for
|
(<tt class="docutils literal"><span class="pre">\begin{something}...\end{something}</span></tt>) and marks them for
|
||||||
processing by MathJax. When <tt class="docutils literal"><span class="pre">false</span></tt>, LaTeX environments will
|
processing by MathJax. When <tt class="docutils literal"><span class="pre">false</span></tt>, LaTeX environments will
|
||||||
not be processed outside of math mode.</p>
|
not be processed outside of math mode.</p>
|
||||||
|
|
|
@ -74,8 +74,8 @@ For example</p>
|
||||||
in your document.</p>
|
in your document.</p>
|
||||||
<p>The HTML-CSS output processor produces high-quality output in all
|
<p>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. Its major
|
||||||
advantage is its quality and consistency; it’s drawback is that it is
|
advantage is its quality and consistency; its drawback is that it is
|
||||||
slower than 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
|
||||||
|
@ -113,7 +113,7 @@ are the configuration files that end in <tt class="docutils literal"><span class
|
||||||
<p>If you are doing your own configuration, there is a special configuration
|
<p>If you are doing your own configuration, there is a special configuration
|
||||||
file that you can include that will choose between NativeMML and HTML-CSS
|
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
|
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
|
your configuration’s <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
|
processor in your <cite>jax</cite> array; MathJax will fill that in for you based on
|
||||||
the abilities of your user’s browser.</p>
|
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>
|
||||||
|
@ -122,7 +122,7 @@ the abilities of your user’s browser.</p>
|
||||||
</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/default.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="options/MMLorHTML.html#configure-mmlorhtml"><em>Configuring MMLorHTML</em></a> section for futher
|
<a class="reference internal" href="options/MMLorHTML.html#configure-mmlorhtml"><em>Configuring MMLorHTML</em></a> section for further
|
||||||
details. As an example, this configuration tells MathJax to use HTML-CSS
|
details. As an example, this configuration tells MathJax to use HTML-CSS
|
||||||
output rather than native MathML support for Firefox:</p>
|
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>
|
<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>
|
||||||
|
@ -138,7 +138,7 @@ output rather than native MathML support for Firefox:</p>
|
||||||
<p>With this configuration, MathML output will be used only for IE with the
|
<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
|
MathPlayer plugin (Firefox is the only other browser to have native MathML
|
||||||
support that is sufficient for use with MathJax). Note, however, that a
|
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
|
user can employ the MathJax contextual menu to select the other renderer if
|
||||||
he or she wishes.</p>
|
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
|
||||||
|
@ -168,10 +168,10 @@ mode. You can accomplish this by including the line</p>
|
||||||
</div>
|
</div>
|
||||||
<p>at the top of the <tt class="docutils literal"><span class="pre"><head></span></tt> section of your HTML documents. This
|
<p>at the top of the <tt class="docutils literal"><span class="pre"><head></span></tt> section of your HTML documents. This
|
||||||
lets you keep the strict <cite>DOCTYPE</cite> for validation purposes, while
|
lets you keep the strict <cite>DOCTYPE</cite> for validation purposes, while
|
||||||
still managing to get reasonable perforance from Internet Explorer
|
still managing to get reasonable performance from Internet Explorer
|
||||||
8. Note that this line must come at the beginning of the <tt class="docutils literal"><span class="pre"><head></span></tt>,
|
8. Note that this line must come at the beginning of the <tt class="docutils literal"><span class="pre"><head></span></tt>,
|
||||||
before any stylesheets or other content are loaded.</p>
|
before any stylesheets or other content are loaded.</p>
|
||||||
<p>Altertnatively, you can use the <cite>MMLorHTML</cite> configuration file
|
<p>Alternatively, you can use the <cite>MMLorHTML</cite> configuration file
|
||||||
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>
|
||||||
|
|
|
@ -63,7 +63,7 @@ use MathJax by modifying the theme or template for your wiki or blog.</p>
|
||||||
<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
|
||||||
include MathJax in your web templates in the absense of
|
include MathJax in your web templates in the absence of
|
||||||
MathJax-specific plugins for the system you are using. To take
|
MathJax-specific plugins for the system you are using. To take
|
||||||
advantage of this approach, you will need access to your theme files,
|
advantage of this approach, you will need access to your theme files,
|
||||||
which probably means you need to be an administrator for the site; if
|
which probably means you need to be an administrator for the site; if
|
||||||
|
@ -98,8 +98,8 @@ the file if it contains no <tt class="docutils literal"><span class="pre"></h
|
||||||
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>
|
||||||
<div class="section" id="insructions-for-specific-platforms">
|
<div class="section" id="instructions-for-specific-platforms">
|
||||||
<h2>Insructions for Specific Platforms<a class="headerlink" href="#insructions-for-specific-platforms" title="Permalink to this headline">¶</a></h2>
|
<h2>Instructions for Specific Platforms<a class="headerlink" href="#instructions-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
|
||||||
template files from inside their administrator interfaces. Specific
|
template files from inside their administrator interfaces. Specific
|
||||||
instructions for these are given via the links below.</p>
|
instructions for these are given via the links below.</p>
|
||||||
|
@ -122,7 +122,7 @@ instructions for these are given via the links below.</p>
|
||||||
<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="#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="#instructions-for-specific-platforms">Instructions for Specific Platforms</a><ul>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -75,14 +75,14 @@ and open the <cite>HTML Head</cite> template.</p>
|
||||||
<span class="nt"></script></span>
|
<span class="nt"></script></span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>to load MathJax from our distributed netowrk service.</p>
|
<p>to load MathJax from our distributed network service.</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 will enable MathJax with both TeX and MathML
|
<li><p class="first">Save the file. This will enable MathJax with both TeX and MathML
|
||||||
input, so you should be able to start adding mathematical content to
|
input, so you should be able to start adding mathematical content to
|
||||||
your pages. If you need to adjust the configuraiton, see
|
your pages. If you need to adjust the configuration, see
|
||||||
<a class="reference internal" href="../configuration.html#loading"><em>Configuring MathJax</em></a> for more details.</p>
|
<a class="reference internal" href="../configuration.html#loading"><em>Configuring MathJax</em></a> for more details.</p>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
|
@ -84,7 +84,7 @@ bottom of the file.</p>
|
||||||
</li>
|
</li>
|
||||||
<li><p class="first">Save the file. This will enable MathJax with both TeX and MathML
|
<li><p class="first">Save the file. This will enable MathJax with both TeX and MathML
|
||||||
input, so you should be able to start adding mathematical content to
|
input, so you should be able to start adding mathematical content to
|
||||||
your pages. If you need to adjust the configuraiton, see
|
your pages. If you need to adjust the configuration, see
|
||||||
<a class="reference internal" href="../configuration.html#loading"><em>Configuring MathJax</em></a> for more details.</p>
|
<a class="reference internal" href="../configuration.html#loading"><em>Configuring MathJax</em></a> for more details.</p>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
its actions, both internally, and with external programs, like
|
its actions, both internally, and with external programs, like
|
||||||
javascript code that you may write as part of dynamic web pages.
|
javascript code that you may write as part of dynamic web pages.
|
||||||
Because many actions in MathJax (like loading files) operate
|
Because many actions in MathJax (like loading files) operate
|
||||||
asynchornously, MathJax needs a way to coordinate those actions so
|
asynchronously, MathJax needs a way to coordinate those actions so
|
||||||
that they occur in the right order. The
|
that they occur in the right order. The
|
||||||
<cite>MathJax.Callback.Queue</cite> object provides that mechanism.</p>
|
<cite>MathJax.Callback.Queue</cite> object provides that mechanism.</p>
|
||||||
<p>A <cite>callback queue</cite> is a list of commands that will be performed one at
|
<p>A <cite>callback queue</cite> is a list of commands that will be performed one at
|
||||||
|
@ -109,11 +109,11 @@ that could operate asynchronously. For example:</p>
|
||||||
<span class="p">);</span>
|
<span class="p">);</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Here, the command <tt class="docutils literal"><span class="pre">MathJax.Ajax.require("extensions/AMSmath.js")</span></tt> is
|
<p>Here, the command <tt class="docutils literal"><span class="pre">MathJax.Ajax.Require("[MathJax]/extensions/AMSmath.js")</span></tt>
|
||||||
queued between two calls to <tt class="docutils literal"><span class="pre">f</span></tt>. The first call to <tt class="docutils literal"><span class="pre">f(1)</span></tt> will be
|
is queued between two calls to <tt class="docutils literal"><span class="pre">f</span></tt>. The first call to <tt class="docutils literal"><span class="pre">f(1)</span></tt> will
|
||||||
made immediately, then the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> statement will
|
be made immediately, then the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> statement
|
||||||
be performed. Since the <tt class="docutils literal"><span class="pre">Require</span></tt> method loads a file, it operates
|
will be performed. Since the <tt class="docutils literal"><span class="pre">Require</span></tt> method loads a file, it
|
||||||
asynchronously, and its return value is a <cite>MathJax.Callback</cite>
|
operates asynchronously, and its return value is a <cite>MathJax.Callback</cite>
|
||||||
object that will be called when the file is loaded. The call to
|
object that will be called when the file is loaded. The call to
|
||||||
<tt class="docutils literal"><span class="pre">f(2)</span></tt> will not be made until that callback is performed,
|
<tt class="docutils literal"><span class="pre">f(2)</span></tt> will not be made until that callback is performed,
|
||||||
effectively synchronizing the second call to <tt class="docutils literal"><span class="pre">f</span></tt> with the completion
|
effectively synchronizing the second call to <tt class="docutils literal"><span class="pre">f</span></tt> with the completion
|
||||||
|
@ -218,12 +218,12 @@ instead are defined in extensions that are loaded automatically when
|
||||||
needed. The typesetting of an expression containing one of these TeX
|
needed. The typesetting of an expression containing one of these TeX
|
||||||
commands can cause the typesetting process to be suspended while the
|
commands can cause the typesetting process to be suspended while the
|
||||||
file is loaded, and then restarted when the extension has become
|
file is loaded, and then restarted when the extension has become
|
||||||
evailable.</p>
|
available.</p>
|
||||||
<p>As a result, any call to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> (or
|
<p>As a result, any call to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> (or
|
||||||
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Process()</span></tt>, or <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Update()</span></tt>, etc.)
|
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Process()</span></tt>, or <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Update()</span></tt>, etc.)
|
||||||
could return long before the mathematics is actually typeset, and the
|
could return long before the mathematics is actually typeset, and the
|
||||||
rest of your code may run before the mathematics is available. If you
|
rest of your code may run before the mathematics is available. If you
|
||||||
have code that relys on the mathematics being visible on screen, you
|
have code that relies on the mathematics being visible on screen, you
|
||||||
will need to break that out into a separate operation that is
|
will need to break that out into a separate operation that is
|
||||||
synchronized with the typesetting via the MathJax queue.</p>
|
synchronized with the typesetting via the MathJax queue.</p>
|
||||||
<p>Furthermore, your own typesetting calls may need to wait for file loading
|
<p>Furthermore, your own typesetting calls may need to wait for file loading
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -54,7 +54,7 @@
|
||||||
<div class="section" id="using-signals">
|
<div class="section" id="using-signals">
|
||||||
<span id="id1"></span><h1>Using Signals<a class="headerlink" href="#using-signals" title="Permalink to this headline">¶</a></h1>
|
<span id="id1"></span><h1>Using Signals<a class="headerlink" href="#using-signals" title="Permalink to this headline">¶</a></h1>
|
||||||
<p>Because much of MathJax operates asynchronously, it is important for
|
<p>Because much of MathJax operates asynchronously, it is important for
|
||||||
MathJax to be able to indicated to other components operating on the
|
MathJax to be able to indicate to other components operating on the
|
||||||
page that certain actions have been taken. For example, as MathJax is
|
page that certain actions have been taken. For example, as MathJax is
|
||||||
starting up, it loads external files such as its configuration files
|
starting up, it loads external files such as its configuration files
|
||||||
and the various input and output <a class="reference internal" href="glossary.html#term-jax"><em class="xref std std-term">jax</em></a> that are used on the
|
and the various input and output <a class="reference internal" href="glossary.html#term-jax"><em class="xref std std-term">jax</em></a> that are used on the
|
||||||
|
@ -105,7 +105,7 @@ have the listener perform the configuration when the message arrives.
|
||||||
But even if the extension <em>has</em> already been loaded, this will still
|
But even if the extension <em>has</em> already been loaded, this will still
|
||||||
work, because the listener will receive the ready signal even if it
|
work, because the listener will receive the ready signal even if it
|
||||||
has already been posted. In this way, listening for signals is a
|
has already been posted. In this way, listening for signals is a
|
||||||
robust method of synchonizing code components no matter when they are
|
robust method of synchronizing code components no matter when they are
|
||||||
loaded and run.</p>
|
loaded and run.</p>
|
||||||
<p>In some cases, it may be inappropriate for a new listener to receive
|
<p>In some cases, it may be inappropriate for a new listener to receive
|
||||||
past messages that were sent to a signal object. There are two ways to
|
past messages that were sent to a signal object. There are two ways to
|
||||||
|
@ -145,7 +145,7 @@ details of the messages sent during startup. See also the
|
||||||
<tt class="docutils literal"><span class="pre">test/sample-signals.html</span></tt> file (and its source) for examples of
|
<tt class="docutils literal"><span class="pre">test/sample-signals.html</span></tt> file (and its source) for examples of
|
||||||
using signals. This example lists all the signals that occur while
|
using signals. This example lists all the signals that occur while
|
||||||
MathJax is processing that page, so it gives useful information about
|
MathJax is processing that page, so it gives useful information about
|
||||||
the details of the signals produced by variuous components.</p>
|
the details of the signals produced by various components.</p>
|
||||||
<p>In this example, the listener starts loading an extra configuration
|
<p>In this example, the listener starts loading an extra configuration
|
||||||
file (from the same directory as the web page). Since it returns
|
file (from the same directory as the web page). Since it returns
|
||||||
the callback from that request, the signal processing will wait until
|
the callback from that request, the signal processing will wait until
|
||||||
|
|
|
@ -86,7 +86,7 @@ that, and otherwise use HTML-with-CSS to display the mathematics.
|
||||||
This is the most general configuration, and should suffice for most
|
This is the most general configuration, and should suffice for most
|
||||||
people’s needs. Other configurations are available, however, and you
|
people’s needs. Other configurations are available, however, and you
|
||||||
can also provide additional configuration parameters to taylor one of
|
can also provide additional configuration parameters to taylor one of
|
||||||
the confiogurations to your needs. More details can be found in the
|
the configurations to your needs. More details can be found in the
|
||||||
<a class="reference internal" href="configuration.html#loading"><em>Loading and Configuring MathJax</em></a> instructions.</p>
|
<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
|
<p>The use of <tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt> is governed by its <a class="reference external" href="http://www.mathjax.org/download/mathjax-cdn-terms-of-service/">terms of service</a>, so be
|
||||||
sure to read that before linking to the MathJax CDN server.</p>
|
sure to read that before linking to the MathJax CDN server.</p>
|
||||||
|
@ -144,7 +144,7 @@ problems in the permission or locations of files.</p>
|
||||||
<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/TeX-AMS-MML_HTMLorMML.js</span></tt> (i.e., the file
|
will load the file <tt class="docutils literal"><span class="pre">config/TeX-AMS-MML_HTMLorMML.js</span></tt> (i.e., the file
|
||||||
named <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML.js</span></tt> in the <tt class="docutils literal"><span class="pre">config</span></tt> folder of the
|
named <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML.js</span></tt> in the <tt class="docutils literal"><span class="pre">config</span></tt> folder of the
|
||||||
main <tt class="docutils literal"><span class="pre">MathJax</span></tt> folder). This file preloads all the most comply-used
|
main <tt class="docutils literal"><span class="pre">MathJax</span></tt> folder). This file preloads all the most commonly-used
|
||||||
components of MathJax, allowing it to process mathematics that is in
|
components of MathJax, allowing it to process mathematics that is in
|
||||||
the TeX or LaTeX format, or in MathML notation. It will produce
|
the TeX or LaTeX format, or in MathML notation. It will produce
|
||||||
output in MathML form if the user’s browser supports that, and will use
|
output in MathML form if the user’s browser supports that, and will use
|
||||||
|
@ -156,7 +156,7 @@ described more fully in <a class="reference internal" href="config-files.html#co
|
||||||
<a class="reference internal" href="options/index.html#configuration"><em>Configuration Options</em></a>.</p>
|
<a class="reference internal" href="options/index.html#configuration"><em>Configuration Options</em></a>.</p>
|
||||||
<p>Note: The configuration process has changed in MathJax v1.1, so if you have
|
<p>Note: The configuration process has changed in MathJax v1.1, so if you have
|
||||||
existing pages that use MathJax, you may need to modify the tag that
|
existing pages that use MathJax, you may need to modify the tag that
|
||||||
loads MathJax so that is conforms with the new configuration process.
|
loads MathJax so that it conforms with the new configuration process.
|
||||||
See <a class="reference internal" href="installation.html#installation"><em>Installing and Configuring MathJax</em></a> for more
|
See <a class="reference internal" href="installation.html#installation"><em>Installing and Configuring MathJax</em></a> for more
|
||||||
details.</p>
|
details.</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -227,14 +227,14 @@ math mode, you must enable that explicitly in your configuration:</p>
|
||||||
<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">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="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/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>
|
<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>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
|
<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 <cite>tex2jax</cite> preprocessor,
|
parameters that you can specify for the <cite>tex2jax</cite> preprocessor,
|
||||||
which is the component of MathJax that identifies TeX notation within
|
which is the component of MathJax that identifies TeX notation within
|
||||||
the page). See the <a class="reference internal" href="tex.html#tex-support"><em>TeX and LaTeX</em></a> page for
|
the page. See the <a class="reference internal" href="tex.html#tex-support"><em>TeX and LaTeX</em></a> page for
|
||||||
more on MathJax’s support for TeX.</p>
|
more on MathJax’s support for TeX.</p>
|
||||||
<p>Here is a complete sample page containing TeX mathematics (also available
|
<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>
|
in the <tt class="docutils literal"><span class="pre">test/sample-tex.html</span></tt> file):</p>
|
||||||
|
|
|
@ -68,13 +68,13 @@ initiates an action, waits for it to complete, and then goes on, you
|
||||||
break the function into two parts: a first part that sets up and
|
break the function into two parts: a first part that sets up and
|
||||||
initiates the action, and a second that runs after the action is
|
initiates the action, and a second that runs after the action is
|
||||||
finished. Callbacks are similar to event handlers that you attach to
|
finished. Callbacks are similar to event handlers that you attach to
|
||||||
DOM elements, and are called when an certain action occurs. See the
|
DOM elements, and are called when a certain action occurs. See the
|
||||||
<a class="reference internal" href="api/callback.html#api-callback"><em>Callback Object</em></a> reference page for details of
|
<a class="reference internal" href="api/callback.html#api-callback"><em>Callback Object</em></a> reference page for details of
|
||||||
how to specify a callback.</p>
|
how to specify a callback.</p>
|
||||||
<p><strong>Queues</strong> are MathJax’s means of synchronizing actions that must be
|
<p><strong>Queues</strong> are MathJax’s means of synchronizing actions that must be
|
||||||
performed sequentially, even when they involve asynchronous events
|
performed sequentially, even when they involve asynchronous events
|
||||||
like loading files or dynamically creating stylesheets. The actions
|
like loading files or dynamically creating stylesheets. The actions
|
||||||
that you put in the queue are <cite>Callback</cite> objects that will be perfomed
|
that you put in the queue are <cite>Callback</cite> objects that will be performed
|
||||||
in sequence, with MathJax handling the linking of one action to the
|
in sequence, with MathJax handling the linking of one action to the
|
||||||
next. MathJax maintains a master queue that you can use to
|
next. MathJax maintains a master queue that you can use to
|
||||||
synchronize with MathJax, but you can also create your own private
|
synchronize with MathJax, but you can also create your own private
|
||||||
|
@ -91,7 +91,7 @@ will call your code. This works somewhat like an event handler, except
|
||||||
that many different types of events can go through the same signal, and the
|
that many different types of events can go through the same signal, and the
|
||||||
signals have a “memory”, meaning that if you register an interest in a
|
signals have a “memory”, meaning that if you register an interest in a
|
||||||
particular type of signal and that signal has already occurred, you will be
|
particular type of signal and that signal has already occurred, you will be
|
||||||
told about the past occurrances as well as any future ones. See the
|
told about the past occurrences 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. 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>
|
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>
|
||||||
|
|
|
@ -78,7 +78,7 @@ 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">
|
<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>
|
<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,
|
<p>By default, the <cite>tex2jax</cite> preprocessor 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
|
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. 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
|
equations, but it does <strong>not</strong> define <tt class="docutils literal"><span class="pre">$...$</span></tt> as in-line math
|
||||||
|
@ -108,7 +108,7 @@ math delimiter.)</p>
|
||||||
options</em></a> page, for additional configuration
|
options</em></a> page, for additional configuration
|
||||||
parameters that you can specify for the <cite>tex2jax</cite> preprocessor,
|
parameters that you can specify for the <cite>tex2jax</cite> preprocessor,
|
||||||
which is the component of MathJax that identifies TeX notation within
|
which is the component of MathJax that identifies TeX notation within
|
||||||
the page).</p>
|
the page.</p>
|
||||||
</div>
|
</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>
|
||||||
|
@ -120,7 +120,7 @@ Also, since the mathematics is initially given as text on the page,
|
||||||
you need to be careful that your mathematics doesn’t look like HTML
|
you need to be careful that your mathematics doesn’t look like HTML
|
||||||
tags to the browser (which parses the page before MathJax gets to see
|
tags to the browser (which parses the page before MathJax gets to see
|
||||||
it). In particular, that means that you have to be careful about
|
it). In particular, that means that you have to be careful about
|
||||||
things like less-than and greater-than signs (<tt class="docutils literal"><span class="pre"><``and</span> <span class="pre">``></span></tt>), and
|
things like less-than and greater-than signs (<tt class="docutils literal"><span class="pre"><</span></tt> and <tt class="docutils literal"><span class="pre">></span></tt>), and
|
||||||
ampersands (<tt class="docutils literal"><span class="pre">&</span></tt>), which have special meaning to the browsers. For
|
ampersands (<tt class="docutils literal"><span class="pre">&</span></tt>), which have special meaning to the browsers. For
|
||||||
example,</p>
|
example,</p>
|
||||||
<div class="highlight-latex"><div class="highlight"><pre>... when <span class="s">$</span><span class="nb">x<y</span><span class="s">$</span> we have ...
|
<div class="highlight-latex"><div class="highlight"><pre>... when <span class="s">$</span><span class="nb">x<y</span><span class="s">$</span> we have ...
|
||||||
|
@ -131,10 +131,10 @@ beginning of a tag named <tt class="docutils literal"><span class="pre">y</span>
|
||||||
HTML). When this happens, the browser will think the tag continues up
|
HTML). When this happens, the browser will think the tag continues up
|
||||||
to the next <tt class="docutils literal"><span class="pre">></span></tt> in the document (typically the end of the next
|
to the next <tt class="docutils literal"><span class="pre">></span></tt> in the document (typically the end of the next
|
||||||
actual tag in the HTML file), and you may notice that you are missing
|
actual tag in the HTML file), and you may notice that you are missing
|
||||||
part of the text of the document. In the example above, the `` we
|
part of the text of the document. In the example above, the “<tt class="docutils literal"><span class="pre">we</span>
|
||||||
have ...`` will not be displayed because the browser thinks it is
|
<span class="pre">have</span> <span class="pre">...</span></tt>” will not be displayed because the browser thinks it is
|
||||||
part of the tag starting at <tt class="docutils literal"><span class="pre"><y</span></tt>. This is one indication you can
|
part of the tag starting at <tt class="docutils literal"><span class="pre"><y</span></tt>. This is one indication you can
|
||||||
use to spot this prooblem; it is a common error and should be avoided.</p>
|
use to spot this problem; it is a common error and should be avoided.</p>
|
||||||
<p>Usually, it is sufficient to simply put spaces around these symbols to
|
<p>Usually, it is sufficient to simply put spaces around these symbols to
|
||||||
cause the browser to avoid them, so</p>
|
cause the browser to avoid them, so</p>
|
||||||
<div class="highlight-latex"><div class="highlight"><pre>... when <span class="s">$</span><span class="nb">x < y</span><span class="s">$</span> we have ...
|
<div class="highlight-latex"><div class="highlight"><pre>... when <span class="s">$</span><span class="nb">x < y</span><span class="s">$</span> we have ...
|
||||||
|
@ -261,18 +261,18 @@ the paragraph, use</p>
|
||||||
<span class="p">}</span>
|
<span class="p">}</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>You may also wish to set the font family, as the default is “serif”</p>
|
<p>You may also wish to set the font family, as the default is “serif”.</p>
|
||||||
</div>
|
</div>
|
||||||
<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 generating error messages. 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 consisting 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>This extension is loaded by all the combined configuration files that
|
<p>This extension is loaded by all the combined configuration files that
|
||||||
include the TeX input processor. To enable the <cite>noUndefined</cite> extension
|
include the TeX input processor. To enable the <cite>noUndefined</cite> extension
|
||||||
in your own configuration, or to modify its parameters, add something like
|
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>
|
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>
|
<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">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>
|
||||||
|
@ -864,7 +864,6 @@ be loaded automatically when the macro or environment is first used.</p>
|
||||||
<span class="k">\nolimits</span>
|
<span class="k">\nolimits</span>
|
||||||
<span class="k">\normalsize</span>
|
<span class="k">\normalsize</span>
|
||||||
<span class="k">\not</span>
|
<span class="k">\not</span>
|
||||||
<span class="k">\notag</span> AMSmath
|
|
||||||
<span class="k">\notag</span> [AMSmath]
|
<span class="k">\notag</span> [AMSmath]
|
||||||
<span class="k">\notin</span>
|
<span class="k">\notin</span>
|
||||||
<span class="k">\nparallel</span> AMSsymbols
|
<span class="k">\nparallel</span> AMSsymbols
|
||||||
|
@ -1078,8 +1077,7 @@ be loaded automatically when the macro or environment is first used.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="t">
|
<div class="section" id="t">
|
||||||
<h3>T<a class="headerlink" href="#t" title="Permalink to this headline">¶</a></h3>
|
<h3>T<a class="headerlink" href="#t" title="Permalink to this headline">¶</a></h3>
|
||||||
<div class="highlight-latex"><div class="highlight"><pre><span class="k">\tag</span> AMSmath
|
<div class="highlight-latex"><div class="highlight"><pre><span class="k">\tag</span> [AMSmath]
|
||||||
<span class="k">\tag</span> [AMSmath]
|
|
||||||
<span class="k">\tan</span>
|
<span class="k">\tan</span>
|
||||||
<span class="k">\tanh</span>
|
<span class="k">\tanh</span>
|
||||||
<span class="k">\tau</span>
|
<span class="k">\tau</span>
|
||||||
|
@ -1226,7 +1224,7 @@ be loaded automatically when the macro or environment is first used.</p>
|
||||||
<div class="section" id="environments">
|
<div class="section" id="environments">
|
||||||
<h3>Environments<a class="headerlink" href="#environments" title="Permalink to this headline">¶</a></h3>
|
<h3>Environments<a class="headerlink" href="#environments" title="Permalink to this headline">¶</a></h3>
|
||||||
<p>LaTeX environments of the form <tt class="docutils literal"><span class="pre">\begin{XXX}</span> <span class="pre">...</span> <span class="pre">\end{XXX}</span></tt> are
|
<p>LaTeX environments of the form <tt class="docutils literal"><span class="pre">\begin{XXX}</span> <span class="pre">...</span> <span class="pre">\end{XXX}</span></tt> are
|
||||||
preovided where <tt class="docutils literal"><span class="pre">XXX</span></tt> is one of the following:</p>
|
provided where <tt class="docutils literal"><span class="pre">XXX</span></tt> is one of the following:</p>
|
||||||
<div class="highlight-latex"><div class="highlight"><pre>align [AMSmath]
|
<div class="highlight-latex"><div class="highlight"><pre>align [AMSmath]
|
||||||
align* [AMSmath]
|
align* [AMSmath]
|
||||||
alignat [AMSmath]
|
alignat [AMSmath]
|
||||||
|
|
|
@ -64,7 +64,7 @@ MathJax operates asynchonously (see <a class="reference internal" href="synchron
|
||||||
your call to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> is synchronized with the
|
your call to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> is synchronized with the
|
||||||
other actions that MathJax is taking. For example, it may already be
|
other actions that MathJax is taking. For example, it may already be
|
||||||
typesetting portions of the page, or it may be waiting for an output
|
typesetting portions of the page, or it may be waiting for an output
|
||||||
jax to load, etc., and so you need to queue to typeset action to be
|
jax to load, etc., and so you need to queue the typeset action to be
|
||||||
performed after MathJax has finished whatever else it may be doing.
|
performed after MathJax has finished whatever else it may be doing.
|
||||||
That may be immediately, but it may not, and there is no way to tell.</p>
|
That may be immediately, but it may not, and there is no way to tell.</p>
|
||||||
<p>To queue the typeset action, use the command</p>
|
<p>To queue the typeset action, use the command</p>
|
||||||
|
@ -74,12 +74,12 @@ That may be immediately, but it may not, and there is no way to tell.</p>
|
||||||
<p>This will cause MathJax to typeset the page when it is next able to do
|
<p>This will cause MathJax to typeset the page when it is next able to do
|
||||||
so. It guarantees that the typesetting will synchronize properly
|
so. It guarantees that the typesetting will synchronize properly
|
||||||
with the loading of jax, extensions, fonts, stylesheets, and other
|
with the loading of jax, extensions, fonts, stylesheets, and other
|
||||||
asynchornous activity, and is the only truely safe way to ask MathJax
|
asynchronous activity, and is the only truly safe way to ask MathJax
|
||||||
to process additional material.</p>
|
to process additional material.</p>
|
||||||
<p>The <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> command also accepts a parameter
|
<p>The <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> command also accepts a parameter
|
||||||
that is a DOM element whose contents is to be typeset. That could be
|
that is a DOM element whose content is to be typeset. That could be
|
||||||
a paragraph, or a <tt class="docutils literal"><span class="pre"><div></span></tt> element, or even a MathJax math
|
a paragraph, or a <tt class="docutils literal"><span class="pre"><div></span></tt> element, or even a MathJax math
|
||||||
<tt class="docutils literal"><span class="pre"><script></span></tt> tag. It could also be a the DOM <cite>id</cite> of such an object, in
|
<tt class="docutils literal"><span class="pre"><script></span></tt> tag. It could also be the DOM <cite>id</cite> of such an object, in
|
||||||
which case, MathJax will look up the DOM element for you. So</p>
|
which case, MathJax will look up the DOM element for you. So</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">Queue</span><span class="p">([</span><span class="s2">"Typeset"</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="s2">"MathExample"</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">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Typeset"</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="s2">"MathExample"</span><span class="p">]);</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
@ -96,7 +96,7 @@ typeset.</p>
|
||||||
immediately, regardless of whether the typesetting has taken place or
|
immediately, regardless of whether the typesetting has taken place or
|
||||||
not, so you can not assume that the mathematics is visible after you
|
not, so you can not assume that the mathematics is visible after you
|
||||||
make this call. That means that things like the size of the container
|
make this call. That means that things like the size of the container
|
||||||
for the mathematics may not yet reflect the size of the typeet
|
for the mathematics may not yet reflect the size of the typeset
|
||||||
mathematics. If you need to perform actions that depend on the
|
mathematics. If you need to perform actions that depend on the
|
||||||
mathematics being typeset, you should push <em>those</em> actions onto the
|
mathematics being typeset, you should push <em>those</em> actions onto the
|
||||||
<tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt> as well.</p>
|
<tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt> as well.</p>
|
||||||
|
@ -110,7 +110,7 @@ of calling the functions that do what you want.</p>
|
||||||
<p>If you are not changing a complete DOM structure, but simply want to
|
<p>If you are not changing a complete DOM structure, but simply want to
|
||||||
update the contents of a single mathematical equation, you do not need
|
update the contents of a single mathematical equation, you do not need
|
||||||
to use <tt class="docutils literal"><span class="pre">innerHTML</span></tt> and <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> to preprocess
|
to use <tt class="docutils literal"><span class="pre">innerHTML</span></tt> and <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> to preprocess
|
||||||
and process an elements new content. Instead, you can ask MathJax to
|
and process an element’s new content. Instead, you can ask MathJax to
|
||||||
find the <cite>element jax</cite> for the math element on the page, and use its
|
find the <cite>element jax</cite> for the math element on the page, and use its
|
||||||
methods to modify and update the mathematics that it displays.</p>
|
methods to modify and update the mathematics that it displays.</p>
|
||||||
<p>For example, suppose you have the following HTML in your document</p>
|
<p>For example, suppose you have the following HTML in your document</p>
|
||||||
|
@ -124,7 +124,7 @@ within dollar signs (it will be blank). A student has typed
|
||||||
something elsewhere on the page, and you want to typeset their answer
|
something elsewhere on the page, and you want to typeset their answer
|
||||||
in the location of the mathematics that is already there. You could
|
in the location of the mathematics that is already there. You could
|
||||||
replace the entire contents of the <cite>MathDiv</cite> element and call
|
replace the entire contents of the <cite>MathDiv</cite> element and call
|
||||||
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> as described above, but there is more
|
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Typeset()</span></tt> as described above, but there is a more
|
||||||
efficient approach, which is to ask MathJax for the element jax for
|
efficient approach, which is to ask MathJax for the element jax for
|
||||||
the mathematics, and call its method for replacing the formula shown
|
the mathematics, and call its method for replacing the formula shown
|
||||||
by that element. For example:</p>
|
by that element. For example:</p>
|
||||||
|
@ -132,18 +132,20 @@ by that element. For example:</p>
|
||||||
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Queue</span><span class="p">([</span><span class="s2">"Text"</span><span class="p">,</span><span class="nx">math</span><span class="p">,</span><span class="s2">"x+1"</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">Queue</span><span class="p">([</span><span class="s2">"Text"</span><span class="p">,</span><span class="nx">math</span><span class="p">,</span><span class="s2">"x+1"</span><span class="p">]);</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>This looks up the list of math elements in <cite>MathDiv</cite> element (there is
|
<p>This looks up the list of math elements in the <cite>MathDiv</cite> element
|
||||||
only one) and takes the first one (element 0) and stores it in
|
(there is only one) and takes the first one (element 0) and stores it
|
||||||
<tt class="docutils literal"><span class="pre">math</span></tt>. This is an <cite>element jax</cite> object (see the <a class="reference internal" href="api/elementjax.html#api-element-jax"><em>Element Jax</em></a> specification for details), which has a
|
in <tt class="docutils literal"><span class="pre">math</span></tt>. This is an <cite>element jax</cite> object (see the <a class="reference internal" href="api/elementjax.html#api-element-jax"><em>Element
|
||||||
|
Jax</em></a> specification for details), which has a
|
||||||
<a class="reference internal" href="api/elementjax.html#Text" title="Text"><tt class="xref py py-meth docutils literal"><span class="pre">Text()</span></tt></a> method that can be used to set the input text of the
|
<a class="reference internal" href="api/elementjax.html#Text" title="Text"><tt class="xref py py-meth docutils literal"><span class="pre">Text()</span></tt></a> method that can be used to set the input text of the
|
||||||
math element, and retypeset it.</p>
|
math element, and retypeset it.</p>
|
||||||
<p>Again, since the typesetting should be synchronized with other actions
|
<p>Again, since the typesetting should be synchronized with other actions
|
||||||
of MathJax, the call should be pushed onto the <tt class="docutils literal"><span class="pre">MathJax.Hub.queue</span></tt>,
|
of MathJax, the call should be pushed onto the MathJax processing
|
||||||
as shown above, rather than called directly. The example above
|
queue using <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Queue()</span></tt>, as shown above, rather than
|
||||||
performs the equivalent of <tt class="docutils literal"><span class="pre">math.Text("x+1")</span></tt> as soon as MathJax is
|
called directly. The example above performs the equivalent of
|
||||||
able to do so. Any additional actions the rely on the equation
|
<tt class="docutils literal"><span class="pre">math.Text("x+1")</span></tt> as soon as MathJax is able to do so. Any
|
||||||
<tt class="docutils literal"><span class="pre">x+1</span></tt> actually showing on screen should also be pushed onto the
|
additional actions that rely on the expression <tt class="docutils literal"><span class="pre">x+1</span></tt> actually
|
||||||
queue so that they will not occur before the math is typeset.</p>
|
showing on screen should also be pushed onto the queue so that they
|
||||||
|
will not occur before the math is typeset.</p>
|
||||||
<p>The actions you can perform on an element jax include:</p>
|
<p>The actions you can perform on an element jax include:</p>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<div><dl class="describe">
|
<div><dl class="describe">
|
||||||
|
@ -171,7 +173,7 @@ the original <tt class="docutils literal"><span class="pre"><script></span
|
||||||
<dt>
|
<dt>
|
||||||
<tt class="descname">SourceElement()</tt></dt>
|
<tt class="descname">SourceElement()</tt></dt>
|
||||||
<dd><p>to obtain a reference to the original
|
<dd><p>to obtain a reference to the original
|
||||||
<tt class="docutils literal"><span class="pre"><script></span></tt> object that is assocaited with this element jax.</p>
|
<tt class="docutils literal"><span class="pre"><script></span></tt> object that is associated with this element jax.</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
</div></blockquote>
|
</div></blockquote>
|
||||||
|
@ -184,7 +186,7 @@ then use that result each time you adjust the mathematics to be
|
||||||
displayed.</p>
|
displayed.</p>
|
||||||
<p>To get the element jax the first time, you need to be sure that you
|
<p>To get the element jax the first time, you need to be sure that you
|
||||||
ask MathJax for it <strong>after</strong> MathJax has processed the page the first
|
ask MathJax for it <strong>after</strong> MathJax has processed the page the first
|
||||||
time. This is another sitaution where you want to use the MathJax
|
time. This is another situation where you want to use the MathJax
|
||||||
queue. If your startup code performs the commands</p>
|
queue. If your startup code performs the commands</p>
|
||||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">studentDisplay</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">studentDisplay</span> <span class="o">=</span> <span class="kc">null</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">Queue</span><span class="p">(</span><span class="kd">function</span> <span class="p">()</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">Queue</span><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
|
||||||
|
|
|
@ -97,7 +97,7 @@ details.</p>
|
||||||
<p>If your page simply loads <tt class="docutils literal"><span class="pre">MathJax.js</span></tt> and relies on
|
<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
|
<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
|
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
|
default configuration file; you are required to explicitly specify the
|
||||||
configuration file if you use one. Furthermore, the name of 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
|
<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>
|
renamed <tt class="docutils literal"><span class="pre">config/default.js</span></tt> instead. Thus, if you used</p>
|
||||||
|
@ -180,7 +180,7 @@ and reliable.</p>
|
||||||
<tt class="docutils literal"><span class="pre">text/x=mathajx-config</span></tt> block to configure MathJax in-line.
|
<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>
|
<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
|
<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>
|
sure to read that before linking to the MathJax CDN server.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="change-in-default-tex-delimiters">
|
<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>
|
<h2>Change in default TeX delimiters<a class="headerlink" href="#change-in-default-tex-delimiters" title="Permalink to this headline">¶</a></h2>
|
||||||
|
@ -257,7 +257,7 @@ GitHub. This will allow you to keep your copy of MathJax up to date as
|
||||||
development continues.</p>
|
development continues.</p>
|
||||||
<p>We apologize for the inconvenience of having to switch distributions, but
|
<p>We apologize for the inconvenience of having to switch distributions, but
|
||||||
the git-to-svn bridge we tried to implement to keep both copies in synch
|
the git-to-svn bridge we tried to implement to keep both copies in synch
|
||||||
turned out to be unreliable, and so the SourceForge disrtibution was
|
turned out to be unreliable, and so the SourceForge distribution was
|
||||||
retired in favor of the GitHub site.</p>
|
retired in favor of the GitHub site.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<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>
|
<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
|
<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
|
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
|
support for browsers and mobile devices, process TeX and MathML better, and
|
||||||
increase MathJax’s performance.</p>
|
increase MathJax’s performance.</p>
|
||||||
<p>In addition to these changes, MathJax.org now offers MathJax as a network
|
<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
|
service. Instead of having to install MathJax on your own server, you can
|
||||||
|
@ -64,9 +64,9 @@ the CDN</em></a> for more details.</p>
|
||||||
<div class="section" id="optimization">
|
<div class="section" id="optimization">
|
||||||
<h2>Optimization<a class="headerlink" href="#optimization" title="Permalink to this headline">¶</a></h2>
|
<h2>Optimization<a class="headerlink" href="#optimization" title="Permalink to this headline">¶</a></h2>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Combined configuraiton files that load all the needed files in one piece
|
<li>Combined configuration files that load all the needed files in one piece
|
||||||
rather than loading them individually. This simplifies configuration
|
rather than loading them individually. This simplifies configuration
|
||||||
and speeds up typsetting of the mathematics on the page.</li>
|
and speeds up typesetting of the mathematics on the page.</li>
|
||||||
<li>Improved responsiveness to mouse events during typesetting.</li>
|
<li>Improved responsiveness to mouse events during typesetting.</li>
|
||||||
<li>Parallel downloading of files needed by MathJax, for faster startup
|
<li>Parallel downloading of files needed by MathJax, for faster startup
|
||||||
times.</li>
|
times.</li>
|
||||||
|
@ -75,12 +75,12 @@ have to wait so long.</li>
|
||||||
<li>Rollover to image fonts if a web font fails to load (so you don’t have
|
<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>
|
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
|
<li>The MathJax files are now packed only with <cite>yuicompressor</cite> rather than a
|
||||||
custom compressor. The CDN serves gzipped versions, which compressed
|
custom compressor. The CDN serves gzipped versions, which end up being
|
||||||
better than the gzipped custom-packed files.</li>
|
smaller 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
|
<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>
|
the style for mathematics.</li>
|
||||||
<li>Improve rendering speed for most browsers by isolating the mathematics
|
<li>Improved rendering speed for most browsers by isolating the mathematics
|
||||||
from page during typesetting (avoids full page reflows).</li>
|
from the page during typesetting (avoids full page reflows).</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="enhancements">
|
<div class="section" id="enhancements">
|
||||||
|
@ -96,7 +96,7 @@ mathematics, for example).</li>
|
||||||
<li>Switch the Git repository from storing the fonts in <cite>fonts.zip</cite> to
|
<li>Switch the Git repository from storing the fonts in <cite>fonts.zip</cite> to
|
||||||
storing the <cite>fonts/</cite> directory directly.</li>
|
storing the <cite>fonts/</cite> directory directly.</li>
|
||||||
<li>Improved About box.</li>
|
<li>Improved About box.</li>
|
||||||
<li>add a minimum scaling factor (so math won’t get too small)</li>
|
<li>Added a minimum scaling factor (so math won’t get too small).</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="tex-support">
|
<div class="section" id="tex-support">
|
||||||
|
@ -124,7 +124,7 @@ storing the <cite>fonts/</cite> directory directly.</li>
|
||||||
<li>Better support for MathML namespaces.</li>
|
<li>Better support for MathML namespaces.</li>
|
||||||
<li>Properly handle comments within MathML in IE.</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>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>
|
<li>Improved support for <tt class="docutils literal"><span class="pre"><maction></span></tt> with embellished operators.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="other-bug-fixes">
|
<div class="section" id="other-bug-fixes">
|
||||||
|
@ -133,7 +133,7 @@ storing the <cite>fonts/</cite> directory directly.</li>
|
||||||
<li>Fixed CSS bleed through with zoom and other situations.</li>
|
<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>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>Replaced illegal prefix characters in cookie name.</li>
|
||||||
<li>Improve placement of surd for square roots and n-th roots.</li>
|
<li>Improved placement of surd for square roots and n-th roots.</li>
|
||||||
<li>Fixed layer obscuring math from MathPlayer for screen readers.</li>
|
<li>Fixed layer obscuring math from MathPlayer for screen readers.</li>
|
||||||
<li>Newlines in CDATA comments are now handled properly.</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
|
<li>Resolved conflict between <cite>jsMath2jax</cite> and <cite>tex2jax</cite> both processing the
|
||||||
|
@ -162,7 +162,7 @@ sibling elements.</li>
|
||||||
<li>Added Firefox 4 detection and configuration.</li>
|
<li>Added Firefox 4 detection and configuration.</li>
|
||||||
<li>Fix for extra line-break bug when displayed equations are in
|
<li>Fix for extra line-break bug when displayed equations are in
|
||||||
preformatted text.</li>
|
preformatted text.</li>
|
||||||
<li>Update fonts so that FF 3.6.13 and above can read them.</li>
|
<li>Updated fonts so that FF 3.6.13 and above can read them.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p><strong>Internet Explorer</strong></p>
|
<p><strong>Internet Explorer</strong></p>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
|
@ -174,7 +174,7 @@ preformatted text.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p><strong>iPhone/iPad</strong></p>
|
<p><strong>iPhone/iPad</strong></p>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Add support for OTF web fonts in iOS4.2.</li>
|
<li>Added support for OTF web fonts in iOS4.2.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p><strong>Nokia</strong></p>
|
<p><strong>Nokia</strong></p>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
|
@ -184,7 +184,7 @@ preformatted text.</li>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Prevent Opera from using STIX fonts unless explicitly requested via the
|
<li>Prevent Opera from using STIX fonts unless explicitly requested via the
|
||||||
font menu (since Opera can’t display many of the characters).</li>
|
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 bad em-size detection in 10.61.</li>
|
||||||
<li>Fixed a problem with the About dialog in Opera 11.</li>
|
<li>Fixed a problem with the About dialog in Opera 11.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p><strong>Safari</strong></p>
|
<p><strong>Safari</strong></p>
|
||||||
|
|
|
@ -18,7 +18,7 @@ rather than just ``ul li``.
|
||||||
The value used to define the CSS style can either be a string
|
The value used to define the CSS style can either be a string
|
||||||
containing the CSS definition, or a javascript object that is itself a
|
containing the CSS definition, or a javascript object that is itself a
|
||||||
collection of `name:value` pairs, where the `name` is the attribute
|
collection of `name:value` pairs, where the `name` is the attribute
|
||||||
being defined and `value` is the value that attibute should be given.
|
being defined and `value` is the value that attribute should be given.
|
||||||
Note that, since this is a JavaScript object, the pairs are separated
|
Note that, since this is a JavaScript object, the pairs are separated
|
||||||
by commas (not semi-colons) and the values are enclosed in quotation
|
by commas (not semi-colons) and the values are enclosed in quotation
|
||||||
marks. If the name contains dashes, it should be enclosed in
|
marks. If the name contains dashes, it should be enclosed in
|
||||||
|
|
|
@ -6,7 +6,7 @@ Describing HTML snippets
|
||||||
|
|
||||||
A number of MathJax configuration options allow you to specify an HTML
|
A number of MathJax configuration options allow you to specify an HTML
|
||||||
snippet using a JavaScript object. This lets you include HTML in your
|
snippet using a JavaScript object. This lets you include HTML in your
|
||||||
configutation files even though they are not HTML files themselves.
|
configuration files even though they are not HTML files themselves.
|
||||||
The format is fairly simple, but flexible enough to let you represent
|
The format is fairly simple, but flexible enough to let you represent
|
||||||
complicated HTML trees.
|
complicated HTML trees.
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ Methods
|
||||||
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 of 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.
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ Methods
|
||||||
.. method:: loadHook(file,callback)
|
.. method:: loadHook(file,callback)
|
||||||
|
|
||||||
Registers a callback to be executed when the given file is
|
Registers a callback to be executed when the given file is
|
||||||
loaded. The file load operation need to be started when this
|
loaded. The file load operation needs to be started when this
|
||||||
method is called, so it can be used to register a hook for a file
|
method is called, so it can be used to register a hook for a file
|
||||||
that may be loaded in the future.
|
that may be loaded in the future.
|
||||||
|
|
||||||
|
@ -156,11 +156,11 @@ Methods
|
||||||
|
|
||||||
.. method:: Preloading(file1[,file2...])
|
.. method:: Preloading(file1[,file2...])
|
||||||
|
|
||||||
Used withing combined configuration files to indicate what files are
|
Used with combined configuration files to indicate what files are
|
||||||
in the configuration file. Marks the files are loading (since there
|
in the configuration file. Marks the files as loading (since there
|
||||||
will never be an explicit :meth:`Load()` or :meth:`Require()` call for
|
will never be an explicit :meth:`Load()` or :meth:`Require()` call for
|
||||||
then), so that load-hooks and other load-related events can be
|
them), so that load-hooks and other load-related events can be
|
||||||
properly processed.
|
properly processed when the :meth:`loadComplete()` occurs.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
- **file1, file2, ...** --- the names of the files in the combined file
|
- **file1, file2, ...** --- the names of the files in the combined file
|
||||||
|
|
|
@ -35,7 +35,7 @@ A callback specification is any one of the following:
|
||||||
.. describe:: fn
|
.. describe:: fn
|
||||||
|
|
||||||
A function that is to be called when the callback is executed.
|
A function that is to be called when the callback is executed.
|
||||||
No additional data is passed to it (other that what it is
|
No additional data is passed to it (other than what it is
|
||||||
called with at the time the callback is executed), and `this`
|
called with at the time the callback is executed), and `this`
|
||||||
will be the window object.
|
will be the window object.
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ of a file), or in response to a user action. For example:
|
||||||
function f(x) {alert("x contains "+x)};
|
function f(x) {alert("x contains "+x)};
|
||||||
function DelayedX(time) {
|
function DelayedX(time) {
|
||||||
var x = "hi";
|
var x = "hi";
|
||||||
setTimeout(MathJax.Callback([f, x], time);
|
setTimeout(MathJax.Callback([f, x], time));
|
||||||
}
|
}
|
||||||
|
|
||||||
The ``DelayedX`` function arranges for the function ``f`` to be called at
|
The ``DelayedX`` function arranges for the function ``f`` to be called at
|
||||||
|
@ -174,7 +174,7 @@ Callback Object Properties
|
||||||
.. describe:: called
|
.. describe:: called
|
||||||
|
|
||||||
Set to ``true`` after the callback has been called, and undefined
|
Set to ``true`` after the callback has been called, and undefined
|
||||||
otherwise. A callback will not be exectued a second time unless
|
otherwise. A callback will not be executed a second time unless
|
||||||
the callback's :meth:`reset()` method is called first, or its
|
the callback's :meth:`reset()` method is called first, or its
|
||||||
``autoReset`` property is set to ``true``.
|
``autoReset`` property is set to ``true``.
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ MathJax.Callback Methods
|
||||||
|
|
||||||
Calls each callback in the `hooks` array (or the single hook if it
|
Calls each callback in the `hooks` array (or the single hook if it
|
||||||
is not an array), passing it the arguments stored in the data
|
is not an array), passing it the arguments stored in the data
|
||||||
array. It `reset` is ``true``, then the callback's
|
array. If `reset` is ``true``, then the callback's
|
||||||
:meth:`reset()` method will be called before each hook is
|
:meth:`reset()` method will be called before each hook is
|
||||||
executed. If any of the hooks returns a `Callback` object, then
|
executed. If any of the hooks returns a `Callback` object, then
|
||||||
it collects those callbacks and returns a new callback that will
|
it collects those callbacks and returns a new callback that will
|
||||||
|
|
|
@ -34,7 +34,7 @@ Class Properties
|
||||||
|
|
||||||
.. describe:: directory
|
.. describe:: directory
|
||||||
|
|
||||||
The directory where the jax files are stored (e.g., ``"[MathJax]/jax/element/mml"``);
|
The directory where the jax files are stored (e.g., ``"[MathJax]/jax/element/mml"``).
|
||||||
|
|
||||||
|
|
||||||
Instance Properties
|
Instance Properties
|
||||||
|
@ -80,19 +80,19 @@ Methods
|
||||||
.. Method:: Text(text[,callback])
|
.. Method:: Text(text[,callback])
|
||||||
|
|
||||||
Sets the input text for this element to the given text and
|
Sets the input text for this element to the given text and
|
||||||
reprocesses the mathematics. (I.e., update the equation to the
|
reprocesses the mathematics. (I.e., updates the equation to the
|
||||||
new one given by `text`). When the processing is complete, the
|
new one given by `text`). When the processing is complete, the
|
||||||
`callback`, if any, is called.
|
`callback`, if any, is called.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
- **text** --- the new mathematic source string for the element
|
- **text** --- the new mathematics source string for the element
|
||||||
- **callback** --- the callback specification
|
- **callback** --- the callback specification
|
||||||
:Returns: the callback object
|
:Returns: the callback object
|
||||||
|
|
||||||
.. Method:: Reprocess([callback])
|
.. Method:: Reprocess([callback])
|
||||||
:noindex:
|
:noindex:
|
||||||
|
|
||||||
Remove the output and produce it again. This may be necessary if
|
Removes the output and produces it again. This may be necessary if
|
||||||
there are changes to the CSS styles that would affect the layout
|
there are changes to the CSS styles that would affect the layout
|
||||||
of the mathematics, for example. The `callback`, if any, is
|
of the mathematics, for example. The `callback`, if any, is
|
||||||
called when the process completes.
|
called when the process completes.
|
||||||
|
|
|
@ -5,7 +5,7 @@ The MathJax.HTML Object
|
||||||
***********************
|
***********************
|
||||||
|
|
||||||
The ``MathJax.HTML`` object provides routines for creating HTML
|
The ``MathJax.HTML`` object provides routines for creating HTML
|
||||||
elements and adding them to the page, and int particular, it contains
|
elements and adding them to the page, and in particular, it contains
|
||||||
the code that processes MathJax's :ref:`HTML snippets <html-snippets>`
|
the code that processes MathJax's :ref:`HTML snippets <html-snippets>`
|
||||||
and turns them into actual DOM objects. It also implements the
|
and turns them into actual DOM objects. It also implements the
|
||||||
methods used to manage the cookies used by MathJax.
|
methods used to manage the cookies used by MathJax.
|
||||||
|
@ -108,7 +108,7 @@ Methods
|
||||||
discussed below.
|
discussed below.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
- **name** --- the name that identifies the coookie
|
- **name** --- the name that identifies the cookie
|
||||||
- **data** --- object containing the data to store in the cookie
|
- **data** --- object containing the data to store in the cookie
|
||||||
:Returns: ``null``
|
:Returns: ``null``
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ loading is asynchronous, a number of the methods below may return
|
||||||
before their actions are completed. For this reason, they include
|
before their actions are completed. For this reason, they include
|
||||||
callback functions that are called when the action completes. These
|
callback functions that are called when the action completes. These
|
||||||
can be used to synchronize actions that require the mathematics to be
|
can be used to synchronize actions that require the mathematics to be
|
||||||
completed before those action occur. See the :ref:`Using Callbacks
|
completed before those actions occur. See the :ref:`Using Callbacks
|
||||||
<using-callbacks>` documentation for more details.
|
<using-callbacks>` documentation for more details.
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,9 +58,9 @@ Properties
|
||||||
|
|
||||||
These are boolean values that indicate whether the browser is
|
These are boolean values that indicate whether the browser is
|
||||||
running on a Macintosh computer or a Windows computer. They
|
running on a Macintosh computer or a Windows computer. They
|
||||||
will both be ``false`` for a Linux computer
|
will both be ``false`` for a Linux computer.
|
||||||
|
|
||||||
.. describe:: isForefox, isSafari, isChrome, isOpera, isMSIE, isKonqueror
|
.. describe:: isFirefox, isSafari, isChrome, isOpera, isMSIE, isKonqueror
|
||||||
|
|
||||||
These are ``true`` when the browser is the indicated one, and
|
These are ``true`` when the browser is the indicated one, and
|
||||||
``false`` otherwise.
|
``false`` otherwise.
|
||||||
|
@ -80,7 +80,7 @@ Properties
|
||||||
browsers and whose values are the functions to be performed.
|
browsers and whose values are the functions to be performed.
|
||||||
Each function is passed one parameter, which is the
|
Each function is passed one parameter, which is the
|
||||||
``MathJax.Hub.Browser`` object. You do not need to include
|
``MathJax.Hub.Browser`` object. You do not need to include
|
||||||
every browser as one of your choices (only those for which you
|
every browser as one of your choices --- only those for which you
|
||||||
need to do special processing. For example:
|
need to do special processing. For example:
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
@ -148,8 +148,8 @@ Methods
|
||||||
Registers a listener for a particular message being sent to the
|
Registers a listener for a particular message being sent to the
|
||||||
startup signal (where initialization and component startup
|
startup signal (where initialization and component startup
|
||||||
messages are sent). When the message equals the `type`, the
|
messages are sent). When the message equals the `type`, the
|
||||||
`callback will be called with the message as its parameter.
|
`callback` will be called with the message as its parameter.
|
||||||
See the :ref:`Using Signals <using-signals>` dcocumentation for
|
See the :ref:`Using Signals <using-signals>` documentation for
|
||||||
more details.
|
more details.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
|
@ -163,7 +163,7 @@ Methods
|
||||||
completely loaded and processed. (The callback is called when the
|
completely loaded and processed. (The callback is called when the
|
||||||
file makes its :meth:`MathJax.Ajax.loadComplete()` call.) The
|
file makes its :meth:`MathJax.Ajax.loadComplete()` call.) The
|
||||||
`file` should be the complete file name, e.g.,
|
`file` should be the complete file name, e.g.,
|
||||||
``"[MathJax]/config/MathJax.js"``.
|
``"[MathJax]/config/default.js"``.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
- **file** --- the name of the file to wait for
|
- **file** --- the name of the file to wait for
|
||||||
|
@ -304,8 +304,8 @@ Methods
|
||||||
|
|
||||||
Returns ``0`` if the element is not a ``<script>`` that can be
|
Returns ``0`` if the element is not a ``<script>`` that can be
|
||||||
processed by MathJax or the result of an output jax, returns ``-1``
|
processed by MathJax or the result of an output jax, returns ``-1``
|
||||||
if element is an unprocessed ``<script>`` tag that could be
|
if the element is an unprocessed ``<script>`` tag that could be
|
||||||
handled by MathJax, and returns ``1`` if element is a processed
|
handled by MathJax, and returns ``1`` if the element is a processed
|
||||||
``<script>`` tag or an element that is the result of an output jax.
|
``<script>`` tag or an element that is the result of an output jax.
|
||||||
|
|
||||||
:Parameters:
|
:Parameters:
|
||||||
|
@ -316,7 +316,7 @@ Methods
|
||||||
|
|
||||||
Inserts data from the `src` object into the `dst` object. The
|
Inserts data from the `src` object into the `dst` object. The
|
||||||
`key:value` pairs in `src` are (recursively) copied into `dst`, so
|
`key:value` pairs in `src` are (recursively) copied into `dst`, so
|
||||||
that if `value` is itself an object, its contents is copied into
|
that if `value` is itself an object, its content is copied into
|
||||||
the corresponding object in `dst`. That is, objects within `src`
|
the corresponding object in `dst`. That is, objects within `src`
|
||||||
are merged into the corresponding objects in `dst` (they don't
|
are merged into the corresponding objects in `dst` (they don't
|
||||||
replace them).
|
replace them).
|
||||||
|
@ -333,7 +333,7 @@ Methods
|
||||||
The `script` is a reference to the ``<script>`` tag where the
|
The `script` is a reference to the ``<script>`` tag where the
|
||||||
error occurred, and `error` is the ``Error`` object for the error.
|
error occurred, and `error` is the ``Error`` object for the error.
|
||||||
The default action is to insert an HTML snippet at the location of
|
The default action is to insert an HTML snippet at the location of
|
||||||
the script, but this routine can be overriden durring MathJax
|
the script, but this routine can be overriden during MathJax
|
||||||
configuration in order to perform some other action.
|
configuration in order to perform some other action.
|
||||||
``MathJax.Hub.lastError`` holds the ``error`` value of the last
|
``MathJax.Hub.lastError`` holds the ``error`` value of the last
|
||||||
error on the page.
|
error on the page.
|
||||||
|
|
|
@ -7,12 +7,14 @@ The MathJax API
|
||||||
The following links document the various components that make up
|
The following links document the various components that make up
|
||||||
MathJax. These are implemented as JavaScript objects contained within
|
MathJax. These are implemented as JavaScript objects contained within
|
||||||
the single global variable, ``MathJax``. Although JavaScript includes
|
the single global variable, ``MathJax``. Although JavaScript includes
|
||||||
an objects with some inheritance capabilities, they do not constitute
|
an object system with some inheritance capabilities, they do not
|
||||||
a full object-oriented programming model, so MathJax implements
|
constitute a full object-oriented programming model, so MathJax
|
||||||
its own object library. This means there is an ambiguity when we
|
implements its own object library. This means there is an ambiguity
|
||||||
speak of an "object", as it could be either a native JavaScript
|
when we speak of an "object", as it could be either a native
|
||||||
object, or a MathJax object. We will use `Object` (capitalized) or
|
JavaScript object, or a MathJax object. When the distinction is
|
||||||
`MathJax.Object` for, when the distinction is important.
|
importat, we will use `Object` (capitalized) or `MathJax.Object` for
|
||||||
|
the latter; the javascript object will always be listed in lower
|
||||||
|
case.
|
||||||
|
|
||||||
You may also want to view the :ref:`advanced topics <advanced-topics>`
|
You may also want to view the :ref:`advanced topics <advanced-topics>`
|
||||||
on the main MathJax documentation page.
|
on the main MathJax documentation page.
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user