-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkatex-header.html
32 lines (32 loc) · 1.82 KB
/
katex-header.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-KiWOvVjnN8qwAZbuQyWDIbfCLFhLXNETzBQjA/92pIowpC0d2O3nppDGQVgwd2nB" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-0fdwu/T/EQMsQlrHCCHoH10pkPLlKA1jL5dFyUOvB3lfeT2540/2g6YgSi2BL14p" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "\\[", right: "\\]", display: true},
{left: "$", right: "$", display: false},
{left: "\\(", right: "\\)", display: false},
],
macros: {
"\\halfco": "[#1, #2)",
"\\floor": "\\lfloor#1\\rfloor",
"\\ceil": "\\lceil#1\\rceil",
"\\Floor": "\\left\\lfloor#1\\right\\rfloor",
"\\Ceil": "\\left\\lceil#1\\right\\rceil",
"\\arsinh": "\\operatorname{arsinh}",
"\\arcosh": "\\operatorname{arcosh}",
"\\artanh": "\\operatorname{artanh}",
"\\sgn": "\\operatorname{sgn}",
"\\erf": "\\operatorname{erf}",
"\\round": "\\lfloor#1\\rceil",
"\\Round": "\\left\\lfloor#1\\right\\rceil",
"\\DP": "\\mathrm{dp}",
"\\xgets": "\\xleftarrow{#1}",
"\\For": "\\text{\\textbf{for} }#1\\text{ \\textbf{do}}",
},
});
});
</script>