Skip to content

Commit

Permalink
Merge pull request #74 from mirpedrol/docs-formula
Browse files Browse the repository at this point in the history
replace katex bymathjax to fix rendering formula
  • Loading branch information
mirpedrol authored Dec 21, 2023
2 parents f43412e + f7cbcf9 commit 492e02c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
10 changes: 0 additions & 10 deletions docs/javascripts/katex.js

This file was deleted.

16 changes: 16 additions & 0 deletions docs/javascripts/mathjax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
window.MathJax = {
tex: {
inlineMath: [["\\(", "\\)"]],
displayMath: [["\\[", "\\]"]],
processEscapes: true,
processEnvironments: true
},
options: {
ignoreHtmlClass: ".*|",
processHtmlClass: "arithmatex"
}
};

document$.subscribe(() => {
MathJax.typesetPromise()
})
11 changes: 5 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,9 @@ theme:
- toc.follow

extra_javascript:
- javascripts/katex.js
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.js
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/contrib/auto-render.min.js

extra_css:
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.css
- javascripts/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

markdown_extensions:
- admonition
Expand All @@ -74,6 +71,8 @@ markdown_extensions:
- pymdownx.details
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.arithmatex:
generic: true

plugins:
- search
Expand Down

0 comments on commit 492e02c

Please sign in to comment.