Fig.scap short signature in knitr not working?
I figured that using fig.scap must contain a short label for use with a table of numbers, but it doesn't, it uses a long label. Any ideas? Rstudio Version 0.98.1091.
---
output:
pdf_document:
fig_caption: yes
---
\listoffigures
```{r, fig.cap="long caption",fig.scap="short"}
plot(1:4)
```
source to share
This option was originally intended for .Rnw documents only. This does not apply to .Rmd docs. However, you can invoke LaTeX output for charts in R Markdown by specifying any of the chunk options out.width
, out.height
and fig.align
. For example,
---
graphics: yes
output:
pdf_document:
fig_caption: yes
---
\listoffigures
```{r, fig.cap="long caption", fig.scap="short", fig.align='center'}
plot(1:4)
```
Note that you need knitr> = 1.8 (currently on CRAN) and Pandoc> = 1.13.1 (see comments below). YAML metadata graphics: yes
lets Pandoc know about the graphical output in a document (it's too hard to explain here).
source to share