Repository navigation
Commit 0fa514a
fix: Re-typeset MathJax equations after instant navigation
The theme enables navigation.instant, which swaps page content via
client-side fetch instead of a full page load. MathJax's default
startup only typesets once on initial load, so pymdownx.arithmatex
equations on any page reached via instant navigation stayed as raw
LaTeX source instead of rendering.
Add docs/javascripts/mathjax.js, which configures MathJax's tex
delimiters/options to match arithmatex's generic mode and subscribes
to document$ (mkdocs-material's instant-navigation event) to clear
and re-typeset MathJax on every page swap, per mkdocs-material's
documented MathJax + instant navigation setup. Load it before the
polyfill/MathJax CDN scripts in extra_javascript.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent d2525a7 commit 0fa514a
2 files changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
0 commit comments