Skip to content

Commit

Permalink
update: add latex support (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
CubeSugarCheese authored Jun 26, 2024
1 parent 40b211c commit 6f835d6
Show file tree
Hide file tree
Showing 2 changed files with 23 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()
})
4 changes: 4 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ theme:

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

repo_url: https://github.com/west2-online/fzu-run
repo_name: west2-online/fzu-run
Expand All @@ -141,3 +143,5 @@ markdown_extensions:
- pymdownx.keys
- pymdownx.mark
- pymdownx.tilde
- pymdownx.arithmatex:
generic: true

0 comments on commit 6f835d6

Please sign in to comment.