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
|
||||
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
|
||||
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
|
||||
by commas (not semi-colons) and the values are enclosed in quotation
|
||||
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>
|
||||
<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
|
||||
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
|
||||
complicated HTML trees.</p>
|
||||
<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
|
||||
containing the CSS definition, or a javascript object that is itself a
|
||||
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
|
||||
by commas (not semi-colons) and the values are enclosed in quotation
|
||||
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
|
||||
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
|
||||
complicated HTML trees.
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ Methods
|
|||
parameter is the name of the file that has been loaded. This
|
||||
routine will cause any callback functions registered for the file
|
||||
or included in the :meth:`MathJax.Ajax.Require()` calls to be
|
||||
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
|
||||
their last parameter.
|
||||
|
||||
|
@ -145,7 +145,7 @@ Methods
|
|||
.. method:: loadHook(file,callback)
|
||||
|
||||
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
|
||||
that may be loaded in the future.
|
||||
|
||||
|
@ -156,11 +156,11 @@ Methods
|
|||
|
||||
.. method:: Preloading(file1[,file2...])
|
||||
|
||||
Used withing combined configuration files to indicate what files are
|
||||
in the configuration file. Marks the files are loading (since there
|
||||
Used with combined configuration files to indicate what files are
|
||||
in the configuration file. Marks the files as loading (since there
|
||||
will never be an explicit :meth:`Load()` or :meth:`Require()` call for
|
||||
then), so that load-hooks and other load-related events can be
|
||||
properly processed.
|
||||
them), so that load-hooks and other load-related events can be
|
||||
properly processed when the :meth:`loadComplete()` occurs.
|
||||
|
||||
:Parameters:
|
||||
- **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
|
||||
|
||||
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`
|
||||
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 DelayedX(time) {
|
||||
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
|
||||
|
@ -174,7 +174,7 @@ Callback Object Properties
|
|||
.. describe:: called
|
||||
|
||||
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
|
||||
``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
|
||||
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
|
||||
executed. If any of the hooks returns a `Callback` object, then
|
||||
it collects those callbacks and returns a new callback that will
|
||||
|
|
|
@ -34,7 +34,7 @@ Class Properties
|
|||
|
||||
.. 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
|
||||
|
@ -80,19 +80,19 @@ Methods
|
|||
.. Method:: Text(text[,callback])
|
||||
|
||||
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
|
||||
`callback`, if any, is called.
|
||||
|
||||
:Parameters:
|
||||
- **text** --- the new mathematic source string for the element
|
||||
- **text** --- the new mathematics source string for the element
|
||||
- **callback** --- the callback specification
|
||||
:Returns: the callback object
|
||||
|
||||
.. Method:: Reprocess([callback])
|
||||
: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
|
||||
of the mathematics, for example. The `callback`, if any, is
|
||||
called when the process completes.
|
||||
|
|
|
@ -5,7 +5,7 @@ The MathJax.HTML Object
|
|||
***********************
|
||||
|
||||
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>`
|
||||
and turns them into actual DOM objects. It also implements the
|
||||
methods used to manage the cookies used by MathJax.
|
||||
|
@ -108,7 +108,7 @@ Methods
|
|||
discussed below.
|
||||
|
||||
: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
|
||||
: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
|
||||
callback functions that are called when the action completes. These
|
||||
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.
|
||||
|
||||
|
||||
|
@ -58,9 +58,9 @@ Properties
|
|||
|
||||
These are boolean values that indicate whether the browser is
|
||||
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
|
||||
``false`` otherwise.
|
||||
|
@ -80,7 +80,7 @@ Properties
|
|||
browsers and whose values are the functions to be performed.
|
||||
Each function is passed one parameter, which is the
|
||||
``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:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
@ -148,8 +148,8 @@ Methods
|
|||
Registers a listener for a particular message being sent to the
|
||||
startup signal (where initialization and component startup
|
||||
messages are sent). When the message equals the `type`, the
|
||||
`callback will be called with the message as its parameter.
|
||||
See the :ref:`Using Signals <using-signals>` dcocumentation for
|
||||
`callback` will be called with the message as its parameter.
|
||||
See the :ref:`Using Signals <using-signals>` documentation for
|
||||
more details.
|
||||
|
||||
:Parameters:
|
||||
|
@ -163,7 +163,7 @@ Methods
|
|||
completely loaded and processed. (The callback is called when the
|
||||
file makes its :meth:`MathJax.Ajax.loadComplete()` call.) The
|
||||
`file` should be the complete file name, e.g.,
|
||||
``"[MathJax]/config/MathJax.js"``.
|
||||
``"[MathJax]/config/default.js"``.
|
||||
|
||||
:Parameters:
|
||||
- **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
|
||||
processed by MathJax or the result of an output jax, returns ``-1``
|
||||
if element is an unprocessed ``<script>`` tag that could be
|
||||
handled by MathJax, and returns ``1`` if element is a processed
|
||||
if the element is an unprocessed ``<script>`` tag that could be
|
||||
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.
|
||||
|
||||
:Parameters:
|
||||
|
@ -316,7 +316,7 @@ Methods
|
|||
|
||||
Inserts data from the `src` object into the `dst` object. The
|
||||
`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`
|
||||
are merged into the corresponding objects in `dst` (they don't
|
||||
replace them).
|
||||
|
@ -333,7 +333,7 @@ Methods
|
|||
The `script` is a reference to the ``<script>`` tag where the
|
||||
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 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.
|
||||
``MathJax.Hub.lastError`` holds the ``error`` value of the last
|
||||
error on the page.
|
||||
|
|
|
@ -7,12 +7,14 @@ The MathJax API
|
|||
The following links document the various components that make up
|
||||
MathJax. These are implemented as JavaScript objects contained within
|
||||
the single global variable, ``MathJax``. Although JavaScript includes
|
||||
an objects with some inheritance capabilities, they do not constitute
|
||||
a full object-oriented programming model, so MathJax implements
|
||||
its own object library. This means there is an ambiguity when we
|
||||
speak of an "object", as it could be either a native JavaScript
|
||||
object, or a MathJax object. We will use `Object` (capitalized) or
|
||||
`MathJax.Object` for, when the distinction is important.
|
||||
an object system with some inheritance capabilities, they do not
|
||||
constitute a full object-oriented programming model, so MathJax
|
||||
implements its own object library. This means there is an ambiguity
|
||||
when we speak of an "object", as it could be either a native
|
||||
JavaScript object, or a MathJax object. When the distinction is
|
||||
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>`
|
||||
on the main MathJax documentation page.
|
||||
|
|
|
@ -45,7 +45,7 @@ Properties
|
|||
|
||||
.. 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
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Class Properties
|
|||
|
||||
.. 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
|
||||
class, e.g. ``"[MathJax]/jax/input"``.
|
||||
|
||||
|
@ -73,7 +73,7 @@ Methods
|
|||
This is the method that the ``MathJax.Hub`` calls when it needs the
|
||||
input or output jax to process the given math ``<script>``. Its
|
||||
default action is to start loading the jax's ``jax.js`` file, and
|
||||
redefine itself to simplu return the callback for the laod operation
|
||||
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
|
||||
callback). Once the ``jax.js`` file has loaded, this method is
|
||||
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
|
||||
``jax.js`` file when it is loaded. It should perform the translation
|
||||
action for the specific jax. For an input jax, it should return the
|
||||
`ElementJax` object that it created. The :meth:`Translate()` mehtod is
|
||||
`ElementJax` object that it created. The :meth:`Translate()` method is
|
||||
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
|
||||
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
|
||||
reason, you will receive an error trying to process mathematics with
|
||||
this jax.
|
||||
|
@ -147,7 +147,7 @@ Methods
|
|||
5. Post the "[name] Jax Startup" message to the startup signal.
|
||||
6. Perform the jax's :meth:`Startup()` method.
|
||||
7. Post the "[name] Jax Ready" message to the startup signal.
|
||||
8. perform the :meth:`MathJax.Ajax.loadComplete()` call for the
|
||||
8. Perform the :meth:`MathJax.Ajax.loadComplete()` call for the
|
||||
``jax.js`` file.
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
.. 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
|
||||
removed, the previous message (if any) can be redisplayed if it hasn't
|
||||
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.
|
||||
|
||||
|
||||
|
@ -92,14 +92,14 @@ Methods
|
|||
directory).
|
||||
|
||||
:Parameters:
|
||||
- **file** --- the name of the file being loaded.
|
||||
:Returns: the message id number for the message created.
|
||||
- **file** --- the name of the file being loaded
|
||||
:Returns: the message id number for the message created
|
||||
|
||||
.. method:: filterText(text,n)
|
||||
|
||||
This method is called on each message before it is displayed. It can
|
||||
be used to modify (e.g., shorten) the various messages before they are
|
||||
displayed. The default action is to check of the ``messageStyle``
|
||||
displayed. The default action is to check if the ``messageStyle``
|
||||
configuration parameter is ``simple``, and if so, convert loading and
|
||||
processing messages to a simpler form. This method can be overridden
|
||||
to perform other sanitization of the message strings.
|
||||
|
|
|
@ -6,7 +6,7 @@ The MathJax.Callback.Queue Class
|
|||
|
||||
The ``MathJax.Callback.Queue`` object is one of the key mechanisms
|
||||
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
|
||||
one after another, even when one action has to wait for an
|
||||
asynchronous process to complete. This guarantees that operations are
|
||||
|
@ -57,7 +57,7 @@ Methods
|
|||
:Returns: the last callback object added to the queue
|
||||
|
||||
.. method:: Process()
|
||||
:noindex:
|
||||
:noindex:
|
||||
|
||||
Process the commands in the queue, provided the queue is not
|
||||
waiting for another command to complete. This method is used
|
||||
|
@ -66,7 +66,7 @@ Methods
|
|||
.. method:: Suspend()
|
||||
|
||||
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
|
||||
called). This method is used internally; you should not need to
|
||||
call it yourself.
|
||||
|
@ -86,7 +86,7 @@ Methods
|
|||
(passing it the original callback) is queued instead, and it
|
||||
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
|
||||
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.
|
||||
|
||||
:Parameters:
|
||||
|
|
|
@ -7,9 +7,9 @@ The MathJax.Callback.Signal Class
|
|||
The ``MathJax.Callback.Signal`` object is one of the key mechanisms
|
||||
used by MathJax to synchronize its actions with those that occur
|
||||
asynchronously, like loading files and stylesheets. A `Signal` object
|
||||
is used to pulicise the fact that MathJax has performed certain
|
||||
actions, giving other code running the the web page the chance to
|
||||
react to those actions. See :ref:`Synchronizing with MathJax
|
||||
is used to publicize the fact that MathJax has performed certain
|
||||
actions, giving other code running the web page the chance to react to
|
||||
those actions. See :ref:`Synchronizing with MathJax
|
||||
<synchronization>` for more details, and :ref:`Using Signals
|
||||
<using-signals>` in particular for examples of how to specify and use
|
||||
MathJax `Signal` objects.
|
||||
|
@ -30,7 +30,7 @@ Properties
|
|||
|
||||
.. 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
|
||||
of the signals that have been posted so far. This can be cleared
|
||||
using the signal's :meth:`Clear()` method.
|
||||
|
@ -39,7 +39,7 @@ Properties
|
|||
|
||||
Array of callbacks to the listeners who have expressed interest in
|
||||
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.
|
||||
|
||||
|
||||
|
@ -51,7 +51,7 @@ Methods
|
|||
Posts a message to all the listeners for the signal. The listener
|
||||
callbacks are called in turn (with the message as an argument),
|
||||
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
|
||||
`callback` parameter is used to synchronize with its operation;
|
||||
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.
|
||||
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
|
||||
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
|
||||
still get called with the complete set of arguments.
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ Main MathJax Components
|
|||
|
||||
.. 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.
|
||||
|
||||
.. describe:: MathJax.HTML
|
||||
|
@ -65,7 +65,7 @@ Main MathJax Components
|
|||
.. describe:: MathJax.ElementJax
|
||||
|
||||
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
|
||||
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
|
||||
specified in the arguments, and in that case, the callback is a "do
|
||||
nothing" callback. The reason for this is so that the resulting
|
||||
callback can be used can be used in a `MathJax.Callback.Queue` for
|
||||
synchronization purposes, so that the actions following it in the
|
||||
queue will not be performed until after the callback has been fired.
|
||||
callback can be used in a `MathJax.Callback.Queue` for synchronization
|
||||
purposes, so that the actions following it in the queue will not be
|
||||
performed until after the callback has been fired.
|
||||
|
||||
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
|
||||
|
@ -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
|
||||
:meth:`MathJax.Ajax.Require()` calls, and then push a callback for 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.
|
||||
|
||||
|
||||
|
@ -124,7 +124,7 @@ For example,
|
|||
|
||||
creates an object that contains three items, a `firstname`, and
|
||||
`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
|
||||
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,...]);
|
||||
|
||||
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,
|
||||
|
||||
.. code-block:: javascript
|
||||
|
@ -221,7 +221,7 @@ you. For example,
|
|||
|
||||
.. code-block:: javascript
|
||||
|
||||
function myTimer (x) {alert("x = "+x)}
|
||||
function f(x) {alert("x = "+x)}
|
||||
setTimeout(MathJax.Callback([f,"Hello World!"]),500);
|
||||
|
||||
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
|
||||
suggestions about future features for MathJax, and present their own
|
||||
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.
|
||||
|
||||
|
||||
|
@ -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
|
||||
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
|
||||
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.
|
||||
|
||||
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
|
||||
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
|
||||
that the problem persists in the lastest version.
|
||||
that the problem persists in the latest version.
|
||||
|
||||
|
||||
.. _badge:
|
||||
|
|
|
@ -160,8 +160,8 @@ The ``Accessible`` configuration file
|
|||
================================================
|
||||
|
||||
This configuration file is essentially the same as
|
||||
``TeX-AMS-MML_HTMLorMML`` except that it includes configuration that is
|
||||
designed for assitive technology, particularly for those with visual
|
||||
``TeX-AMS-MML_HTMLorMML`` except that it includes options that are
|
||||
designed for assistive technology, particularly for those with visual
|
||||
challenges. It is equivalent to the following configuration:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
@ -178,7 +178,7 @@ challenges. It is equivalent to the following configuration:
|
|||
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
|
||||
to double-click, so that readers can see a larger version of the
|
||||
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
|
||||
:ref:`Notes About Shared Servers <cross-domain-linking>` for more details.
|
||||
|
||||
When you load MathJax, it is common to include additional parameters for
|
||||
MathJax as part of the URL. These control MathJax's configuration, and are
|
||||
discussed in the :ref:`Configuration Objects <configuration>` section. A
|
||||
When you load MathJax, it is common to request a specific
|
||||
configuration file as discussed in the section on :ref:`Using 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
|
||||
|
||||
.. 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
|
||||
configuration file, you will need to include an in-line configuration
|
||||
block in order to tell MathJax how to read and display the mathematics on
|
||||
your pages. See the section below for details.
|
||||
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
|
||||
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
|
||||
versions, so you can either link to a version that stays up-to-date as
|
||||
Mathjax is improved, or you can stay with one of the release versions so
|
||||
that you pages always use the same version of MathJax.
|
||||
MathJax is improved, or you can stay with one of the release versions so
|
||||
that your pages always use the same version of MathJax.
|
||||
|
||||
The URL that you use to obtain MathJax determines the version that you
|
||||
get. The CDN has the following directory structure:
|
||||
|
@ -112,7 +114,7 @@ with patches that would correspond to releases that might be numbers 1.1a,
|
|||
distribution (they likely won't be).
|
||||
|
||||
We may occasionally introduce directories for betas, as indicated above,
|
||||
but they will be temprorary, and will be removed after the official
|
||||
but they will be temporary, and will be removed after the official
|
||||
release.
|
||||
|
||||
To load from a particular release, use the directory for that release.
|
||||
|
@ -132,18 +134,24 @@ versions, while
|
|||
will always be the most current stable release, so it will go from v1.1 to
|
||||
v1.2 automatically when that is released. Note that all the versions
|
||||
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
|
||||
<http://www.mathjax.org/download/mathjax-cdn-terms-of-service/>`_, so be
|
||||
sure to read that before linking to the MathJax CDN server.
|
||||
|
||||
If you wish to use the MathJax CDN but use your own configuration file
|
||||
rather than one of the pre-defined ones, see the information at the end
|
||||
of the :ref:`Using a configuration file <config-files>` section below.
|
||||
|
||||
|
||||
Configuring MathJax
|
||||
===================
|
||||
|
||||
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
|
||||
pre-defined configuration file, but include in-line commands to
|
||||
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
|
||||
|
||||
Allows math to be specified in TeX or LaTeX notation (with the
|
||||
Allows math to be specified in TeX or LaTeX notation, with the
|
||||
`AMSmath` and `AMSsymbols` packages included, and produces output
|
||||
using the HTML-CSS output processor.
|
||||
|
||||
|
@ -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
|
||||
files load the majority of the needed files all as one large file, reducing
|
||||
the number of network requests that are needed. That means you will
|
||||
probably be getting the componets that MathJax needs faster than you would
|
||||
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
|
||||
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
|
||||
processor. The "full" configuration files are substantially larger (on
|
||||
the order of 70KB), so you need to decide whether it is worth loading the
|
||||
full configuraiton for your pages.
|
||||
full configuration for your pages.
|
||||
|
||||
If most of your pages include mathematics, then it is to your advantage to
|
||||
load the full version, but if you are including MathJax in a theme file for
|
||||
|
@ -261,9 +269,10 @@ can use
|
|||
src="path-to-MathJax/MathJax.js?config=TeX-AMS_HTML,local/local">
|
||||
</script>
|
||||
|
||||
to first load the main configuraiton, then the local modifications. You
|
||||
can also load MathJax from the CDN and a local configuration from your own
|
||||
server:
|
||||
to first load the main configuration, then the local modifications.
|
||||
|
||||
You can also load MathJax from the MathJax CDN server but use a configuration from
|
||||
your own local server:
|
||||
|
||||
.. 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">
|
||||
</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
|
||||
===================================
|
||||
|
@ -315,7 +342,7 @@ For instance,
|
|||
This example includes the `tex2jax` preprocessor and configures it to use
|
||||
both the standard :term:`TeX` and :term:`LaTeX` math delimiters. It uses
|
||||
the `TeX` input processor and the `HTML-CSS` output processor, and forces the
|
||||
HTML-CSS processor to use the TeX fonts rather that other locally installed
|
||||
HTML-CSS processor to use the TeX fonts rather than other locally installed
|
||||
fonts (e.g., :term:`STIX` fonts). See the :ref:`configuration options
|
||||
<configuration>` section (or the comments in the ``config/default.js``
|
||||
file) for more information about the configuration options that you can
|
||||
|
@ -323,9 +350,9 @@ include in the :meth:`MathJax.Hub.Config()` call. Note that this
|
|||
configuration does **not** load any pre-defined configuration file.
|
||||
|
||||
Note that you can combine in-line configuration with file-based
|
||||
configuration, simply include ``text/x-mathjax-config`` scripts as above,
|
||||
configuration; simply include ``text/x-mathjax-config`` scripts as above,
|
||||
but also include ``config=filename`` when you load the ``MathJax.js``
|
||||
file. For example, the `tex2jax` preprocessor does **not** the TeX
|
||||
file. For example, the `tex2jax` preprocessor does **not** enable the TeX
|
||||
single-dollar in-line math delimiters by default. You can load one of the
|
||||
pre-defined configuration files that include the TeX preprocessor, and use
|
||||
an in-line configuration block to enable the single-dollar signs:
|
||||
|
@ -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
|
||||
startup.)
|
||||
|
||||
You can set ``delayStartupUntil=configured`` in order to delay the startup
|
||||
configuration until the :meth:`MathJax.Hub.Configured()` method is
|
||||
called. This allows you to delay startup until later on the page, but
|
||||
then restart MathJax configuration process as soon as possible rather than
|
||||
waiting for the entire page to load. For example, you could use
|
||||
You can set ``delayStartupUntil=configured`` in order to delay the
|
||||
startup configuration until the :meth:`MathJax.Hub.Configured()`
|
||||
method is called. This allows you to delay startup until later on the
|
||||
page, but then restart the MathJax configuration process as soon as
|
||||
possible rather than waiting for the entire page to load. For
|
||||
example, you could use
|
||||
|
||||
.. 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
|
||||
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
|
||||
continuing its startup. In this way you can use a default configuration
|
||||
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
|
||||
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.
|
||||
|
||||
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
|
||||
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
|
||||
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.
|
||||
|
||||
.. code-block:: javascript
|
||||
|
|
|
@ -29,7 +29,7 @@ Glossary
|
|||
particular message is sent along the signal channel.
|
||||
|
||||
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.
|
||||
|
||||
jax
|
||||
|
|
|
@ -50,7 +50,7 @@ date or out of date). If MathJax needs updating, use
|
|||
cd MathJax
|
||||
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
|
||||
latest bug fixes and new features as they become available.
|
||||
|
||||
|
@ -86,15 +86,15 @@ 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
|
||||
tag. Use
|
||||
|
||||
.. code-block::sh
|
||||
.. code-block:: sh
|
||||
|
||||
cd MathJax
|
||||
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
|
||||
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
|
||||
release, use
|
||||
|
||||
|
@ -144,7 +144,7 @@ use
|
|||
cd MathJax
|
||||
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
|
||||
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
|
||||
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.
|
||||
|
||||
|
||||
|
@ -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
|
||||
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
|
||||
the ``.zip`` file in the download list will be the original release
|
||||
version, not the patched version. To obtain the patched version, use
|
||||
the `Branches` drop down menu (at the far left of the menus within the
|
||||
page) to select the release branch that you want (for example
|
||||
``v1.1-latest``), and then use the 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
|
||||
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
|
||||
installation at ``www.yourcollege.edu`` rather than installing a
|
||||
separate copy on the departmental machine. MathJax can certainly
|
||||
be loaded from another server, but there is one imporant caveat ---
|
||||
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 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
|
||||
MathJax is installed, and if that server is running the `Apache web
|
||||
server <http://www.apache.org/>`_. In the remote server's
|
||||
``MathJax/fonts/HTML-CSS/TeX/otf`` folder, create a file called
|
||||
``MathJax/fonts/`` folder, create a file called
|
||||
``.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
|
||||
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
|
||||
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
|
||||
Firefox. In that case, MathJax will fall back on image fonts to
|
||||
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.
|
||||
MathJax allows page authors to write formulas using TeX and LaTeX
|
||||
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
|
||||
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
|
||||
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`
|
||||
preprocessor and the TeX input processor, but the NativeMML output
|
||||
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 available in browsers that don't have native MathML support.
|
||||
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
|
||||
====================
|
||||
|
||||
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
|
||||
``√`` or unicode characters embedded in the page itself. The
|
||||
reason is that entities are replaced by the browser before MathJax
|
||||
|
@ -87,7 +87,7 @@ The deficiencies include:
|
|||
``msgroup``, ``msrow``, ``mscarries``, and ``mscarry``.
|
||||
|
||||
- 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.
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ preprocessors for :ref:`TeX notation <TeX-support>`, :ref:`MathML
|
|||
notation <MathML-support>`, and the :ref:`jsMath notation
|
||||
<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
|
||||
format (e.g., pages produced from Markdown documents, or via programs
|
||||
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
|
||||
mathematics, since the extra preprocessing step would not be needed,
|
||||
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).
|
||||
|
||||
|
||||
|
@ -192,21 +192,21 @@ by MathJax (called an `element jax`). This internal format is
|
|||
essentially MathML (represented as JavaScript objects), so an input
|
||||
jax acts as a translator into MathML.
|
||||
|
||||
**Output jax** convert that internal element jax format into a specific
|
||||
output format. For example, the NativeMML output jax inserts MathML
|
||||
tags into the page to represent the mathematics, while the HTML-CSS
|
||||
output jax uses HTML with CSS styling to lay out the mathematics so
|
||||
that it can be displayed even in browsers that dont understand
|
||||
MathML. Output jax could be produced that render the mathematics
|
||||
using SVG, for example, or that speak an equation for the blind
|
||||
users. The MathJax contextual menu can be used to switch between the
|
||||
output jax that are available.
|
||||
**Output jax** convert that internal element jax format into a
|
||||
specific output format. For example, the NativeMML output jax inserts
|
||||
MathML tags into the page to represent the mathematics, while the
|
||||
HTML-CSS output jax uses HTML with CSS styling to lay out the
|
||||
mathematics so that it can be displayed even in browsers that don't
|
||||
understand MathML. Output jax could be produced that render the
|
||||
mathematics using SVG, for example, or that speak an equation for
|
||||
blind users. The MathJax contextual menu can be used to switch
|
||||
between the output jax that are available.
|
||||
|
||||
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
|
||||
MathJax configuration, and a larger file that implements the core
|
||||
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.
|
||||
|
||||
The **MathJax Hub** keeps track of the internal representations of the
|
||||
|
|
|
@ -23,76 +23,76 @@ would set the ``fadeoutTime`` option to 2000 milliseconds (2 seconds).
|
|||
|
||||
.. describe:: messageStyle: { ... }
|
||||
|
||||
This sets the CSS styles to be used for the font warning message
|
||||
window. See the ``extensions/FontWarnings.js`` file for details of
|
||||
what are set by default. See the :ref:`CSS style objects
|
||||
<css-style-objects>` for details about how to specify CSS styles
|
||||
via javascript objects.
|
||||
This sets the CSS styles to be used for the font warning message
|
||||
window. See the ``extensions/FontWarnings.js`` file for details of
|
||||
what are set by default. See the :ref:`CSS style objects
|
||||
<css-style-objects>` for details about how to specify CSS styles
|
||||
via javascript objects.
|
||||
|
||||
.. describe:: Message: { ... }
|
||||
|
||||
This block contains HTML snippets to be used for the various
|
||||
messages that the FontWarning extension can produce. There are
|
||||
three messages that you can redefine to suit your needs:
|
||||
This block contains HTML snippets to be used for the various
|
||||
messages that the FontWarning extension can produce. There are
|
||||
three messages that you can redefine to suit your needs:
|
||||
|
||||
.. describe:: webFont: [ ... ]
|
||||
.. describe:: webFont: [ ... ]
|
||||
|
||||
The message used for when MathJax uses web-based fonts (rather
|
||||
than local fonts installed on the user's system).
|
||||
The message used for when MathJax uses web-based fonts (rather
|
||||
than local fonts installed on the user's system).
|
||||
|
||||
.. describe:: imageFonts: [ ... ]
|
||||
.. describe:: imageFonts: [ ... ]
|
||||
|
||||
The message used for when MathJax must use image fonts rather
|
||||
than local or web-based fonts (for those browsers that don't
|
||||
handle the ``@font-face`` CSS directive).
|
||||
The message used for when MathJax must use image fonts rather
|
||||
than local or web-based fonts (for those browsers that don't
|
||||
handle the ``@font-face`` CSS directive).
|
||||
|
||||
.. describe:: noFonts: [ ... ]
|
||||
.. describe:: noFonts: [ ... ]
|
||||
|
||||
The message used when MathJax is unable to find any font to use
|
||||
(i.e., neither local nor web-based nor image-based fonts are
|
||||
available).
|
||||
The message used when MathJax is unable to find any font to use
|
||||
(i.e., neither local nor web-based nor image-based fonts are
|
||||
available).
|
||||
|
||||
Any message that is set to ``null`` rather than an HTML snippet
|
||||
array will not be presented to the user, so you can set, for
|
||||
example, the ``webFont`` message to ``null`` in order to have the
|
||||
``imageFonts`` and ``noFonts`` messages, but no message if MathJax
|
||||
uses web-based fonts.
|
||||
Any message that is set to ``null`` rather than an HTML snippet
|
||||
array will not be presented to the user, so you can set, for
|
||||
example, the ``webFont`` message to ``null`` in order to have the
|
||||
``imageFonts`` and ``noFonts`` messages, but no message if MathJax
|
||||
uses web-based fonts.
|
||||
|
||||
See the description of :ref:`HTML snippets <html-snippets>` for
|
||||
details about how to describe the messages using HTML snippets.
|
||||
Note that in addition to the usual rules for defining such
|
||||
snippets, the FontWarnings snippets can include references to
|
||||
pre-defined snippets (that represent elements common to all three
|
||||
messages). These are defined below in the ``HTML`` block, and are
|
||||
referenced using ``["name"]`` within the snippet, where `name` is
|
||||
the name of one of the snippets defined in the ``HTML``
|
||||
configuration block. For example
|
||||
See the description of :ref:`HTML snippets <html-snippets>` for
|
||||
details about how to describe the messages using HTML snippets.
|
||||
Note that in addition to the usual rules for defining such
|
||||
snippets, the FontWarnings snippets can include references to
|
||||
pre-defined snippets (that represent elements common to all three
|
||||
messages). These are defined below in the ``HTML`` block, and are
|
||||
referenced using ``["name"]`` within the snippet, where `name` is
|
||||
the name of one of the snippets defined in the ``HTML``
|
||||
configuration block. For example
|
||||
|
||||
.. code-block:: javascript
|
||||
.. code-block:: javascript
|
||||
|
||||
Message: {
|
||||
noFonts: [
|
||||
["closeBox"],
|
||||
"MathJax is unable to locate a font to use to display ",
|
||||
"its mathematics, and image fonts are not available, so it ",
|
||||
"is falling back on generic unicode characters in hopes that ",
|
||||
"your browser will be able to display them. Some characters ",
|
||||
"may not show up properly, or possibly not at all.",
|
||||
["fonts"],
|
||||
["webfonts"]
|
||||
]
|
||||
}
|
||||
Message: {
|
||||
noFonts: [
|
||||
["closeBox"],
|
||||
"MathJax is unable to locate a font to use to display ",
|
||||
"its mathematics, and image fonts are not available, so it ",
|
||||
"is falling back on generic unicode characters in hopes that ",
|
||||
"your browser will be able to display them. Some characters ",
|
||||
"may not show up properly, or possibly not at all.",
|
||||
["fonts"],
|
||||
["webfonts"]
|
||||
]
|
||||
}
|
||||
|
||||
refers to the ``closeBox``, ``fonts`` and ``webfonts`` snippets in
|
||||
refers to the ``closeBox``, ``fonts`` and ``webfonts`` snippets
|
||||
declared in the ``HTML`` section.
|
||||
|
||||
.. describe:: HTML: { ... }
|
||||
|
||||
This object defines HTML snippets that are common to more than one
|
||||
message in the ``Message`` section above. They can be called in
|
||||
by using ``["name"]`` in an HTML snippet, where `name` refers to
|
||||
the name of the snippet in the ``HTML`` block. The pre-defined
|
||||
snippets are:
|
||||
message in the ``Message`` section above. They can be included in
|
||||
other HTML snippets by by using ``["name"]`` in an HTML snippet,
|
||||
where `name` refers to the name of the snippet in the ``HTML``
|
||||
block. The pre-defined snippets are:
|
||||
|
||||
.. describe:: closeBox
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ would set the ``preferredFont`` option to the :term:`STIX` fonts.
|
|||
|
||||
.. 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
|
||||
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
|
||||
above are available on the user's computer. Note that currently
|
||||
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.
|
||||
|
||||
.. 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
|
||||
fonts listed above are available and the browser doesn't support
|
||||
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).
|
||||
|
||||
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
|
||||
browsers unchanged).
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ would set the ``delay`` option to 600 milliseconds.
|
|||
.. describe:: showRenderer: true
|
||||
|
||||
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`
|
||||
output processors for the mathematics on the page. Set to
|
||||
``false`` to prevent this menu item from showing.
|
||||
|
@ -43,9 +43,9 @@ would set the ``delay`` option to 600 milliseconds.
|
|||
.. describe:: showContext: false
|
||||
|
||||
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
|
||||
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
|
||||
reason to allow pass-through to the browser's menu is to gain
|
||||
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
|
||||
|
||||
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
|
||||
mathematics produced by the `HTML-CSS` output processor. Note that
|
||||
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
|
||||
|
||||
The scaling factor (as a percentage) of math with respect to 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
|
||||
to compensate for the size selected by the browser. The user can
|
||||
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
|
||||
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.
|
||||
|
||||
.. describe:: styles: {}
|
||||
|
|
|
@ -47,7 +47,7 @@ to be defined within the TeX input processor.
|
|||
This lists macros to define before the TeX input processor begins.
|
||||
These are name:value pairs where the `name` gives the name of the TeX
|
||||
macro to be defined, and `value` gives the replacement text for the
|
||||
macro. The `value` canbe an array of the form `[value,n]`, where
|
||||
macro. The `value` can be an array of the form `[value,n]`, where
|
||||
`value` is the replacement text and `n` is the number of parameters
|
||||
for the macro. Note that since the `value` is a javascript string,
|
||||
backslashes in the replacement text must be doubled to prevent them
|
||||
|
@ -64,12 +64,12 @@ to be defined within the TeX input processor.
|
|||
|
||||
would ask the TeX processor to define two new macros: ``\RR``,
|
||||
which produces a bold-face "R", and ``\bold{...}``, which takes one
|
||||
parameter and set it in the bold-face font.
|
||||
parameter and sets it in the bold-face font.
|
||||
|
||||
.. describe:: MAXMACROS: 10000
|
||||
|
||||
Because a definition of the form ``\def\x{\x} \x`` would cause MathJax
|
||||
to loop infinitely, the `MAXMACROS` constant will limit the nuber of
|
||||
to loop infinitely, the `MAXMACROS` constant will limit the number of
|
||||
macro substitutions allowed in any expression processed by MathJax.
|
||||
|
||||
.. describe:: MAXBUFFER: 5*1024
|
||||
|
@ -78,4 +78,4 @@ to be defined within the TeX input processor.
|
|||
infinitely, and at the same time stack up lots of a's in MathJax's
|
||||
equation buffer, the `MAXBUFFER` constant is used to limit the size of
|
||||
the string being processed by MathJax. It is set to 5KB, which should
|
||||
be sufficient for any reasonable equation.
|
||||
be sufficient for any reasonable equation.
|
||||
|
|
|
@ -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
|
||||
something extra into your HTML file in order to avoid a bug in
|
||||
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
|
||||
MathJax ``<script>`` tag, IE will remove the first space. When
|
||||
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
|
||||
the math SCRIPT tag; define the patterns you want to use below.
|
||||
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"
|
||||
|
||||
The CSS class for a math preview to be removed preceeding a
|
||||
MathJax SCRIPT tag. If the tag just before the MathJax
|
||||
``<script>`` tag is of this class, its contents are removed when
|
||||
MathJax processes the ``<script>`` tag. This allows you to
|
||||
include a math preview in a form that will be displayed prior to
|
||||
MathJax performing its typesetting. It also avoids the Internet
|
||||
Explorer space-removal bug, and can be used in place of ``preJax``
|
||||
and ``postJax`` if that is more convenient.
|
||||
This is the CSS class name for math previews that will be removed
|
||||
preceding a MathJax SCRIPT tag. If the tag just before the
|
||||
MathJax ``<script>`` tag is of this class, its contents are
|
||||
removed when MathJax processes the ``<script>`` tag. This allows
|
||||
you to include a math preview in a form that will be displayed
|
||||
prior to MathJax performing its typesetting. It also avoids the
|
||||
Internet Explorer space-removal bug, and can be used in place of
|
||||
``preJax`` and ``postJax`` if that is more convenient.
|
||||
|
||||
For example
|
||||
|
||||
|
@ -103,7 +103,7 @@ behavior of MathJax. They are given with their default values.
|
|||
|
||||
.. 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
|
||||
prevent those messages (though file loading and other messages
|
||||
will still be shown).
|
||||
|
@ -128,10 +128,10 @@ behavior of MathJax. They are given with their default values.
|
|||
|
||||
.. 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
|
||||
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
|
||||
``"configured"``, in which case, MathJax will delay its startup until
|
||||
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
|
||||
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
|
||||
of the mathematics for any formula that causes MathJax to
|
||||
|
@ -217,4 +217,4 @@ behavior of MathJax. They are given with their default values.
|
|||
explicit configuration in the event that the `jax` array is empty
|
||||
after configuration is complete. If you really intend that array to
|
||||
be empty, set this flag to ``false``. Note that setting this to false
|
||||
does **not** cause a default configuration file to be loaded.
|
||||
does **not** cause a default configuration file to be loaded.
|
||||
|
|
|
@ -42,7 +42,7 @@ For example,
|
|||
});
|
||||
|
||||
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
|
||||
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
|
||||
|
@ -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
|
||||
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.
|
||||
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ preprocessor.
|
|||
.. describe:: inlineMath: [['\\\(','\\\)']]
|
||||
|
||||
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
|
||||
as you want. For example,
|
||||
|
||||
|
@ -51,7 +51,7 @@ preprocessor.
|
|||
|
||||
.. 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
|
||||
delimiter and the second is the terminal delimiter. You can have
|
||||
as many pairs as you want.
|
||||
|
@ -74,7 +74,7 @@ preprocessor.
|
|||
.. describe:: processEnvironments: true
|
||||
|
||||
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
|
||||
processing by MathJax. When ``false``, LaTeX environments will
|
||||
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
|
||||
major browsers, with results that are consistent across browsers and
|
||||
operating systems. This is MathJax's primary output mode. It's major
|
||||
advantage is its quality and consistency; it's drawback is that it is
|
||||
operating systems. This is MathJax's primary output mode. Its major
|
||||
advantage is its quality and consistency; its drawback is that it is
|
||||
slower than the NativeMML mode at rendering the mathematics. (The
|
||||
HTML-CSS processor has not yet been optimized for speed, so you can
|
||||
expect some improvement in the future. Note that IE8 in "IE8
|
||||
|
@ -77,7 +77,7 @@ are the configuration files that end in ``_HTMLorMML``.
|
|||
If you are doing your own configuration, there is a special configuration
|
||||
file that you can include that will choose between NativeMML and HTML-CSS
|
||||
depending on the browser in use. To invoke it, add ``"MMLorHTML.js"`` to
|
||||
your configurations `config` array, and **do not** include an output
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
MathPlayer plugin (Firefox is the only other browser to have native MathML
|
||||
support that is sufficient for use with MathJax). Note, however, that a
|
||||
user can employ the MathJax contectual menu to select the other renderer if
|
||||
user can employ the MathJax contextual menu to select the other renderer if
|
||||
he or she wishes.
|
||||
|
||||
MathJax produces MathML that models the underlying mathematics as best
|
||||
|
@ -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
|
||||
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>``,
|
||||
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
|
||||
that your users install the `MathPlayer plugin
|
||||
<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
|
||||
layer that determines how the pages look, and that loads information
|
||||
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
|
||||
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
|
||||
|
@ -64,8 +64,8 @@ theme/template only. If you change themes or update your theme, you
|
|||
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
|
||||
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">
|
||||
</script>
|
||||
|
||||
to load MathJax from our distributed netowrk service.
|
||||
to load MathJax from our distributed network service.
|
||||
|
||||
.. image:: ../images/mt_head.png
|
||||
|
||||
5. Save the file. This will enable MathJax with both TeX and MathML
|
||||
input, so you should be able to start adding mathematical content to
|
||||
your pages. If you need to adjust the configuraiton, see
|
||||
your pages. If you need to adjust the configuration, see
|
||||
: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
|
||||
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.
|
||||
|
|
|
@ -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
|
||||
javascript code that you may write as part of dynamic web pages.
|
||||
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
|
||||
`MathJax.Callback.Queue` object provides that mechanism.
|
||||
|
||||
|
@ -69,11 +69,11 @@ that could operate asynchronously. For example:
|
|||
[f, 2]
|
||||
);
|
||||
|
||||
Here, the command ``MathJax.Ajax.require("extensions/AMSmath.js")`` is
|
||||
queued between two calls to ``f``. The first call to ``f(1)`` will be
|
||||
made immediately, then the :meth:`MathJax.Ajax.Require` statement will
|
||||
be performed. Since the ``Require`` method loads a file, it operates
|
||||
asynchronously, and its return value is a `MathJax.Callback`
|
||||
Here, the command ``MathJax.Ajax.Require("[MathJax]/extensions/AMSmath.js")``
|
||||
is queued between two calls to ``f``. The first call to ``f(1)`` will
|
||||
be made immediately, then the :meth:`MathJax.Ajax.Require` statement
|
||||
will be performed. Since the ``Require`` method loads a file, it
|
||||
operates asynchronously, and its return value is a `MathJax.Callback`
|
||||
object that will be called when the file is loaded. The call to
|
||||
``f(2)`` will not be made until that callback is performed,
|
||||
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
|
||||
commands can cause the typesetting process to be suspended while the
|
||||
file is loaded, and then restarted when the extension has become
|
||||
evailable.
|
||||
available.
|
||||
|
||||
As a result, any call to :meth:`MathJax.Hub.Typeset()` (or
|
||||
:meth:`MathJax.Hub.Process()`, or :meth:`MathJax.Hub.Update()`, etc.)
|
||||
could return long before the mathematics is actually typeset, and the
|
||||
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
|
||||
synchronized with the typesetting via the MathJax queue.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Using Signals
|
|||
*************
|
||||
|
||||
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
|
||||
starting up, it loads external files such as its configuration files
|
||||
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
|
||||
work, because the listener will receive the ready signal even if it
|
||||
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.
|
||||
|
||||
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
|
||||
using signals. This example lists all the signals that occur while
|
||||
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
|
||||
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
|
||||
people's needs. Other configurations are available, however, and you
|
||||
can also provide additional configuration parameters to taylor one of
|
||||
the confiogurations to your needs. More details can be found in the
|
||||
the configurations to your needs. More details can be found in the
|
||||
:ref:`Loading and Configuring MathJax <loading>` instructions.
|
||||
|
||||
The use of ``cdn.mathjax.org`` is governed by its `terms of service
|
||||
|
@ -123,7 +123,7 @@ Configuring your copy of MathJax
|
|||
When you include MathJax into your web pages as described below, it
|
||||
will load the file ``config/TeX-AMS-MML_HTMLorMML.js`` (i.e., the file
|
||||
named ``TeX-AMS-MML_HTMLorMML.js`` in the ``config`` folder of the
|
||||
main ``MathJax`` folder). This file preloads all the most comply-used
|
||||
main ``MathJax`` folder). This file preloads all the most commonly-used
|
||||
components of MathJax, allowing it to process mathematics that is in
|
||||
the TeX or LaTeX format, or in MathML notation. It will produce
|
||||
output in MathML form if the user's browser supports that, and will use
|
||||
|
@ -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
|
||||
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
|
||||
details.
|
||||
|
||||
|
@ -227,13 +227,13 @@ math mode, you must enable that explicitly in your configuration:
|
|||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
|
||||
});
|
||||
</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
|
||||
options <configure-tex2jax>` page, for additional configuration
|
||||
parameters that you can specify for the `tex2jax` preprocessor,
|
||||
which is the component of MathJax that identifies TeX notation within
|
||||
the page). 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.
|
||||
|
||||
Here is a complete sample page containing TeX mathematics (also available
|
||||
|
|
|
@ -154,7 +154,7 @@ are requested simultaneously, so they load concurrently. That means they
|
|||
can load in any order, and that the begin and end signals for the jax and
|
||||
extensions can be intermixed. (In general, you will get `Begin Jax`
|
||||
followed by `Begin Extensions`, but the order of `End Jax` and `End
|
||||
Extensions` will depend on the file sbeing loaded.) Both 5 and 6 must
|
||||
Extensions` will depend on the files being loaded.) Both 5 and 6 must
|
||||
complete, however, before 7 will be performed.
|
||||
|
||||
See the ``test/sample-signals.html`` file to see the signals in action.
|
||||
See the ``test/sample-signals.html`` file to see the signals in action.
|
||||
|
|
|
@ -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
|
||||
initiates the action, and a second that runs after the action is
|
||||
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
|
||||
how to specify a callback.
|
||||
|
||||
**Queues** are MathJax's means of synchronizing actions that must be
|
||||
performed sequentially, even when they involve asynchronous events
|
||||
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
|
||||
next. MathJax maintains a master queue that you can use to
|
||||
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
|
||||
signals have a "memory", meaning that if you register an interest in a
|
||||
particular type of signal and that signal has already occurred, you will be
|
||||
told about the past occurrances as well as any future ones. See the
|
||||
told about the past occurrences as well as any future ones. See the
|
||||
:ref:`Signal Object <api-signal>` reference page for more details. See
|
||||
also the ``test/sample-signals.html`` file in the MathJax ``test``
|
||||
directory for a working example of using signals.
|
||||
|
|
|
@ -39,7 +39,7 @@ you need a LaTeX-to-HTML converter, you should consider `other options
|
|||
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
|
||||
equations. It also defines the TeX delimiters ``$$...$$`` for displayed
|
||||
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
|
||||
parameters that you can specify for the `tex2jax` preprocessor,
|
||||
which is the component of MathJax that identifies TeX notation within
|
||||
the page).
|
||||
the page.
|
||||
|
||||
|
||||
TeX and LaTeX in HTML documents
|
||||
|
@ -86,7 +86,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
|
||||
tags to the browser (which parses the page before MathJax gets to see
|
||||
it). In particular, that means that you have to be careful about
|
||||
things like less-than and greater-than signs (``<``and ``>``), and
|
||||
things like less-than and greater-than signs (``<`` and ``>``), and
|
||||
ampersands (``&``), which have special meaning to the browsers. For
|
||||
example,
|
||||
|
||||
|
@ -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
|
||||
to the next ``>`` in the document (typically the end of the next
|
||||
actual tag in the HTML file), and you may notice that you are missing
|
||||
part of the text of the document. In the example above, the `` we
|
||||
have ...`` will not be displayed because the browser thinks it is
|
||||
part of the text of the document. In the example above, the "``we
|
||||
have ...``" will not be displayed because the browser thinks it is
|
||||
part of the tag starting at ``<y``. This is one indication you can
|
||||
use to spot this 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
|
||||
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
|
||||
|
@ -269,13 +269,13 @@ noUndefined
|
|||
|
||||
The `noUndefined` extension causes undefined control sequences to be
|
||||
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.
|
||||
|
||||
This extension is loaded by all the combined configuration files that
|
||||
include the TeX input processor. To enable the `noUndefined` extension
|
||||
in your own configuration, or to modify its parameters, add something like
|
||||
the following ro your :meth:`MathJax.Hub.Config()` call:
|
||||
the following to your :meth:`MathJax.Hub.Config()` call:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
|
@ -899,7 +899,6 @@ N
|
|||
\nolimits
|
||||
\normalsize
|
||||
\not
|
||||
\notag AMSmath
|
||||
\notag [AMSmath]
|
||||
\notin
|
||||
\nparallel AMSsymbols
|
||||
|
@ -1119,7 +1118,6 @@ T
|
|||
|
||||
.. code-block:: latex
|
||||
|
||||
\tag AMSmath
|
||||
\tag [AMSmath]
|
||||
\tan
|
||||
\tanh
|
||||
|
@ -1273,7 +1271,7 @@ Environments
|
|||
------------
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ MathJax operates asynchonously (see :ref:`Synchronizing with MathJax
|
|||
your call to :meth:`MathJax.Hub.Typeset()` is synchronized with the
|
||||
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
|
||||
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.
|
||||
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
|
||||
so. It guarantees that the typesetting will synchronize properly
|
||||
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.
|
||||
|
||||
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
|
||||
``<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
|
||||
|
||||
.. 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
|
||||
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
|
||||
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 being typeset, you should push *those* actions onto the
|
||||
``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
|
||||
update the contents of a single mathematical equation, you do not need
|
||||
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
|
||||
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
|
||||
in the location of the mathematics that is already there. You could
|
||||
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
|
||||
the mathematics, and call its method for replacing the formula shown
|
||||
by that element. For example:
|
||||
|
@ -105,20 +105,21 @@ by that element. For example:
|
|||
var math = MathJax.Hub.getAllJax("MathDiv")[0];
|
||||
MathJax.Hub.Queue(["Text",math,"x+1"]);
|
||||
|
||||
This looks up the list of math elements in `MathDiv` element (there is
|
||||
only one) and takes the first one (element 0) and stores it in
|
||||
``math``. This is an `element jax` object (see the :ref:`Element Jax
|
||||
<api-element-jax>` specification for details), which has a
|
||||
This looks up the list of math elements in the `MathDiv` element
|
||||
(there is only one) and takes the first one (element 0) and stores it
|
||||
in ``math``. This is an `element jax` object (see the :ref:`Element
|
||||
Jax <api-element-jax>` specification for details), which has a
|
||||
:meth:`Text()` method that can be used to set the input text of the
|
||||
math element, and retypeset it.
|
||||
|
||||
Again, since the typesetting should be synchronized with other actions
|
||||
of MathJax, the call should be pushed onto the ``MathJax.Hub.queue``,
|
||||
as shown above, rather than called directly. The example above
|
||||
performs the equivalent of ``math.Text("x+1")`` as soon as MathJax is
|
||||
able to do so. Any additional actions the rely on the equation
|
||||
``x+1`` actually showing on screen should also be pushed onto the
|
||||
queue so that they will not occur before the math is typeset.
|
||||
of MathJax, the call should be pushed onto the MathJax processing
|
||||
queue using :meth:`MathJax.Hub.Queue()`, as shown above, rather than
|
||||
called directly. The example above performs the equivalent of
|
||||
``math.Text("x+1")`` as soon as MathJax is able to do so. Any
|
||||
additional actions that rely on the expression ``x+1`` actually
|
||||
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:
|
||||
|
||||
|
@ -140,7 +141,7 @@ The actions you can perform on an element jax include:
|
|||
.. describe:: SourceElement()
|
||||
|
||||
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
|
||||
|
@ -153,7 +154,7 @@ displayed.
|
|||
|
||||
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
|
||||
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
|
||||
|
||||
.. code-block:: javascript
|
||||
|
|
|
@ -59,7 +59,7 @@ details.
|
|||
If your page simply loads ``MathJax.js`` and relies on
|
||||
``config/MathJax.js``, then you will need to modify your ``<script>`` tag
|
||||
in order to use MathJax v1.1. This is because MathJax no longer loads a
|
||||
default configuration file; you are required to explicity specify the
|
||||
default configuration file; you are required to explicitly specify the
|
||||
configuration file if you use one. Furthermore, the name of the
|
||||
``config/MathJax.js`` file was a source of confusion, so it has been
|
||||
renamed ``config/default.js`` instead. Thus, if you used
|
||||
|
@ -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
|
||||
<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
|
||||
|
@ -255,5 +255,5 @@ development continues.
|
|||
|
||||
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
|
||||
turned out to be unreliable, and so the SourceForge disrtibution was
|
||||
retired in favor of the GitHub site.
|
||||
turned out to be unreliable, and so the SourceForge distribution was
|
||||
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
|
||||
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.
|
||||
|
||||
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
|
||||
============
|
||||
|
||||
* 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
|
||||
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.
|
||||
|
||||
|
@ -36,14 +36,14 @@ Optimization
|
|||
to wait for *every* font to fail.
|
||||
|
||||
* The MathJax files are now packed only with `yuicompressor` rather than a
|
||||
custom compressor. The CDN serves gzipped versions, which compressed
|
||||
better than the gzipped custom-packed files.
|
||||
custom compressor. The CDN serves gzipped versions, which end up being
|
||||
smaller than the gzipped custom-packed files.
|
||||
|
||||
* Improved rendering speed in IE by removing ``position:relative`` from
|
||||
the style for mathematics.
|
||||
|
||||
* Improve rendering speed for most browsers by isolating the mathematics
|
||||
from page during typesetting (avoids full page reflows).
|
||||
* Improved rendering speed for most browsers by isolating the mathematics
|
||||
from the page during typesetting (avoids full page reflows).
|
||||
|
||||
|
||||
Enhancements
|
||||
|
@ -65,7 +65,7 @@ Enhancements
|
|||
|
||||
* 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
|
||||
|
@ -93,7 +93,7 @@ MathML Support
|
|||
* Better support for MathML namespaces.
|
||||
* Properly handle comments within MathML in IE.
|
||||
* Properly consider ``<mspace>`` and ``<mtext>`` as space-like.
|
||||
* Improved support for ``<maction>`` with embelished operators.
|
||||
* Improved support for ``<maction>`` with embellished operators.
|
||||
|
||||
|
||||
Other Bug Fixes
|
||||
|
@ -102,7 +102,7 @@ Other Bug Fixes
|
|||
* Fixed CSS bleed through with zoom and other situations.
|
||||
* Fixed problems with ``showMathMenuMSIE`` when set to ``false``.
|
||||
* Replaced illegal prefix characters in cookie name.
|
||||
* Improve placement of surd for square roots and n-th roots.
|
||||
* Improved placement of surd for square roots and n-th roots.
|
||||
* Fixed layer obscuring math from MathPlayer for screen readers.
|
||||
* Newlines in CDATA comments are now handled properly.
|
||||
* Resolved conflict between `jsMath2jax` and `tex2jax` both processing the
|
||||
|
@ -135,7 +135,7 @@ Browser Support
|
|||
* Added Firefox 4 detection and configuration.
|
||||
* Fix for extra line-break bug when displayed equations are in
|
||||
preformatted text.
|
||||
* Update fonts so that FF 3.6.13 and above can read them.
|
||||
* Updated fonts so that FF 3.6.13 and above can read them.
|
||||
|
||||
|
||||
**Internet Explorer**
|
||||
|
@ -148,7 +148,7 @@ Browser Support
|
|||
|
||||
**iPhone/iPad**
|
||||
|
||||
* Add support for OTF web fonts in iOS4.2.
|
||||
* Added support for OTF web fonts in iOS4.2.
|
||||
|
||||
**Nokia**
|
||||
|
||||
|
@ -158,7 +158,7 @@ Browser Support
|
|||
|
||||
* Prevent Opera from using STIX fonts unless explicitly requested via the
|
||||
font menu (since Opera can't display many of the characters).
|
||||
* Fix for bad em-size detection in 10.61.
|
||||
* Fixed bad em-size detection in 10.61.
|
||||
* 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
|
||||
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
|
||||
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
|
||||
their last parameter.</p>
|
||||
<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">
|
||||
<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
|
||||
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
|
||||
that may be loaded in the future.</p>
|
||||
<table class="docutils field-list" frame="void" rules="none">
|
||||
|
@ -283,11 +283,11 @@ that may be loaded in the future.</p>
|
|||
<dl class="method">
|
||||
<dt id="Preloading">
|
||||
<tt class="descname">Preloading</tt><big>(</big><em>file1</em><span class="optional">[</span>, <em>file2...</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#Preloading" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Used withing combined configuration files to indicate what files are
|
||||
in the configuration file. Marks the files are loading (since there
|
||||
<dd><p>Used with combined configuration files to indicate what files are
|
||||
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
|
||||
then), so that load-hooks and other load-related events can be
|
||||
properly processed.</p>
|
||||
them), so that load-hooks and other load-related events can be
|
||||
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">
|
||||
<col class="field-name" />
|
||||
<col class="field-body" />
|
||||
|
|
|
@ -78,7 +78,7 @@ specification into a Callback object if needed.</p>
|
|||
<dt>
|
||||
<tt class="descname">fn</tt></dt>
|
||||
<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>
|
||||
will be the window object.</p>
|
||||
</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>
|
||||
<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="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>
|
||||
</pre></div>
|
||||
</div>
|
||||
|
@ -225,7 +225,7 @@ function.</p>
|
|||
<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
|
||||
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
|
||||
<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>
|
||||
|
@ -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>
|
||||
<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
|
||||
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
|
||||
executed. If any of the hooks returns a <cite>Callback</cite> object, then
|
||||
it collects those callbacks and returns a new callback that will
|
||||
|
|
|
@ -82,7 +82,7 @@ that class.</p>
|
|||
<dl class="describe">
|
||||
<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>
|
||||
|
||||
</div>
|
||||
|
@ -137,7 +137,7 @@ rather than <tt class="docutils literal"><span class="pre">MathJax.Hub</span></t
|
|||
<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>
|
||||
<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
|
||||
<cite>callback</cite>, if any, is called.</p>
|
||||
<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" />
|
||||
<tbody valign="top">
|
||||
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple">
|
||||
<li><strong>text</strong> — the 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>
|
||||
</ul>
|
||||
</td>
|
||||
|
@ -160,7 +160,7 @@ new one given by <cite>text</cite>). When the processing is complete, the
|
|||
<dl class="method">
|
||||
<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
|
||||
of the mathematics, for example. The <cite>callback</cite>, if any, is
|
||||
called when the process completes.</p>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<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>
|
||||
<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>
|
||||
and turns them into actual DOM objects. It also implements the
|
||||
methods used to manage the cookies used by MathJax.</p>
|
||||
|
@ -217,7 +217,7 @@ discussed below.</p>
|
|||
<col class="field-body" />
|
||||
<tbody valign="top">
|
||||
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple">
|
||||
<li><strong>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>
|
||||
</ul>
|
||||
</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
|
||||
callback functions that are called when the action completes. These
|
||||
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">
|
||||
<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2>
|
||||
<dl class="describe">
|
||||
|
@ -114,12 +114,12 @@ additional properties and methods concerning the browser:</p>
|
|||
<tt class="descname">isMac and isPC</tt></dt>
|
||||
<dd><p>These are boolean values that indicate whether the browser is
|
||||
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>
|
||||
|
||||
<dl class="describe">
|
||||
<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
|
||||
<tt class="docutils literal"><span class="pre">false</span></tt> otherwise.</p>
|
||||
</dd></dl>
|
||||
|
@ -142,7 +142,7 @@ for instance.</p>
|
|||
browsers and whose values are the functions to be performed.
|
||||
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
|
||||
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>
|
||||
<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>
|
||||
|
@ -256,8 +256,8 @@ parameter.</p>
|
|||
<dd><p>Registers a listener for a particular message being sent to the
|
||||
startup signal (where initialization and component startup
|
||||
messages are sent). When the message equals the <cite>type</cite>, the
|
||||
<cite>callback will be called with the message as its parameter.
|
||||
See the :ref:`Using Signals <using-signals></cite> dcocumentation for
|
||||
<cite>callback</cite> will be called with the message as its parameter.
|
||||
See the <a class="reference internal" href="../signals.html#using-signals"><em>Using Signals</em></a> documentation for
|
||||
more details.</p>
|
||||
<table class="docutils field-list" frame="void" rules="none">
|
||||
<col class="field-name" />
|
||||
|
@ -283,7 +283,7 @@ more details.</p>
|
|||
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
|
||||
<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">
|
||||
<col class="field-name" />
|
||||
<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>
|
||||
<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>
|
||||
if 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
|
||||
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 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>
|
||||
<table class="docutils field-list" frame="void" rules="none">
|
||||
<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>
|
||||
<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
|
||||
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>
|
||||
are merged into the corresponding objects in <cite>dst</cite> (they don’t
|
||||
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
|
||||
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 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.
|
||||
<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>
|
||||
|
|
|
@ -54,12 +54,14 @@
|
|||
<p>The following links document the various components that make up
|
||||
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
|
||||
an objects with some inheritance capabilities, they do not constitute
|
||||
a full object-oriented programming model, so MathJax implements
|
||||
its own object library. This means there is an ambiguity when we
|
||||
speak of an “object”, as it could be either a native JavaScript
|
||||
object, or a MathJax object. We will use <cite>Object</cite> (capitalized) or
|
||||
<cite>MathJax.Object</cite> for, when the distinction is important.</p>
|
||||
an object system with some inheritance capabilities, they do not
|
||||
constitute a full object-oriented programming model, so MathJax
|
||||
implements its own object library. This means there is an ambiguity
|
||||
when we speak of an “object”, as it could be either a native
|
||||
JavaScript object, or a MathJax object. When the distinction is
|
||||
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>
|
||||
on the main MathJax documentation page.</p>
|
||||
<div class="toctree-wrapper compound">
|
||||
|
|
|
@ -92,7 +92,7 @@ that class.</p>
|
|||
<dl class="describe">
|
||||
<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>
|
||||
|
||||
<dl class="describe">
|
||||
|
|
|
@ -72,9 +72,9 @@ other jax classes.</p>
|
|||
<dl class="describe">
|
||||
<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>
|
||||
<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>
|
||||
<span class="pre">class,</span> <span class="pre">e.g.</span> <span class="pre">``"[MathJax]/jax/input"</span></tt>.</p>
|
||||
<dd><p>The name of the jax directory (usually <tt class="docutils literal"><span class="pre">"[MathJax]/jax"</span></tt>).
|
||||
Overridden in the subclass to be the specific directory for the
|
||||
class, e.g. <tt class="docutils literal"><span class="pre">"[MathJax]/jax/input"</span></tt>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<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
|
||||
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
|
||||
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
|
||||
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
|
||||
|
@ -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
|
||||
<tt class="docutils literal"><span class="pre">jax.js</span></tt> file when it is loaded. It should perform the translation
|
||||
action for the specific jax. For an input jax, it should return the
|
||||
<cite>ElementJax</cite> object that it created. The <a class="reference internal" href="#Translate" title="Translate"><tt class="xref py py-meth docutils literal"><span class="pre">Translate()</span></tt></a> mehtod is
|
||||
<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>
|
||||
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
|
||||
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
|
||||
reason, you will receive an error trying to process mathematics with
|
||||
this jax.</p>
|
||||
|
@ -249,7 +249,7 @@ following:</p>
|
|||
<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>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>
|
||||
</ol>
|
||||
</div></blockquote>
|
||||
|
|
|
@ -71,7 +71,7 @@ set via</p>
|
|||
</pre></div>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
|
@ -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
|
||||
removed, the previous message (if any) can be redisplayed if it hasn’t
|
||||
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>
|
||||
<div class="section" id="methods">
|
||||
<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2>
|
||||
|
@ -168,11 +168,11 @@ directory).</p>
|
|||
<col class="field-body" />
|
||||
<tbody valign="top">
|
||||
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><ul class="first simple">
|
||||
<li><strong>file</strong> — the name of the file being loaded.</li>
|
||||
<li><strong>file</strong> — the name of the file being loaded</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the message id number for the message created.</p>
|
||||
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last">the message id number for the message created</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -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>
|
||||
<dd><p>This method is called on each message before it is displayed. It can
|
||||
be used to modify (e.g., shorten) the various messages before they are
|
||||
displayed. The default action is to check of the <tt class="docutils literal"><span class="pre">messageStyle</span></tt>
|
||||
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
|
||||
processing messages to a simpler form. This method can be overridden
|
||||
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>
|
||||
<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
|
||||
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
|
||||
one after another, even when one action has to wait for an
|
||||
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">
|
||||
<dt>
|
||||
<tt class="descname">Process</tt><big>(</big><big>)</big></dt>
|
||||
<dd><blockquote>
|
||||
<div>Process the commands in the queue, provided the queue is not
|
||||
<dd><p>Process the commands in the queue, provided the queue is not
|
||||
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>
|
||||
|
||||
<dl class="method">
|
||||
<dt id="Suspend">
|
||||
<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
|
||||
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
|
||||
called). This method is used internally; you should not need to
|
||||
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
|
||||
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
|
||||
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>
|
||||
<table class="docutils field-list" frame="void" rules="none">
|
||||
<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
|
||||
used by MathJax to synchronize its actions with those that occur
|
||||
asynchronously, like loading files and stylesheets. A <cite>Signal</cite> object
|
||||
is used to pulicise the fact that MathJax has performed certain
|
||||
actions, giving other code running the the web page the chance 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
|
||||
is used to publicize the fact that MathJax has performed certain
|
||||
actions, giving other code running the web page the chance 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
|
||||
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>
|
||||
<div class="section" id="properties">
|
||||
|
@ -75,7 +75,7 @@ the signal return references to the same object.</p>
|
|||
<dl class="describe">
|
||||
<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
|
||||
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>
|
||||
|
@ -86,7 +86,7 @@ using the signal’s <a class="reference internal" href="message.html#Clear"
|
|||
<tt class="descname">listeners</tt></dt>
|
||||
<dd><p>Array of callbacks to the listeners who have expressed interest in
|
||||
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>
|
||||
</dd></dl>
|
||||
|
||||
|
@ -99,7 +99,7 @@ was posted.</p>
|
|||
<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),
|
||||
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
|
||||
<cite>callback</cite> parameter is used to synchronize with its operation;
|
||||
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.
|
||||
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
|
||||
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
|
||||
still get called with the complete set of arguments.</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">
|
||||
<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>
|
||||
</dd></dl>
|
||||
|
||||
|
@ -131,7 +131,7 @@ itself as <tt class="docutils literal"><span class="pre">MathJax.OutputJax["
|
|||
<dt>
|
||||
<tt class="descname">MathJax.ElementJax</tt></dt>
|
||||
<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
|
||||
itself as <tt class="docutils literal"><span class="pre">MathJax.ElementJax.mml</span></tt>.</p>
|
||||
</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
|
||||
specified in the arguments, and in that case, the callback is a “do
|
||||
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
|
||||
synchronization purposes, so that the actions following it in the
|
||||
queue will not be performed until after the callback has been fired.</p>
|
||||
callback can be used in a <cite>MathJax.Callback.Queue</cite> for synchronization
|
||||
purposes, so that the actions following it in the queue will not be
|
||||
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
|
||||
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
|
||||
|
@ -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
|
||||
<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
|
||||
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>
|
||||
<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>
|
||||
|
@ -151,7 +151,7 @@ the object without knowing explicitly where the object is stored.</p>
|
|||
</div>
|
||||
<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
|
||||
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
|
||||
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>
|
||||
|
@ -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>
|
||||
</pre></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>
|
||||
<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>
|
||||
|
@ -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
|
||||
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>
|
||||
<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>
|
||||
</pre></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
|
||||
suggestions about future features for MathJax, and present their own
|
||||
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>
|
||||
<div class="section" id="forums">
|
||||
<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
|
||||
Group</a>. We made this group
|
||||
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>
|
||||
<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
|
||||
|
@ -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
|
||||
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
|
||||
that the problem persists in the lastest version.</p>
|
||||
that the problem persists in the latest version.</p>
|
||||
</div>
|
||||
<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>
|
||||
|
|
|
@ -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">
|
||||
<h2>The <tt class="docutils literal"><span class="pre">Accessible</span></tt> configuration file<a class="headerlink" href="#the-accessible-configuration-file" title="Permalink to this headline">¶</a></h2>
|
||||
<p>This configuration file is essentially the same as
|
||||
<tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt> except that it includes configuration that is
|
||||
designed for assitive technology, particularly for those with visual
|
||||
<tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt> except that it includes options that are
|
||||
designed for assistive technology, particularly for those with visual
|
||||
challenges. It is equivalent to the following configuration:</p>
|
||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Config</span><span class="p">({</span>
|
||||
<span class="nx">config</span><span class="o">:</span> <span class="p">[</span><span class="s2">"MMLorHTML.js"</span><span class="p">],</span>
|
||||
|
@ -199,7 +199,7 @@ challenges. It is equivalent to the following configuration:</p>
|
|||
<span class="p">});</span>
|
||||
</pre></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
|
||||
to double-click, so that readers can see a larger version of the
|
||||
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
|
||||
involved in doing so that you need to take into consideration. See the
|
||||
<a class="reference internal" href="installation.html#cross-domain-linking"><em>Notes About Shared Servers</em></a> for more details.</p>
|
||||
<p>When you load MathJax, it is common to include additional parameters for
|
||||
MathJax as part of the URL. These control MathJax’s configuration, and are
|
||||
discussed in the <a class="reference internal" href="options/index.html#configuration"><em>Configuration Objects</em></a> section. A
|
||||
<p>When you load MathJax, it is common to request a specific
|
||||
configuration file as discussed in the section on <a class="reference internal" href="#config-files"><em>Using 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>
|
||||
<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>
|
||||
|
@ -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
|
||||
configuration file, you will need to include an in-line configuration
|
||||
block in order to tell MathJax how to read and display the mathematics on
|
||||
your pages. See the section below for details.</p>
|
||||
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
|
||||
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
|
||||
|
@ -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>
|
||||
<p>The CDN hosts the most current version of MathJax, as well as older
|
||||
versions, so you can either link to a version that stays up-to-date as
|
||||
Mathjax is improved, or you can stay with one of the release versions so
|
||||
that you pages always use the same version of MathJax.</p>
|
||||
MathJax is improved, or you can stay with one of the release versions so
|
||||
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
|
||||
get. The CDN has the following directory structure:</p>
|
||||
<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
|
||||
distribution (they likely won’t be).</p>
|
||||
<p>We may occasionally introduce directories for betas, as indicated above,
|
||||
but they will be temprorary, and will be removed after the official
|
||||
but they will be temporary, and will be removed after the official
|
||||
release.</p>
|
||||
<p>To load from a particular release, use the directory for that release.
|
||||
For example,</p>
|
||||
|
@ -151,14 +153,19 @@ versions, while</p>
|
|||
<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
|
||||
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
|
||||
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 class="section" id="configuring-mathjax">
|
||||
<h2>Configuring MathJax<a class="headerlink" href="#configuring-mathjax" title="Permalink to this headline">¶</a></h2>
|
||||
<p>There are two ways to configure MathJax: via a configuration file, or by
|
||||
including configuration commands wthin the web page itself. These can be
|
||||
including configuration commands within the web page itself. These can be
|
||||
used independently, or in combination. For example, you can load a main
|
||||
pre-defined configuration file, but include in-line commands to
|
||||
adjust the configuration to your needs.</p>
|
||||
|
@ -192,7 +199,7 @@ MathML if the browser supports it, and HTML-with-CSS otherwise.</p>
|
|||
<dl class="describe">
|
||||
<dt>
|
||||
<tt class="descname">TeX-AMS_HTML.js</tt></dt>
|
||||
<dd><p>Allows math to be specified in TeX or LaTeX notation (with the
|
||||
<dd><p>Allows math to be specified in TeX or LaTeX notation, with the
|
||||
<cite>AMSmath</cite> and <cite>AMSsymbols</cite> packages included, and produces output
|
||||
using the HTML-CSS output processor.</p>
|
||||
</dd></dl>
|
||||
|
@ -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
|
||||
files load the majority of the needed files all as one large file, reducing
|
||||
the number of network requests that are needed. That means you will
|
||||
probably be getting the componets that MathJax needs faster than you would
|
||||
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
|
||||
actually used; that is the trade off.</p>
|
||||
<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
|
||||
processor. The “full” configuration files are substantially larger (on
|
||||
the order of 70KB), so you need to decide whether it is worth loading the
|
||||
full configuraiton for your pages.</p>
|
||||
full configuration for your pages.</p>
|
||||
<p>If most of your pages include mathematics, then it is to your advantage to
|
||||
load the full version, but if you are including MathJax in a theme file for
|
||||
a blog or wiki that only includes mathematics occasionally, then perhaps it
|
||||
|
@ -270,17 +277,30 @@ can use</p>
|
|||
<span class="nt"></script></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>to first load the main configuraiton, then the local modifications. You
|
||||
can also load MathJax from the CDN and a local configuration from your own
|
||||
server:</p>
|
||||
<p>to first load the main configuration, then the local modifications.</p>
|
||||
<p>You can also load MathJax from the MathJax CDN server but use a configuration from
|
||||
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>
|
||||
<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>
|
||||
</pre></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 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>,
|
||||
that puts the configuration options within the web page itself. This
|
||||
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
|
||||
both the standard <a class="reference internal" href="glossary.html#term-tex"><em class="xref std std-term">TeX</em></a> and <a class="reference internal" href="glossary.html#term-latex"><em class="xref std std-term">LaTeX</em></a> math delimiters. It uses
|
||||
the <cite>TeX</cite> input processor and the <cite>HTML-CSS</cite> output processor, and forces the
|
||||
HTML-CSS processor to use the TeX fonts rather that other locally installed
|
||||
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>
|
||||
file) for more information about the configuration options that you can
|
||||
include in the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. Note that this
|
||||
configuration does <strong>not</strong> load any pre-defined configuration file.</p>
|
||||
<p>Note that you can combine in-line configuration with file-based
|
||||
configuration, simply include <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> scripts as above,
|
||||
configuration; simply include <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> scripts as above,
|
||||
but also include <tt class="docutils literal"><span class="pre">config=filename</span></tt> when you load the <tt class="docutils literal"><span class="pre">MathJax.js</span></tt>
|
||||
file. For example, the <cite>tex2jax</cite> preprocessor does <strong>not</strong> the TeX
|
||||
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
|
||||
pre-defined configuration files that include the TeX preprocessor, and use
|
||||
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
|
||||
main files that MathJax needs, so there is not much loss in delaying the
|
||||
startup.)</p>
|
||||
<p>You can set <tt class="docutils literal"><span class="pre">delayStartupUntil=configured</span></tt> in order to delay the startup
|
||||
configuration until the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Configured()</span></tt> method is
|
||||
called. This allows you to delay startup until later on the page, but
|
||||
then restart MathJax configuration process as soon as possible rather than
|
||||
waiting for the entire page to load. For example, you could use</p>
|
||||
<p>You can set <tt class="docutils literal"><span class="pre">delayStartupUntil=configured</span></tt> in order to delay the
|
||||
startup configuration until the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Configured()</span></tt>
|
||||
method is called. This allows you to delay startup until later on the
|
||||
page, but then restart the MathJax configuration process as soon as
|
||||
possible rather than waiting for the entire page to load. For
|
||||
example, you could use</p>
|
||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span>
|
||||
<span class="na">src=</span><span class="s">"path-to-MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML&delayStartupUntil=configured"</span><span class="nt">></span>
|
||||
<span class="nt"></script></span>
|
||||
|
@ -386,7 +407,7 @@ waiting for the entire page to load. For example, you could use</p>
|
|||
</div>
|
||||
<p>in its footer, so that MathJax will delay setting up until the footer is
|
||||
reached, but will not have to wait until images and other files are
|
||||
laoded. If you have <tt class="docutils literal"><span class="pre">text/x-mathjax-config</span></tt> script tags within the main
|
||||
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
|
||||
continuing its startup. In this way you can use a default configuration
|
||||
that can be modified on a page-by-page basis.</p>
|
||||
|
|
|
@ -88,7 +88,7 @@ configuration.</p>
|
|||
</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
|
||||
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>
|
||||
<p>Here is a version that uses the <tt class="docutils literal"><span class="pre">config=filename</span></tt> method to
|
||||
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>
|
||||
<hr class="docutils" />
|
||||
<p>Here is a script that runs MathJax in any document that contains
|
||||
MathML (whether its includes MathJax or not). That allows
|
||||
MathML (whether it includes MathJax or not). That allows
|
||||
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>
|
||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="c1">// ==UserScript==</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
|
||||
particular message is sent along the signal channel.</dd>
|
||||
<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>
|
||||
<dt id="term-jax">jax</dt>
|
||||
<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>
|
||||
</ul>
|
||||
<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>
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ date or out of date). If MathJax needs updating, use</p>
|
|||
git pull origin
|
||||
</pre></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
|
||||
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
|
||||
|
@ -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
|
||||
patched version of a release, then check out the branch rather than the
|
||||
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
|
||||
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
|
||||
release, use</p>
|
||||
<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd </span>MathJax
|
||||
|
@ -147,7 +151,7 @@ use</p>
|
|||
svn update
|
||||
</pre></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
|
||||
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
|
||||
|
@ -162,7 +166,7 @@ described below. You can use</p>
|
|||
</div>
|
||||
<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
|
||||
<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>
|
||||
</div>
|
||||
<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
|
||||
MathJax that contains all the latest changes and bug-fixes. You can
|
||||
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
|
||||
the <tt class="docutils literal"><span class="pre">.zip</span></tt> file in the download list will be the original release
|
||||
version, not the patched version. To obtain the patched version, use
|
||||
the <cite>Branches</cite> drop down menu (at the far left of the menus within the
|
||||
page) to select the 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
|
||||
version of that release.</p>
|
||||
</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
|
||||
installation at <tt class="docutils literal"><span class="pre">www.yourcollege.edu</span></tt> rather than installing a
|
||||
separate copy on the departmental machine. MathJax can certainly
|
||||
be loaded from another server, but there is one imporant caveat —
|
||||
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>
|
||||
<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>
|
||||
|
@ -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
|
||||
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
|
||||
<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>
|
||||
<div class="highlight-python"><pre><FilesMatch "\.(ttf|otf|eot)$">
|
||||
<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
|
||||
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
|
||||
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
|
||||
Firefox. In that case, MathJax will fall back on image fonts to
|
||||
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.
|
||||
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
|
||||
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
|
||||
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
|
||||
can be extended to include new capabilities as needed. MathJax is
|
||||
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>
|
||||
preprocessor and the TeX input processor, but the NativeMML output
|
||||
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 available in browsers that don’t have native MathML support.
|
||||
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>
|
||||
<div class="section" id="mathml-in-html-pages">
|
||||
<h2>MathML in HTML pages<a class="headerlink" href="#mathml-in-html-pages" title="Permalink to this headline">¶</a></h2>
|
||||
<p>For MathML that is handled via the pre-processor, you should not use
|
||||
<p>For MathML that is handled via the preprocessor, you should not use
|
||||
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
|
||||
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>,
|
||||
<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
|
||||
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 right-to-left rendering.</li>
|
||||
</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
|
||||
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>
|
||||
<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
|
||||
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
|
||||
|
@ -90,7 +90,7 @@ directly, as described below, rather than having MathJax run
|
|||
another preprocessor. This will speed up the final display of the
|
||||
mathematics, since the extra preprocessing step would not be needed,
|
||||
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>
|
||||
<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>
|
||||
|
@ -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
|
||||
essentially MathML (represented as JavaScript objects), so an input
|
||||
jax acts as a translator into MathML.</p>
|
||||
<p><strong>Output jax</strong> convert that internal element jax format into a specific
|
||||
output format. For example, the NativeMML output jax inserts MathML
|
||||
tags into the page to represent the mathematics, while the HTML-CSS
|
||||
output jax uses HTML with CSS styling to lay out the mathematics so
|
||||
that it can be displayed even in browsers that dont understand
|
||||
MathML. Output jax could be produced that render the mathematics
|
||||
using SVG, for example, or that speak an equation for the blind
|
||||
users. The MathJax contextual menu can be used to switch between the
|
||||
output jax that are available.</p>
|
||||
<p><strong>Output jax</strong> convert that internal element jax format into a
|
||||
specific output format. For example, the NativeMML output jax inserts
|
||||
MathML tags into the page to represent the mathematics, while the
|
||||
HTML-CSS output jax uses HTML with CSS styling to lay out the
|
||||
mathematics so that it can be displayed even in browsers that don’t
|
||||
understand MathML. Output jax could be produced that render the
|
||||
mathematics using SVG, for example, or that speak an equation for
|
||||
blind users. The MathJax contextual menu can be used to switch
|
||||
between the output jax that are available.</p>
|
||||
<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
|
||||
MathJax configuration, and a larger file that implements the core
|
||||
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>
|
||||
<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
|
||||
|
|
|
@ -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
|
||||
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>
|
||||
<div class="highlight-javascript"><pre> Message: {
|
||||
noFonts: [
|
||||
["closeBox"],
|
||||
"MathJax is unable to locate a font to use to display ",
|
||||
"its mathematics, and image fonts are not available, so it ",
|
||||
"is falling back on generic unicode characters in hopes that ",
|
||||
"your browser will be able to display them. Some characters ",
|
||||
"may not show up properly, or possibly not at all.",
|
||||
["fonts"],
|
||||
["webfonts"]
|
||||
]
|
||||
}
|
||||
|
||||
refers to the ``closeBox``, ``fonts`` and ``webfonts`` snippets in
|
||||
declared in the ``HTML`` section.</pre>
|
||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">Message</span><span class="o">:</span> <span class="p">{</span>
|
||||
<span class="nx">noFonts</span><span class="o">:</span> <span class="p">[</span>
|
||||
<span class="p">[</span><span class="s2">"closeBox"</span><span class="p">],</span>
|
||||
<span class="s2">"MathJax is unable to locate a font to use to display "</span><span class="p">,</span>
|
||||
<span class="s2">"its mathematics, and image fonts are not available, so it "</span><span class="p">,</span>
|
||||
<span class="s2">"is falling back on generic unicode characters in hopes that "</span><span class="p">,</span>
|
||||
<span class="s2">"your browser will be able to display them. Some characters "</span><span class="p">,</span>
|
||||
<span class="s2">"may not show up properly, or possibly not at all."</span><span class="p">,</span>
|
||||
<span class="p">[</span><span class="s2">"fonts"</span><span class="p">],</span>
|
||||
<span class="p">[</span><span class="s2">"webfonts"</span><span class="p">]</span>
|
||||
<span class="p">]</span>
|
||||
<span class="p">}</span>
|
||||
</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>
|
||||
|
||||
<dl class="describe">
|
||||
<dt>
|
||||
<tt class="descname">HTML: { ... }</tt></dt>
|
||||
<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
|
||||
by using <tt class="docutils literal"><span class="pre">["name"]</span></tt> in an HTML snippet, where <cite>name</cite> refers to
|
||||
the name of the snippet in the <tt class="docutils literal"><span class="pre">HTML</span></tt> block. The pre-defined
|
||||
snippets are:</p>
|
||||
message in the <tt class="docutils literal"><span class="pre">Message</span></tt> section above. They can be included in
|
||||
other HTML snippets by by using <tt class="docutils literal"><span class="pre">["name"]</span></tt> in an HTML snippet,
|
||||
where <cite>name</cite> refers to the name of the snippet in the <tt class="docutils literal"><span class="pre">HTML</span></tt>
|
||||
block. The pre-defined snippets are:</p>
|
||||
<dl class="describe">
|
||||
<dt>
|
||||
<tt class="descname">closeBox</tt></dt>
|
||||
|
|
|
@ -81,7 +81,7 @@ menu item associated with the typeset mathematics.</p>
|
|||
<dl class="describe">
|
||||
<dt>
|
||||
<tt class="descname">minScaleAdjust: 50</tt></dt>
|
||||
<dd><p>This gives a minimum scale (as a percent) for the scaling used my
|
||||
<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
|
||||
prevent MathJax from making the mathematics too small.</p>
|
||||
</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
|
||||
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
|
||||
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>
|
||||
</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
|
||||
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
|
||||
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>
|
||||
<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
|
||||
|
|
|
@ -67,7 +67,7 @@ in your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.H
|
|||
<span class="p">});</span>
|
||||
</pre></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
|
||||
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
|
||||
|
|
|
@ -86,7 +86,7 @@ selects that item, the browser opens a new window with this URL.</p>
|
|||
<dt>
|
||||
<tt class="descname">showRenderer: true</tt></dt>
|
||||
<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>
|
||||
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>
|
||||
|
@ -96,9 +96,9 @@ output processors for the mathematics on the page. Set to
|
|||
<dt>
|
||||
<tt class="descname">showContext: false</tt></dt>
|
||||
<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
|
||||
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
|
||||
reason to allow pass-through to the browser’s menu is to gain
|
||||
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>
|
||||
<tt class="descname">showFontMenu: false</tt></dt>
|
||||
<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
|
||||
mathematics produced by the <cite>HTML-CSS</cite> output processor. Note that
|
||||
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>
|
||||
</pre></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">
|
||||
<dt>
|
||||
<tt class="descname">scale: 100</tt></dt>
|
||||
<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
|
||||
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
|
||||
to compensate for the size selected by the browser. The user can
|
||||
also adjust this value using the contextual menu item associated
|
||||
|
@ -99,7 +99,7 @@ more details.</p>
|
|||
<tt class="descname">showMathMenuMSIE: true</tt></dt>
|
||||
<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
|
||||
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>
|
||||
</dd></dl>
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ the value to leave sufficient margin for tags.</p>
|
|||
<dd><p>This lists macros to define before the TeX input processor begins.
|
||||
These are name:value pairs where the <cite>name</cite> gives the name of the TeX
|
||||
macro to be defined, and <cite>value</cite> gives the replacement text for the
|
||||
macro. The <cite>value</cite> canbe an array of the form <cite>[value,n]</cite>, where
|
||||
macro. The <cite>value</cite> can be an array of the form <cite>[value,n]</cite>, where
|
||||
<cite>value</cite> is the replacement text and <cite>n</cite> is the number of parameters
|
||||
for the macro. Note that since the <cite>value</cite> is a javascript string,
|
||||
backslashes in the replacement text must be doubled to prevent them
|
||||
|
@ -114,14 +114,14 @@ from acting as javascript escape characters.</p>
|
|||
</div>
|
||||
<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
|
||||
parameter and set it in the bold-face font.</p>
|
||||
parameter and sets it in the bold-face font.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="describe">
|
||||
<dt>
|
||||
<tt class="descname">MAXMACROS: 10000</tt></dt>
|
||||
<dd><p>Because a definition of the form <tt class="docutils literal"><span class="pre">\def\x{\x}</span> <span class="pre">\x</span></tt> would cause MathJax
|
||||
to loop infinitely, the <cite>MAXMACROS</cite> constant will limit the nuber of
|
||||
to loop infinitely, the <cite>MAXMACROS</cite> constant will limit the number of
|
||||
macro substitutions allowed in any expression processed by MathJax.</p>
|
||||
</dd></dl>
|
||||
|
||||
|
|
|
@ -109,11 +109,11 @@ time.</p>
|
|||
are not using one of the preprocessors, you need to insert
|
||||
something extra into your HTML file in order to avoid a bug in
|
||||
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
|
||||
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
|
||||
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
|
||||
the math SCRIPT tag; define the patterns you want to use below.
|
||||
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">
|
||||
<dt>
|
||||
<tt class="descname">preRemoveClass: "MathJax_Preview"</tt></dt>
|
||||
<dd><p>The CSS class for a math preview to be removed preceeding a
|
||||
MathJax SCRIPT tag. If the tag just before the MathJax
|
||||
<tt class="docutils literal"><span class="pre"><script></span></tt> tag is of this class, its contents are removed when
|
||||
MathJax processes the <tt class="docutils literal"><span class="pre"><script></span></tt> tag. This allows you to
|
||||
include a math preview in a form that will be displayed prior to
|
||||
MathJax performing its typesetting. It also avoids the Internet
|
||||
Explorer space-removal bug, and can be used in place of <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>
|
||||
<dd><p>This is the CSS class name for math previews that will be removed
|
||||
preceding a MathJax SCRIPT tag. If the tag just before the
|
||||
MathJax <tt class="docutils literal"><span class="pre"><script></span></tt> tag is of this class, its contents are
|
||||
removed when MathJax processes the <tt class="docutils literal"><span class="pre"><script></span></tt> tag. This allows
|
||||
you to include a math preview in a form that will be displayed
|
||||
prior to MathJax performing its typesetting. It also avoids the
|
||||
Internet Explorer space-removal bug, and can be used in place of
|
||||
<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>
|
||||
<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>
|
||||
|
@ -158,7 +158,7 @@ to typeset it.</p>
|
|||
<dl class="describe">
|
||||
<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
|
||||
prevent those messages (though file loading and other messages
|
||||
will still be shown).</p>
|
||||
|
@ -188,10 +188,10 @@ displayed equations.</p>
|
|||
<dl class="describe">
|
||||
<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
|
||||
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
|
||||
<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
|
||||
|
@ -269,7 +269,7 @@ than simply crash, MathJax can report an error and go on. The
|
|||
options you can set include:</p>
|
||||
<dl class="describe">
|
||||
<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
|
||||
of the mathematics for any formula that causes MathJax to
|
||||
produce an internal error (i.e., an error in the MathJax code
|
||||
|
|
|
@ -84,14 +84,14 @@ configuration options for the component.</p>
|
|||
</pre></div>
|
||||
</div>
|
||||
<p>is a configuration that includes two settings for the MathJax Hub (one
|
||||
for <cite>showProcessingMessages</cite> and one of the <cite>jax</cite> array), and a
|
||||
for <cite>showProcessingMessages</cite> and one for the <cite>jax</cite> array), and a
|
||||
configuration object for the TeX input processor. The latter includes
|
||||
a setting for the TeX input processor’s <cite>TagSide</cite> option (to set tags
|
||||
on the left rather than the right) and a setting for <cite>Macros</cite>, which
|
||||
defines new TeX macros (in this case, two macros, one called <tt class="docutils literal"><span class="pre">\RR</span></tt>
|
||||
that produces a bold “R”, and one called <tt class="docutils literal"><span class="pre">\bold</span></tt> that puts is
|
||||
argument in bold face).</p>
|
||||
<p>The <tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file is another example that shows nearly
|
||||
<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>
|
||||
<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>
|
||||
|
|
|
@ -78,7 +78,7 @@ The default is the whole document.</p>
|
|||
<dt>
|
||||
<tt class="descname">inlineMath: [['\(','\)']]</tt></dt>
|
||||
<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
|
||||
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>
|
||||
|
@ -98,7 +98,7 @@ include text, not tags, as your math delimiters.</p>
|
|||
<dl class="describe">
|
||||
<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
|
||||
delimiter and the second is the terminal delimiter. You can have
|
||||
as many pairs as you want.</p>
|
||||
|
@ -124,7 +124,7 @@ sign in the rendered document.</p>
|
|||
<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
|
||||
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
|
||||
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>
|
||||
|
|
|
@ -74,8 +74,8 @@ For example</p>
|
|||
in your document.</p>
|
||||
<p>The HTML-CSS output processor produces high-quality output in all
|
||||
major browsers, with results that are consistent across browsers and
|
||||
operating systems. This is MathJax’s primary output mode. It’s major
|
||||
advantage is its quality and consistency; it’s drawback is that it is
|
||||
operating systems. This is MathJax’s primary output mode. Its major
|
||||
advantage is its quality and consistency; its drawback is that it is
|
||||
slower than the NativeMML mode at rendering the mathematics. (The
|
||||
HTML-CSS processor has not yet been optimized for speed, so you can
|
||||
expect some improvement in the future. Note that IE8 in “IE8
|
||||
|
@ -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
|
||||
file that you can include that will choose between NativeMML and HTML-CSS
|
||||
depending on the browser in use. To invoke it, add <tt class="docutils literal"><span class="pre">"MMLorHTML.js"</span></tt> to
|
||||
your configurations <cite>config</cite> array, and <strong>do not</strong> include an output
|
||||
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
|
||||
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>
|
||||
|
@ -122,7 +122,7 @@ the abilities of your user’s browser.</p>
|
|||
</div>
|
||||
<p>You can customize which choice to make on a browser-by-browser basis
|
||||
or a global basis. See the <tt class="docutils literal"><span class="pre">config/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
|
||||
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>
|
||||
|
@ -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
|
||||
MathPlayer plugin (Firefox is the only other browser to have native MathML
|
||||
support that is sufficient for use with MathJax). Note, however, that a
|
||||
user can employ the MathJax contectual menu to select the other renderer if
|
||||
user can employ the MathJax contextual menu to select the other renderer if
|
||||
he or she wishes.</p>
|
||||
<p>MathJax produces MathML that models the underlying mathematics as best
|
||||
it can, rather than using complicated hacks to improve output for a
|
||||
|
@ -168,10 +168,10 @@ mode. You can accomplish this by including the line</p>
|
|||
</div>
|
||||
<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
|
||||
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>,
|
||||
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
|
||||
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>
|
||||
|
|
|
@ -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
|
||||
layer that determines how the pages look, and that loads information
|
||||
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
|
||||
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
|
||||
|
@ -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
|
||||
will have to repeat these steps.</p>
|
||||
</div>
|
||||
<div class="section" id="insructions-for-specific-platforms">
|
||||
<h2>Insructions for Specific Platforms<a class="headerlink" href="#insructions-for-specific-platforms" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="section" id="instructions-for-specific-platforms">
|
||||
<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
|
||||
template files from inside their administrator interfaces. Specific
|
||||
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>
|
||||
<li><a class="reference internal" href="#">Using MathJax in popular web platforms</a><ul>
|
||||
<li><a class="reference internal" href="#using-mathjax-in-a-theme-file">Using MathJax in a Theme File</a></li>
|
||||
<li><a class="reference internal" href="#insructions-for-specific-platforms">Insructions for Specific Platforms</a><ul>
|
||||
<li><a class="reference internal" href="#instructions-for-specific-platforms">Instructions for Specific Platforms</a><ul>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -75,14 +75,14 @@ and open the <cite>HTML Head</cite> template.</p>
|
|||
<span class="nt"></script></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>to load MathJax from our distributed netowrk service.</p>
|
||||
<p>to load MathJax from our distributed network service.</p>
|
||||
<blockquote>
|
||||
<div><img alt="../_images/mt_head.png" src="../_images/mt_head.png" />
|
||||
</div></blockquote>
|
||||
</li>
|
||||
<li><p class="first">Save the file. This will enable MathJax with both TeX and MathML
|
||||
input, so you should be able to start adding mathematical content to
|
||||
your pages. If you need to adjust the configuraiton, see
|
||||
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>
|
||||
</li>
|
||||
</ol>
|
||||
|
|
|
@ -84,7 +84,7 @@ bottom of the file.</p>
|
|||
</li>
|
||||
<li><p class="first">Save the file. This will enable MathJax with both TeX and MathML
|
||||
input, so you should be able to start adding mathematical content to
|
||||
your pages. If you need to adjust the configuraiton, see
|
||||
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>
|
||||
</li>
|
||||
</ol>
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
its actions, both internally, and with external programs, like
|
||||
javascript code that you may write as part of dynamic web pages.
|
||||
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
|
||||
<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
|
||||
|
@ -109,11 +109,11 @@ that could operate asynchronously. For example:</p>
|
|||
<span class="p">);</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Here, the command <tt class="docutils literal"><span class="pre">MathJax.Ajax.require("extensions/AMSmath.js")</span></tt> 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 be
|
||||
made immediately, then the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> statement will
|
||||
be performed. Since the <tt class="docutils literal"><span class="pre">Require</span></tt> method loads a file, it operates
|
||||
asynchronously, and its return value is a <cite>MathJax.Callback</cite>
|
||||
<p>Here, the command <tt class="docutils literal"><span class="pre">MathJax.Ajax.Require("[MathJax]/extensions/AMSmath.js")</span></tt>
|
||||
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
|
||||
be made immediately, then the <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Ajax.Require()</span></tt> statement
|
||||
will be performed. Since the <tt class="docutils literal"><span class="pre">Require</span></tt> method loads a file, it
|
||||
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
|
||||
<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
|
||||
|
@ -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
|
||||
commands can cause the typesetting process to be suspended while the
|
||||
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
|
||||
<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
|
||||
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
|
||||
synchronized with the typesetting via the MathJax queue.</p>
|
||||
<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">
|
||||
<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
|
||||
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
|
||||
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
|
||||
|
@ -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
|
||||
work, because the listener will receive the ready signal even if it
|
||||
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>
|
||||
<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
|
||||
|
@ -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
|
||||
using signals. This example lists all the signals that occur while
|
||||
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
|
||||
file (from the same directory as the web page). Since it returns
|
||||
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
|
||||
people’s needs. Other configurations are available, however, and you
|
||||
can also provide additional configuration parameters to taylor one of
|
||||
the confiogurations to your needs. More details can be found in the
|
||||
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>
|
||||
<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>
|
||||
|
@ -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
|
||||
will load the file <tt class="docutils literal"><span class="pre">config/TeX-AMS-MML_HTMLorMML.js</span></tt> (i.e., the file
|
||||
named <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML.js</span></tt> in the <tt class="docutils literal"><span class="pre">config</span></tt> folder of the
|
||||
main <tt class="docutils literal"><span class="pre">MathJax</span></tt> folder). This file preloads all the most comply-used
|
||||
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
|
||||
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
|
||||
|
@ -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>
|
||||
<p>Note: The configuration process has changed in MathJax v1.1, so if you have
|
||||
existing pages that use MathJax, you may need to modify the tag that
|
||||
loads MathJax so that is conforms with the new configuration process.
|
||||
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
|
||||
details.</p>
|
||||
</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="p">});</span>
|
||||
<span class="nt"></script></span>
|
||||
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascipt"</span> <span class="na">src=</span><span class="s">"path-to-mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"</span><span class="nt">></script></span>
|
||||
<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>
|
||||
</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
|
||||
options</em></a> page, for additional configuration
|
||||
parameters that you can specify for the <cite>tex2jax</cite> preprocessor,
|
||||
which is the component of MathJax that identifies TeX notation within
|
||||
the page). 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>
|
||||
<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>
|
||||
|
|
|
@ -191,7 +191,7 @@ are requested simultaneously, so they load concurrently. That means they
|
|||
can load in any order, and that the begin and end signals for the jax and
|
||||
extensions can be intermixed. (In general, you will get <cite>Begin Jax</cite>
|
||||
followed by <cite>Begin Extensions</cite>, but the order of <cite>End Jax</cite> and <cite>End
|
||||
Extensions</cite> will depend on the file sbeing loaded.) Both 5 and 6 must
|
||||
Extensions</cite> will depend on the files being loaded.) Both 5 and 6 must
|
||||
complete, however, before 7 will be performed.</p>
|
||||
<p>See the <tt class="docutils literal"><span class="pre">test/sample-signals.html</span></tt> file to see the signals in action.</p>
|
||||
</div>
|
||||
|
|
|
@ -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
|
||||
initiates the action, and a second that runs after the action is
|
||||
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
|
||||
how to specify a callback.</p>
|
||||
<p><strong>Queues</strong> are MathJax’s means of synchronizing actions that must be
|
||||
performed sequentially, even when they involve asynchronous events
|
||||
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
|
||||
next. MathJax maintains a master queue that you can use to
|
||||
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
|
||||
signals have a “memory”, meaning that if you register an interest in a
|
||||
particular type of signal and that signal has already occurred, you will be
|
||||
told about the past occurrances as well as any future ones. See the
|
||||
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
|
||||
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>
|
||||
|
|
|
@ -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>
|
||||
<div class="section" id="tex-and-latex-math-delimiters">
|
||||
<h2>TeX and LaTeX math delimiters<a class="headerlink" href="#tex-and-latex-math-delimiters" title="Permalink to this headline">¶</a></h2>
|
||||
<p>By default, the <cite>tex2jax</cite> preprocesor defines the LaTeX math delimiters,
|
||||
<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
|
||||
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
|
||||
|
@ -108,7 +108,7 @@ math delimiter.)</p>
|
|||
options</em></a> page, for additional configuration
|
||||
parameters that you can specify for the <cite>tex2jax</cite> preprocessor,
|
||||
which is the component of MathJax that identifies TeX notation within
|
||||
the page).</p>
|
||||
the page.</p>
|
||||
</div>
|
||||
<div class="section" id="tex-and-latex-in-html-documents">
|
||||
<h2>TeX and LaTeX in HTML documents<a class="headerlink" href="#tex-and-latex-in-html-documents" title="Permalink to this headline">¶</a></h2>
|
||||
|
@ -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
|
||||
tags to the browser (which parses the page before MathJax gets to see
|
||||
it). In particular, that means that you have to be careful about
|
||||
things like less-than and greater-than signs (<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
|
||||
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 ...
|
||||
|
@ -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
|
||||
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
|
||||
part of the text of the document. In the example above, the `` we
|
||||
have ...`` will not be displayed because the browser thinks it is
|
||||
part of the text of the document. In the example above, the “<tt class="docutils literal"><span class="pre">we</span>
|
||||
<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
|
||||
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
|
||||
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 ...
|
||||
|
@ -261,18 +261,18 @@ the paragraph, use</p>
|
|||
<span class="p">}</span>
|
||||
</pre></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 class="section" id="noundefined">
|
||||
<h3>noUndefined<a class="headerlink" href="#noundefined" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <cite>noUndefined</cite> extension causes undefined control sequences to be
|
||||
shown as their macro names rather than 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>
|
||||
<p>This extension is loaded by all the combined configuration files that
|
||||
include the TeX input processor. To enable the <cite>noUndefined</cite> extension
|
||||
in your own configuration, or to modify its parameters, add something like
|
||||
the following ro your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call:</p>
|
||||
the following to your <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call:</p>
|
||||
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
|
||||
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"noUndefined.js"</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">\normalsize</span>
|
||||
<span class="k">\not</span>
|
||||
<span class="k">\notag</span> AMSmath
|
||||
<span class="k">\notag</span> [AMSmath]
|
||||
<span class="k">\notin</span>
|
||||
<span class="k">\nparallel</span> AMSsymbols
|
||||
|
@ -1078,8 +1077,7 @@ be loaded automatically when the macro or environment is first used.</p>
|
|||
</div>
|
||||
<div class="section" id="t">
|
||||
<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
|
||||
<span class="k">\tag</span> [AMSmath]
|
||||
<div class="highlight-latex"><div class="highlight"><pre><span class="k">\tag</span> [AMSmath]
|
||||
<span class="k">\tan</span>
|
||||
<span class="k">\tanh</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">
|
||||
<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
|
||||
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]
|
||||
align* [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
|
||||
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
|
||||
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.
|
||||
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>
|
||||
|
@ -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
|
||||
so. It guarantees that the typesetting will synchronize properly
|
||||
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>
|
||||
<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
|
||||
<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>
|
||||
<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>
|
||||
|
@ -96,7 +96,7 @@ typeset.</p>
|
|||
immediately, regardless of whether the typesetting has taken place or
|
||||
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
|
||||
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 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>
|
||||
|
@ -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
|
||||
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
|
||||
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
|
||||
methods to modify and update the mathematics that it displays.</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
|
||||
in the location of the mathematics that is already there. You could
|
||||
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
|
||||
the mathematics, and call its method for replacing the formula shown
|
||||
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>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This looks up the list of math elements in <cite>MathDiv</cite> element (there is
|
||||
only one) and takes the first one (element 0) and stores it 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
|
||||
<p>This looks up the list of math elements in the <cite>MathDiv</cite> element
|
||||
(there is only one) and takes the first one (element 0) and stores it
|
||||
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
|
||||
math element, and retypeset it.</p>
|
||||
<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>,
|
||||
as shown above, rather than called directly. The example above
|
||||
performs the equivalent of <tt class="docutils literal"><span class="pre">math.Text("x+1")</span></tt> as soon as MathJax is
|
||||
able to do so. Any additional actions the rely on the equation
|
||||
<tt class="docutils literal"><span class="pre">x+1</span></tt> actually showing on screen should also be pushed onto the
|
||||
queue so that they will not occur before the math is typeset.</p>
|
||||
of MathJax, the call should be pushed onto the MathJax processing
|
||||
queue using <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Queue()</span></tt>, as shown above, rather than
|
||||
called directly. The example above performs the equivalent of
|
||||
<tt class="docutils literal"><span class="pre">math.Text("x+1")</span></tt> as soon as MathJax is able to do so. Any
|
||||
additional actions that rely on the expression <tt class="docutils literal"><span class="pre">x+1</span></tt> actually
|
||||
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>
|
||||
<blockquote>
|
||||
<div><dl class="describe">
|
||||
|
@ -171,7 +173,7 @@ the original <tt class="docutils literal"><span class="pre"><script></span
|
|||
<dt>
|
||||
<tt class="descname">SourceElement()</tt></dt>
|
||||
<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>
|
||||
|
||||
</div></blockquote>
|
||||
|
@ -184,7 +186,7 @@ then use that result each time you adjust the mathematics to be
|
|||
displayed.</p>
|
||||
<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
|
||||
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>
|
||||
<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>
|
||||
|
|
|
@ -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
|
||||
<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt>, then you will need to modify your <tt class="docutils literal"><span class="pre"><script></span></tt> tag
|
||||
in order to use MathJax v1.1. This is because MathJax no longer loads a
|
||||
default configuration file; you are required to explicity specify the
|
||||
default configuration file; you are required to explicitly specify the
|
||||
configuration file if you use one. Furthermore, the name of the
|
||||
<tt class="docutils literal"><span class="pre">config/MathJax.js</span></tt> file was a source of confusion, so it has been
|
||||
renamed <tt class="docutils literal"><span class="pre">config/default.js</span></tt> instead. Thus, if you used</p>
|
||||
|
@ -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.
|
||||
<a class="reference internal" href="configuration.html#loading-cdn"><em>More details</em></a> are available, if you need them.</p>
|
||||
<p>The use of <tt class="docutils literal"><span class="pre">cdn.mathjax.org</span></tt> is governed by its <a class="reference external" href="http://www.mathjax.org/download/mathjax-cdn-terms-of-service/">terms of service</a>, so be
|
||||
sure to read that before linked to the MathJax CDN server.</p>
|
||||
sure to read that before linking to the MathJax CDN server.</p>
|
||||
</div>
|
||||
<div class="section" id="change-in-default-tex-delimiters">
|
||||
<h2>Change in default TeX delimiters<a class="headerlink" href="#change-in-default-tex-delimiters" title="Permalink to this headline">¶</a></h2>
|
||||
|
@ -257,7 +257,7 @@ GitHub. This will allow you to keep your copy of MathJax up to date as
|
|||
development continues.</p>
|
||||
<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
|
||||
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>
|
||||
</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>
|
||||
<p>MathJax version 1.1 includes a number of important improvements and
|
||||
enhancements over version 1.0. We have worked hard to fix bugs, improve
|
||||
support for browsers and mobile devices, supprot TeX and MathML better, and
|
||||
support for browsers and mobile devices, process TeX and MathML better, and
|
||||
increase MathJax’s performance.</p>
|
||||
<p>In addition to these changes, MathJax.org now offers MathJax as a network
|
||||
service. Instead of having to install MathJax on your own server, you can
|
||||
|
@ -64,9 +64,9 @@ the CDN</em></a> for more details.</p>
|
|||
<div class="section" id="optimization">
|
||||
<h2>Optimization<a class="headerlink" href="#optimization" title="Permalink to this headline">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Combined configuraiton files that load all the needed files in one piece
|
||||
<li>Combined configuration files that load all the needed files in one piece
|
||||
rather than loading them individually. This simplifies configuration
|
||||
and speeds up typsetting of the mathematics on the page.</li>
|
||||
and speeds up typesetting of the mathematics on the page.</li>
|
||||
<li>Improved responsiveness to mouse events during typesetting.</li>
|
||||
<li>Parallel downloading of files needed by MathJax, for faster startup
|
||||
times.</li>
|
||||
|
@ -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
|
||||
to wait for <em>every</em> font to fail.</li>
|
||||
<li>The MathJax files are now packed only with <cite>yuicompressor</cite> rather than a
|
||||
custom compressor. The CDN serves gzipped versions, which compressed
|
||||
better than the gzipped custom-packed files.</li>
|
||||
custom compressor. The CDN serves gzipped versions, which end up being
|
||||
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
|
||||
the style for mathematics.</li>
|
||||
<li>Improve rendering speed for most browsers by isolating the mathematics
|
||||
from page during typesetting (avoids full page reflows).</li>
|
||||
<li>Improved rendering speed for most browsers by isolating the mathematics
|
||||
from the page during typesetting (avoids full page reflows).</li>
|
||||
</ul>
|
||||
</div>
|
||||
<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
|
||||
storing the <cite>fonts/</cite> directory directly.</li>
|
||||
<li>Improved About box.</li>
|
||||
<li>add a minimum scaling factor (so math won’t get too small)</li>
|
||||
<li>Added a minimum scaling factor (so math won’t get too small).</li>
|
||||
</ul>
|
||||
</div>
|
||||
<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>Properly handle comments within MathML in IE.</li>
|
||||
<li>Properly consider <tt class="docutils literal"><span class="pre"><mspace></span></tt> and <tt class="docutils literal"><span class="pre"><mtext></span></tt> as space-like.</li>
|
||||
<li>Improved support for <tt class="docutils literal"><span class="pre"><maction></span></tt> with embelished operators.</li>
|
||||
<li>Improved support for <tt class="docutils literal"><span class="pre"><maction></span></tt> with embellished operators.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<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 problems with <tt class="docutils literal"><span class="pre">showMathMenuMSIE</span></tt> when set to <tt class="docutils literal"><span class="pre">false</span></tt>.</li>
|
||||
<li>Replaced illegal prefix characters in cookie name.</li>
|
||||
<li>Improve placement of surd for square roots and n-th roots.</li>
|
||||
<li>Improved placement of surd for square roots and n-th roots.</li>
|
||||
<li>Fixed layer obscuring math from MathPlayer for screen readers.</li>
|
||||
<li>Newlines in CDATA comments are now handled properly.</li>
|
||||
<li>Resolved conflict between <cite>jsMath2jax</cite> and <cite>tex2jax</cite> both processing the
|
||||
|
@ -162,7 +162,7 @@ sibling elements.</li>
|
|||
<li>Added Firefox 4 detection and configuration.</li>
|
||||
<li>Fix for extra line-break bug when displayed equations are in
|
||||
preformatted text.</li>
|
||||
<li>Update fonts so that FF 3.6.13 and above can read them.</li>
|
||||
<li>Updated fonts so that FF 3.6.13 and above can read them.</li>
|
||||
</ul>
|
||||
<p><strong>Internet Explorer</strong></p>
|
||||
<ul class="simple">
|
||||
|
@ -174,7 +174,7 @@ preformatted text.</li>
|
|||
</ul>
|
||||
<p><strong>iPhone/iPad</strong></p>
|
||||
<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>
|
||||
<p><strong>Nokia</strong></p>
|
||||
<ul class="simple">
|
||||
|
@ -184,7 +184,7 @@ preformatted text.</li>
|
|||
<ul class="simple">
|
||||
<li>Prevent Opera from using STIX fonts unless explicitly requested via the
|
||||
font menu (since Opera can’t display many of the characters).</li>
|
||||
<li>Fix for bad em-size detection in 10.61.</li>
|
||||
<li>Fixed bad em-size detection in 10.61.</li>
|
||||
<li>Fixed a problem with the About dialog in Opera 11.</li>
|
||||
</ul>
|
||||
<p><strong>Safari</strong></p>
|
||||
|
|
|
@ -18,7 +18,7 @@ rather than just ``ul li``.
|
|||
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
|
||||
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
|
||||
by commas (not semi-colons) and the values are enclosed in quotation
|
||||
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
|
||||
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
|
||||
complicated HTML trees.
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ Methods
|
|||
parameter is the name of the file that has been loaded. This
|
||||
routine will cause any callback functions registered for the file
|
||||
or included in the :meth:`MathJax.Ajax.Require()` calls to be
|
||||
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
|
||||
their last parameter.
|
||||
|
||||
|
@ -145,7 +145,7 @@ Methods
|
|||
.. method:: loadHook(file,callback)
|
||||
|
||||
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
|
||||
that may be loaded in the future.
|
||||
|
||||
|
@ -156,11 +156,11 @@ Methods
|
|||
|
||||
.. method:: Preloading(file1[,file2...])
|
||||
|
||||
Used withing combined configuration files to indicate what files are
|
||||
in the configuration file. Marks the files are loading (since there
|
||||
Used with combined configuration files to indicate what files are
|
||||
in the configuration file. Marks the files as loading (since there
|
||||
will never be an explicit :meth:`Load()` or :meth:`Require()` call for
|
||||
then), so that load-hooks and other load-related events can be
|
||||
properly processed.
|
||||
them), so that load-hooks and other load-related events can be
|
||||
properly processed when the :meth:`loadComplete()` occurs.
|
||||
|
||||
:Parameters:
|
||||
- **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
|
||||
|
||||
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`
|
||||
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 DelayedX(time) {
|
||||
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
|
||||
|
@ -174,7 +174,7 @@ Callback Object Properties
|
|||
.. describe:: called
|
||||
|
||||
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
|
||||
``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
|
||||
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
|
||||
executed. If any of the hooks returns a `Callback` object, then
|
||||
it collects those callbacks and returns a new callback that will
|
||||
|
|
|
@ -34,7 +34,7 @@ Class Properties
|
|||
|
||||
.. 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
|
||||
|
@ -80,19 +80,19 @@ Methods
|
|||
.. Method:: Text(text[,callback])
|
||||
|
||||
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
|
||||
`callback`, if any, is called.
|
||||
|
||||
:Parameters:
|
||||
- **text** --- the new mathematic source string for the element
|
||||
- **text** --- the new mathematics source string for the element
|
||||
- **callback** --- the callback specification
|
||||
:Returns: the callback object
|
||||
|
||||
.. Method:: Reprocess([callback])
|
||||
: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
|
||||
of the mathematics, for example. The `callback`, if any, is
|
||||
called when the process completes.
|
||||
|
|
|
@ -5,7 +5,7 @@ The MathJax.HTML Object
|
|||
***********************
|
||||
|
||||
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>`
|
||||
and turns them into actual DOM objects. It also implements the
|
||||
methods used to manage the cookies used by MathJax.
|
||||
|
@ -108,7 +108,7 @@ Methods
|
|||
discussed below.
|
||||
|
||||
: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
|
||||
:Returns: ``null``
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user