Skip to content

use mathjax to make PDFs

Dan Visel requested to merge 910-mathjax-svgs-part-ii into main

This is for #910 (closed) – if there's an inline equation or a display equation, the LaTeX is sent to MathJax, which sends back SVG. We make a filename for the SVG and save it; inside JATS, we put a link to the graphic as an alternative. So HTML that looks like this:

<math-inline class="math-node">x^2 + y^2 = z^2</math-inline>

turns into this:

<inline-formula>
  <alternatives>
    <inline-graphic xlink:href="images/inlineformula_0.svg"/>
    <tex-math><!--[CDATA[x^2 + y^2 = z^2]]--></tex-math>
  </alternatives>
</inline-formula>

Merge request reports