I'd like to cite an article in my figure caption. I've tried using the Rmarkdown/pandoc [@citekey]
and the latex \\citep{citekey}
forms in the fig.cap
chunk option without any luck.
Here is a reproducible example:
---
output:
rmarkdown::tufte_handout
references:
- id: Nobody06
title: 'My Article'
author:
- family: Nobody
given: Jr
issued:
year: 2006
---
Some text [@Nobody06].
```{r figure, fig.cap="A figure [@Nobody06]"}
library(ggplot2)
qplot(1:10, rnorm(10))
```
# References
This produces the correct citation in the text block but either [@Nobody06]
(when I use the RMarkdown form) or (?)
(when I use the Latex form) in the figure caption.
Does anyone know if it's possible to use citations in thefig.cap
field?