-
Notifications
You must be signed in to change notification settings - Fork 394
feature: cross-format pdf-standard selection
#13857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gordonwoodhull
wants to merge
2
commits into
deps/pandoc-2025-08
Choose a base branch
from
feature/pdf-standard
base: deps/pandoc-2025-08
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
mcanouil
reviewed
Jan 8, 2026
Collaborator
|
Following our meeting discussion, related issues on pdf accessibility |
77f8c0c to
21d0394
Compare
New `pdf-standard` option for LaTeX and Typst PDF output that supports: - PDF versions: 1.4, 1.5, 1.6, 1.7, 2.0 - PDF/A standards: a-1b, a-2a, a-2b, a-2u, a-3a, a-3b, a-3u, a-4, a-4f - PDF/UA standards: ua-1, ua-2 (LaTeX only) - PDF/X standards: x-4, x-4p, x-5g, x-5n, x-5pg, x-6, x-6n, x-6p (LaTeX only) Standards can be combined, e.g., `pdf-standard: [a-2b, ua-1]` for accessible archival PDF. Uses LaTeX's \DocumentMetadata API with `tagging=on` for tagged PDF support. Auto-installs required LaTeX packages (latex-lab, colorprofiles) when missing. Closes #4426 Closes #13782 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Preserve markdown image captions and fig-alt attributes as alt text
for \includegraphics[alt={...}] in LaTeX output. This enables PDF/UA
compliance by ensuring alt text is embedded in the PDF.
The fix preserves image captions as the alt attribute before clearing
them for figure handling. Also propagates fig-alt from FloatRefTarget
to Image elements for LaTeX output.
Closes #13248
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
21d0394 to
71ab9c4
Compare
Contributor
Author
|
Clarification: LaTeX does not do compliance validation; that's why it only produces warnings. We'd have to integrate something like veraPDF to actually validate LaTeX PDFs. Compliance validation is integrated for Typst. |
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.
To be merged after #13249
Fixes #4426
Also includes a fix for #13248 in a separate commit for alt text from captions for PDF images not being passed through to Pandoc. The Typst side is more complicated since Pandoc does not support this yet.
Adds basic support in Typst and LaTeX for PDF standard selection.
PDF versions and standards can be independently specified, so this takes a list. Version specifies the output format; standard specified what validation is applied to the output.
Here are the rules: you can combine standards from different families:
The constraint is you can only have one from each category:
It would be equally valid to take
pdf-versionandpdf-standardas separate options, as LaTeX does, but I chose to follow Typst here and use one option for both.Once the options have been validated, these go to the command line
--pdf-standardfor Typst, new\DocumentMetadata{}command for PDF.The metadata includes
tagging=onfor any standard in LaTeX.Auto-installs required LaTeX packages (latex-lab, colorprofiles) when missing.
This includes a test which will fail UA-1 in Typst and warn in LaTeX; these warnings are surfaced from the LaTeX log.