Skip to content

Mathjax before pagedjs

Dan Visel requested to merge mathjax-before-pagedjs into main

What this change does is to fire MathJax on any math in the document, replacing math with inline SVGs; this is a reworking of existing code that was used to generate SVGs for JATS generation. That's then sent to PagedJS. This means that we don't run into the issue of the MathJax script not finishing before PagedJS lays everything out.

This also runs on any manuscript that has math that can be downloaded via the GraphQL interface: if there's a call for manuscript.styledHtml, the HTML from Wax is run through the same template that's used to make a PDF, which means that any MathJax will be replaced with inline SVGs.

One side effect of this is that our MathJax should be consistent across platforms because it's being generated the same way.

Merge request reports