MitseaBlog/themes/hugo-theme-stack/layouts/partials/article/components/math.html

12 lines
518 B
HTML
Raw Normal View History

2022-10-11 17:34:41 +08:00
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
<script>
window.addEventListener("DOMContentLoaded", () => {
renderMathInElement(document.querySelector(`.article-content`), {
delimiters: [
{ left: "$$", right: "$$", display: true },
{ left: "$", right: "$", display: false },
{ left: "\\(", right: "\\)", display: false },
{ left: "\\[", right: "\\]", display: true }
]
});})
</script>