Skip to content

Commit b526f30

Browse files
committed
Copy header for KaTeX integration for lax crate
1 parent 5d38f5e commit b526f30

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lax/katex-header.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!-- This file includes the work that is distributed in MIT or Apache-2.0 license at https://github.com/paulkernfeld/rustdoc-katex-demo -->
2+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">
3+
<script src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.js" integrity="sha384-K3vbOmF2BtaVai+Qk37uypf7VrgBubhQreNQe9aGsz9lB63dIFiQVlJbr92dw2Lx" crossorigin="anonymous"></script>
4+
<script src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/contrib/auto-render.min.js" integrity="sha384-kmZOZB5ObwgQnS/DuDg6TScgOiWWBiVt0plIRkZCmE6rDZGrEOQeHM5PcHi+nyqe" crossorigin="anonymous"></script>
5+
<script>
6+
document.addEventListener("DOMContentLoaded", function() {
7+
renderMathInElement(document.body, {
8+
delimiters: [
9+
{left: "$$", right: "$$", display: true},
10+
{left: "\\(", right: "\\)", display: false},
11+
{left: "$", right: "$", display: false},
12+
{left: "\\[", right: "\\]", display: true}
13+
]
14+
});
15+
});
16+
</script>

0 commit comments

Comments
 (0)