Skip to content

Commit 5b3aaef

Browse files
committed
update
1 parent 2b3cf7f commit 5b3aaef

File tree

3 files changed

+45
-9
lines changed

3 files changed

+45
-9
lines changed

docs/javascripts/katex.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
document$.subscribe(({ body }) => {
2+
renderMathInElement(body, {
3+
delimiters: [
4+
{ left: "$$", right: "$$", display: true },
5+
{ left: "$", right: "$", display: false },
6+
{ left: "\\(", right: "\\)", display: false },
7+
{ left: "\\[", right: "\\]", display: true }
8+
],
9+
})
10+
})

docs/javascripts/mathjax.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
window.MathJax = {
2+
tex: {
3+
inlineMath: [["\\(", "\\)"]],
4+
displayMath: [["\\[", "\\]"]],
5+
processEscapes: true,
6+
processEnvironments: true
7+
},
8+
options: {
9+
ignoreHtmlClass: ".*|",
10+
processHtmlClass: "arithmatex"
11+
}
12+
};
13+
14+
document$.subscribe(() => {
15+
MathJax.startup.output.clearCache()
16+
MathJax.typesetClear()
17+
MathJax.texReset()
18+
MathJax.typesetPromise()
19+
})

mkdocs.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,26 @@ theme:
4747
plugins:
4848
- mkdocs-jupyter:
4949
ignore_h1_titles: true
50-
include: ["*.ipynb"]
51-
ignore: []
50+
# include_source: true
51+
allow_errors: true
52+
53+
markdown_extensions:
54+
- footnotes
55+
- pymdownx.arithmatex:
56+
generic: true
57+
58+
extra_javascript:
59+
- javascripts/katex.js
60+
- https://unpkg.com/katex@0/dist/katex.min.js
61+
- https://unpkg.com/katex@0/dist/contrib/auto-render.min.js
62+
63+
extra_css:
64+
- https://unpkg.com/katex@0/dist/katex.min.css
65+
5266

5367
extra:
5468
generator: false
5569
analytics:
5670
provider: google
5771
property: G-TLJF393667
5872

59-
markdown_extensions:
60-
- pymdownx.arithmatex:
61-
generic: true
62-
63-
extra_javascript:
64-
- javascripts/mathjax.js
65-
- https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js

0 commit comments

Comments
 (0)