28 lines
620 B
JavaScript
28 lines
620 B
JavaScript
window.addEventListener("load", () => {
|
|
const macros = {};
|
|
for (const item of new Map(
|
|
Object.entries({
|
|
N: "mathbb{N}",
|
|
R: "mathbb{R}",
|
|
Z: "mathbb{Z}",
|
|
O: "Theta",
|
|
ra: "rightarrow",
|
|
la: "leftarrow",
|
|
RA: "Rightarrow",
|
|
LA: "Leftarrow",
|
|
u: "mu",
|
|
})
|
|
)[Symbol.iterator]()) {
|
|
macros[`\\${item[0]}`] = `\\${item[1]}`;
|
|
}
|
|
|
|
renderMathInElement(document.body, {
|
|
delimiters: [
|
|
{ left: "$$", right: "$$", display: true },
|
|
{ left: "$", right: "$", display: false },
|
|
],
|
|
throwOnError: false,
|
|
macros,
|
|
output: "mathml",
|
|
});
|
|
});
|