Skip to content

Fix running header chapter prefix when lang is non-English#3

Merged
cderv merged 1 commit into
mainfrom
fix/localize-running-header
May 19, 2026
Merged

Fix running header chapter prefix when lang is non-English#3
cderv merged 1 commit into
mainfrom
fix/localize-running-header

Conversation

@cderv
Copy link
Copy Markdown
Contributor

@cderv cderv commented May 19, 2026

When rendering a Typst book with lang: set to a non-English locale, the running header keeps the English Chapter N. prefix instead of the locale's word (e.g. Chapitre N. for lang: fr).

The book() function exposes a supplement-chapter parameter that drives the running header via a show heading rule, but typst-show.typ was not forwarding Quarto's localized chapter prefix variable.

The line is gated on the template variable being defined, so the default English Chapter supplied by book()'s own default applies when the variable is unset (e.g., Quarto versions that do not yet surface this metadata, or non-Quarto consumers of the template).

Refs quarto-dev/quarto-cli#14524

The book() function exposes a supplement-chapter parameter that drives
the running header via a show heading rule. typst-show.typ did not
forward Quarto's localized chapter prefix variable, so the header
showed the default English "Chapter N." regardless of lang:.

The line is gated on the template variable being defined, so the
default English "Chapter" supplied by book()'s own default applies
when the variable is unset (e.g., Quarto versions that do not yet
surface this metadata, or non-Quarto consumers of the template).

Refs quarto-dev/quarto-cli#14524
@cderv cderv merged commit b11e504 into main May 19, 2026
@cderv cderv deleted the fix/localize-running-header branch May 19, 2026 10:58
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.

1 participant