276 lines
21 KiB
HTML
276 lines
21 KiB
HTML
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<title>Common Configurations — MathJax v1.1 documentation</title>
|
|
<link rel="stylesheet" href="_static/mj.css" type="text/css" />
|
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
|
<script type="text/javascript">
|
|
var DOCUMENTATION_OPTIONS = {
|
|
URL_ROOT: '',
|
|
VERSION: '1.1',
|
|
COLLAPSE_INDEX: false,
|
|
FILE_SUFFIX: '.html',
|
|
HAS_SOURCE: true
|
|
};
|
|
</script>
|
|
<script type="text/javascript" src="_static/jquery.js"></script>
|
|
<script type="text/javascript" src="_static/underscore.js"></script>
|
|
<script type="text/javascript" src="_static/doctools.js"></script>
|
|
<!--<script type="text/javascript" src="../../MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>-->
|
|
<link rel="top" title="MathJax v1.1 documentation" href="index.html" />
|
|
<link rel="next" title="Configuration Objects" href="options/index.html" />
|
|
<link rel="prev" title="Loading and Configuring MathJax" href="configuration.html" />
|
|
</head>
|
|
<body>
|
|
|
|
<div class="related">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="genindex.html" title="General Index"
|
|
accesskey="I">index</a></li>
|
|
<li class="right" >
|
|
<a href="options/index.html" title="Configuration Objects"
|
|
accesskey="N">next</a> |</li>
|
|
<li class="right" >
|
|
<a href="configuration.html" title="Loading and Configuring MathJax"
|
|
accesskey="P">previous</a> |</li>
|
|
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
<div class="body">
|
|
|
|
<div class="section" id="common-configurations">
|
|
<span id="id1"></span><h1>Common Configurations<a class="headerlink" href="#common-configurations" title="Permalink to this headline">¶</a></h1>
|
|
<p>MathJax comes with a number of pre-defined configuration files in the
|
|
<tt class="docutils literal"><span class="pre">MathJax/config</span></tt> directory. The <tt class="docutils literal"><span class="pre">default.js</span></tt> file contains nearly all
|
|
the possible configuration options together with comments explaining them,
|
|
so you can use that file to customize MathJax to your needs. Simply load
|
|
it via</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=default"</span><span class="nt">></script></span>
|
|
</pre></div>
|
|
</div>
|
|
<p>where <tt class="docutils literal"><span class="pre">path-to-MathJax</span></tt> is the URL to the MathJax directory on your
|
|
server or hard disk.</p>
|
|
<p>The remaining files are combined configuration files that include not just
|
|
configuration parameters but also the files that MathJax would need to
|
|
load for those configurations. This means MathJax will have to load fewer
|
|
files, and since each file access requires establishing connections over
|
|
the network, it can be better to load one larger file than several smaller
|
|
ones. See <a class="reference internal" href="configuration.html#loading"><em>Loading and Configuring MathJax</em></a> for more
|
|
details about how to load configurations, and how to modify the parameters
|
|
for a configuration file.</p>
|
|
<p>The following sections describe the contents of the combined configuration
|
|
files. Each comes in two flavors: a standard version and a “full” version.
|
|
The standard version simply defines the output processor(s) that are part
|
|
of the configuration, but doesn’t load the code that implements the output
|
|
processor; the full version loads the complete output processors, so
|
|
everything that MathJax needs for the page should be loaded up front, and
|
|
there will be no delay once the page is ready to be processed. To obtain
|
|
the “full” version, add <tt class="docutils literal"><span class="pre">-full</span></tt> to the end of the configuration file
|
|
name.</p>
|
|
<div class="section" id="the-tex-ams-mml-htmlormml-configuration-file">
|
|
<h2>The <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt> configuration file<a class="headerlink" href="#the-tex-ams-mml-htmlormml-configuration-file" title="Permalink to this headline">¶</a></h2>
|
|
<p>This configuration file is the most general of the pre-defined
|
|
configurations. It loads all the important MathJax components, including
|
|
the TeX and MathML preprocessors and input processors, the AMSmath,
|
|
AMSsymbols, noErrors, and noUndefined TeX extensions, both the native
|
|
MathML and HTML-with-CSS output processor definitions, and the MathMenu and
|
|
MathZoom extensions. 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>
|
|
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span><span class="s2">"input/MathML"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">,</span><span class="s2">"output/NativeMML"</span><span class="p">],</span>
|
|
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">,</span><span class="s2">"mml2jax.js"</span><span class="p">,</span><span class="s2">"MathMenu.js"</span><span class="p">,</span><span class="s2">"MathZoom.js"</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">"AMSmath.js"</span><span class="p">,</span><span class="s2">"AMSsymbols.js"</span><span class="p">,</span><span class="s2">"noErrors.js"</span><span class="p">,</span><span class="s2">"noUndefined.js"</span><span class="p">]</span>
|
|
<span class="p">}</span>
|
|
<span class="p">});</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>In addition, it loads the mml Element Jax, the TeX and MathML input jax
|
|
main code (not just the definition files), as well as the <cite>toMathML</cite>
|
|
extension, which is used by the Show Source option in the MathJax
|
|
contextual menu. The full version also loads both the HTML-CSS and
|
|
NativeMML output jax main code, plus the HTML-CSS <cite>mtable</cite> extension, which
|
|
is normally loaded on demand.</p>
|
|
<p>See the <a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration</em></a> section for
|
|
other configuration options for the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor, and the
|
|
<a class="reference internal" href="options/TeX.html#configure-tex"><em>TeX input jax configuration</em></a> section for options
|
|
that control the TeX input processor.
|
|
See the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration</em></a> section for
|
|
other configuration options for the <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessor, and the
|
|
<a class="reference internal" href="options/MathML.html#configure-mathml"><em>MathML input jax configuration</em></a> section for
|
|
options that control the MathML input processor.
|
|
See <a class="reference internal" href="output.html#output-formats"><em>MathJax Output Formats</em></a> for more
|
|
information on the NativeMML and HTML-CSS output processors. See the
|
|
<a class="reference internal" href="options/MMLorHTML.html#configure-mmlorhtml"><em>MMLorHTML configuration</em></a> section for
|
|
details on the options that control the <tt class="docutils literal"><span class="pre">MMLorHTML</span></tt> configuration.</p>
|
|
</div>
|
|
<div class="section" id="the-tex-ams-html-configuration-file">
|
|
<h2>The <tt class="docutils literal"><span class="pre">TeX-AMS_HTML</span></tt> configuration file<a class="headerlink" href="#the-tex-ams-html-configuration-file" title="Permalink to this headline">¶</a></h2>
|
|
<p>This configuration file is for sites that only use TeX format for their
|
|
mathematics, and that want the output to be as close to TeX output as
|
|
possible. This uses the HTML-CSS output jax (even when the user’s browser
|
|
understands MathML). The user can still use the MathJax contextual menu
|
|
to select the NativeMML output jax if they desire.</p>
|
|
<p>This file includes all the important MathJax components for TeX input and
|
|
output, including the <cite>tex2jax</cite> preprocessor and TeX input jax, the
|
|
AMSmath, AMSsymbols, noErrors, and noUndefined TeX extensions, the
|
|
HTML-with-CSS output processor definition, and the MathMenu and MathZoom
|
|
extensions. 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">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">],</span>
|
|
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">,</span><span class="s2">"MathMenu.js"</span><span class="p">,</span><span class="s2">"MathZoom.js"</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">"AMSmath.js"</span><span class="p">,</span><span class="s2">"AMSsymbols.js"</span><span class="p">,</span><span class="s2">"noErrors.js"</span><span class="p">,</span><span class="s2">"noUndefined.js"</span><span class="p">]</span>
|
|
<span class="p">}</span>
|
|
<span class="p">});</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>In addition, it loads the mml Element Jax and the TeX input jax main code
|
|
(not just the definition file), as well as the <cite>toMathML</cite> extension, which
|
|
is used by the Show Source option in the MathJax contextual menu. The full
|
|
version also loads the HTML-CSS output jax main code, plus the HTML-CSS
|
|
<cite>mtable</cite> extension, which is normally loaded on demand.</p>
|
|
<p>See the <a class="reference internal" href="options/tex2jax.html#configure-tex2jax"><em>tex2jax configuration</em></a> section for
|
|
other configuration options for the <tt class="docutils literal"><span class="pre">tex2jax</span></tt> preprocessor, and the
|
|
<a class="reference internal" href="options/TeX.html#configure-tex"><em>TeX input jax configuration</em></a> section for options
|
|
that control the TeX input processor.
|
|
See <a class="reference internal" href="output.html#output-formats"><em>MathJax Output Formats</em></a> for more
|
|
information on the HTML-CSS output processor.</p>
|
|
</div>
|
|
<div class="section" id="the-mml-htmlormml-configuration-file">
|
|
<h2>The <tt class="docutils literal"><span class="pre">MML_HTMLorMML</span></tt> configuration file<a class="headerlink" href="#the-mml-htmlormml-configuration-file" title="Permalink to this headline">¶</a></h2>
|
|
<p>This configuration file is for sites that only use MathML format for their
|
|
mathematics. It will use MathML output in browsers where that is
|
|
supported, and HTML-CSS output otherwise. The user can still use the
|
|
MathJax contextual menu to select the other output format if they desire.</p>
|
|
<p>This file includes all the important MathJax components for MathML input
|
|
and output, including the <cite>mml2jax</cite> preprocessor and MathML input jax, the
|
|
NativeMML and HTML-CSS output processor definition files, and the MathMenu
|
|
and MathZoom extensions. 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>
|
|
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/MathML"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">,</span><span class="s2">"output/NativeMML"</span><span class="p">],</span>
|
|
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"mml2jax.js"</span><span class="p">,</span><span class="s2">"MathMenu.js"</span><span class="p">,</span><span class="s2">"MathZoom.js"</span><span class="p">]</span>
|
|
<span class="p">});</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>In addition, it loads the mml Element Jax and the MathML input jax main
|
|
code (not just the definition file), as well as the <cite>toMathML</cite> extension,
|
|
which is used by the Show Source option in the MathJax contextual menu.
|
|
The full version also loads both the HTML-CSS and NativeMML output jax main
|
|
code files, plus the HTML-CSS <cite>mtable</cite> extension, which is normally loaded
|
|
on demand.</p>
|
|
<p>See the <a class="reference internal" href="options/mml2jax.html#configure-mml2jax"><em>mml2jax configuration</em></a> section for
|
|
other configuration options for the <tt class="docutils literal"><span class="pre">mml2jax</span></tt> preprocessor, and the
|
|
<a class="reference internal" href="options/MathML.html#configure-mathml"><em>MathML input jax configuration</em></a> section for
|
|
options that control the MathML input processor.
|
|
See <a class="reference internal" href="output.html#output-formats"><em>MathJax Output Formats</em></a> for more
|
|
information on the NativeMML and HTML-CSS output processors. See the
|
|
<a class="reference internal" href="options/MMLorHTML.html#configure-mmlorhtml"><em>MMLorHTML configuration</em></a> section for
|
|
details on the options that control the <tt class="docutils literal"><span class="pre">MMLorHTML</span></tt> configuration.</p>
|
|
</div>
|
|
<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 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>
|
|
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">"input/TeX"</span><span class="p">,</span><span class="s2">"input/MathML"</span><span class="p">,</span><span class="s2">"output/HTML-CSS"</span><span class="p">,</span><span class="s2">"output/NativeMML"</span><span class="p">],</span>
|
|
<span class="nx">extensions</span><span class="o">:</span> <span class="p">[</span><span class="s2">"tex2jax.js"</span><span class="p">,</span><span class="s2">"mml2jax.js"</span><span class="p">,</span><span class="s2">"MathMenu.js"</span><span class="p">,</span><span class="s2">"MathZoom.js"</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">"AMSmath.js"</span><span class="p">,</span><span class="s2">"AMSsymbols.js"</span><span class="p">,</span><span class="s2">"noErrors.js"</span><span class="p">,</span><span class="s2">"noUndefined.js"</span><span class="p">]</span>
|
|
<span class="p">},</span>
|
|
<span class="nx">NativeMML</span><span class="o">:</span> <span class="p">{</span> <span class="nx">showMathMenuMSIE</span><span class="o">:</span> <span class="kc">false</span> <span class="p">},</span>
|
|
<span class="nx">menuSettings</span><span class="o">:</span> <span class="p">{</span> <span class="nx">zoom</span><span class="o">:</span> <span class="s2">"Double-Click"</span> <span class="p">},</span>
|
|
<span class="nx">errorSettings</span><span class="o">:</span> <span class="p">{</span> <span class="nx">message</span><span class="o">:</span> <span class="p">[</span><span class="s2">"[Math Error]"</span><span class="p">]</span> <span class="p">}</span>
|
|
<span class="p">});</span>
|
|
</pre></div>
|
|
</div>
|
|
<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>
|
|
<p>In addition, it loads the mml Element Jax, the TeX and MathML input jax
|
|
main code (not just the definition files), as well as the <cite>toMathML</cite>
|
|
extension, which is used by the Show Source option in the MathJax
|
|
contextual menu. The full version also loads both the HTML-CSS and
|
|
NativeMML output jax main code, plus the HTML-CSS <cite>mtable</cite> extension, which
|
|
is normally loaded on demand.</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sphinxsidebar">
|
|
<div class="sphinxsidebarwrapper">
|
|
<h3><a href="index.html">Table Of Contents</a></h3>
|
|
<ul>
|
|
<li><a class="reference internal" href="#">Common Configurations</a><ul>
|
|
<li><a class="reference internal" href="#the-tex-ams-mml-htmlormml-configuration-file">The <tt class="docutils literal"><span class="pre">TeX-AMS-MML_HTMLorMML</span></tt> configuration file</a></li>
|
|
<li><a class="reference internal" href="#the-tex-ams-html-configuration-file">The <tt class="docutils literal"><span class="pre">TeX-AMS_HTML</span></tt> configuration file</a></li>
|
|
<li><a class="reference internal" href="#the-mml-htmlormml-configuration-file">The <tt class="docutils literal"><span class="pre">MML_HTMLorMML</span></tt> configuration file</a></li>
|
|
<li><a class="reference internal" href="#the-accessible-configuration-file">The <tt class="docutils literal"><span class="pre">Accessible</span></tt> configuration file</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
<h4>Previous topic</h4>
|
|
<p class="topless"><a href="configuration.html"
|
|
title="previous chapter">Loading and Configuring MathJax</a></p>
|
|
<h4>Next topic</h4>
|
|
<p class="topless"><a href="options/index.html"
|
|
title="next chapter">Configuration Objects</a></p>
|
|
<div id="searchbox" style="display: none">
|
|
<h3>Quick search</h3>
|
|
<form class="search" action="search.html" method="get">
|
|
<input type="text" name="q" size="18" />
|
|
<input type="submit" value="Go" />
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
<input type="hidden" name="area" value="default" />
|
|
</form>
|
|
<p class="searchtip" style="font-size: 90%">
|
|
Enter search terms or a module, class or function name.
|
|
</p>
|
|
</div>
|
|
<script type="text/javascript">$('#searchbox').show(0);</script>
|
|
</div>
|
|
</div>
|
|
<div class="clearer"></div>
|
|
</div>
|
|
<div class="related">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="genindex.html" title="General Index"
|
|
>index</a></li>
|
|
<li class="right" >
|
|
<a href="options/index.html" title="Configuration Objects"
|
|
>next</a> |</li>
|
|
<li class="right" >
|
|
<a href="configuration.html" title="Loading and Configuring MathJax"
|
|
>previous</a> |</li>
|
|
<li><a href="index.html">MathJax v1.1 documentation</a> »</li>
|
|
</ul>
|
|
</div>
|
|
<div class="footer">
|
|
© Copyright 2011 Design Science.
|
|
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
|
|
</div>
|
|
|
|
</body>
|
|
</html> |