From dc504e1c8579b6ecb3c106fbbc1c99c3effe0879 Mon Sep 17 00:00:00 2001 From: Samarth Jaiswal Date: Thu, 12 Nov 2026 23:08:02 +0530 Subject: [PATCH] Keep logo: false through fillLogoPaths so Typst drops the brand logo --- news/changelog-1.12.md | 1 + src/core/brand/brand.ts | 4 +++ .../brand/logo/typst-logo-false-format.qmd | 28 +++++++++++++++++++ .../brand/logo/typst-logo-false-top.qmd | 28 +++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 tests/docs/smoke-all/brand/logo/typst-logo-false-format.qmd create mode 100644 tests/docs/smoke-all/brand/logo/typst-logo-false-top.qmd diff --git a/news/changelog-1.12.md b/news/changelog-1.12.md index bfc6660377a..efdf32fe3de 100644 --- a/news/changelog-1.12.md +++ b/news/changelog-1.12.md @@ -54,6 +54,7 @@ All changes included in 1.12: - ([#15168](https://github.com/quarto-dev/quarto-cli/issues/15168)): Fix definitions, examples and exercises being set in italics in Typst output with the default `theorem-appearance: simple`. Their body is now upright, as in LaTeX output, while theorems, lemmas, corollaries, propositions and conjectures keep an italic body. (author: @mcanouil) - ([#15251](https://github.com/quarto-dev/quarto-cli/pull/15251)): Fix algorithm blocks (`#alg-`) being set in italics with `theorem-appearance: simple` and using the colours of theorems with `theorem-appearance: fancy`. They now look like definitions, examples and exercises. (author: @mcanouil) +- ([#15311](https://github.com/quarto-dev/quarto-cli/issues/15311)): Fix `logo: false` not removing the brand logo in Typst output. The rest of the brand still applies. (author: @SAMARTHJAISWAL) - ([#15320](https://github.com/quarto-dev/quarto-cli/pull/15320)): Update to Pandoc's Typst template following Pandoc 3.13 support: - Horizontal rules are full-width, using Typst 0.15's native `divider`. A Typst binary set with `QUARTO_TYPST` must be 0.15 or later. - In a tight definition list, a one-paragraph definition now sits on the same line as its term. diff --git a/src/core/brand/brand.ts b/src/core/brand/brand.ts index 6e1604512ec..cef5d0599e7 100644 --- a/src/core/brand/brand.ts +++ b/src/core/brand/brand.ts @@ -590,6 +590,10 @@ export function fillLogoPaths( } return undefined; } + if (spec === false) { + // keep an explicit `logo: false` so `resolveLogo()` can disable the logo + return false; + } if (!spec) { return undefined; } diff --git a/tests/docs/smoke-all/brand/logo/typst-logo-false-format.qmd b/tests/docs/smoke-all/brand/logo/typst-logo-false-format.qmd new file mode 100644 index 00000000000..8806bf3d0af --- /dev/null +++ b/tests/docs/smoke-all/brand/logo/typst-logo-false-format.qmd @@ -0,0 +1,28 @@ +--- +title: Typst with logo false (format level) +format: + typst: + output-ext: typ + logo: false +brand: + color: + primary: "#1f6f8b" + logo: + images: + quarto: + path: quarto.png + alt: quarto logo + small: quarto +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'primary: rgb\("#1f6f8b"\)' + - + - 'set page\(background' + - 'image\("[^"]*quarto\.png"' +--- + +`logo: false` removes the brand logo in Typst output, while the rest of the +brand still applies (#15311). diff --git a/tests/docs/smoke-all/brand/logo/typst-logo-false-top.qmd b/tests/docs/smoke-all/brand/logo/typst-logo-false-top.qmd new file mode 100644 index 00000000000..0d9fdc78ede --- /dev/null +++ b/tests/docs/smoke-all/brand/logo/typst-logo-false-top.qmd @@ -0,0 +1,28 @@ +--- +title: Typst with logo false (top level) +format: + typst: + output-ext: typ +logo: false +brand: + color: + primary: "#1f6f8b" + logo: + images: + quarto: + path: quarto.png + alt: quarto logo + small: quarto +_quarto: + tests: + typst: + ensureTypstFileRegexMatches: + - + - 'primary: rgb\("#1f6f8b"\)' + - + - 'set page\(background' + - 'image\("[^"]*quarto\.png"' +--- + +`logo: false` removes the brand logo in Typst output, while the rest of the +brand still applies (#15311).