Skip to content

Commit

Permalink
add the MathJax and a math showcase page
Browse files Browse the repository at this point in the history
  • Loading branch information
minxu74 committed Jul 9, 2024
1 parent 9b97356 commit d8d8caa
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
19 changes: 19 additions & 0 deletions docs/assets/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: 6 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ markdown_extensions:
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite # highlight inline code blocks
- pymdownx.arithmatex:
generic: true


# plugins
Expand Down Expand Up @@ -209,8 +211,8 @@ nav:
- Jupyter Notebook Showcase:
- jupyternb/index.md
- Plot NBP time series: jupyternb/check_nbp.ipynb
#- Test page:
# - test/index.md
- Test page:
- test/index.md
- Blog:
- blog/index.md

Expand All @@ -223,3 +225,5 @@ extra_css:

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

0 comments on commit d8d8caa

Please sign in to comment.