Skip to content

Resolve "PDF doesnt render math"

Dan Visel requested to merge 860-math-in-pagedjs into main

Math now goes through to PDFs (#860 (closed)). What this does:

  • transforms <math-inline> and <math-display> to <span class="math inline"> and <p><span class="math display">
  • adds $ and $$ inside of those tags to trigger math conversion
  • loads MathJax script remotely.

I put in code for using the MathJax script locally; however, this doesn't work very well because it's also expecting to get fonts from the same place. I have left that code in commented out in case this breaks PDF rendering for Amnet (like Google Fonts did); but it seems fine on my testing, and I haven't been able to break it.

Edited by Dan Visel

Merge request reports