Deployed f263125 with MkDocs version: 1.6.1
This commit is contained in:
parent
1d2a68dc54
commit
149b30e3a5
21 changed files with 130 additions and 56 deletions
16
javascripts/katex.js
Normal file
16
javascripts/katex.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
const renderMath = (el) => {
|
||||
renderMathInElement(el, {
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
{ left: "$", right: "$", display: false },
|
||||
{ left: "\\(", right: "\\)", display: false },
|
||||
{ left: "\\[", right: "\\]", display: true }
|
||||
],
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof document$ !== "undefined") {
|
||||
document$.subscribe(({ body }) => renderMath(body));
|
||||
} else {
|
||||
document.addEventListener("DOMContentLoaded", () => renderMath(document.body));
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
window.MathJax = {
|
||||
tex: {
|
||||
inlineMath: [["\\(", "\\)"]],
|
||||
displayMath: [["\\[", "\\]"]],
|
||||
processEscapes: true,
|
||||
processEnvironments: true
|
||||
},
|
||||
options: {
|
||||
ignoreHtmlClass: ".*|",
|
||||
processHtmlClass: "arithmatex"
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
MathJax.startup.document.state(0);
|
||||
MathJax.typesetClear();
|
||||
MathJax.typesetPromise();
|
||||
});
|
||||
Reference in a new issue