diff options
author | Chun-Hung Tseng <henrybear327@users.noreply.github.com> | 2018-01-15 22:22:14 +0800 |
---|---|---|
committer | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2018-01-15 22:22:14 +0800 |
commit | 6f7bd1b933b2ed24569b90645510804b607ff428 (patch) | |
tree | 1460981256232f289f1f54f298c962fa268a9125 /layouts/partials/scripts.html | |
parent | e1f5be88d365dfa31b88b552f331460d73f31ca7 (diff) |
feat: config mathjax to use $...$ for in-line math mode (#22)
* Update cdn mathjax version to 2.7.2
Diffstat (limited to 'layouts/partials/scripts.html')
-rw-r--r-- | layouts/partials/scripts.html | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 1a284ee..2cfa68a 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -16,13 +16,16 @@ <script type="text/javascript" src="{{ "dist/even.min.js?v=2.7.2" | relURL }}"></script> {{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }} - <script type="text/javascript"> - window.MathJax = { + <script type="text/x-mathjax-config"> + MathJax.Hub.Config({ + {{ if or .Params.mathjaxEnableSingleDollar (and .Site.Params.mathjaxEnableSingleDollar (ne .Params.mathjaxEnableSingleDollar false)) -}} + tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}, + {{ end -}} showProcessingMessages: false, messageStyle: 'none' - }; + }); </script> - <script async src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML'></script> + <script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script> {{- end }} <!-- Analytics --> |