Skip to content

Commit

Permalink
Remove polyfill.io (#417) (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidWalz authored Jul 15, 2024
1 parent bc75560 commit 5c88d2a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 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()
})
5 changes: 3 additions & 2 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ plugins:
- mike:

markdown_extensions:
# https://squidfunk.github.io/mkdocs-material/reference/math/?h=math#mathjax
- pymdownx.arithmatex:
generic: true
- pymdownx.superfences
Expand All @@ -63,8 +64,8 @@ markdown_extensions:
- admonition

extra_javascript:
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
- javascripts/mathjax.js
- https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js

extra:
version:
Expand Down

0 comments on commit 5c88d2a

Please sign in to comment.