1
Fork 0

fix: switch to katex

This commit is contained in:
Tibo De Peuter 2026-05-19 23:17:17 +02:00
parent 97598105e5
commit f26312583a
3 changed files with 22 additions and 20 deletions

16
docs/javascripts/katex.js Normal file
View 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));
}