-
Notifications
You must be signed in to change notification settings - Fork 395
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
4
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 <[email protected]>
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 <[email protected]>
21d0394 to
71ab9c4
Compare
PDF tagging is now only enabled for standards that actually require document structure tagging: - PDF/UA (ua-1, ua-2) - accessibility standards require tagging - PDF/A level "a" (a-2a, a-3a) - "accessible" level requires tagging Standards that don't require tagging no longer enable it: - PDF/A level "b" (a-1b, a-2b, a-3b) - "basic" level - PDF/A level "u" (a-2u, a-3u) - "unicode" level - PDF/A-4, a-4e, a-4f - tagging optional - PDF/X standards - print exchange, no tagging - PDF version only (1.7, 2.0) - version is independent of tagging Also fixes supported standards list: - Removed a-1a (not supported by LaTeX DocumentMetadata) - Added a-4e (supported by LaTeX) Co-Authored-By: Claude Opus 4.5 <[email protected]>
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. |
Closes #13868 Workaround for Pandoc not passing alt text to Typst image() calls. When an image has alt text (from caption or explicit alt attribute), emit raw Typst with image(..., alt: "...") for accessibility. This is a temporary fix until jgm/pandoc#11394 is merged upstream. - Add alt text handling in render_typst_fixups() Image filter - Alt parameter placed second after filename (matches Pandoc PR) - Escape backslashes and quotes in alt text - Add comprehensive test coverage with unique test images - Replace test-image.png with smaller penrose.svg Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 task
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
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.