forked from mirrors/hugo-tufte
6bc21de118
Fixes #29
29 lines
No EOL
1.1 KiB
HTML
29 lines
No EOL
1.1 KiB
HTML
{{ if .Params.katex }}
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css">
|
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js"></script>
|
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js"></script>
|
|
<script defer>
|
|
renderMathInElement(
|
|
document.body,
|
|
{
|
|
delimiters: [
|
|
{ left: "$$", right: "$$", display: true },
|
|
{ left: "\\[", right: "\\]", display: true },
|
|
{ left: "$", right: "$", display: false },
|
|
{ left: "\\(", right: "\\)", display: false }
|
|
],
|
|
displayMode: true
|
|
}
|
|
);
|
|
</script>
|
|
{{ else }}
|
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
|
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
|
<script defer>
|
|
window.MathJax = {
|
|
tex: {
|
|
inlineMath: [['$', '$'], ['\\(', '\\)']]
|
|
}
|
|
};
|
|
</script>
|
|
{{ end }} |