Skip to content
New issue

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

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

Already on GitHub? # to your account

Document without citation doesn't get compiled #10185

Closed
raffaem opened this issue Sep 14, 2024 · 1 comment
Closed

Document without citation doesn't get compiled #10185

raffaem opened this issue Sep 14, 2024 · 1 comment
Labels

Comments

@raffaem
Copy link

raffaem commented Sep 14, 2024

Explain the problem.

A document with <div id="refs"></div> but without any citations crash at compilation time.

MWE:

---
title: "Title Here"
---

# Abstract

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

# References

<div id="refs"></div>

Command line:

❯ pandoc --from markdown --to pdf -o main.pdf main.md 
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.108 \end{CSLReferences}

Pandoc version?

❯ pandoc --version
pandoc 3.1.9
Features: +server +lua
Scripting engine: Lua 5.4
User data directory: /home/raffaele/.local/share/pandoc
Copyright (C) 2006-2023 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
@jgm
Copy link
Owner

jgm commented Sep 14, 2024

The tex generated will include

\begin{CSLReferences}{0}{1}
\end{CSLReferences}

and that seems to be the problem -- this is a list environment without an item.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants