Skip to content

Fix PDF math, diagram labels, and page layout - #91

Open
yuval-block wants to merge 1 commit into
pdffrom
codex/pdf-rendering-fixes
Open

yuval-block wants to merge 1 commit into
pdffrom
codex/pdf-rendering-fixes

Conversation

@yuval-block

@yuval-block yuval-block commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Several fixes for PDF rendering issues that were uncovered by merging with draft branch:

  • Use XeLaTeX with native dollar-delimited math and a font for the 🤖 markers. Keep HTML math preprocessing out of the PDF pipeline.
  • Render Mermaid labels as SVG text, preserving spaces and decoding label entities.
  • Repair table headers and column widths, convert saved notebook HTML tables, and wrap long field identifiers.
  • Apply smaller, wrapping code listings throughout the book. Stack consecutive plots and leave paragraph space around tall images to prevent overflow and runaway pagination.

Use XeLaTeX with native dollar-delimited math and an explicit font for draft markers. Keep KaTeX and Graphviz Markdown rewriting in the HTML pipeline so TeX expressions reach the PDF renderer intact.

Render PDF diagrams with native SVG labels, preserving text spacing and decoding label entities. Wrap code and table identifiers, repair split BIP headers, and reserve paragraph space around tall images so the page builder can place them.

Convert saved notebook HTML tables before rendering, retain the index column, and use a smaller font for all PDF code listings. Stack consecutive plots so each image is bounded to the page.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants