Skip to content

Commit 415af43

Browse files
committed
Add MathJax
1 parent fe4f6f2 commit 415af43

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

.github/workflows/mkdocs_ghp.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ jobs:
2525
path: .cache
2626
restore-keys: |
2727
mkdocs-material-
28-
- run: pip install mkdocs-material
28+
- run: pip install pymdown-extensions
29+
- run: pip install mkdocs-material
2930
- run: mkdocs gh-deploy --force

docs/javascripts/mathjax.js

+19
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

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
site_name: ZuneDev Wiki
22
site_url: http://zunedev.github.io
3+
34
extra_css:
4-
- style.css
5+
- style.css
6+
7+
markdown_extensions:
8+
- pymdownx.arithmatex:
9+
generic: true
10+
11+
extra_javascript:
12+
- javascripts/mathjax.js
13+
- https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js

0 commit comments

Comments
 (0)