-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtodo.math.js
48 lines (44 loc) · 1015 Bytes
/
todo.math.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// This file is a part of todo.horse and provides bindings to MathJax.
// SPDX-License-Identifier: AGPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright (C) 2012-2024 Marek Rogalski
(function () {
window.MathJax = {
tex: {
inlineMath: [
["$", "$"],
["\\(", "\\)"],
],
},
svg: {
fontCache: "global",
},
startup: {
typeset: false,
},
loader: {
load: ["input/asciimath"],
},
options: {
menuOptions: {
settings: {
assistiveMml: false,
texHints: false,
collapsible: false,
explorer: false,
},
},
},
};
var script = document.createElement("script");
script.src = "/mathjax/tex-svg.js";
script.async = true;
document.head.appendChild(script);
$TODO.typesetMath = function () {
MathJax.typeset($TODO.active);
$TODO.save();
};
$TODO.nav.bind(
{ ctrl: false, shift: false, code: $TODO.Keycodes["M"] },
$TODO.typesetMath,
);
})();