Update docs based on Fred's reading of the documentation

This commit is contained in:
Davide P. Cervone 2011-07-12 11:03:05 -04:00
parent 2ac603fa4a
commit e72b960fb0
30 changed files with 80 additions and 77 deletions

View File

@ -63,7 +63,7 @@ Properties
.. describe:: loadHooks
An object containing the load hooks for the various files, set up by
the :meth:`loadHook()` method, or by the
the :meth:`LoadHook()` method, or by the
:meth:`MathJax.Hub.Register.LoadHook()` method.
@ -142,7 +142,7 @@ Methods
- **file** --- the name of the file that failed to load
:Returns: ``null``
.. method:: loadHook(file,callback)
.. method:: LoadHook(file,callback)
Registers a callback to be executed when the given file is
loaded. The file load operation needs to be started when this

View File

@ -83,10 +83,10 @@ A callback specification is any one of the following:
.. code-block:: javascript
["length",[1,2,3,4]]
["toString",[1,2,3,4]]
would call the `length` method on the array ``[1,2,3,4]`` when
the callback is called, returning ``4``.
would call the `toString` method on the array ``[1,2,3,4]`` when
the callback is called, returning ``1,2,3,4``.
.. describe:: ["method", object, data...]
@ -220,7 +220,7 @@ MathJax.Callback Methods
- **callback** --- the callback specification
:Returns: the callback object
.. method:: executeHooks(hooks[, data[,reset]])
.. method:: ExecuteHooks(hooks[, data[,reset]])
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
@ -229,7 +229,7 @@ MathJax.Callback Methods
executed. If any of the hooks returns a `Callback` object, then
it collects those callbacks and returns a new callback that will
execute when all the ones returned by the hooks have been
completed. Otherwise, :meth:`MathJax.Callback.executeHooks()`
completed. Otherwise, :meth:`MathJax.Callback.ExecuteHooks()`
returns ``null``.
:Parameters:

View File

@ -39,7 +39,7 @@ Methods
var div = MathJax.HTML.Element(
"div",
{id: "MathDiv", style:{border:"1px solid", padding:"5px"}},
["Here is math: $x+1$",["br"],"and a display $$x+1\\over x-1$$"]
["Here is math: \\(x+1\\)",["br"],"and a display $$x+1\\over x-1$$"]
);
:Parameters:
@ -81,7 +81,7 @@ Methods
- **text** --- the text for the new node
:Returns: the new text node
.. method:: setText(script,text)
.. method:: setScript(script,text)
Sets the contents of the ``script`` element to be the given
``text``, properly taking into account the browser limitations and

View File

@ -16,7 +16,7 @@ For example:
.. code-block:: javascript
MathJax.Object.Foo = MathJax.Object.Subclass({
Init: function (x) {this.SetX(x)},
Init: function (x) {this.setX(x)},
getX: function () {return this.x},
setX: function (x) {this.x = x}
});

View File

@ -37,11 +37,11 @@ Main MathJax Components
Contains the code for managing MathJax callbacks, queues and
signals.
.. describe:: MathJax.Extensions
.. describe:: MathJax.Extension
Initially empty, this is where extensions can load their code.
For example, the `tex2jax` preprocessor creates
``MathJax.Extensions.tex2jax`` for its code and variables.
``MathJax.Extension.tex2jax`` for its code and variables.
.. describe:: MathJax.Object

View File

@ -151,7 +151,7 @@ behavior of MathJax. They are given with their default values.
that act as the defaults for the user's settings in that menu.
The possible values are:
.. describe:: zoom: "none"
.. describe:: zoom: "None"
This indicates when typeset mathematics should be zoomed. It
can be set to ``"None"``, ``"Hover"``, ``"Click"``, or

View File

@ -103,14 +103,14 @@ pushed into the queue:
6. Load the extension files:
- Post the ``Begin Extension`` startup signal
- Post the ``Begin Extensions`` startup signal
- Load the files from the ``MathJax.Hub.config.extensions`` array
- Most extensions will post a ``Extension [name] Ready``
startup message when they are loaded (where ``[name]`` is
the name of the extension)
- Most extensions will post a ``[name] Ready`` or ``Extension
[name] Ready`` startup message when they are loaded (where
``[name]`` is the name of the extension)
- Post the ``End Extension`` startup signal
- Post the ``End Extensions`` startup signal
..

View File

@ -371,6 +371,7 @@ Symbols
{
}
~
'
\ (backslash-space)
\!

View File

@ -87,14 +87,14 @@ For example, suppose you have the following HTML in your document
.. code-block:: html
<div id="MathDiv">
The answer you provided is: ${}$.
The answer you provided is: \({}\).
</div>
and MathJax has already preprocessed and typeset the mathematics
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
within the div. 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 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

View File

@ -118,7 +118,7 @@ additional internal data.</p>
<dt>
<tt class="descname">loadHooks</tt></dt>
<dd><p>An object containing the load hooks for the various files, set up by
the <a class="reference internal" href="#loadHook" title="loadHook"><tt class="xref py py-meth docutils literal"><span class="pre">loadHook()</span></tt></a> method, or by the
the <a class="reference internal" href="#LoadHook" title="LoadHook"><tt class="xref py py-meth docutils literal"><span class="pre">LoadHook()</span></tt></a> method, or by the
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Register.LoadHook()</span></tt> method.</p>
</dd></dl>
@ -257,8 +257,8 @@ puts a warning message into the MathJax message box on screen.</p>
</dd></dl>
<dl class="method">
<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>
<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 needs to be started when this
method is called, so it can be used to register a hook for a file

View File

@ -128,11 +128,11 @@ the function as well.</p>
<div><p>Here, <cite>object</cite> is an object that has a method called <cite>method</cite>, and
the callback will execute that method (with the object as
<cite>this</cite>) when it is called. For example,</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[</span><span class="s2">&quot;length&quot;</span><span class="p">,[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]]</span>
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">[</span><span class="s2">&quot;toString&quot;</span><span class="p">,[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">]]</span>
</pre></div>
</div>
<p>would call the <cite>length</cite> method on the array <tt class="docutils literal"><span class="pre">[1,2,3,4]</span></tt> when
the callback is called, returning <tt class="docutils literal"><span class="pre">4</span></tt>.</p>
<p>would call the <cite>toString</cite> method on the array <tt class="docutils literal"><span class="pre">[1,2,3,4]</span></tt> when
the callback is called, returning <tt class="docutils literal"><span class="pre">1,2,3,4</span></tt>.</p>
</div></blockquote>
<dl class="describe">
<dt>
@ -289,8 +289,8 @@ commands.</p>
</dd></dl>
<dl class="method">
<dt id="executeHooks">
<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>
<dt id="ExecuteHooks">
<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. If <cite>reset</cite> is <tt class="docutils literal"><span class="pre">true</span></tt>, then the callback&#8217;s
@ -298,7 +298,7 @@ array. If <cite>reset</cite> is <tt class="docutils literal"><span class="pre">
executed. If any of the hooks returns a <cite>Callback</cite> object, then
it collects those callbacks and returns a new callback that will
execute when all the ones returned by the hooks have been
completed. Otherwise, <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback.executeHooks()</span></tt>
completed. Otherwise, <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Callback.ExecuteHooks()</span></tt>
returns <tt class="docutils literal"><span class="pre">null</span></tt>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />

View File

@ -86,7 +86,7 @@ describes the contents to create for the element. For example</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">div</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">HTML</span><span class="p">.</span><span class="nx">Element</span><span class="p">(</span>
<span class="s2">&quot;div&quot;</span><span class="p">,</span>
<span class="p">{</span><span class="nx">id</span><span class="o">:</span> <span class="s2">&quot;MathDiv&quot;</span><span class="p">,</span> <span class="nx">style</span><span class="o">:</span><span class="p">{</span><span class="nx">border</span><span class="o">:</span><span class="s2">&quot;1px solid&quot;</span><span class="p">,</span> <span class="nx">padding</span><span class="o">:</span><span class="s2">&quot;5px&quot;</span><span class="p">}},</span>
<span class="p">[</span><span class="s2">&quot;Here is math: $x+1$&quot;</span><span class="p">,[</span><span class="s2">&quot;br&quot;</span><span class="p">],</span><span class="s2">&quot;and a display $$x+1\\over x-1$$&quot;</span><span class="p">]</span>
<span class="p">[</span><span class="s2">&quot;Here is math: \\(x+1\\)&quot;</span><span class="p">,[</span><span class="s2">&quot;br&quot;</span><span class="p">],</span><span class="s2">&quot;and a display $$x+1\\over x-1$$&quot;</span><span class="p">]</span>
<span class="p">);</span>
</pre></div>
</div>
@ -177,8 +177,8 @@ provided. It is equivalent to</p>
</dd></dl>
<dl class="method">
<dt id="setText">
<tt class="descname">setText</tt><big>(</big><em>script</em>, <em>text</em><big>)</big><a class="headerlink" href="#setText" title="Permalink to this definition"></a></dt>
<dt id="setScript">
<tt class="descname">setScript</tt><big>(</big><em>script</em>, <em>text</em><big>)</big><a class="headerlink" href="#setScript" title="Permalink to this definition"></a></dt>
<dd><p>Sets the contents of the <tt class="docutils literal"><span class="pre">script</span></tt> element to be the given
<tt class="docutils literal"><span class="pre">text</span></tt>, properly taking into account the browser limitations and
bugs.</p>

View File

@ -61,7 +61,7 @@ subclasses of <cite>MathJax.Object</cite> or one of its subclasses, and are
instantiated by calling the object class as you would a function.</p>
<p>For example:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">Foo</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nb">Object</span><span class="p">.</span><span class="nx">Subclass</span><span class="p">({</span>
<span class="nx">Init</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">SetX</span><span class="p">(</span><span class="nx">x</span><span class="p">)},</span>
<span class="nx">Init</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">setX</span><span class="p">(</span><span class="nx">x</span><span class="p">)},</span>
<span class="nx">getX</span><span class="o">:</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">x</span><span class="p">},</span>
<span class="nx">setX</span><span class="o">:</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">x</span><span class="p">)</span> <span class="p">{</span><span class="k">this</span><span class="p">.</span><span class="nx">x</span> <span class="o">=</span> <span class="nx">x</span><span class="p">}</span>
<span class="p">});</span>

View File

@ -97,10 +97,10 @@ signals.</p>
<dl class="describe">
<dt>
<tt class="descname">MathJax.Extensions</tt></dt>
<tt class="descname">MathJax.Extension</tt></dt>
<dd><p>Initially empty, this is where extensions can load their code.
For example, the <cite>tex2jax</cite> preprocessor creates
<tt class="docutils literal"><span class="pre">MathJax.Extensions.tex2jax</span></tt> for its code and variables.</p>
<tt class="docutils literal"><span class="pre">MathJax.Extension.tex2jax</span></tt> for its code and variables.</p>
</dd></dl>
<dl class="describe">

View File

@ -87,7 +87,7 @@
<dt><a href="api/signal.html#ExecuteHook">ExecuteHook()</a></dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/callback.html#executeHooks">executeHooks()</a></dt>
<dt><a href="api/callback.html#ExecuteHooks">ExecuteHooks()</a></dt>
</dl></td>
</tr></table>
@ -154,7 +154,7 @@
<dt><a href="api/ajax.html#loadError">loadError()</a></dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/ajax.html#loadHook">loadHook()</a></dt>
<dt><a href="api/ajax.html#LoadHook">LoadHook()</a></dt>
<dt><a href="api/ajax.html#loadTimeout">loadTimeout()</a></dt>
<dt><a href="api/message.html#Log">Log()</a></dt>
</dl></td>
@ -215,7 +215,7 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="api/message.html#Set">Set()</a></dt>
<dt><a href="api/html.html#setText">setText()</a></dt>
<dt><a href="api/html.html#setScript">setScript()</a></dt>
<dt><a href="api/callback.html#Signal">Signal()</a></dt>
<dt><a href="api/elementjax.html#SourceElement">SourceElement()</a></dt>
<dt><a href="api/jax.html#Startup">Startup()</a></dt>

View File

@ -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 29, 2011.</p>
<p>This version of the documentation was built June 02, 2011.</p>
</div>
</div>

View File

@ -216,7 +216,7 @@ that act as the defaults for the user&#8217;s settings in that menu.
The possible values are:</p>
<dl class="describe">
<dt>
<tt class="descname">zoom: &quot;none&quot;</tt></dt>
<tt class="descname">zoom: &quot;None&quot;</tt></dt>
<dd><p>This indicates when typeset mathematics should be zoomed. It
can be set to <tt class="docutils literal"><span class="pre">&quot;None&quot;</span></tt>, <tt class="docutils literal"><span class="pre">&quot;Hover&quot;</span></tt>, <tt class="docutils literal"><span class="pre">&quot;Click&quot;</span></tt>, or
<tt class="docutils literal"><span class="pre">&quot;Double-Click&quot;</span></tt> to set the zoom trigger.</p>

File diff suppressed because one or more lines are too long

View File

@ -143,14 +143,14 @@ pushed into the queue:</p>
</ol>
<ol class="arabic simple" start="6">
<li>Load the extension files:<ul>
<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Extension</span></tt> startup signal</li>
<li>Post the <tt class="docutils literal"><span class="pre">Begin</span> <span class="pre">Extensions</span></tt> startup signal</li>
<li>Load the files from the <tt class="docutils literal"><span class="pre">MathJax.Hub.config.extensions</span></tt> array<ul>
<li>Most extensions will post a <tt class="docutils literal"><span class="pre">Extension</span> <span class="pre">[name]</span> <span class="pre">Ready</span></tt>
startup message when they are loaded (where <tt class="docutils literal"><span class="pre">[name]</span></tt> is
the name of the extension)</li>
<li>Most extensions will post a <tt class="docutils literal"><span class="pre">[name]</span> <span class="pre">Ready</span></tt> or <tt class="docutils literal"><span class="pre">Extension</span>
<span class="pre">[name]</span> <span class="pre">Ready</span></tt> startup message when they are loaded (where
<tt class="docutils literal"><span class="pre">[name]</span></tt> is the name of the extension)</li>
</ul>
</li>
<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Extension</span></tt> startup signal</li>
<li>Post the <tt class="docutils literal"><span class="pre">End</span> <span class="pre">Extensions</span></tt> startup signal</li>
</ul>
</li>
</ol>

View File

@ -350,6 +350,7 @@ be loaded automatically when the macro or environment is first used.</p>
<span class="nb">{</span>
<span class="nb">}</span>
~
&#39;
<span class="k">\ </span> (backslash-space)
<span class="k">\!</span>

View File

@ -115,15 +115,15 @@ 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>
<div class="highlight-html"><div class="highlight"><pre><span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">&quot;MathDiv&quot;</span><span class="nt">&gt;</span>
The answer you provided is: ${}$.
The answer you provided is: \({}\).
<span class="nt">&lt;/div&gt;</span>
</pre></div>
</div>
<p>and MathJax has already preprocessed and typeset the mathematics
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
within the div. 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 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

View File

@ -63,7 +63,7 @@ Properties
.. describe:: loadHooks
An object containing the load hooks for the various files, set up by
the :meth:`loadHook()` method, or by the
the :meth:`LoadHook()` method, or by the
:meth:`MathJax.Hub.Register.LoadHook()` method.
@ -142,7 +142,7 @@ Methods
- **file** --- the name of the file that failed to load
:Returns: ``null``
.. method:: loadHook(file,callback)
.. method:: LoadHook(file,callback)
Registers a callback to be executed when the given file is
loaded. The file load operation needs to be started when this

View File

@ -83,10 +83,10 @@ A callback specification is any one of the following:
.. code-block:: javascript
["length",[1,2,3,4]]
["toString",[1,2,3,4]]
would call the `length` method on the array ``[1,2,3,4]`` when
the callback is called, returning ``4``.
would call the `toString` method on the array ``[1,2,3,4]`` when
the callback is called, returning ``1,2,3,4``.
.. describe:: ["method", object, data...]
@ -220,7 +220,7 @@ MathJax.Callback Methods
- **callback** --- the callback specification
:Returns: the callback object
.. method:: executeHooks(hooks[, data[,reset]])
.. method:: ExecuteHooks(hooks[, data[,reset]])
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
@ -229,7 +229,7 @@ MathJax.Callback Methods
executed. If any of the hooks returns a `Callback` object, then
it collects those callbacks and returns a new callback that will
execute when all the ones returned by the hooks have been
completed. Otherwise, :meth:`MathJax.Callback.executeHooks()`
completed. Otherwise, :meth:`MathJax.Callback.ExecuteHooks()`
returns ``null``.
:Parameters:

View File

@ -39,7 +39,7 @@ Methods
var div = MathJax.HTML.Element(
"div",
{id: "MathDiv", style:{border:"1px solid", padding:"5px"}},
["Here is math: $x+1$",["br"],"and a display $$x+1\\over x-1$$"]
["Here is math: \\(x+1\\)",["br"],"and a display $$x+1\\over x-1$$"]
);
:Parameters:
@ -81,7 +81,7 @@ Methods
- **text** --- the text for the new node
:Returns: the new text node
.. method:: setText(script,text)
.. method:: setScript(script,text)
Sets the contents of the ``script`` element to be the given
``text``, properly taking into account the browser limitations and

View File

@ -16,7 +16,7 @@ For example:
.. code-block:: javascript
MathJax.Object.Foo = MathJax.Object.Subclass({
Init: function (x) {this.SetX(x)},
Init: function (x) {this.setX(x)},
getX: function () {return this.x},
setX: function (x) {this.x = x}
});

View File

@ -37,11 +37,11 @@ Main MathJax Components
Contains the code for managing MathJax callbacks, queues and
signals.
.. describe:: MathJax.Extensions
.. describe:: MathJax.Extension
Initially empty, this is where extensions can load their code.
For example, the `tex2jax` preprocessor creates
``MathJax.Extensions.tex2jax`` for its code and variables.
``MathJax.Extension.tex2jax`` for its code and variables.
.. describe:: MathJax.Object

View File

@ -151,7 +151,7 @@ behavior of MathJax. They are given with their default values.
that act as the defaults for the user's settings in that menu.
The possible values are:
.. describe:: zoom: "none"
.. describe:: zoom: "None"
This indicates when typeset mathematics should be zoomed. It
can be set to ``"None"``, ``"Hover"``, ``"Click"``, or

View File

@ -103,14 +103,14 @@ pushed into the queue:
6. Load the extension files:
- Post the ``Begin Extension`` startup signal
- Post the ``Begin Extensions`` startup signal
- Load the files from the ``MathJax.Hub.config.extensions`` array
- Most extensions will post a ``Extension [name] Ready``
startup message when they are loaded (where ``[name]`` is
the name of the extension)
- Most extensions will post a ``[name] Ready`` or ``Extension
[name] Ready`` startup message when they are loaded (where
``[name]`` is the name of the extension)
- Post the ``End Extension`` startup signal
- Post the ``End Extensions`` startup signal
..

View File

@ -371,6 +371,7 @@ Symbols
{
}
~
'
\ (backslash-space)
\!

View File

@ -87,14 +87,14 @@ For example, suppose you have the following HTML in your document
.. code-block:: html
<div id="MathDiv">
The answer you provided is: ${}$.
The answer you provided is: \({}\).
</div>
and MathJax has already preprocessed and typeset the mathematics
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
within the div. 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 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