From d3f01172943a20af4b0dc4cfe3dbede82c9dea8d Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 22 Oct 2026 14:01:27 +0200 Subject: [PATCH 1/2] Keep KOMA classes working with pdf-standard under KOMA-Script 3.49.3 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 (cherry picked from commit 03c9314b0e66fac24b776da579ac0a786cbadfd5) --- src/resources/formats/pdf/pandoc/template.tex | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/resources/formats/pdf/pandoc/template.tex b/src/resources/formats/pdf/pandoc/template.tex index 5ce3e586c35..00ba246571a 100644 --- a/src/resources/formats/pdf/pandoc/template.tex +++ b/src/resources/formats/pdf/pandoc/template.tex @@ -1,4 +1,12 @@ $document-metadata.latex()$ +$if(pdfstandard)$ +$-- KOMA-Script 3.49.3 aborts on \DocumentMetadata unless \komascript_documentmetadata_test: exists; +$-- a no-op keeps the 3.49.2 behaviour (#15143). The guard keeps a definition made earlier. +\ExplSyntaxOn +\cs_if_exist:NF \komascript_documentmetadata_test: + { \cs_new:Npn \komascript_documentmetadata_test: { } } +\ExplSyntaxOff +$endif$ % Options for packages loaded elsewhere $passoptions.latex()$ % From f274e0a375d35f03c2e788e3cf9c4218b17f8b7a Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 22 Oct 2026 14:59:19 +0200 Subject: [PATCH 2/2] Add changelog entry for #15143 backport --- news/changelog-1.10.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/news/changelog-1.10.md b/news/changelog-1.10.md index c2fcee0b8b8..9a0536b6955 100644 --- a/news/changelog-1.10.md +++ b/news/changelog-1.10.md @@ -2,6 +2,8 @@ ## In this release +- ([#15143](https://github.com/quarto-dev/quarto-cli/issues/15143)): Fix PDF rendering with `pdf-standard` failing with `\DocumentMetadata not supported!` after updating to KOMA-Script 3.49.3, which provides the default document classes. + ## In previous releases - ([#14920](https://github.com/quarto-dev/quarto-cli/issues/14920)): Correct the Windows ARM diagnostic for x64 R crashes with stable native ARM64 R installation guidance, including reinstalling packages and configuring `QUARTO_R`.