Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation failed to PDF with Quarto 1.4.358 #6819

Closed
lorenzoFabbri opened this issue Sep 13, 2023 · 12 comments
Closed

Compilation failed to PDF with Quarto 1.4.358 #6819

lorenzoFabbri opened this issue Sep 13, 2023 · 12 comments
Labels
needs-repro Issues that are blocked until reporter provides an adequate reproduction support a request for support

Comments

@lorenzoFabbri
Copy link

lorenzoFabbri commented Sep 13, 2023

Bug description

I am trying to render a Quarto document that was rendering fine with the latest release. I am now using Quarto version 1.4.358, and I get the following error message:

Rendering PDF
running lualatex - 1
  This is LuaHBTeX, Version 1.17.0 (TeX Live 2023) 
   restricted system commands enabled.
  
updating tlmgr
-
updating existing packages
ERROR: 
compilation failed- 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.544 \end{CSLReferences}

Steps to reproduce

I have the following in the YAML:

---
title: "Some Fancy Title"

metadata-files:
  - ../../../../all_phd/authors.yml

format:
  docx:
    reference-doc: reference_document.docx
  pdf:
    pdf-engine: lualatex
    number-sections: true
    toc: false
    keep-tex: true
    include-in-header:
      text: |
        \usepackage{lineno}
        \usepackage{rotating}
        \usepackage{float}
        \usepackage{typearea}
    include-before-body:
      text: |
        \linenumbers

bibliography: bibliography.bib
csl: ama11.csl

link-citations: true
linkcolor: blue

filters:
  - authors-block
  - ../../../../all_phd/_extensions/acronyms/parse-acronyms.lua
  - ../../../../all_phd/_extensions/wordcount/citeproc.lua
  - ../../../../all_phd/_extensions/wordcount/wordcount.lua

acronyms:
  fromfile: ../../../../all_phd/acronyms.yml
  insert_links: false
  insert_loa: false
  sorting: alphabetical

editor_options: 
  chunk_output_type: console

execute:
  echo: false
  warning: false
  error: false
  message: false
---

Expected behavior

No response

Actual behavior

No response

Your environment

> R.version
               _                           
platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          4                           
minor          3.1                         
year           2023                        
month          06                          
day            16                          
svn rev        84548                       
language       R                           
version.string R version 4.3.1 (2023-06-16)
nickname       Beagle Scouts

Quarto check output

Quarto 1.4.358
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.7: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.4: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.358
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (external install)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /home/lfabbri/.TinyTeX/bin/x86_64-linux
      Version: 2023

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.12
      Path: /usr/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.3.1
      Path: /usr/lib/R
      LibPaths:
        - /home/lfabbri/Documents/edu/phd/papers/paper3_helixSC_neuro/paper-helixSC-neuro/renv/library/R-4.3/x86_64-pc-linux-gnu
        - /usr/lib/R/library
      knitr: 1.44
      rmarkdown: 2.24

[✓] Checking Knitr engine render......OK
@lorenzoFabbri lorenzoFabbri added the bug Something isn't working label Sep 13, 2023
@cderv
Copy link
Collaborator

cderv commented Sep 13, 2023

Can you provide a reproducible example ?
https://quarto.org/bug-reports.html#small-is-beautiful-aim-for-a-single-document-with-10-lines

As of now, we can run your document and so we can't see what could go wrong. It could be something from the content of your document itself.

There is a lot of things happening in the YAML, including some lua filters, so maybe it could be link too.

I don't say it does not come from a Quarto change, just that without being able to reproduce, it will be hard to find the change in .tex output that would make latex error

@cderv cderv added the needs-repro Issues that are blocked until reporter provides an adequate reproduction label Sep 13, 2023
@mcanouil mcanouil added support a request for support and removed bug Something isn't working labels Sep 22, 2023
@lnnrtwttkhn
Copy link

hey @lorenzoFabbri, could you share the solution, if you found one?

I'm currently receiving the same error here: https://github.com/lnnrtwttkhn/fair-teaching-proposal/tree/draft but only using GitHub Actions (see example here: https://github.com/lnnrtwttkhn/fair-teaching-proposal/actions/runs/8893520433/job/24419870767), local rendering works fine.

thanks!

@lorenzoFabbri
Copy link
Author

hey @lorenzoFabbri, could you share the solution, if you found one?

I'm currently receiving the same error here: https://github.com/lnnrtwttkhn/fair-teaching-proposal/tree/draft but only using GitHub Actions (see example here: https://github.com/lnnrtwttkhn/fair-teaching-proposal/actions/runs/8893520433/job/24419870767), local rendering works fine.

thanks!

Hello. I sort of gave up on Quarto for the moment... It's too annoying and I'd rather focus on the content of my papers 😅.
Which version are you using?

@lnnrtwttkhn
Copy link

Thanks for the quick response @lorenzoFabbri. ok, good to know that you didn't pursue this further.

@cderv, my repo (see link above) provides an example, although it's not minimal. Also it seems to be a problem that occurs in GitHub Actions for me, local rendering works fine. I'll try to investigate this further, but just flagging this in case you want to consider re-opening the issue. thanks!

@cderv
Copy link
Collaborator

cderv commented Apr 30, 2024

@lnnrtwttkhn I don't think you have the same issue as @lorenzoFabbri . Error message is different in the latex log - similar but different.

In your case this is related to bibliography problem. It can be reproduced by the following

---
title: "Table"
format: pdf
bibliography: bibliography.bib
---

::: {#refs}
:::

There is a bibliography provided, and a #refs block, but no bibliography item in the document.

Errors also happens with Pandoc directly

❯ quarto pandoc index.qmd --from markdown --to pdf --bibliography=bibliography.bib --citeproc -o test.pdf
Error producing PDF.
! 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.96 \end{CSLReferences}

This is a single doc, but this is what happens in your project too, as you are using

  • A website project
  • format: pdf

Each .qmd will be rendered independently from each other to pdf.

I don't know what you expect for your references.qmd for the pdf output. Not sure why / how it works locally.

You could either include all your bib for uncited item : https://quarto.org/docs/authoring/footnotes-and-citations.html#including-uncited-items
or maybe you are expecting a book output with all reference from what is used across other formats. But book project is different than website project.

Please do open a new discussion if you have any follow up question thanks

@lnnrtwttkhn
Copy link

Thanks @cderv!

Each .qmd will be rendered independently from each other to pdf.

This was the crucial insight for me here. So as you suggested, adding

nocite: |
  @*

to the YAML header of references.qmd made it work.

@raffaem
Copy link

raffaem commented Sep 13, 2024

@cderv I don't think we should crash if there are no citations, just print an empty reference section.

Can I open an issue about this?

@cderv
Copy link
Collaborator

cderv commented Sep 13, 2024

Yes please do with a reproducible example. Only thing that we'll need to check :

  • Is this Pandoc generating the LaTeX that then fails or is it Quarto ?

Anyhow, a new issue is always welcome to discuss rather than old one. Thanks !

@raffaem
Copy link

raffaem commented Sep 14, 2024

Reported upstream here: jgm/pandoc#10185

@raffaem
Copy link

raffaem commented Sep 15, 2024

@cderv it got fixed upstream. How does it propagate downstream? Is quarto just calling the system-wide pandoc?

@cderv
Copy link
Collaborator

cderv commented Sep 16, 2024

Thanks for opening upstream ! Really appreciated !

How does it propagate downstream? Is quarto just calling the system-wide pandoc?

Quarto uses its bundled version. This is because a Quarto version works with a specific Pandoc version, and can't work with a new one necessarilly without some tweaks to adapt to Pandoc potential change and breaking change.

We did not do the dependency update for Pandoc yet. So it will propagate when Quarto will use the latest pandoc in a future update. And should be for next 1.6 stable release, and a soon to be pre-release in the meantime.

@mcanouil
Copy link
Collaborator

In addition, Pandoc first needs to make a release. The current fix is only available on the default branch of Pandoc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-repro Issues that are blocked until reporter provides an adequate reproduction support a request for support
Projects
None yet
Development

No branches or pull requests

5 participants