[英]pandoc-citeproc error 83 with Rmarkdown file
我有以下文檔,我正在嘗試使用 Rstudio 進行編譯:
---
title:
shorttitle:
author:
bibliography:
- library.bib
output: papaja::apa6_pdf
---
```{r message = FALSE, warning = FALSE}
library("papaja")
apa_prepare_doc() # Prepare document for rendering
```
# Introduction
@Bakan1966
# References
```{r create_r-references}
r_refs(file = "r-references.bib")
```
當我運行 knit 時,它編譯了 .md 文件,但是 pandoc 給出了一個錯誤:
pandoc-citeproc: "stdin" (line 232, column 2):
unexpected "a"
expecting "c", "C", "p", "P", "s" or "S"
pandoc: Error running filter /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc-citeproc
Error: pandoc document conversion failed with error 83
In addition: Warning messages:
1: In yaml::yaml.load(enc2utf8(string), ...) :
NAs introduced by coercion: 1,2,3 is not an integer
2: In yaml::yaml.load(enc2utf8(string), ...) :
NAs introduced by coercion: 1,2,3 is not an integer
Execution halted
我在不同的主題上發現了類似的問題,但沒有一個提議的解決方案對我有用......
“解決了”。
問題來自我的 library.bib 文件。
我使用 Mendeley 生成了它,它插入了許多 pandoc-citeproc 不支持的特殊字符......
這很可能是 pandoc-citeproc 問題。 要診斷,請手動運行rmarkdown::render
,例如: rmarkdown::render(output_format = "html_document", input = your_vignette, clean = FALSE)
就我而言,我需要將.bib
添加到bibliography: bibfile
行的 YAML 小插圖標題中。
當編織一個應用arules::apriori()
的 rmarkdown 文件時,我遇到了錯誤 83。
---
title: "[**Pattern Discovery in Data Mining** *Programming Assignment: Frequent Itemset Mining Using Apriori*](https://www.coursera.org/learn/data-patterns)"
subtitle: "[**Data Mining** *by University of Illinois at Urbana-Champaign*](https://www.coursera.org/specializations/data-mining)"
author: "[®γσ, Eng Lian Hu](http://englianhu.wordpress.com) <img src='figure/ShirotoNorimichi2.jpg' width='24'> 白戸則道®"
date: "`r Sys.Date()`"
output:
tufte::tufte_html:
toc: yes
tufte::tufte_handout:
citation_package: natbib
latex_engine: xelatex
tufte::tufte_book:
citation_package: natbib
latex_engine: xelatex
bibliography: skeleton.bib
link-citations: yes
---
在我刪除以下行后它工作正常: bibliography: skeleton.bib
。
我在渲染 HTML 文件時遇到了同樣的錯誤,但我的問題的解決方案是不同的:
我在 YAML 標頭中指定了csl: nature.csl
。 我不知道的是,我還必須下載nature.csl
文件並在 YAML 標頭中指定它的路徑。 所以,而不是:
bibliography: references/library.bib
csl: nature.csl
我下載了nature.csl
文件並將其放在與library.bib
相同的文件夾中。 正確的 YAML 標頭如下所示
bibliography: references/library.bib
csl: references/nature.csl
我得到Error: pandoc document conversion failed with error 83
in empty environments 如下所示。
錯誤的方法
```{example}
```
正確的方法
```{example}
Some content.
```
如果您使用的是Mac,請打開終端並鍵入:
brew install pandoc-citeproc
要么
brew upgrade pandoc-citeproc
如果不起作用,您需要降級到pandoc-citeproc的某個工作版本。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.