mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
quieten MathJax
This commit is contained in:
parent
fcb3283a9d
commit
c1d15a8e1f
2 changed files with 25 additions and 23 deletions
|
@ -1,28 +1,27 @@
|
||||||
window.MathJax = {
|
window.MathJax = {
|
||||||
tex: {
|
tex: {
|
||||||
displayMath: [["\\[", "\\]"]],
|
displayMath: [["\\[", "\\]"]],
|
||||||
processRefs: false,
|
processRefs: false,
|
||||||
processEnvironments: false,
|
processEnvironments: false,
|
||||||
packages: {
|
packages: {
|
||||||
"[+]": ["noerrors", "mhchem"],
|
"[+]": ["noerrors", "mhchem"],
|
||||||
},
|
|
||||||
},
|
},
|
||||||
startup: {
|
},
|
||||||
typeset: false,
|
startup: {
|
||||||
pageReady: () => {
|
typeset: false,
|
||||||
console.log("page is ready");
|
pageReady: () => {
|
||||||
return MathJax.startup.defaultPageReady();
|
return MathJax.startup.defaultPageReady();
|
||||||
},
|
|
||||||
},
|
},
|
||||||
options: {
|
},
|
||||||
renderActions: {
|
options: {
|
||||||
addMenu: [],
|
renderActions: {
|
||||||
checkLoading: [],
|
addMenu: [],
|
||||||
},
|
checkLoading: [],
|
||||||
ignoreHtmlClass: "tex2jax_ignore",
|
|
||||||
processHtmlClass: "tex2jax_process",
|
|
||||||
},
|
|
||||||
loader: {
|
|
||||||
load: ["[tex]/noerrors", "[tex]/mhchem"],
|
|
||||||
},
|
},
|
||||||
|
ignoreHtmlClass: "tex2jax_ignore",
|
||||||
|
processHtmlClass: "tex2jax_process",
|
||||||
|
},
|
||||||
|
loader: {
|
||||||
|
load: ["[tex]/noerrors", "[tex]/mhchem"],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -90,6 +90,9 @@ class AnkiWebPage(QWebEnginePage):
|
||||||
buf = "JS %(t)s %(f)s:%(a)d %(b)s" % dict(
|
buf = "JS %(t)s %(f)s:%(a)d %(b)s" % dict(
|
||||||
t=level, a=line, f=srcID, b=msg + "\n"
|
t=level, a=line, f=srcID, b=msg + "\n"
|
||||||
)
|
)
|
||||||
|
if "MathJax localStorage" in buf:
|
||||||
|
# silence localStorage noise
|
||||||
|
return
|
||||||
# ensure we don't try to write characters the terminal can't handle
|
# ensure we don't try to write characters the terminal can't handle
|
||||||
buf = buf.encode(sys.stdout.encoding, "backslashreplace").decode(
|
buf = buf.encode(sys.stdout.encoding, "backslashreplace").decode(
|
||||||
sys.stdout.encoding
|
sys.stdout.encoding
|
||||||
|
|
Loading…
Reference in a new issue