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

オープン
#15,234 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript, latex
領域
build-system

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
JavaScript
スター
6.1k
フォーク
478
平均マージ
17時間 7分
マージ済み PR(30日)
112

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

quarto-dev/quarto-cli のほかの issue

quarto-dev/quarto-cli の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。