mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-27 04:03:48 +01:00
feat(math): add inline math support (#88)
This commit is contained in:
parent
de79b8a470
commit
39dd18e603
1 changed files with 14 additions and 1 deletions
|
@ -5,4 +5,17 @@
|
|||
crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js"
|
||||
integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"
|
||||
onload="renderMathInElement(document.querySelector(`.article-content`));"></script>
|
||||
onload="StackLaTeX()"></script>
|
||||
|
||||
<script>
|
||||
function StackLaTeX() {
|
||||
renderMathInElement(document.querySelector(`.article-content`), {
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "$", right: "$", display: false },
|
||||
{ left: "\\(", right: "\\)", display: false },
|
||||
{ left: "\\[", right: "\\]", display: true }
|
||||
]
|
||||
});
|
||||
}
|
||||
</script>
|
Loading…
Reference in a new issue