Replace fig-pos [H] with [h] when PDF tagging is active#14165
Closed
gordonwoodhull wants to merge 1 commit intomainfrom
Closed
Replace fig-pos [H] with [h] when PDF tagging is active#14165gordonwoodhull wants to merge 1 commit intomainfrom
gordonwoodhull wants to merge 1 commit intomainfrom
Conversation
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. |
The [H] placement specifier (from LaTeX's float package) breaks
lualatex's PDF tag structure, causing /Caption and /Figure to appear
as direct children of /Document instead of being properly nested.
Standard [h] ("place here") is the closest equivalent without the
float package's incompatible reimplementation.
When pdf-standard requires tagging (e.g. ua-2), all automatic [H]
injections are replaced with [h] across the filter pipeline:
- quarto-pre/figures.lua (execution engine fig-pos defaults)
- quarto-post/latex.lua (panel layouts and star environments)
- layout/pandoc3_figure.lua (unlabeled figures)
Fixes #14164
316e9a7 to
c54f70e
Compare
Contributor
Author
|
This is apparently not the way - there are hooks that can be set in order to make the EDIT: Further research shows that no, there are no such hooks for |
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.
Summary
pdf-standard: ua-2is set[H]float placement with[h]when PDF tagging is active, across all filter pipeline locationsDetails
The
[H]specifier (from LaTeX'sfloatpackage) redefines the figure environment in a way that breaks lualatex's PDF tagging system —/Captionand/Figureend up as direct children of/Documentinstead of being properly nested. This causes verapdf to report<Document> shall not contain <Caption>.Multiple code paths inject
[H]: knitr/Jupyter execution engines (for echoed code chunks),pandoc3_figure.lua(for non-cross-referenceable figures), andquarto-post/latex.lua(for panel layouts). Cross-referenceable static images were unaffected only because they happen not to get[H]— the LaTeX output is structurally identical in all cases.Empirical testing of placement specifiers with
pdf-standard: ua-2:[h][htbp][H]<Document> shall not contain <Caption>Only
[H](from thefloatpackage) breaks tagging. All standard LaTeX specifiers work correctly.[h]is the closest semantic equivalent to[H]("place here") without thefloatpackage's incompatible reimplementation.Upstream: latex3/tagging-project#890
Changes
Test plan
Fixes #14164