diff options
Diffstat (limited to 'layouts/partials')
| -rw-r--r-- | layouts/partials/math.html | 21 | 
1 files changed, 14 insertions, 7 deletions
| diff --git a/layouts/partials/math.html b/layouts/partials/math.html index 59a0b2d..c54c8d5 100644 --- a/layouts/partials/math.html +++ b/layouts/partials/math.html @@ -1,9 +1,16 @@ -<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css"> +<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js"></script> + +<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/contrib/auto-render.min.js" +  onload="renderMathInElement(document.body);"></script> +  <script> -  MathJax = { -    tex: { -      displayMath: [['\\[', '\\]'], ['$$', '$$']], -      inlineMath: [['\\[', '\\]'], ['$', '$']] -    } -  }; +  document.addEventListener("DOMContentLoaded", function () { +    renderMathInElement(document.body, { +      delimiters: [ +        { left: "$$", right: "$$", display: true }, +        { left: "$", right: "$", display: false } +      ] +    }); +  });  </script>
\ No newline at end of file | 
