quarto-dev / quarto-dev/quarto-cli
Chapter-wise bibliography works, but cross-referencing fails
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
What I would like to do
I tried to use chapter-wise bibliographies using the Quarto extension/filter section-bibliographies, which is working.
However, when using the section-bibliographies filter, the cross-referencing fails. For example, instead of "Figure 1", there is "?@fig-mtcars--707ddefda8b9d501a1d63dad3fcb74d0cb28b51a."
What I have tried
The problem persists both in PDF (pdflatex, lualatex, xelatex) and HTML formats, and also both in individual documents and books. If citeproc: true is set, then the literature cross-referencing does not produce correct references either.
Screenshot of the bug
Steps to reproduce
---
title: "Sectionwise bibliography works, cross-referencing fails"
bibliography: references.bib
filters:
- section-bibliographies
reference-section-title: References
citeproc: false
format: pdf
---
# Part1
Lorem ipsum.
Read @knuth84.
See @fig-mtcars.
```{r}
#| label: fig-mtcars
#| fig-cap: Some caption
data(mtcars)
plot(mtcars)
```
# Part2
Also read @knuth84.
Here's the content of references.bib:
@article{knuth84,
author = {Knuth, Donald E.},
title = {Literate Programming},
year = {1984},
issue_date = {May 1984},
publisher = {Oxford University Press, Inc.},
address = {USA},
volume = {27},
number = {2},
issn = {0010-4620},
url = {https://doi.org/10.1093/comjnl/27.2.97},
doi = {10.1093/comjnl/27.2.97},
journal = {Comput. J.},
month = may,
pages = {97–111},
numpages = {15}
}
Expected behavior
I would like to have a bibliography for each chapter without missing cross-referencing figures etc.
Actual behavior
When using the filter section-bibliographies, the cross-referencing breaks.
Your environment
- RStudio: 2023.06.0
- OS: MacOS Sonoma 14.6.1
Quarto check output
Quarto 1.6.8
[✓] 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.6.8
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2024.07.03
Chromium: 869685
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/sebastiansaueruser/Library/TinyTeX/bin/universal-darwin
Version: 2024
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.11.5
Path: /usr/local/bin/python3
Jupyter: 5.4.0
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.2.1
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Users/sebastiansaueruser/Rlibs
- /Library/Frameworks/R.framework/Versions/4.2/Resources/library
knitr: 1.48
rmarkdown: 2.28
[✓] 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 by reproducing the minimal document in the issue with the section-bibliographies filter, then compare PDF and HTML output with citeproc enabled and disabled. Done means chapter-wise bibliographies still work while figure and literature cross-references resolve correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, latex, r
- Domain
- documentation, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100