I'd like a caption on the figure, the short caption to appear in the list of figures, and to refer to the figure in the text. This seemed to work for me very recently and from my reading of the documentation here it ought to work still. To my dismay, I get an empty list of figures, a figure with no caption, and a ?? in the text. I'm compiling in RStudio by just hitting the "Compile PDF" button.
Am I missing something obvious?
\documentclass{article}
\usepackage{graphics}
\begin{document}
\SweaveOpts{concordance=TRUE}
\listoffigures
I'm referring to Figure~\ref{fig:wtf}.
<<wtf,echo=FALSE,fig=TRUE,fig.cap='test caption',fig.scap='tstcptn'>>=
plot(rnorm(1000))
@
<<si>>=
sessionInfo()
@
\end{document}
I recently updated to the latest version of R and RStudio. Below are the results of the sessionInfo()
inside of the document.
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.2.2
The result of cat(system('pandoc --version', intern=TRUE), sep = '\n')
is
pandoc 1.15.0.6
Compiled with texmath 0.8.2.2, highlighting-kate 0.6.
...
I can't think of any additional information to provide ...