Update documentation

This commit is contained in:
Davide P. Cervone 2011-03-07 20:43:43 -05:00
parent 963b69b7ba
commit 155436ba97
3 changed files with 24 additions and 21 deletions

View File

@ -11,8 +11,8 @@ processing the mathematics within the webpage once it has been loaded
in the browser by a user viewing your web pages. If you are using in the browser by a user viewing your web pages. If you are using
jsMath with its ``tex2math`` preprocessor, then switching to MathJax jsMath with its ``tex2math`` preprocessor, then switching to MathJax
should be easy, and is simply a matter of configuring MathJax should be easy, and is simply a matter of configuring MathJax
appropriately. See the section on :ref:`Configuring MathJax appropriately. See the section on :ref:`Loading and Configuring MathJax
<configuration>` for details about loading and configuring MathJax. <loading>` for details.
On the other hand, if you are using jsMath's ``<span On the other hand, if you are using jsMath's ``<span
class="math">...</span>`` and ``<div class="math">...</div>`` tags to class="math">...</span>`` and ``<div class="math">...</div>`` tags to

View File

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

View File

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