1
Fork 0
This repository has been archived on 2026-08-15. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
2026SEL3-project-Brittle_St.../docs/javascripts/katex.js

16 lines
489 B
JavaScript

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));
}