R Markdown: Citation Parsing

I am trying to type quotes in my R Markdown document, and it seems that quotes are not processed correctly in some cases, in particular when quotes appear with : for example [@ref1]: and then the text following it,

Here is the 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.** 

I am using the latest version of rmarkdown from CRAN (0.8.1). Please note that in the above example, # 2 also works. This is when you chase the text : with the text, that quoting stops rendering.

Edit:

This could also be a knitr problem. I am in the latest version of knitr from CRAN (1.11).

+6
source share
1 answer

It seems like knitr trying to parse the whole quote, including the semicolon. To stop it, use \ to exit the colon:

 [@fenner2012a]\: Here is some text. **This works now.** 
+4
source

All Articles