quarto-dev / quarto-cli

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

If you delete references.bib for from _quarto.yml latex rendering gives hard to understand error #11040

Open ati-ozgur opened 1 month ago

ati-ozgur commented 1 month ago

Bug description

Create a project file. Remove references.bib file from _quarto.yml. command:

quarto render --to pdf 

gives following error.

LaTeX Error: Something's wrong--perhaps a missing \item.    
See the LaTeX manual or LaTeX Companion for explanation.   
Type  H <return>  for immediate help.   
...
l.242 \end{CSLReferences}

change cite-method: in format section like below:

format:

  pdf:
    documentclass: scrreprt
    cite-method: natbib

it works and you understand the error.

I didn't find a database entry for "knuth84"


│generating bibliography                                                                                                                │
│  This is BibTeX, Version 0.99d (TeX Live 2024)                                                                                        │
│  The top-level auxiliary file: index.aux                                                                                              │
│  The style file: plainnat.bst                                                                                                         │
│  I found no \bibdata command---while reading file index.aux                                                                           │
│  Warning--I didn't find a database entry for "knuth84"                                                                                │
│  (There was 1 error message)                                                                                                          │
│                                                                                                                                       │
│running xelatex - 2                                                                                                                    │
│  This is XeTeX, Version 3.141592653-2.6-0.999996 (TeX Live 2024) (preloaded format=xelatex)                                           │
│   restricted \write18 enabled.                                                                                                        │
│  entering extended mode                                                                                                               │

Steps to reproduce

Expected behavior

It should remind you that there is no bib file instead of giving this cryptic error.

Actual behavior

gives following error.

LaTeX Error: Something's wrong--perhaps a missing \item.    
See the LaTeX manual or LaTeX Companion for explanation.   
Type  H <return>  for immediate help.   
...
l.242 \end{CSLReferences}

Your environment

command line quarto

Quarto check output

[✓] Checking tools....................OK │ │ TinyTeX: v2024.10 │ │ Chromium: 869685 │ │ │ │[✓] Checking LaTeX....................OK │ │ Using: TinyTex │ │ Path: /home/atilla/.TinyTeX/bin/x86_64-linux │ │ Version: 2024 │ │ │ │[✓] Checking basic markdown render....OK │ │ │ │[✓] Checking Python 3 installation....OK │ │ Version: 3.12.3 │ │ Path: /usr/bin/python3 │ │ Jupyter: 5.3.2 │ │ Kernels: python3 │ │ │ │[✓] Checking Jupyter engine render....OK │ │ │ │[✓] Checking R installation...........(None) │ │ │ │ Unable to locate an installed version of R. │ │ Install R from https://cloud.r-project.org/ │ │

ati-ozgur commented 1 month ago

I added following github repo and github workflow that show this issue.

https://github.com/ati-ozgur/quarto-bugs/tree/refs/heads/reference-bug https://github.com/ati-ozgur/quarto-bugs/actions/runs/11314112634

cderv commented 1 month ago

This makes me thing of this other issue:

which was a problem with upstream Pandoc

It has been now fixed in Pandoc 3.5 and there should not be any more error like this when no bibliography file is provided.

Pandoc 3.5 will be integrated in Quarto in a later version that should fix this problem. When this is done, I'll check for what happens in your reported example.

Thanks again for the feedback