Open truecluster opened 1 month ago
added a front matter csl citation to intro.qmd
I would think the citation in front matter needs to be available for the whole book, and not only for intro.qmd
file. So I would put it in _quarto.yml
.
Without doing this, I see this message for PDF
[WARNING] Citeproc: citation WatsonCrick1953 not found
So the front matter citation in intro.qmd
is not even taken into account. Moving it in _quarto.yml
solves it. The PDF file rendering does not have any warning, and both citations are included in the reference.
This would be the expected way of doing it. But even with that, I can reproduce the problem for HTML. We somehow have a missing citation in HTML, without any warning. So something in the processing for website is not handling that.
From my perspective, the whole point of allowing front matter citation is that one can keep maintenance of citation data local to chapters, which is exactly my usecase, because I envisage many independent contributors to many independent chapters, but possibly with a consolidated reference list at the end of the book. I'd never consider putting citation data into the central YAML file. Ideally the front matter citation data in the chapter files would support bib/bibtex, because that's a widely used standard. Yes, CSL ist standardized, but nobody seems to use it for citation data. Google for "Donald Knuth bibtex" and "Donald Knuth CSL".
I understand the use case. Though for now, considering how HTML book are working, any in-document configuration applies only on the document. When inside project for books or website, there need to be some specific handling and not all configuration are considered global. What is desired here is to have citation inside a single document to be considered citation for all document.
Maybe this could be done, we need to look into how citations for project are handled. but this raises also question:
WatsonCrick1953
entry in intro.qmd
, but you want to use it in summary.qmd
with @WatsonCrick1953
. Is that expected to work ? Current hypothesis is that citations are considered to be globally set, usually using a single .bib
file so that citations can be used accros all book chapters.
To help with handling citation, IDE like VSCODE with Quarto Extensions have even some support for globally centered citation storage like zotero, to help insert citation in a document and automatically keep updated the project bib file. Doc at: https://quarto.org/docs/visual-editor/vscode/#zotero-citations
So in summary we have two topic here:
_quarto.yml
for HTML book does not seem to get picked up correctlyThanks a lot for the ideas.
bibliography
allows multiple bib files:
bibliography:
- chapter1.bib
- chapter2.bib
Thanks Mickaël, This is the best way to go!
Bug description
I created a quarto book project with RStudio and added a front matter csl citation to
intro.qmd
, then rendered to html. the citation is shown as a tool tip, but not included in references (onle the @knuth84 citation is there).Steps to reproduce
quartocsl.zip
Expected behavior
The @WatsonCrick1953 citation should appear in References along with the @knuth84 citation
Actual behavior
The @WatsonCrick1953 citation is missing in References
Your environment
Quarto check output
Quarto 1.5.52 [✓] 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.52 Path: /opt/quarto/bin
[✓] Checking tools....................OK TinyTeX: v2024.07.03 Chromium: (not installed)
[✓] Checking LaTeX....................OK Using: TinyTex Path: /home/jo/.TinyTeX/bin/x86_64-linux Version: 2024
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK Version: 3.8.10 Path: /usr/bin/python3 Jupyter: (None)
[✓] Checking R installation...........OK Version: 4.4.1 Path: /usr/lib/R LibPaths:
[✓] Checking Knitr engine render......OK