I have a vignette of a R-package with multiple bibliographies (MB), using a lua filter. When I try to turn the vignette with MB into a pkgdown article I got an error for the .lua and .bib files, that do not appeared with the vignette.
pkgdown::build_article("index", pkg = ".", data = list(), lazy = FALSE,
quiet = FALSE) # build index.Rmd vignette (located in vignettes folder) as article
openBinaryFile: does not exist (No such file or directory
WORKAROUND: If I use the whole path of files, problem disappears: /home/user..
NOTE: For pandoc >2.11 each bibliography accepts only one .bib
Vignette (index.Rmd) with MB, example yaml section:
pkgdown:
as_is: true
output:
rmarkdown::html_vignette:
toc: true
toc_depth: 1
number_sections: true
pandoc_args: --lua-filter=multiple-bibliographies.lua
bibliography_normal: [allrefs.bib]
bibliography_software: [packages.bib, Rrefs.bib]
bibliography_docs: [docPackages.bib]
For testing purposes you will need a package DESCRIPTION file, one is available in link. See also link about creating a package. In order to create a vignette, install R-Studio, go to File, new file, R-markdown, From Template, Package Vignette. Important: Check the lua filter link also to learn what is MB in this Post. To add cites use [@R-plyr]
in body, or use this in yaml section:
nocite: |
@R-plyr
In order to create .bib files use:
knitr::write_bib(c("devtools","plyr","dplyr"), 'packages.bib')
Notes: Requires pandoc > 2
Solved adding files to yaml:
resource_files:
- multiple-bibliographies.lua
- allrefs.bib
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With