More updates to the TeX documentation
This commit is contained in:
parent
90f9948e19
commit
da3a15a439
|
@ -347,7 +347,9 @@ this may be better than loading the extension explicitly, since it
|
|||
avoids loading the extra file on pages where these macros are *not*
|
||||
used. The `sample autoloading macros
|
||||
<http://cdn.mathjax.org/mathjax/latest/test/sample-autoload.html>`_
|
||||
example page shows this in action.
|
||||
example page shows this in action. The `autoload-all` extension below
|
||||
defines such macros for *all* the extensions so that if you include
|
||||
it, MathJax will have access to all the macros it knows about.
|
||||
|
||||
The main extensions are described below.
|
||||
|
||||
|
@ -594,7 +596,7 @@ To use this extension in your own configurations, add it to the
|
|||
.. code-block:: javascript
|
||||
|
||||
TeX: {
|
||||
extensions: ["action.js"]
|
||||
extensions: ["enclose.js"]
|
||||
}
|
||||
|
||||
This extension is **not** included in any of the combined configurations,
|
||||
|
@ -885,6 +887,53 @@ array. You can configure the extension as follows:
|
|||
}
|
||||
|
||||
|
||||
Autoload-all
|
||||
------------
|
||||
|
||||
The `autoload-all` extension predefines all the macros from the
|
||||
extensions above so that they autoload the extensions when first
|
||||
used. A number of macros already do this, e.g., ``\unicode``, but
|
||||
this extension defines the others to do the same. That way MathJax
|
||||
will have access to all the macros that it knows about.
|
||||
|
||||
To use this extension in your own configurations, add it to the
|
||||
`extensions` array in the TeX block.
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
TeX: {
|
||||
extensions: ["autoload-all.js"]
|
||||
}
|
||||
|
||||
This extension is **not** included in any of the combined configurations,
|
||||
and will not be loaded automatically, so you must include it
|
||||
explicitly in your configuration if you wish to use these commands.
|
||||
|
||||
Note that `autoload-all` redefines ``\color`` to be the one from the
|
||||
`color` extension (the LaTeX-compatible one rather than the
|
||||
non-standard MathJax version). This is because ``\colorbox`` and
|
||||
``\fcolorbox`` autoload the `color` extension, which will cause
|
||||
``\color`` to be redefined, and so for consistency, ``\color`` is
|
||||
redefined immediately.
|
||||
|
||||
If you wish to retain the original definition of ``\color``, then use
|
||||
the following
|
||||
|
||||
.. code-block:: html
|
||||
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
TeX: { extensions: ["autoload-all.js"] }
|
||||
});
|
||||
MathJax.Hub.Register.StartupHook("TeX autoload-all Ready", function () {
|
||||
var MACROS = MathJax.InputJax.TeX.Definitions.macros;
|
||||
MACROS.color = "Color";
|
||||
delete MACROS.colorbox;
|
||||
delete MACROS.fcolorbox;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
.. _tex-commands:
|
||||
|
||||
Supported LaTeX commands
|
||||
|
@ -1292,6 +1341,7 @@ L
|
|||
|
||||
.. code-block:: latex
|
||||
|
||||
\label [AMSmath]
|
||||
\Lambda
|
||||
\lambda
|
||||
\land
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -333,7 +333,9 @@ to be loaded, redefining all four to their proper values. Note that
|
|||
this may be better than loading the extension explicitly, since it
|
||||
avoids loading the extra file on pages where these macros are <em>not</em>
|
||||
used. The <a class="reference external" href="http://cdn.mathjax.org/mathjax/latest/test/sample-autoload.html">sample autoloading macros</a>
|
||||
example page shows this in action.</p>
|
||||
example page shows this in action. The <cite>autoload-all</cite> extension below
|
||||
defines such macros for <em>all</em> the extensions so that if you include
|
||||
it, MathJax will have access to all the macros it knows about.</p>
|
||||
<p>The main extensions are described below.</p>
|
||||
<div class="section" id="action">
|
||||
<h3>Action<a class="headerlink" href="#action" title="Permalink to this headline">¶</a></h3>
|
||||
|
@ -551,7 +553,7 @@ MathML attribute values allowed on the <tt class="docutils literal"><span class=
|
|||
<p>To use this extension in your own configurations, add it to the
|
||||
<cite>extensions</cite> array in the TeX block.</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">"action.js"</span><span class="p">]</span>
|
||||
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"enclose.js"</span><span class="p">]</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
|
@ -804,6 +806,45 @@ array. You can configure the extension as follows:</p>
|
|||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="autoload-all">
|
||||
<h3>Autoload-all<a class="headerlink" href="#autoload-all" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <cite>autoload-all</cite> extension predefines all the macros from the
|
||||
extensions above so that they autoload the extensions when first
|
||||
used. A number of macros already do this, e.g., <tt class="docutils literal"><span class="pre">\unicode</span></tt>, but
|
||||
this extension defines the others to do the same. That way MathJax
|
||||
will have access to all the macros that it knows about.</p>
|
||||
<p>To use this extension in your own configurations, add it to the
|
||||
<cite>extensions</cite> array in the TeX block.</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">"autoload-all.js"</span><span class="p">]</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This extension is <strong>not</strong> included in any of the combined configurations,
|
||||
and will not be loaded automatically, so you must include it
|
||||
explicitly in your configuration if you wish to use these commands.</p>
|
||||
<p>Note that <cite>autoload-all</cite> redefines <tt class="docutils literal"><span class="pre">\color</span></tt> to be the one from the
|
||||
<cite>color</cite> extension (the LaTeX-compatible one rather than the
|
||||
non-standard MathJax version). This is because <tt class="docutils literal"><span class="pre">\colorbox</span></tt> and
|
||||
<tt class="docutils literal"><span class="pre">\fcolorbox</span></tt> autoload the <cite>color</cite> extension, which will cause
|
||||
<tt class="docutils literal"><span class="pre">\color</span></tt> to be redefined, and so for consistency, <tt class="docutils literal"><span class="pre">\color</span></tt> is
|
||||
redefined immediately.</p>
|
||||
<p>If you wish to retain the original definition of <tt class="docutils literal"><span class="pre">\color</span></tt>, then use
|
||||
the following</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>
|
||||
<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">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">"autoload-all.js"</span><span class="p">]</span> <span class="p">}</span>
|
||||
<span class="p">});</span>
|
||||
<span class="nx">MathJax</span><span class="p">.</span><span class="nx">Hub</span><span class="p">.</span><span class="nx">Register</span><span class="p">.</span><span class="nx">StartupHook</span><span class="p">(</span><span class="s2">"TeX autoload-all Ready"</span><span class="p">,</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
|
||||
<span class="kd">var</span> <span class="nx">MACROS</span> <span class="o">=</span> <span class="nx">MathJax</span><span class="p">.</span><span class="nx">InputJax</span><span class="p">.</span><span class="nx">TeX</span><span class="p">.</span><span class="nx">Definitions</span><span class="p">.</span><span class="nx">macros</span><span class="p">;</span>
|
||||
<span class="nx">MACROS</span><span class="p">.</span><span class="nx">color</span> <span class="o">=</span> <span class="s2">"Color"</span><span class="p">;</span>
|
||||
<span class="k">delete</span> <span class="nx">MACROS</span><span class="p">.</span><span class="nx">colorbox</span><span class="p">;</span>
|
||||
<span class="k">delete</span> <span class="nx">MACROS</span><span class="p">.</span><span class="nx">fcolorbox</span><span class="p">;</span>
|
||||
<span class="p">});</span>
|
||||
<span class="nt"></script></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="supported-latex-commands">
|
||||
<span id="tex-commands"></span><h2>Supported LaTeX commands<a class="headerlink" href="#supported-latex-commands" title="Permalink to this headline">¶</a></h2>
|
||||
|
@ -1191,7 +1232,8 @@ in MathJax</a> page.</p>
|
|||
</div>
|
||||
<div class="section" id="l">
|
||||
<h3>L<a class="headerlink" href="#l" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="highlight-latex"><div class="highlight"><pre><span class="k">\Lambda</span>
|
||||
<div class="highlight-latex"><div class="highlight"><pre><span class="k">\label</span> [AMSmath]
|
||||
<span class="k">\Lambda</span>
|
||||
<span class="k">\lambda</span>
|
||||
<span class="k">\land</span>
|
||||
<span class="k">\langle</span>
|
||||
|
@ -1797,6 +1839,7 @@ vmatrix
|
|||
<li><a class="reference internal" href="#noerrors">noErrors</a></li>
|
||||
<li><a class="reference internal" href="#noundefined">noUndefined</a></li>
|
||||
<li><a class="reference internal" href="#unicode-support">Unicode support</a></li>
|
||||
<li><a class="reference internal" href="#autoload-all">Autoload-all</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#supported-latex-commands">Supported LaTeX commands</a><ul>
|
||||
|
|
|
@ -347,7 +347,9 @@ this may be better than loading the extension explicitly, since it
|
|||
avoids loading the extra file on pages where these macros are *not*
|
||||
used. The `sample autoloading macros
|
||||
<http://cdn.mathjax.org/mathjax/latest/test/sample-autoload.html>`_
|
||||
example page shows this in action.
|
||||
example page shows this in action. The `autoload-all` extension below
|
||||
defines such macros for *all* the extensions so that if you include
|
||||
it, MathJax will have access to all the macros it knows about.
|
||||
|
||||
The main extensions are described below.
|
||||
|
||||
|
@ -594,7 +596,7 @@ To use this extension in your own configurations, add it to the
|
|||
.. code-block:: javascript
|
||||
|
||||
TeX: {
|
||||
extensions: ["action.js"]
|
||||
extensions: ["enclose.js"]
|
||||
}
|
||||
|
||||
This extension is **not** included in any of the combined configurations,
|
||||
|
@ -885,6 +887,53 @@ array. You can configure the extension as follows:
|
|||
}
|
||||
|
||||
|
||||
Autoload-all
|
||||
------------
|
||||
|
||||
The `autoload-all` extension predefines all the macros from the
|
||||
extensions above so that they autoload the extensions when first
|
||||
used. A number of macros already do this, e.g., ``\unicode``, but
|
||||
this extension defines the others to do the same. That way MathJax
|
||||
will have access to all the macros that it knows about.
|
||||
|
||||
To use this extension in your own configurations, add it to the
|
||||
`extensions` array in the TeX block.
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
TeX: {
|
||||
extensions: ["autoload-all.js"]
|
||||
}
|
||||
|
||||
This extension is **not** included in any of the combined configurations,
|
||||
and will not be loaded automatically, so you must include it
|
||||
explicitly in your configuration if you wish to use these commands.
|
||||
|
||||
Note that `autoload-all` redefines ``\color`` to be the one from the
|
||||
`color` extension (the LaTeX-compatible one rather than the
|
||||
non-standard MathJax version). This is because ``\colorbox`` and
|
||||
``\fcolorbox`` autoload the `color` extension, which will cause
|
||||
``\color`` to be redefined, and so for consistency, ``\color`` is
|
||||
redefined immediately.
|
||||
|
||||
If you wish to retain the original definition of ``\color``, then use
|
||||
the following
|
||||
|
||||
.. code-block:: html
|
||||
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
TeX: { extensions: ["autoload-all.js"] }
|
||||
});
|
||||
MathJax.Hub.Register.StartupHook("TeX autoload-all Ready", function () {
|
||||
var MACROS = MathJax.InputJax.TeX.Definitions.macros;
|
||||
MACROS.color = "Color";
|
||||
delete MACROS.colorbox;
|
||||
delete MACROS.fcolorbox;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
.. _tex-commands:
|
||||
|
||||
Supported LaTeX commands
|
||||
|
@ -1292,6 +1341,7 @@ L
|
|||
|
||||
.. code-block:: latex
|
||||
|
||||
\label [AMSmath]
|
||||
\Lambda
|
||||
\lambda
|
||||
\land
|
||||
|
|
Loading…
Reference in New Issue
Block a user