MitseaBlog/themes/hugo-theme-stack/layouts/partials/article/components/math.html
2024-07-31 17:10:56 +08:00

13 lines
527 B
HTML

{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
<script>
window.addEventListener("DOMContentLoaded", () => {
renderMathInElement(document.body, {
delimiters: [
{ left: "$$", right: "$$", display: true },
{ left: "$", right: "$", display: false },
{ left: "\\(", right: "\\)", display: false },
{ left: "\\[", right: "\\]", display: true }
],
ignoredClasses: ["gist"]
});})
</script>