145 lines
7.3 KiB
HTML
145 lines
7.3 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>The mml2jax Preprocessor — 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="up" title="Configuration Objects" href="index.html" />
|
|
<link rel="next" title="The jsMath2jax Preprocessor" href="jsMath2jax.html" />
|
|
<link rel="prev" title="The tex2jax Preprocessor" href="tex2jax.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="jsMath2jax.html" title="The jsMath2jax Preprocessor"
|
|
accesskey="N">next</a> |</li>
|
|
<li class="right" >
|
|
<a href="tex2jax.html" title="The tex2jax Preprocessor"
|
|
accesskey="P">previous</a> |</li>
|
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
|
<li><a href="index.html" accesskey="U">Configuration Objects</a> »</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
<div class="body">
|
|
|
|
<div class="section" id="the-mml2jax-preprocessor">
|
|
<span id="configure-mml2jax"></span><h1>The mml2jax Preprocessor<a class="headerlink" href="#the-mml2jax-preprocessor" title="Permalink to this headline">¶</a></h1>
|
|
<p>The options below control the operation of the <cite>mml2jax</cite> preprocessor
|
|
that is run when you include <tt class="docutils literal"><span class="pre">"mml2jax.js"</span></tt> in the <cite>extensions</cite> array
|
|
of your configuration. They are listed with their default values. To
|
|
set any of these options, include a <tt class="docutils literal"><span class="pre">mml2jax</span></tt> section in your
|
|
<tt class="xref py py-meth docutils literal"><span class="pre">MathJax.Hub.Config()</span></tt> call. 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">mml2jax</span><span class="o">:</span> <span class="p">{</span>
|
|
<span class="nx">preview</span><span class="o">:</span> <span class="s2">"none"</span>
|
|
<span class="p">}</span>
|
|
<span class="p">});</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>would set the <tt class="docutils literal"><span class="pre">preview</span></tt> parameter to <tt class="docutils literal"><span class="pre">"none"</span></tt>.</p>
|
|
<dl class="describe">
|
|
<dt>
|
|
<tt class="descname">preview: "alttext"</tt></dt>
|
|
<dd><p>This controls whether <cite>mml2jax</cite> inserts <tt class="docutils literal"><span class="pre">MathJax_Preview</span></tt> spans
|
|
to make a preview available, and what preview to use, when it
|
|
locates mathematics on the page. The default is <tt class="docutils literal"><span class="pre">"alttext"</span></tt>,
|
|
which means use the <tt class="docutils literal"><span class="pre"><math></span></tt> tag’s <tt class="docutils literal"><span class="pre">alttext</span></tt> attribute as the
|
|
preview (visible until it is processed by MathJax), if the tag has
|
|
one. Set it to <tt class="docutils literal"><span class="pre">"none"</span></tt> to prevent the previews from being
|
|
inserted (the math will simply disappear until it is typeset).
|
|
Set it to an array containing the description of an HTML snippet
|
|
in order to use the same preview for all equations on the page.</p>
|
|
<p>Examples:</p>
|
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">preview</span><span class="o">:</span> <span class="p">[</span><span class="s2">"[math]"</span><span class="p">],</span> <span class="c1">// insert the text "[math]" as the preview</span>
|
|
</pre></div>
|
|
</div>
|
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">preview</span><span class="o">:</span> <span class="p">[[</span><span class="s2">"img"</span><span class="p">,{</span><span class="nx">src</span><span class="o">:</span> <span class="s2">"/images/mypic.jpg"</span><span class="p">}]],</span> <span class="c1">// insert an image as the preview</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>See the <a class="reference internal" href="../HTML-snippets.html#html-snippets"><em>description of HTML snippets</em></a> for
|
|
details on how to represent HTML code in this way.</p>
|
|
</dd></dl>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sphinxsidebar">
|
|
<div class="sphinxsidebarwrapper">
|
|
<h4>Previous topic</h4>
|
|
<p class="topless"><a href="tex2jax.html"
|
|
title="previous chapter">The tex2jax Preprocessor</a></p>
|
|
<h4>Next topic</h4>
|
|
<p class="topless"><a href="jsMath2jax.html"
|
|
title="next chapter">The jsMath2jax Preprocessor</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="jsMath2jax.html" title="The jsMath2jax Preprocessor"
|
|
>next</a> |</li>
|
|
<li class="right" >
|
|
<a href="tex2jax.html" title="The tex2jax Preprocessor"
|
|
>previous</a> |</li>
|
|
<li><a href="../index.html">MathJax v1.1 documentation</a> »</li>
|
|
<li><a href="index.html" >Configuration Objects</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> |