About MathJax
Introducing MathJax
<script src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="//cdn.bootcss.com/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="dns-prefetch" href="//cdn.bootcss.com" />
<link rel="dns-prefetch" href="//cdn.mathjax.org" />
Description of external config
<script type="text/javascript" src=" https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX -AMS_HTML, http://myserver.com/MathJax/config/local/local.js "> </script>
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.
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 toMathML 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 mtable extension, which is normally loaded on demand.
Inline config description
<script type="text/x-mathjax-config"> MathJax. Hub. Config({ }); </script> <script type="text/javascript" src="path-to-MathJax/MathJax.js"></script>
Identification formula
<script type="text/x-mathjax-config"> MathJax. Hub. Config({ tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ] } }); </script> <script type="text/javascript" src="path-to-MathJax/MathJax.js"></script>
Area selective identification
Constraint recognition range
var mathId = document.getElementById("post-content"); MathJax. Hub. Config({ tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ] } }); MathJax. Hub. Queue(["Typeset",MathJax.Hub,mathId]);
Avoid special labels and classes
MathJax. Hub. Config({ tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], skipTags: ['script', 'noscript', 'style', 'textarea', 'pre','code','a'], ignoreClass:"class1" } }); MathJax. Hub. Queue(["Typeset",MathJax.Hub]);
more
Beautify mathematical formula
Remove the blue box
.MathJax{outline:0;}
.MathJax span{font-size:15px;}
.MathJax_Display{overflow-x:auto;overflow-y:hidden;}
Extended functions
MathJax. Hub. Config({ extensions: ["tex2jax.js"], jax: ["input/TeX", "output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], skipTags: ['script', 'noscript', 'style', 'textarea', 'pre','code','a'], ignoreClass:"class1" }, "HTML-CSS": { } }); MathJax. Hub. Queue(["Typeset",MathJax.Hub]);
"HTML-CSS": { availableFonts: ["STIX","TeX"] }
"HTML-CSS": { showMathMenu: false }
Remove loading information
MathJax. Hub. Config({ showProcessingMessages: false, messageStyle: "none" });
arrangement
<script type="text/x-mathjax-config"> MathJax. Hub. Config({ ShowProcessingMessages: false,//Close the js loading process information MessageStyle: "none",//No message is displayed extensions: ["tex2jax.js"], jax: ["input/TeX", "output/HTML-CSS"], tex2jax: { InlineMath: [['$', '$'], [" (", " )"],//In line formula selector DisplayMath: [['$$', '$$'], [" [", " ]"]],//formula selector in section SkipTags: ['script ',' noscript ',' style ',' textarea ',' pre ',' code ',' a '],//Avoid some tags IgnoreClass: "comment content"//Avoid the label containing this class }, "HTML-CSS": { AvailableFonts: ["STIX", "TeX"],//Optional fonts ShowMathMenu: false//Close the right-click menu display } }); MathJax. Hub. Queue(["Typeset",MathJax.Hub]); </script> <script src="//cdn.bootcss.com/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config"> var mathId = document.getElementById("post-content"); // Select formula recognition range MathJax. Hub. Config({ ShowProcessingMessages: false,//Close the js loading process information MessageStyle: "none",//No message is displayed extensions: ["tex2jax.js"], jax: ["input/TeX", "output/HTML-CSS"], tex2jax: { InlineMath: [['$', '$'], [" (", " )"],//In line formula selector DisplayMath: [['$$', '$$'], [" [", " ]"]],//formula selector in section SkipTags: ['script ',' noscript ',' style ',' textarea ',' pre ',' code ',' a ']//Avoid some tags }, "HTML-CSS": { AvailableFonts: ["STIX", "TeX"],//Optional fonts ShowMathMenu: false//Close the right-click menu display } }); MathJax. Hub. Queue(["Typeset",MathJax.Hub,mathId]); </script> <script src="//cdn.bootcss.com/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
.MathJax_Display{overflow-x:auto;overflow-y:hidden;} .MathJax{outline:0;}
InstantClick callback
<script data-no-instant> InstantClick.on('change', function(isInitialLoad){ if (isInitialLoad === false) { if (typeof MathJax !== 'undefined'){ MathJax. Hub. Queue(["Typeset",MathJax.Hub]); } } }); InstantClick.init(); </script>
<script data-no-instant> InstantClick.on('change', function(isInitialLoad){ if (isInitialLoad === false) { if (typeof MathJax !== 'undefined'){ var mathId = document.getElementById("post-content"); MathJax. Hub. Queue(["Typeset",MathJax.Hub,mathId]); } } }); InstantClick.init(); </script>
epilogue