quarto-dev / quarto-dev/quarto-cli
Section cross-references do not work in PDF when using number-sections: false
@cscheid is already working on this.
Since Jun 5, 2024.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
Section cross-references do not work in PDF when using number-sections: false
_quarto.yml:
project:
type: book
book:
title: "Quarto_Example"
author: "Norah Jones"
date: "5.6.2024"
chapters:
- index.qmd
- intro.qmd
- summary.qmd
- references.qmd
bibliography: references.bib
number-sections: false
format:
html:
theme: cosmo
pdf:
documentclass: scrreprt
editor: visual
intro.qmd:
Introduction {#sec-newer}
This is a book created from markdown and executable code.
See @knuth84 for additional discussion of literate programming.
{r}
1 + 1
And now have a look at the newer part @sec-newer.
This works in the .html file just fine. But in the PDF, I only see the prefix ("Chapter") without the name of the chapter to read / click on. Any idea why?
HTML:
PDF:
I have experienced this with different quarto versions. Interestingly, when not using number-sections: false, the cross-references work fine both in the PDF and html file.
Steps to reproduce
No response
Expected behavior
I expect the chapter name to appear both in the html file and the PDF.
Actual behavior
The chapter name only appears in the html file. It remains empty with only the prefix in the PDF.
Your environment
- Rstudio 2024.04.1 Build 748
- Windows 10
- Quarto 1.5.41 but also earlier versions
Quarto check output
$ quarto check
Quarto 1.5.41
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.2.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.41.0: OK
Typst version 0.11.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.5.41
Path: C:\Users\user\AppData\Local\Programs\Quarto\bin
CodePage: 1252
[>] Checking tools....................OK
TinyTeX: v2024.05
Chromium: (not installed)
[>] Checking LaTeX....................OK
Using: TinyTex
Path: C:\Users\user\AppData\Roaming\TinyTeX\bin\windows
Version: 2024
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....OK
Version: 3.10.5
Path: C:/Program Files/Python310/python.exe
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with py -m pip install jupyter
[>] Checking R installation...........OK
Version: 4.2.3
Path: C:/Users/user/AppData/Local/Programs/R/R-4.2.3
LibPaths:
- C:/Users/user/AppData/Local/Programs/R/R-4.2.3/library
knitr: 1.42
rmarkdown: 2.21
[>] 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.
Assessment
This issue has not been assessed yet.