2022-05-13 05:23:35 +02:00
|
|
|
// Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
|
|
|
|
/// <reference types="./mathjax-types" />
|
|
|
|
|
|
|
|
const packages = ["noerrors", "mathtools", "mhchem"];
|
|
|
|
|
|
|
|
function packagesForLoading(packages: string[]): string[] {
|
|
|
|
return packages.map((value: string): string => `[tex]/${value}`);
|
|
|
|
}
|
|
|
|
|
|
|
|
window.MathJax = {
|
|
|
|
tex: {
|
|
|
|
displayMath: [["\\[", "\\]"]],
|
|
|
|
processEscapes: false,
|
|
|
|
processEnvironments: false,
|
|
|
|
processRefs: false,
|
|
|
|
packages: {
|
|
|
|
"[+]": packages,
|
2023-12-11 06:00:56 +01:00
|
|
|
"[-]": ["textmacros"],
|
2022-05-13 05:23:35 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
loader: {
|
|
|
|
load: packagesForLoading(packages),
|
|
|
|
paths: {
|
|
|
|
mathjax: "/_anki/js/vendor/mathjax",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
startup: {
|
|
|
|
typeset: false,
|
|
|
|
},
|
|
|
|
};
|