From 16ea8d54f9c5ee7727fd0b28fe9a90cce70f9fba Mon Sep 17 00:00:00 2001 From: krahets Date: Mon, 17 Jul 2023 18:54:16 +0800 Subject: [PATCH] deploy --- javascripts/katex.js | 10 ++++++++++ javascripts/mathjax.js | 16 ++++++++++++++++ sitemap.xml.gz | Bin 908 -> 908 bytes 3 files changed, 26 insertions(+) create mode 100644 javascripts/katex.js create mode 100644 javascripts/mathjax.js diff --git a/javascripts/katex.js b/javascripts/katex.js new file mode 100644 index 000000000..0946ce0a8 --- /dev/null +++ b/javascripts/katex.js @@ -0,0 +1,10 @@ +document$.subscribe(({ body }) => { + renderMathInElement(body, { + delimiters: [ + { left: "$$", right: "$$", display: true }, + { left: "$", right: "$", display: false }, + { left: "\\(", right: "\\)", display: false }, + { left: "\\[", right: "\\]", display: true }, + ], + }); +}); diff --git a/javascripts/mathjax.js b/javascripts/mathjax.js new file mode 100644 index 000000000..117b04607 --- /dev/null +++ b/javascripts/mathjax.js @@ -0,0 +1,16 @@ +window.MathJax = { + tex: { + inlineMath: [["\\(", "\\)"]], + displayMath: [["\\[", "\\]"]], + processEscapes: true, + processEnvironments: true, + }, + options: { + ignoreHtmlClass: ".*|", + processHtmlClass: "arithmatex", + }, +}; + +document$.subscribe(() => { + MathJax.typesetPromise(); +}); diff --git a/sitemap.xml.gz b/sitemap.xml.gz index 789ebfdb55af8c16d5f3857211b4090b26b7e61d..f64180a610dd37185a6de1a31b4fce4b0c4c068a 100644 GIT binary patch delta 15 WcmeBS?_p