[英]citing references in a rmd file & error in pandoc-citeproc.exe
這是我第一次在我的rmd文件中使用引文而我不知道如何才能完全執行此操作。 我將我的rmd文件轉換為pdf文檔,但是我在生成參考和參考書目時遇到了問題。 編織時出現此錯誤:
pandoc-citeproc.exe:找不到bibliography.bib pandoc.exe:運行過濾器時出錯pandoc-citeproc過濾器返回錯誤狀態1錯誤:pandoc文件轉換失敗,錯誤83
這是我的yaml上下文:
> title: "Context" > author: "Minoo" > date: "2017/06/06" > output: > pdf_document: > toc: true > toc_depth: 3 > bibliography: bibliography.bib > vignette: > > %\\VignetteIndexEntry{Context} > %\\VignetteEngine{knitr::rmarkdown} > %\\VignetteEncoding{UTF-8}
我在我的rmd文件的最后部分列出了這樣的引用:
@article{@Csardi2006, Csardi G, Nepusz T: The igraph software package for complex network research, InterJournal, Complex Systems 1695. 2006. http://igraph.org}
@article{@Butts2015, Butts C (2015). network: Classes for Relational Data. The Statnet Project (http://statnet.org). R package version 1.13.0, http://CRAN.R-project.org/package=network.}
@article{@Butts2008, Butts C (2008). “network: a Package for Managing Relational Data in R.” Journal of Statistical Software, 24(2). http://www.jstatsoft.org/v24/i02/paper.}
我要么在[@ Csardi2006]的背景下引用它們。 有什么想法解決這個問題嗎? 更具體地說,我如何引用rmd文件?
也許您需要將bibliography.bib文件放入工作目錄或將參考書目列入頭部,例如參考書目:
在編輯器中或使用JabRef之類的程序手動編寫bibliography.bib文件。 還有一些方法可以使用例如Zotero自動生成:
% Encoding: UTF-8
@article{csardi2006,
author = {G, Csardi and T, Nepusz},
title = {The igraph software package for complex network research},
journal = {InterJournal, Complex Systems},
year = {2006},
url = {http://igraph.org},
}
@article{...}
@article{...}
將其作為“bibliography.bib”保存到您的工作目錄中。
帶參考書目的YAML元數據:
---
title: "Context"
author: "Minoo"
date: "June 13, 2017"
output:
pdf_document: default
html_document: default
bibliography: bibliography.bib
---
或包含參考文獻的YAML元數據,例如快速論文:
---
title: "Context"
author: "Minoo"
date: "June 13, 2017"
output:
pdf_document: default
html_document: default
references:
- id: csardi2006
author:
- family: Csardi
given: G.
- family: Nepusz
given: T.
publisher: InterJournal, Complex Systems
title: The igraph software package for complex network research
type: article-journal
issued:
year: 2006
---
RMD的文字部分:
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Text
Lorem ipsum dolor sit amet [@csardi2006], consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
## Biblio
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.