Skip to content

Commit

Permalink
add math support
Browse files Browse the repository at this point in the history
  • Loading branch information
hyandt committed Oct 3, 2024
1 parent cb0e577 commit 6b7a5d8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/javascripts/mathjax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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()
})

5 changes: 5 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ theme:
markdown_extensions:
- toc:
permalink: "#"
- pymdownx.arithmatex:
generic: true
- admonition
- attr_list
- meta
Expand All @@ -204,6 +206,9 @@ extra:
property: UA-189117140-2
extra_css:
- stylesheets/extra.css
extra_javascript:
- javascripts/mathjax.js
- https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js
site_name: NREL HPC
repo_url: https://github.com/NREL/HPC/tree/gh-pages
repo_name: NREL/HPC

0 comments on commit 6b7a5d8

Please sign in to comment.