diff options
Diffstat (limited to 'layouts/partials/head.html')
-rw-r--r-- | layouts/partials/head.html | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 689beb7..6d1460a 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -31,12 +31,21 @@ </script> {{ end }} - {{ if .Site.Params.MathJax | default true }} + {{ if or .Page.Params.math .Site.Params.math }} <!-- adds MathJax support --> - <script async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.5/es5/tex-mml-chtml.js" integrity="sha256-HGLuEfFcsUJGhvB8cQ8nr0gai9EucOOaIxFw7qxmd+w=" crossorigin="anonymous"></script> <script type="text/x-mathjax-config"> - MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}}); + MathJax.Hub.Config({ + extensions: ["tex2jax.js"], + jax: ["input/TeX", "output/HTML-CSS"], + tex2jax: { + inlineMath: [ ['$','$'], ["\\(","\\)"] ], + displayMath: [ ['$$','$$'], ["\\[","\\]"] ], + processEscapes: true + }, + "HTML-CSS": { availableFonts: ["TeX"] } + }); </script> + <script src="https://cdn.jsdelivr.net/npm/mathjax@3.0.5/es5/tex-mml-chtml.js" integrity="sha256-HGLuEfFcsUJGhvB8cQ8nr0gai9EucOOaIxFw7qxmd+w=" crossorigin="anonymous"></script> {{ end }} <link rel="stylesheet" href="/layui/css/layui.css"> |