For a Typst book project with lang: set to a non-English locale, the running header on chapter pages keeps the English Chapter N. prefix instead of the locale's word (e.g. Chapitre N. for lang: fr).
Minimal reproduction:
# _quarto.yml
project:
type: book
book:
title: "Livre Test"
author: "Auteur Test"
chapters:
- index.qmd
- chapter1.qmd
lang: fr
format:
typst:
keep-typ: true
<!-- index.qmd -->
# Préface {.unnumbered}
Préface.
<!-- chapter1.qmd -->
# Introduction
Du contenu, assez long pour faire déborder sur une deuxième page et faire apparaître l'en-tête de page.
After quarto render, the running header on chapter pages reads Chapter 1. Introduction. Expected: Chapitre 1. Introduction.
The orange-book extension's book(...) accepts a supplement-chapter parameter (default "Chapter") that drives the running header via a show heading rule:
|
#let book(title: "", subtitle: "", date: "", author: (), paper-size: "a4", width: none, height: none, margin: (x: 3cm, bottom: 2.5cm, top: 3cm), logo: none, cover: none, cover-background: auto, image-index:none, body, main-color: blue, copyright: [], lang: "en", list-of-figure-title: none, list-of-table-title: none, supplement-chapter: "Chapter", supplement-part: "Part", font-size: 10pt, part-style: 0, part-font-size: auto, lowercase-references: false, padded-heading-number: true, outline-font-size: auto, outline-small-depth: 2, outline-small-width: 9.5cm, heading-style: 0, first-line-indent: true, outline-depth: 3) = { |
|
show heading.where(level: 1): set heading(supplement: supplement-chapter) |
The Quarto-side typst-show.typ never passes supplement-chapter to book.with(...), so the default English value applies:
https://github.com/quarto-dev/quarto-cli/blob/a8d0dcfee2394f9caba3f1576b371c7e3bbeb47b/src/resources/extension-subtrees/orange-book/_extensions/orange-book/typst-show.typ
The localized value exists in _language-fr.yml as crossref-ch-prefix: "Chapitre":
|
crossref-ch-prefix: "Chapitre" |
It is exposed as a Lua filter param via languageFilterParams but never written into Pandoc YAML metadata where the typst-show.typ template variable would resolve. The existing list-of-figure-title and list-of-table-title pipes in the same template are affected the same way and currently render as empty strings when the user enables lof: true / lot: true.
For a Typst book project with
lang:set to a non-English locale, the running header on chapter pages keeps the EnglishChapter N.prefix instead of the locale's word (e.g.Chapitre N.forlang: fr).Minimal reproduction:
After
quarto render, the running header on chapter pages readsChapter 1. Introduction. Expected:Chapitre 1. Introduction.The orange-book extension's
book(...)accepts asupplement-chapterparameter (default"Chapter") that drives the running header via ashow headingrule:quarto-cli/src/resources/extension-subtrees/orange-book/_extensions/orange-book/typst/packages/preview/orange-book/0.7.1/lib.typ
Line 311 in a8d0dcf
quarto-cli/src/resources/extension-subtrees/orange-book/_extensions/orange-book/typst/packages/preview/orange-book/0.7.1/lib.typ
Line 419 in a8d0dcf
The Quarto-side
typst-show.typnever passessupplement-chaptertobook.with(...), so the default English value applies:https://github.com/quarto-dev/quarto-cli/blob/a8d0dcfee2394f9caba3f1576b371c7e3bbeb47b/src/resources/extension-subtrees/orange-book/_extensions/orange-book/typst-show.typ
The localized value exists in
_language-fr.ymlascrossref-ch-prefix: "Chapitre":quarto-cli/src/resources/language/_language-fr.yml
Line 93 in a8d0dcf
It is exposed as a Lua filter param via
languageFilterParamsbut never written into Pandoc YAML metadata where thetypst-show.typtemplate variable would resolve. The existinglist-of-figure-titleandlist-of-table-titlepipes in the same template are affected the same way and currently render as empty strings when the user enableslof: true/lot: true.