scribble-mathjax/docs/html/options/index.html

195 lines
10 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>Configuration Objects &mdash; MathJax v2.0 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: '2.0',
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 v2.0 documentation" href="../index.html" />
<link rel="next" title="The Core Configuration Options" href="hub.html" />
<link rel="prev" title="Common Configurations" href="../config-files.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="hub.html" title="The Core Configuration Options"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../config-files.html" title="Common Configurations"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="configuration-objects">
<span id="configuration"></span><h1>Configuration Objects<a class="headerlink" href="#configuration-objects" title="Permalink to this headline"></a></h1>
<p>The various components of MathJax, including its input and output
processors, its preprocessors, its extensions, and the MathJax core,
all can be configured through the <tt class="docutils literal"><span class="pre">config/default.js</span></tt> file, or via a
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call (indeed, if you look closely, you
will see that <tt class="docutils literal"><span class="pre">config/default.js</span></tt> is itself one big call to
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt>). Anything that is in
<tt class="docutils literal"><span class="pre">config/default.js</span></tt> can be included in-line to configure MathJax.</p>
<p>The structure that you pass to <tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> is a
JavaScript object that includes <cite>name:value</cite> pairs giving the names of
parameters and their values, with pairs separated by commas. Be
careful not to include a comma after the last value, however, as some
browsers (namely Internet Explorer) will fail to process the
configuration if you do.</p>
<p>The MathJax components, like the TeX input processor, have their own
sections in the configuration object labeled by the component name,
and using an object as its value. That object is itself
a configuration object made up of <cite>name:value</cite> pairs that give the
configuration options for the component.</p>
<p>For example,</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">showProcessingMessages</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span>
<span class="nx">jax</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;input/TeX&quot;</span><span class="p">,</span> <span class="s2">&quot;output/HTML-CSS&quot;</span><span class="p">],</span>
<span class="nx">TeX</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">TagSide</span><span class="o">:</span> <span class="s2">&quot;left&quot;</span><span class="p">,</span>
<span class="nx">Macros</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">RR</span><span class="o">:</span> <span class="s1">&#39;{\\bf R}&#39;</span><span class="p">,</span>
<span class="nx">bold</span><span class="o">:</span> <span class="p">[</span><span class="s1">&#39;{\\bf #1}&#39;</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">});</span>
</pre></div>
</div>
<p>is a configuration that includes two settings for the MathJax Hub (one
for <cite>showProcessingMessages</cite> and one for the <cite>jax</cite> array), and a
configuration object for the TeX input processor. The latter includes
a setting for the TeX input processor&#8217;s <cite>TagSide</cite> option (to set tags
on the left rather than the right) and a setting for <cite>Macros</cite>, which
defines new TeX macros (in this case, two macros, one called <tt class="docutils literal"><span class="pre">\RR</span></tt>
that produces a bold &#8220;R&#8221;, and one called <tt class="docutils literal"><span class="pre">\bold</span></tt> that puts is
argument in bold face).</p>
<p>The <tt class="docutils literal"><span class="pre">config/default.js</span></tt> file is another example that shows nearly
all the configuration options for all of MathJax&#8217;s components.</p>
<div class="section" id="configuration-options-by-component">
<h2>Configuration Options by Component<a class="headerlink" href="#configuration-options-by-component" title="Permalink to this headline"></a></h2>
<p>The individual options are explained in the following sections, which
are categorized by the component they affect.</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="hub.html">The core options</a></li>
</ul>
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="tex2jax.html">The tex2jax preprocessor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="mml2jax.html">The mml2jax preprocessor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="asciimath2jax.html">The asciimath2jax preprocessor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="jsMath2jax.html">The jsMath2jax preprocessor options</a></li>
</ul>
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="TeX.html">The TeX input processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="MathML.html">The MathML input processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="AsciiMath.html">The AsciiMath input processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="HTML-CSS.html">The HTML-CSS output processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="NativeMML.html">The NativeMML output processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="SVG.html">The SVG output processor options</a></li>
<li class="toctree-l1"><a class="reference internal" href="MMLorHTML.html">The MMLorHTML configuration options</a></li>
</ul>
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="MathMenu.html">The MathMenu options</a></li>
<li class="toctree-l1"><a class="reference internal" href="MathZoom.html">The MathZoom options</a></li>
<li class="toctree-l1"><a class="reference internal" href="MathEvents.html">The MathEvents options</a></li>
<li class="toctree-l1"><a class="reference internal" href="FontWarnings.html">The FontWarnings options</a></li>
</ul>
</div>
</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="#">Configuration Objects</a><ul>
<li><a class="reference internal" href="#configuration-options-by-component">Configuration Options by Component</a><ul>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="../config-files.html"
title="previous chapter">Common Configurations</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="hub.html"
title="next chapter">The Core Configuration Options</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="hub.html" title="The Core Configuration Options"
>next</a> |</li>
<li class="right" >
<a href="../config-files.html" title="Common Configurations"
>previous</a> |</li>
<li><a href="../index.html">MathJax v2.0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2012 Design Science.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>