Improve pdf styling#50
Draft
robredpath wants to merge 8 commits into
Draft
Conversation
robredpath
force-pushed
the
improve-pdf-styling
branch
from
July 13, 2026 15:03
39d115c to
17102df
Compare
robredpath
force-pushed
the
improve-pdf-styling
branch
from
July 14, 2026 14:07
17102df to
786620e
Compare
Contributor
Author
|
This is what the produced PDF looks like. @emmajclegg - any feedback on how the PDF looks? The code works, and I've refined a bit over running it a few times. I've only tested it in the devcontainer build. I had Claude write me a primer for LaTeX styling; I've read that and checked it in. I've not verified every detail, but it seems to track with what's in the document code. I don't like how this solution currently checks in fonts and styling choices from the design system that may change. I'd like to explore if we can pull more of that stuff in at build time, maybe version-control it with the design system itself. cc @IATI/devs for awareness |
Sphinx's LaTeX builder only accepts PDF/PNG/JPEG images, so SVGs referenced in docs were silently dropped from PDF downloads while PNG/JPEG rendered fine. Register sphinxcontrib.rsvgconverter in the theme's setup() so SVGs are converted to PDF (as vectors, via rsvg-convert) during the LaTeX build. This applies to every consumer site automatically, alongside the existing config-inited LaTeX wiring - the converter is inert for HTML and importing it can never break HTML builds. Add the converter as a theme dependency, and install librsvg2-bin (which provides rsvg-convert) in the Read the Docs and devcontainer build environments. Add a vector SVG to the kitchen-sink docs to exercise the conversion in the PDF build. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The kitchen-sink pages are copied in from sphinx-themes.org and may be regenerated, which would drop anything added to them. Move the SVG example that exercises SVG-to-PDF conversion into the theme's own docs: a new examples/images page, with the asset in docs/_static (matching the videos example). Restores docs/kitchen-sink/images.rst to its pristine vendored form. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The previous commit wired package.json's build to run this script but never committed the file itself, so CI failed with MODULE_NOT_FOUND. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.