quarto-dev / quarto-dev/quarto-cli
lang argument in quarto chapter yaml header is not taken into account
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
It seems that the lang argument in quarto chapter _metadata.yml or yaml header is not taken into account for pdf output. Only the lang argument in _quarto.yml is taken into account.
Steps to reproduce
Here are the files used to reproduce this bug :
_quarto.yml
project:
type: book
lang: fr
book:
chapters:
- index.qmd
- fr.qmd
- en.qmd
bibliography: references.bib
filters:
- section-bibliographies
format:
html:
theme: cosmo
pdf:
documentclass: scrreprt
citeproc: false
editor: visual
index.qmd
# Preface {.unnumbered}
en.qmd
---
lang: en
---
# English
[@ethier2020]
fr.qmd
---
lang: fr
---
# French
[@ethier2020]
references.bib
@article{ethier2020,
title = {Using microphone arrays to investigate microhabitat selection by declining breeding birds},
author = {Ethier, Jeffrey P. and Wilson, David R.},
year = {2020},
month = {07},
date = {2020-07-01},
journal = {Ibis},
pages = {873--884},
volume = {162},
number = {3},
doi = {10.1111/ibi.12785},
note = {DOI: 10.1111/ibi.12785
MAG ID: 2977097847}
}
Expected behavior
The outputs of these files running quarto render index.qmd must be a html website and pdf file with correct citation, i.e. "and" between authors names for english chapter and "et" between authors names for french chapter.
Actual behavior
The outputs of these files running quarto render index.qmd are a html website with correct citation, i.e. "and" between authors names for english chapter and "et" between authors names for french chapter, and a pdf file with only french formated citations (as lang: fr is specified in _quarto.yml).
Your environment
- IDE: quarto command line
- OS: Debian 12
Quarto check output
Quarto 1.4.549
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.4.549
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2022
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.11.2
Path: /usr/bin/python3
Jupyter: 4.12.0
Kernels: julia-1.10
NOTE: No Jupyter kernel for Python found
[✓] Checking R installation...........OK
Version: 4.3.2
Path: /usr/lib/R
LibPaths:
- /home/lucas/R/x86_64-pc-linux-gnu-library/4.3
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.45
rmarkdown: 2.25
[✓] Checking Knitr engine render......OK
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied _quarto.yml, index.qmd, fr.qmd, and en.qmd files and reproduce the issue with quarto render index.qmd. Trace how chapter-level lang metadata is carried into PDF citation processing, then verify that the English chapter uses “and” while the French chapter uses “et” in the rendered PDF.
Written by the indexing model from the issue text.
Assessment
- Domain
- internationalization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100