【问题标题】:Including entire bibliographic entry in RMarkdown - equivalent of \fullcite?包括 RMarkdown 中的整个书目条目 - 相当于 \fullcite?
【发布时间】:2020-04-30 15:31:28
【问题描述】:

有没有办法在我的 Rmarkdown 文档的正文中包含整个书目条目?如果我使用 LaTeX,我会使用 \fullcite{Smith2000}。然后它会在我想要的任何地方打印:

Smith, J. 2000。一本好书。牛津:牛津大学出版社。

这是一个示例 .Rmd 文件

---
title: "hi"
author: "dmt"
date: "30/04/2020"
output: html_document
bibliography: bib.bib
biblio-style: apalike
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## R Markdown


```{r cars}
summary(cars)
```

Here is the citation of a book I am reading:

@Smith2000

But I would like to put the whole reference here like this: 

Smith, J. 2000. A nice book. Oxford: Oxford University Press.

How can I do this without writing it out?

这是一个示例 .bib 文件:

@book{Smith2000,
    Address = {Oxford},
    Author = {Smith, J},
    Date-Added = {2020-04-30 17:03:32 +0100},
    Date-Modified = {2020-04-30 17:04:03 +0100},
    Publisher = {Oxford University Press},
    Title = {A nice book},
    Year = {2000}}

【问题讨论】:

    标签: latex r-markdown knitr biblatex


    【解决方案1】:

    这对我来说很好用:

    在你的 RMD 文件中执行这个块:

    ```{r, echo=FALSE}
    biblio <- bibtex::read.bib("bib.bib")
    ```
    

    然后您可以在脚本中使用以下行:

    `r capture.output(print(biblio["Smith2000"]))`
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-06-07
      • 1970-01-01
      • 2016-07-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-01
      • 2011-04-25
      相关资源
      最近更新 更多