quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.99k stars 328 forks source link

Chapter-wise bibliography works, but cross-referencing fails #10664

Open sebastiansauer opened 3 months ago

sebastiansauer commented 3 months ago

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

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
cscheid commented 3 months ago

Crossrefs work for you in Quarto but don't work when the extension is installed? Shouldn't this be filed as a bug report against the extension?

sebastiansauer commented 3 months ago

You are right, I might better a file an issue against the extension.