mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-11-15 04:46:58 +01:00
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>
|
|
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>
|
|
window.MathJax = {
|
|
tex: {
|
|
inlineMath: [['$', '$'], ['\\(', '\\)']]
|
|
}
|
|
};
|
|
</script>
|
|
{{ end }} |