pdf-standard: use pdfmanagement and \SetKeys instead of \DocumentMetadata for standards that don't require tagging

Aperta
#15,234 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, latex
Ambito
build-system

Direzione di ricerca

Start with src/resources/formats/pdf/pandoc/document-metadata.latex and the PDF format logic in src/format/pdf/format-pdf.ts; compare how each standard is handled and read the linked Pandoc discussion and issue. Determine how to use pdfmanagement and \SetKeys for standards that do not require tagging while retaining \DocumentMetadata for standards that do. Check whether the workaround from #15154 is still needed; done means non-tagging standards avoid KOMA's check without producing untagged PDFs that claim PDF/UA.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug latex

When pdf-standard is set, Quarto emits \DocumentMetadata for every standard, including the ones that don't require tagging (PDF/A b and u levels, PDF/A-4, PDF/X).

https://github.com/quarto-dev/quarto-cli/blob/32dc3b49833a9d3dce989ba782bda58474435a62/src/resources/formats/pdf/pandoc/document-metadata.latex#L5-L20

\DocumentMetadata is what KOMA-Script 3.49.3 refuses in all its classes (\DocumentMetadata not supported!, #15143). #15154 restores the previous behavior by overriding KOMA's check, but this is a workaround on a hook KOMA marks as temporary.

For standards that don't need tagging, the LaTeX team documents another route: load pdfmanagement and set the metadata with \SetKeys[document/metadata]{...} before \documentclass. See documentmetadata-support-doc.pdf.

\RequirePackage{pdfmanagement}
\SetKeys[document/metadata]{
  pdfversion=1.7,
  pdfstandard={a-2b},
  lang=en,
  xmp=true}
\documentclass{scrartcl}

This doesn't trigger KOMA's \DocumentMetadata check, so KOMA classes would keep working for those standards without the hook.

Standards that require tagging (a-2a, a-3a, ua-1, ua-2) still need \DocumentMetadata{... tagging=on}. \SetKeys has no tagging key, and with pdfstandard=ua-2 it produces an untagged PDF that claims PDF/UA.

https://github.com/quarto-dev/quarto-cli/blob/32dc3b49833a9d3dce989ba782bda58474435a62/src/format/pdf/format-pdf.ts#L1317-L1322

Things to decide:

  • Our document-metadata.latex partial is identical to Pandoc's. We could change it here, or contribute it to Pandoc first and pick it up with a Pandoc update. jgm/pandoc#11421 tracks refining this upstream, and the jgm/pandoc#11407 discussion has the plan for it (gate on \IfFormatAtLeastTF{2025-11-01}, as older kernels did not force tagging code with \DocumentMetadata).
  • Whether the hook from #15154 is still needed for non-tagging standards once this is done.

Related: #14422 for the tagging side with the KOMA default class.

Lingua principale
JavaScript
Stelle
6.1k
Fork
478
Merge medio
17h 26m
PR unite (30g)
126

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di quarto-dev/quarto-cli

Tutte le issue di quarto-dev/quarto-cli

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.