Fix running header chapter prefix when lang is non-English#3
Merged
Conversation
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
Draft
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When rendering a Typst book with
lang:set to a non-English locale, the running header keeps the EnglishChapter N.prefix instead of the locale's word (e.g.Chapitre N.forlang: fr).The
book()function exposes asupplement-chapterparameter that drives the running header via ashow headingrule, buttypst-show.typwas not forwarding Quarto's localized chapter prefix variable.The line is gated on the template variable being defined, so the default English
Chaptersupplied bybook()'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