Typst: logo from _brand.yml is drawn on every page and logo: false does not remove it
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript, yaml
- Área
- backend
Línea de trabajo
Empieza en src/core/brand/brand.ts, en fillLogoPaths(), y sigue cómo llega su resultado a resolveLogo() desde src/format/typst/format-typst.ts. Comprueba el tratamiento existente de logo: false y el fondo de página de Typst en src/resources/formats/typst/pandoc/quarto/page.typ. Se considerará terminado cuando el renderizado con un logotipo de marca omita el logotipo al usar logo: false y conserve los colores y las fuentes de la marca.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug description
When _brand.yml defines a logo, Typst output puts it in the page background of every page, and logo: false does not remove it, neither as a typst format option nor at the top level of the front matter.
revealjs honors logo: false with the same _brand.yml, and websites and books document it for navbar and sidebar (https://prerelease.quarto.org/docs/authoring/brand.html#disabling-the-logo).
For Typst, the only document-level switch I found is brand: false, which also drops the brand colors and fonts.
Steps to reproduce
_brand.yml
logo:
images:
mark:
path: logo.svg
alt: Logo
small: mark
logo.svg
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect width="100" height="100" fill="#d33"/></svg>
doc.qmd
---
title: Logo test
format:
typst:
logo: false
---
First page paragraph.
{{< pagebreak >}}
Second page paragraph.
quarto render doc.qmd -M keep-typ:true
grep "set page(background" doc.typ
Same result with logo: false at the top level instead of under typst, and without logo at all.
Actual behavior
doc.typ always contains
#set page(background: align(left+top, box(inset: 0.75in, image("/logo.svg", width: 1.5in, alt: "Logo"))))
and the red square is drawn on both pages of the PDF.
Expected behavior
logo: false removes the logo in Typst output, while the rest of _brand.yml still applies.
Cause
The Typst format passes the document logo through fillLogoPaths() before resolveLogo():
resolveLogo() handles false since #13922 (for navbar and sidebar):
but fillLogoPaths() turns any falsy value into undefined first:
So resolveLogo() receives undefined and falls back to the first brand logo of small, medium, large, which the page.typ partial then sets as page background:
We could let false pass through fillLogoPaths() unchanged so the existing check in resolveLogo() applies.
Workaround
A Typst file in include-in-header that wraps article() and resets the background before any content:
#let quarto-article = article
#let article(..args) = {
set page(background: none)
quarto-article(..args)
}
format:
typst:
include-in-header: no-logo.typ
It resets any other page background too. A plain #set page(background: none) in include-before-body comes after the title block and adds an extra page.
Your environment
- Quarto 1.12.0 (prerelease), also 1.11.9
- Windows 11
- Lenguaje dominante
- JavaScript
- Estrellas
- 6.1k
- Forks
- 478
- Merge medio
- 17 h 58 min
- PR fusionados (30 d)
- 135
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de quarto-dev/quarto-cli
-
accessibility bug embed
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
quarto-dev/quarto-cli#15306 ·
Los mantenedores suelen responder en 1 día
-
bootstrap bug themes
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
quarto-dev/quarto-cli#15304 ·
Los mantenedores suelen responder en 1 día
-
accessibility bug code-blocks html themes
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quarto-dev/quarto-cli#15303 ·
Los mantenedores suelen responder en 1 día
-
accessibility brand bug dark-mode
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
quarto-dev/quarto-cli#15301 ·
Los mantenedores suelen responder en 1 día
-
bootstrap bug html tables
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
quarto-dev/quarto-cli#15300 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de quarto-dev/quarto-cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Add: ON Football HD feed LogoAbiertoapproved check:passed logos:add
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
binding:python bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
BUG: Unhandled TypeError in updateMedicine and updateDischargeLog when data is null/undefinedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
AOSSIE-Org/BabyNest#310 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug needs-triage potential-regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
aws/aws-sdk-js-v3#8408 ·
Los mantenedores suelen responder en 1 día