diff --git a/docs/html/_sources/callbacks.txt b/docs/html/_sources/callbacks.txt index e2f7306ef..ca5ed3226 100644 --- a/docs/html/_sources/callbacks.txt +++ b/docs/html/_sources/callbacks.txt @@ -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 diff --git a/docs/html/_sources/dynamic.txt b/docs/html/_sources/dynamic.txt index 349830c31..24b565fe4 100644 --- a/docs/html/_sources/dynamic.txt +++ b/docs/html/_sources/dynamic.txt @@ -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 diff --git a/docs/html/_sources/model.txt b/docs/html/_sources/model.txt index 1eaf6b670..4bfd6c428 100644 --- a/docs/html/_sources/model.txt +++ b/docs/html/_sources/model.txt @@ -38,7 +38,7 @@ preprocessors for :ref:`TeX notation `, :ref:`MathML notation `, and the :ref:`jsMath notation ` 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 diff --git a/docs/html/_sources/queues.txt b/docs/html/_sources/queues.txt index d85fa50d0..289118049 100644 --- a/docs/html/_sources/queues.txt +++ b/docs/html/_sources/queues.txt @@ -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. diff --git a/docs/html/_sources/signals.txt b/docs/html/_sources/signals.txt index 418248c3b..7b385c884 100644 --- a/docs/html/_sources/signals.txt +++ b/docs/html/_sources/signals.txt @@ -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 diff --git a/docs/html/_sources/startup.txt b/docs/html/_sources/startup.txt index eb25d8253..c157d0fd6 100644 --- a/docs/html/_sources/startup.txt +++ b/docs/html/_sources/startup.txt @@ -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. \ No newline at end of file +See the ``test/sample-signals.html`` file to see the signals in action. diff --git a/docs/html/_sources/synchronize.txt b/docs/html/_sources/synchronize.txt index a285f2a7d..2f707c695 100644 --- a/docs/html/_sources/synchronize.txt +++ b/docs/html/_sources/synchronize.txt @@ -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 ` 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 ` 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. diff --git a/docs/html/_sources/typeset.txt b/docs/html/_sources/typeset.txt index 2c98bc3d8..76951dcc2 100644 --- a/docs/html/_sources/typeset.txt +++ b/docs/html/_sources/typeset.txt @@ -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 ``
`` element, or even a MathJax math -``