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

Đang mở
#15,234 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, latex
Lĩnh vực
build-system

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
JavaScript
Star
6.1k
Fork
478
Merge trung bình
17 giờ 36 phút
Pull request đã merge (30 ngày)
139

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của quarto-dev/quarto-cli

Tất cả issue của quarto-dev/quarto-cli

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.