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

Fatal problem with citeproc in Pandoc 3.1.8. and Eisvogel 2.4.1: "... missing \item." #361

Closed
mfhepp opened this issue Oct 5, 2023 · 7 comments · Fixed by #364
Closed

Comments

@mfhepp
Copy link
Contributor

mfhepp commented Oct 5, 2023

When I try to use the latest Eisvogel template 2.4.1 with Pandoc 3.1.8 on a Debian bookworm platform with TeX Live 2022 (texlive-full from apt), Markdown documents with references fail to compile to PDF.

pandoc citations.md -o citations-eisvogel.pdf --from markdown --citeproc --template /foo/bar/eisvogel/eisvogel.latex

Error producing PDF.
! LaTeX Error: Something's wrong--perhaps a missing \item.

They compile flawlessly with the default Pandoc 3.1.8 LaTeX template:

pandoc citations.md -o citations-default.pdf --from markdown --citeproc

My guess is that the problem is related to a change in the Pandoc LaTeX template in release 3.1.7, because there it says:

Use \cite and \bibitem to link up citations, even with citeproc. (#9031). This will give us better accessibility; when tagging is enabled, the citation can be linked to the bibliography entry. This changes some of the details of the layout and the default template. We now make CSLReferences a special enumitem list that will contain \bibitems. Internal links inside citations to ids beginning in ref- are creating using \cite instead of \hyperref.

For better debugging, I created intermediate .tex documents as follows:

citations-eisvogel.tex:

pandoc citations.md -o citations-eisvogel.tex --from markdown --citeproc --template /foo/bar/eisvogel/eisvogel.latex

citations-default.tex:

pandoc citations.md -o citations-default.tex --from markdown --citeproc

I attach the Markdown source and the resulting intermediate *.tex files (*.tex as *.tex.txt due to Github):

@mfhepp
Copy link
Contributor Author

mfhepp commented Oct 5, 2023

I just tried with the latest version from Github (commit 8c48a17), which includes #358; the effect is unchanged.

Also, note that the change from Pandoc 3.1.7 wrt to the LaTeX writer has been reverted.

@mfhepp
Copy link
Contributor Author

mfhepp commented Oct 5, 2023

Addition: I tried going back to Eisvogel 2.4.0 and 2.3.0, to no avail. Only the error message changes slightly to

Error producing PDF.
! LaTeX Error: Lonely \item--perhaps a missing list environment.

@cagix
Copy link
Contributor

cagix commented Oct 6, 2023

the eisvogel template is a modified variant of pandoc's default latex template. it seems, that it needs to be synchronised again.

@Wandmalfarbe i wonder if it would be possible to rewrite this template into tex snippets to be used with the --include-xxx options and pandoc's default latex template? this could eliminate the need to rebase your work as soon as the pandoc project changes something in the template?

@mfhepp
Copy link
Contributor Author

mfhepp commented Oct 6, 2023

the eisvogel template is a modified variant of pandoc's default latex template. it seems, that it needs to be synchronised again.

@Wandmalfarbe i wonder if it would be possible to rewrite this template into tex snippets to be used with the --include-xxx options and pandoc's default latex template? this could eliminate the need to rebase your work as soon as the pandoc project changes something in the template?

Yes, that would be very good (but likely means major work). Quarto is using a similar approach in the hope of more stable customized templates.

@cryptax
Copy link

cryptax commented Oct 16, 2023

I have the same issue with Pandoc 3.1.8 and Eisvogel 2.4.1

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.407 \bibitem[\citeproctext]{ref-flutterdev}

Where the bibliography entry is complete and correct AFAIK. I even added a dummy author entry, just to make sure.

@misc{flutterdev,
	title        = {Flutter},
	author       = {A},
	year         = 2023,
	url          = {https://flutter.dev},
	note         = {Online; accessed 16-October-2023},
	howpublished = {\url{https://flutter.dev}}
}

FYI, I tried with an even older eisvogel.latex template, and it did not work. The error message is slightly different, but the issue is still the citation:

Error producing PDF.
! Undefined control sequence.
l.399 This is a ref (\citeproc

@davidmehren
Copy link
Contributor

I opened #364, which imports changes from the latest upstream LaTeX template. This fixes compilation with Pandoc 3.1.8.

@mfhepp
Copy link
Contributor Author

mfhepp commented Nov 28, 2023

Thanks a lot!

FYI: I have not yet been able to test if this fixes my issues, as I am using a custom Debian 12-based environment in Docker with texlive-full as the TeX environment, which seems to miss a few relevant packages. And as Debian 12 is still with TeX Live 2022, it is non-trivial to add missing LaTeX components :-(.

But I trust in the others in here that the underlying issue is solved.

Again, a huge thanks to @Wandmalfarbe and @davidmehren !

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

Successfully merging a pull request may close this issue.

4 participants