[Docs] Fix math rendering in docs (#23676)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
20
docs/mkdocs/javascript/mathjax.js
Normal file
20
docs/mkdocs/javascript/mathjax.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// Enables MathJax rendering
|
||||||
|
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()
|
||||||
|
})
|
@ -129,15 +129,16 @@ markdown_extensions:
|
|||||||
- toc:
|
- toc:
|
||||||
permalink: true
|
permalink: true
|
||||||
# For math rendering
|
# For math rendering
|
||||||
- mdx_math:
|
- pymdownx.arithmatex:
|
||||||
enable_dollar_delimiter: true
|
generic: true
|
||||||
|
|
||||||
extra_css:
|
extra_css:
|
||||||
- mkdocs/stylesheets/extra.css
|
- mkdocs/stylesheets/extra.css
|
||||||
|
|
||||||
extra_javascript:
|
extra_javascript:
|
||||||
- mkdocs/javascript/run_llm_widget.js
|
- mkdocs/javascript/run_llm_widget.js
|
||||||
- https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML
|
- mkdocs/javascript/mathjax.js
|
||||||
|
- https://unpkg.com/mathjax@3.2.2/es5/tex-mml-chtml.js
|
||||||
- mkdocs/javascript/edit_and_feedback.js
|
- mkdocs/javascript/edit_and_feedback.js
|
||||||
- mkdocs/javascript/slack_and_forum.js
|
- mkdocs/javascript/slack_and_forum.js
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ mkdocs-awesome-nav
|
|||||||
mkdocs-glightbox
|
mkdocs-glightbox
|
||||||
mkdocs-git-revision-date-localized-plugin
|
mkdocs-git-revision-date-localized-plugin
|
||||||
mkdocs-minify-plugin
|
mkdocs-minify-plugin
|
||||||
python-markdown-math
|
|
||||||
regex
|
regex
|
||||||
ruff
|
ruff
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user