Bibliography causes rmarkdown::render() to fail

114 views Asked by At

trying to render my rmarkdown into a MS Word, if I add a bibliography I get this error:

pandoc-citeproc: when expecting a product (:*:), encountered Object instead
Error running filter pandoc-citeproc:
Filter returned error status 1
Error: pandoc document conversion failed with error 83

These are the headers of my .rmd file:


title: XXX.
author: "Angelo D'Ambrosio"
date: "10/8/2020"
delete_merged_file: true
bibliography: references.bib
output:
  word_document: 
    reference_docx: style.docx
    pandoc_args: ['-F', 'pandoc-crossref']
    toc: yes
---

I read around that it could be a matter of pandoc versions. I updated my pandoc with brew, since the RStudio one is too old and couldn't work with pandoc-crossref.

UPDATE: It is indeed related to pandoc version. To make pandoc work with pandoc-crossref I need to force rmarkdown to use the version of pandoc I downloaded with rmarkdown::find_pandoc(dir = "/usr/local/Cellar/pandoc/2.10.1/bin"). But then this version don't like pandoc-citeproc. So if I use rstudio default pandoc I get pandoc-citeproc and if I use the one I downloaded I get pandoc-crossref. How can I get both??

0

There are 0 answers