【问题标题】:Why does my R Markdown file not output a citation from Bib为什么我的 R Markdown 文件没有从 Bib 输出引文
【发布时间】:2014-10-15 16:05:58
【问题描述】:

我正在使用R Markdown 创建一个带有引用的文档。但是引用并没有反映生成的 pdf 文档。使用RStudio Version 0.98.994R 3.1

这是.rmd 文件

---
title: "Untitled"
author: "keniajin"
date: "Tuesday, October 14, 2014"
output: pdf_document
---

This is an R Markdown document. 

```{r}
require(knitcitations)
summary(cars)
bib <- read.bibtex("ieetutorial.bib")
```

You can also embed citations, for example:
Smith says blah [-@author00] 

BibTeX 文件是

@Book{author00,
  author =   {Author},
  title =    {Title},
  publisher =    {Publisher},
  year =     2000}

【问题讨论】:

    标签: r r-markdown bibtex


    【解决方案1】:

    尝试将 rmd 文件的最后一行更改为

    Smith says blah `r citep(bib[["author00"]])`
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-27
      相关资源
      最近更新 更多