Fix LaTeX in Docs
This MR modifies the CI build and the sphinx-docs configuration to fix latex rendering issues, as visible on this production docs page
Merge request reports
Activity
The latex content in the source files (markdown) seems to get correctly parsed into html elements with class
math
:<p>The probabilities are factored in the following way:</p> <div class="math"> <p><span class="math">P(\\vec{\\rho}, \\vec{t}, \\vec{\phi}, \\vec{O} | \\vec{D_H}, s)...</span></p>
added 1 commit
- 44f39a17 - add math on first page to ensure mathjax is loaded by sphinx automatically
Noticed that mathjax javascript seems to be missing from docs pages (not in header). For comparison, another sphinx-built site that has properly rendering latex has the following script header
<script defer="defer" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
Found a bug report that indicates our version of sphinx may only check rst files for a
math
directive, then decide about includingmathjax
or not, and finally let other renderers play (likemyst_parser
, which we use for all pages in other projects but use a mix in gstlal of markdown and rst).Testing this now by including a minimal math directive on the homepage.
Edited by James Kennington