Created
September 3, 2018 18:37
-
-
Save jasikpark/f07f3bf8bbf11a731425bf14825360fd to your computer and use it in GitHub Desktop.
MathJax config for Hugo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" async | |
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> | |
MathJax.Hub.Config({ | |
tex2jax: { | |
inlineMath: [['$','$'], ['\\(','\\)']], | |
displayMath: [['$$','$$']], | |
processEscapes: true, | |
processEnvironments: true, | |
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'], | |
TeX: { equationNumbers: { autoNumber: "AMS" }, | |
extensions: ["AMSmath.js", "AMSsymbols.js"] } | |
} | |
}); | |
MathJax.Hub.Queue(function() { | |
// Fix <code> tags after MathJax finishes running. This is a | |
// hack to overcome a shortcoming of Markdown. Discussion at | |
// https://github.com/mojombo/jekyll/issues/199 | |
var all = MathJax.Hub.getAllJax(), i; | |
for(i = 0; i < all.length; i += 1) { | |
all[i].SourceElement().parentNode.className += ' has-jax'; | |
} | |
}); | |
MathJax.Hub.Config({ | |
// Autonumbering by mathjax | |
TeX: { equationNumbers: { autoNumber: "AMS" } } | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment