Open YulongNiu opened 2 years ago
Hi @YulongNiu
Thanks for the report and the nice reproducible example. I can confirm I see the same issue on my system. I think it's related to requirements in more recent versions of pandoc, which is now shipping with Rstudio. Can you provide the output from rmarkdown::pandoc_version()
?
Thanks your reply @grimbough
I repeated the same example above, and got the same issue.
> rmarkdown::pandoc_version()
[1] ‘2.17.1.1’
This is actually pretty interesting. We don't have a citation in the BiocStyle R Markdown vignette, and if I try to include one it fails in the same way.
I tested with some much older versions of Pandoc (e.g. Version 2.8) and you get a different but similar error: "! LaTeX Error: Environment cslreferences undefined.
" so this problem has been around for a while.
I also took a look at the packages currently in Bioconductor and there are 34 R Markdown vignettes that use citations and mention BiocStyle::pdf_document()
. However all of them have the html_document()
output listed first and that's what gets built - I guess that for some of those packages this error is the reason they're not using PDF.
I'm going to see if I can replicate what other packages are doing to get this to work.
@grimbough I think I have a somewhat related issue happening : https://github.com/neurogenomics/rworkflows/issues/69
Trying to sort out whether it's something that needs to addressed on the side of BiocStyle
, the r-lib/actions/setup-tinytex@v2
action, or some additional deps I'm not accounting for in rworkflows
.
I got errors when I tried to add references in a
Rmd
file:Example Rmd file:
The
test.bib
file is:Environment: