Como citar em uma legenda com citação nativa do rmarkdown?
No R Markdown, quero uma legenda de figura com uma citação vinculada no estilo de citação nativa R Markdown[@ref]
. No entanto, quando insiro o[@hawking_thermodynamics_1983]
snippet no final da legenda, está lançando apenas um erro:
! Missing $ inserted.
<inserted text>
$
l.94 ...iontextfoo [@hawking_thermodynamics_1983]}
pandoc.exe: Error producing PDF
Error: pandoc document conversion failed with error 43
Exemplo:
Este é o meu código:
---
title: "Untitled"
author: "Author"
output: pdf_document
# bibliography: bibliography.bib
references:
- id: hawking_thermodynamics_1983
author:
- family: Hawking
given: S. W.
- family: Page
given: Don. N.
publisher: Communications in Mathematical Physics
title: Thermodynamics of Black Holes in Anti-de Sitter Space.
volume: 87
type: article-journal
issued:
year: 1983
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
\begin{figure}[h]
\centering
\includegraphics[width=13cm]{example.jpg}
\caption{Captiontextfoo}\label{fig1}
\end{figure}
[@hawking_thermodynamics_1983]
# Bibliography
com esta saída:
Quero que a citação entre parênteses apareça dentro da legenda da figura, com um link de trabalho para a bibliografia. A bibliografia deve aparecer automaticamente como de costume.
Como eu poderia conseguir isso?
Notas:
Eu também tentei\[@...
ou sem colchetes, mas não funcionou.Eu tentei tambem isso\caption{Captiontextfoo \cite{[@hawking_thermodynamics_1983]}}
deesta resposta, mas não funcionou tão bem, mostra apenas[?]
.R versão 3.4.3 (30/11/2017)Plataforma: x86_64-w64-mingw32 / x64 (64 bits)Em execução no: Windows 7 x64 (build 7601) Service Pack 1