feat(math): add inline math support (#88)

This commit is contained in:
Jimmy Cai 2020-12-24 10:57:01 +01:00 committed by GitHub
parent de79b8a470
commit 39dd18e603
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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>