Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove/hide figure caption below knitted markdown->pandoc plot

I don't know how to remove Figure 1: as seen bellow from the generated pdf document: (using rmarkdown; knitr; pandoc). I have a .Rmd file > .md > .pdf

I generate the pdf in R console as:

system(paste("pandoc -V geometry:margin=0.7in -o", path, "/file_name", ".pdf ", "file_Rmd", ".md" ,sep=""))

Simple example:

```{r}
plot(1:20)
```

Output:

enter image description here

like image 307
Maximilian Avatar asked Oct 23 '14 14:10

Maximilian


1 Answers

Add -fmarkdown-implicit_figures to your pandoc call to disable the implicit figure extension which will, in turn, disable the "Figure # : xyz" labeling.

system(paste("pandoc -V geometry:margin=0.7in -fmarkdown-implicit_figures -o", path, "/file_name", ".pdf ", "file_Rmd", ".md" ,sep=""))
like image 88
hrbrmstr Avatar answered Oct 24 '22 13:10

hrbrmstr