A version of toggles.js
for the MathJax third party extension repository, including a compressed version (using YUI, see the MathJax-dev tools).
Implements LaTeX toggles for MathJax, based on the etoolbox implementation -- see etoolbox documentation on CTAN.
\newtoggle{name}
\providetoggle{name}
\settoggle{name}{value}
\toggletrue{name}
\togglefalse{name}
\iftoggle{name}{math}{math}
\nottoggle{name}{math}{math}
References:
- toggles: https://github.com/leathrum/mathjax-ext-contrib/tree/master/toggles
- MathJax: http://www.mathjax.org/
The MathJax CDN hosts a copy of this extension via the MathJax third party extension repository. To use the CDN copy, you need MathJax v2.4 (or higher) and configure the third party extension repository as described in the MathJax documentation.
Then add the extension to your configuration like any other third party extension from the MathJax CDN. For example, your inline configuration might be
<script type="text/x-mathjax-config>
MathJax.Hub.Config({
extensions: ["tex2jax.js","[Contrib]/toggles.js"],
jax: ["input/TeX","output/HTML-CSS"],
tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
TeX: {extensions: ["AMSmath.js","AMSsymbols.js"]}
});
</script>