尝试将rmarkdown渲染为MS Word,如果添加书目,则会出现此错误:
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
这些是我的.rmd文件的标题:
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
---
我了解到这可能是pandoc版本的问题。我用brew更新了pandoc,因为RStudio太旧了,无法使用pandoc-crossref。
更新:
确实与pandoc版本有关。为了使pandoc与pandoc-crossref一起使用,我需要强制rmarkdown使用通过rmarkdown::find_pandoc(dir = "/usr/local/Cellar/pandoc/2.10.1/bin")
下载的pandoc版本。但是,此版本不喜欢pandoc-citeproc。因此,如果我使用rstudio默认的pandoc,则会得到pandoc-citeproc,如果我下载的是我,则会得到pandoc-crossref。我怎么都可以??