Overview of Math-rendering audit tools
devThe math-rendering audit tools consist of three scripts designed to detect LaTeX leakage in rendered HTML and PDF outputs. These tools ensure that LaTeX syntax is correctly handled by MathJax or contained within code blocks, rather than appearing as raw text in the final rendered document.
Note: All scripts must be run from the repo root.
Available Scripts
| Script | Purpose |
|---|---|
audit_math_rendering.py | Builds each chapter's HTML via binder and scans the rendered output for raw LaTeX leakage outside MathJax/code zones. |
audit_math_pdf.py | Builds per-chapter PDFs, extracts text via pdftotext, renders pages to PNG via pdftoppm for visual spot-checking, and applies the same leak detector to the extracted text. |
audit_pdf_spot_check.py | Scans the PDFs produced by audit_math_pdf.py for known fix sites (regex map maintained in the script) and emits a markdown manifest pointing to the exact page numbers / PNGs to inspect. |