Skip to content

Verify UA-2 unlabeled captioned figure tagging now passes verapdf with updated tagpdf/luamml #14570

@cderv

Description

@cderv

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).

https://github.com/quarto-dev/quarto-cli/blob/4127c2685136d07fec1a3f9b915707c2c65bd4ea/tests/docs/smoke-all/pdf-standard/ua2-unlabeled-figure-caption.qmd

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/luamml now 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 4127c26).

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions