4

I tried to use the package rticles within a Rmd file, in order to generate journal publications. When trying to knit the template as it is, I get following error

his is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
I was unable to find any missing LaTeX packages from the error log UC4_SupplySecurity.log.
! You can't use `\vadjust' in vertical mode.
l.300 \leavevmode\vadjust
                          pre{\hypertarget{ref-Neurobot2013}{}}% 

Error: LaTeX failed to compile UC4_SupplySecurity.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See UC4_SupplySecurity.log for more info.
Execution halted

Within the log file, the same error is reported:

Package pdftex.def Info: UC4_SupplySecurity_files/figure-latex/Figure-1-1.pdf  
used on input line 291.
(pdftex.def)             Requested size: 241.86113pt x 241.86148pt.
! You can't use `\vadjust' in vertical mode.
l.300 \leavevmode\vadjust

I use following configurations

  • Latex
pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2021)
kpathsea version 6.3.3
Copyright 2021 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.03
  • R 4.0.5

What am I doing wrong?

Unfortunately I cannot provide a reproductible example, as it corresponds to the raw Frontiers Journal Article. The same issue persists with the Elsevier Journal Article template.

The template compiles if I remove all references and citations [@XY], but a publication without references is a no-go.

Indrajeet Patil
  • 4,673
  • 2
  • 20
  • 51
  • I had the same problem, I'll check back if I figure anything out. – bischrob Apr 11 '21 at 03:57
  • I ran into this issue using the latest pandoc release (2.13). Using a previous release (2.11.4) seems to resolve the issue for now. I recognize that isn't a permanent solution, but I couldn't track down the root cause. – mpschramm Apr 12 '21 at 22:01
  • Yep, that version of pandoc works for me too – bischrob Apr 14 '21 at 04:10
  • I can also reproduce this with `pandoc 2.13`. I _think_ this has something to with how bibliography items are being created in `.tex`. – Indrajeet Patil May 24 '21 at 20:45

2 Answers2

3

I believe this issue with rticles has been reported in the Github repo already https://github.com/rstudio/rticles/issues/383 and it has been fixed in rticles 0.20 which is not yet on CRAN.

So for now, one should do

remotes::install_github("rstudio/rticles")

Using the dev version, I can render without error the default template for Frontier article.

cderv
  • 6,272
  • 1
  • 21
  • 31
0

You cannot knit with code in an \texttt{enumerate} or \texttt{itemize} environment. Maybe this is your problem.

i.s.
  • 1
  • Could you please paste some code that reproduce the problem? It's unclear now. – wind Apr 23 '21 at 11:11
  • I was able to reproduce the error using the default rticles rmarkdown when using pandoc 2.13, although I haven't checked recently if it's been fixed. – bischrob Apr 23 '21 at 16:56