Repository navigation
Fix pdf-standard with KOMA classes under KOMA-Script 3.49.3 - #15154
Merged
Merged
Conversation
KOMA-Script 3.49.3 turned the 3.49.2 warning about \DocumentMetadata into a fatal error for every KOMA class (scrartcl, scrreprt, scrbook) that has no tagging support file. Quarto emits \DocumentMetadata whenever pdf-standard is set and defaults to scrartcl, so every pdf-standard PDF render fails once TeX Live ships the new KOMA-Script. KOMA documents \komascript_documentmetadata_test: as the hook packages and wrapper classes define before loading the class to replace this check. Defining it as a no-op right after \DocumentMetadata restores the 3.49.2 behaviour, i.e. what 1.9 and 1.10 produced, with no change in class or layout. The cs_if_exist guard keeps an existing definition. Non-KOMA classes never read the macro. Known tradeoff: this bypasses a deliberate KOMA check, and KOMA classes still do not tag sectioning commands (#14422); that is addressed separately. KOMA calls the hook provisional, so a later release may need a different approach. Fixes #15143
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
2 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
KOMA-Script 3.49.3 (on CTAN since 2026-10-19) stops with
\DocumentMetadata not supported!in all KOMA classes when\DocumentMetadatais used. Quarto emits\DocumentMetadatawhenpdf-standardis set, and our default PDF class isscrartcl, so anypdf-standardrender to PDF fails as soon as TeX Live is updated. This is what turned our nightly smoke tests red; details in #15143.Fix
KOMA defines its check
\komascript_documentmetadata_test:only if the macro does not already exist. Its source documents this as the way for packages and wrapper classes to replace the test before loading the class. Whenpdf-standardis set,template.texnow defines it as a no-op right after\DocumentMetadata. This gives back the 3.49.2 behaviour: same class, same layout, same output as with Quarto 1.9 and 1.10. Non-KOMA classes never read this macro.document-metadata.latexis not modified, so it stays identical to Pandoc's partial.This bypasses a check KOMA added on purpose. KOMA classes still don't tag sectioning commands (#14422), so the tagged PDF has the same structure issues as before this KOMA release. Proper tagging with
pdf-standardwill be handled separately for 1.11. KOMA describes the hook as provisional, so a later KOMA release may need another approach.A backport to v1.10 will follow in a separate PR once this is merged.
Test plan
Rendered locally all LaTeX docs in
tests/docs/smoke-all/pdf-standard/,tests/docs/render/pdf-standard-env.qmd, a book project (scrreprt) withpdf-standard: ua-2, and a doc withdocumentclass: article, using KOMA-Script 3.49.2 and 3.49.3 (throughTEXMFHOME).\DocumentMetadatafails with 3.49.3 and renders with 3.49.2.texonly differs by the new block, and does not change at all withoutpdf-standardFixes #15143
Checklist
I have (if applicable):
AI-assisted PR
Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.