R Markdown:引文解析
R Markdown: Citation parsing
我试图在我的 R Markdown 文档中排版引文,但在某些情况下,引文似乎没有被正确解析,特别是当引文以 :
出现时,例如 [@ref1]:
和它后面的一些文字。
这是一个 MWE:
---
title: Citations Parsing
references:
- id: fenner2012a
title: One-click science marketing
author:
- family: Fenner
given: Martin
container-title: Nature Materials
volume: 11
URL: 'http://dx.doi.org/10.1038/nmat3283'
DOI: 10.1038/nmat3283
issue: 4
publisher: Nature Publishing Group
page: 261-263
type: article-journal
issued:
year: 2012
month: 3
---
1. [@fenner2012a]: Here is some text. **This does not work.**
2. [@fenner2012a]:
3. [@fenner2012a] : Here is some text. **This works.**
我正在使用来自 CRAN (0.8.1) 的最新版本 rmarkdown
。请注意,在上面的示例中,#2 也适用。当您用文本追逐 :
时,引文停止呈现。
编辑:
这很可能也是一个 knitr
问题。我正在使用来自 CRAN (1.11) 的最新版 knitr。
看起来 knitr
正在尝试解析整个引文,包括分号。要停止它,请使用 \
转义冒号:
[@fenner2012a]\: Here is some text. **This works now.**
我试图在我的 R Markdown 文档中排版引文,但在某些情况下,引文似乎没有被正确解析,特别是当引文以 :
出现时,例如 [@ref1]:
和它后面的一些文字。
这是一个 MWE:
---
title: Citations Parsing
references:
- id: fenner2012a
title: One-click science marketing
author:
- family: Fenner
given: Martin
container-title: Nature Materials
volume: 11
URL: 'http://dx.doi.org/10.1038/nmat3283'
DOI: 10.1038/nmat3283
issue: 4
publisher: Nature Publishing Group
page: 261-263
type: article-journal
issued:
year: 2012
month: 3
---
1. [@fenner2012a]: Here is some text. **This does not work.**
2. [@fenner2012a]:
3. [@fenner2012a] : Here is some text. **This works.**
我正在使用来自 CRAN (0.8.1) 的最新版本 rmarkdown
。请注意,在上面的示例中,#2 也适用。当您用文本追逐 :
时,引文停止呈现。
编辑:
这很可能也是一个 knitr
问题。我正在使用来自 CRAN (1.11) 的最新版 knitr。
看起来 knitr
正在尝试解析整个引文,包括分号。要停止它,请使用 \
转义冒号:
[@fenner2012a]\: Here is some text. **This works now.**