Skip to content

Commit

Permalink
Add config for math equation
Browse files Browse the repository at this point in the history
  • Loading branch information
xie186 committed Sep 16, 2024
1 parent 1af4ca9 commit 88c48c4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/javascripts/mathjax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
window.MathJax = {
tex: {
inlineMath: [["\\(", "\\)"]],
displayMath: [["\\[", "\\]"]],
processEscapes: true,
processEnvironments: true
},
options: {
ignoreHtmlClass: ".*|",
processHtmlClass: "arithmatex"
}
};

document$.subscribe(() => {
MathJax.startup.output.clearCache()
MathJax.typesetClear()
MathJax.texReset()
MathJax.typesetPromise()
})
8 changes: 8 additions & 0 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ extra:
- icon: fontawesome/brands/github
link: https://github.com/Bix4UMD

markdown_extensions:
- pymdownx.arithmatex:
generic: true

extra_javascript:
- javascripts/mathjax.js
- https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js

# Page Tree
nav:

Expand Down

0 comments on commit 88c48c4

Please sign in to comment.