Skip to content

Commit 7f950ae

Browse files
authored
Merge pull request #69 from qryxip/katex
Use KaTeX in documentation
2 parents 61212ca + 6164c10 commit 7f950ae

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.cargo/config.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build]
2+
rustdocflags = ["--html-in-header", "./doc/katex-header.html"]

doc/katex-header.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
2+
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>
3+
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"></script>
4+
<script>
5+
document.addEventListener("DOMContentLoaded", () => {
6+
renderMathInElement(document.body, {
7+
delimiters: [
8+
{left: "$$", right: "$$", display: true},
9+
{left: "\\[", right: "\\]", display: true},
10+
{left: "$", right: "$", display: false},
11+
{left: "\\(", right: "\\)", display: false}
12+
],
13+
})
14+
});
15+
</script>

0 commit comments

Comments
 (0)