[doc] Work around delayed math rendering
With MathJax 2 math rendering is delayed by a couple of seconds in many
page loads (I wasn't able to determine what exactly triggered the
behavior). The console shows
```
Uncaught DOMException: Node.removeChild: The node to be removed is not a child of this node MathJax.js:19
c https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-AMS-MML_HTMLorMML:19
```
(This error message is from Firefox, but Chrome shows the same
behavior and a similar error message.)
I wasn't able to determine the root cause for this behavior, but
switching to MathJax 3 (a complete rewrite) fixes the problem, so I went
with that.
Signed-off-by: Philipp Wagner <phw@lowrisc.org>
diff --git a/site/docs/layouts/partials/footer.html b/site/docs/layouts/partials/footer.html
index 6b8d6a3..14fa434 100644
--- a/site/docs/layouts/partials/footer.html
+++ b/site/docs/layouts/partials/footer.html
@@ -44,8 +44,7 @@
Policy</a>.</p>
</footer>
-<script type="text/javascript"
- src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+<script type="text/javascript" id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/2.1.2/skins/default.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/2.1.2/wavedrom.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/10.0.0/markdown-it.min.js"></script>