Skip to content

Fix pdf-standard with KOMA classes under KOMA-Script 3.49.3 - #15154

Merged
cderv merged 2 commits into
mainfrom
fix/nightly-scrartcl-documentmetadata
Oct 22, 2026
Merged

cderv merged 2 commits into
mainfrom
fix/nightly-scrartcl-documentmetadata

Conversation

@cderv

@cderv cderv commented Oct 22, 2026

Copy link
Copy Markdown
Member

KOMA-Script 3.49.3 (on CTAN since 2026-10-19) stops with \DocumentMetadata not supported! in all KOMA classes when \DocumentMetadata is used. Quarto emits \DocumentMetadata when pdf-standard is set, and our default PDF class is scrartcl, so any pdf-standard render 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. When pdf-standard is set, template.tex now 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.latex is 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-standard will 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) with pdf-standard: ua-2, and a doc with documentclass: article, using KOMA-Script 3.49.2 and 3.49.3 (through TEXMFHOME).

  • Without the fix, every doc emitting \DocumentMetadata fails with 3.49.3 and renders with 3.49.2
  • With the fix, every doc renders with both versions, with the same results as 3.49.2 without the fix
  • With 3.49.2, the generated .tex only differs by the new block, and does not change at all without pdf-standard

Fixes #15143

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes
  • updated the appropriate changelog in the PR
  • ensured the present test suite passes
  • added new tests
  • created a separate documentation PR in Quarto's website repo and linked it to this PR
AI-assisted PR
  • AI tool used: Claude Code
  • Codebase grounding: local clone, KOMA-Script sources from CTAN
  • Human review: I have reviewed, tested, and verified the AI-generated content before submitting.

Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.

cderv added 2 commits October 22, 2026 14:01
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
@posit-snyk-bot

posit-snyk-bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv
cderv merged commit ec53d35 into main Oct 22, 2026
52 checks passed
@cderv
cderv deleted the fix/nightly-scrartcl-documentmetadata branch October 22, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pdf-standard with LaTeX fails with KOMA-Script 3.49.3: \DocumentMetadata not supported!

2 participants