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

LaTeX error with CSLReferences in Pandoc >= 3.1.7 #117

Open
bastistician opened this issue Jan 22, 2024 · 3 comments
Open

LaTeX error with CSLReferences in Pandoc >= 3.1.7 #117

bastistician opened this issue Jan 22, 2024 · 3 comments

Comments

@bastistician
Copy link

rmarkdown::render()ing the article template fails when using recent versions of Pandoc (>= 3.1.7), presumably due to changes in its LaTeX writer with respect to the CSLReferences environment.

With Pandoc 3.1.7, the error is (as previously reported in #113)

! Undefined control sequence.
<argument> \cslentryspacing 
                            
l.84 \setlength{\cslentryspacing}{0em}

With Pandoc 3.1.8 to 3.1.11.1 (current) the error is

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

In Pandoc 3.1.6.2, the LaTeX writer had produced, e.g.,

\leavevmode\vadjust pre{\hypertarget{ref-crosstalk}{}}%

to open a new bib item, whereas it now (Pandoc >= 3.1.7) produces

\bibitem[\citeproctext]{ref-crosstalk}

This is incompatible with the outdated definition of CSLReferences in RJwrapper.tex.
See the changes in Pandoc's default LaTeX template between 3.1.6.2 and 3.1.11.1.

@dicook
Copy link
Collaborator

dicook commented Jan 23, 2024

Thanks! We need to update csl to better match the referencing between pdf and html versions. So this is extra motivation to work on that.

@ngreifer
Copy link

Should anyone else spend hours upon hours finding a solution, mine was to run

pandoc::with_pandoc_version(
    version = '3.1.6.2',
    rmarkdown::render('article.Rmd')
)

Thanks for the lead @bastistician.

@BerriJ
Copy link

BerriJ commented Aug 2, 2024

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

No branches or pull requests

4 participants