Skip to content

Commit

Permalink
add math rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoucet committed Jan 9, 2025
1 parent b379cb2 commit 9754520
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions docs/katex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
document.addEventListener("DOMContentLoaded", function () {
renderMathInElement(document.body, {
delimiters: [
{ left: "$$", right: "$$", display: true },
{ left: "$", right: "$", display: false },
{ left: "\\[", right: "\\]", display: true },
{ left: "\\(", right: "\\)", display: false },
],
});
});

2 changes: 1 addition & 1 deletion mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ markdown_extensions:
generic: true

extra_javascript:
- javascripts/katex.js
- docs/katex.js
- https://unpkg.com/katex@0/dist/katex.min.js
- https://unpkg.com/katex@0/dist/contrib/auto-render.min.js

Expand Down

0 comments on commit 9754520

Please sign in to comment.