quarto-dev / quarto-dev/quarto-cli
Verify UA-2 unlabeled captioned figure tagging now passes verapdf with updated tagpdf/luamml
@cderv is already working on this.
Since Jun 3, 2026.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
The smoke test docs/smoke-all/pdf-standard/ua2-unlabeled-figure-caption.qmd was added to document a known LaTeX/tagpdf limitation: an unlabeled captioned figure goes through pandoc3_figure.lua and produces a bare \begin{figure}[H], so tagpdf places <Caption> as a sibling of <Figure> under <Document> instead of nesting them in a grouping element. That violates UA-2, which requires <Caption> to be a child of <Figure>, <Table>, or <Formula>. The test asserted that verapdf would fail UA-2 validation (it expected the PDF validation failed for ua-2 warning).
On CI with TeX Live 2026, the run installs newer tagpdf, luatexbase, selnolig, and luamml, and verapdf now returns PASSED for the same document. The negative assertion no longer holds, so the test fails because the expected warning is never emitted:
[verapdf]: Validating ua2-unlabeled-figure-caption.pdf against PDF/UA2...
PASSED
...
Missing WARN /PDF validation failed for ua-2/
I've flipped the smoke test to a positive assertion (verifying the failure warning does not appear) so CI is unblocked. But that change records the new behavior without confirming why it changed. Two possibilities:
- The updated
tagpdf/luammlnow produce a valid structure tree for unlabeled captioned figures (the limitation is genuinely fixed upstream). - verapdf's UA-2 checks changed and the structure is still technically non-conforming but no longer flagged.
We could verify which by dumping the tagged structure tree from the generated PDF and confirming <Caption> is now nested inside a grouping element under <Figure> rather than sitting as a sibling under <Document>. If the structure is genuinely correct, the documenting comment and the FloatRefTarget vs. pandoc3_figure.lua discussion in the test can be retired; if it's only verapdf leniency, we'd want to keep tracking the underlying nesting issue.
Related: #14103, #14164. The test was introduced in #14142's follow-up work (commit 4127c2685136d07fec1a3f9b915707c2c65bd4ea).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.