Skip to content

Commit

Permalink
fix: mathjax support
Browse files Browse the repository at this point in the history
  • Loading branch information
aalexmmaldonado committed Nov 19, 2024
1 parent 1d679d3 commit c63a56e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 5 additions & 1 deletion docs/.overrides/main.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{% extends "base.html" %}

{% block content %}
{% block header %}
{{ super() }}
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
{% endblock %}

{% block content %}
{{ super() }}
{% endblock content %}
4 changes: 2 additions & 2 deletions docs/js/mathjax.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
window.MathJax = {
tex: {
inlineMath: [["\\(", "\\)"]],
displayMath: [["\\[", "\\]"]],
inlineMath: [["$", "$"]],
displayMath: [["$$", "$$"]],
processEscapes: true,
processEnvironments: true
},
Expand Down
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ extra_css:

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

markdown_extensions:
- abbr
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ bump-my-version = ">=0.27.0,<0.28"
[tool.pixi.tasks]
docs = { cmd = ["mkdocs", "build", "-d", "public/", "--clean"] }
docs-cache = { cmd = ["mkdocs", "build", "-d", "public/"] }
serve = { cmd = ["mkdocs", "serve", "-a", "localhost:29847", "--open", "--dirty"] }
serve = { cmd = ["mkdocs", "serve", "-a", "localhost:29847", "--dirty"] }

0 comments on commit c63a56e

Please sign in to comment.