Skip to content

Commit 7caa07f

Browse files
committed
Add MathJax support for LaTeX math rendering
1 parent 4b606e7 commit 7caa07f

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

docs/assets/mathjax.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
};

mkdocs.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ theme:
3232
extra_css:
3333
- assets/extra.css
3434

35+
extra_javascript:
36+
- assets/mathjax.js
37+
- https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js
38+
39+
markdown_extensions:
40+
- pymdownx.arithmatex:
41+
generic: true
42+
3543
nav:
3644
- Home: index.md
3745
- Syllabus:

0 commit comments

Comments
 (0)