I would like to make the font size of all captions (figures and tables) in my R Markdown document smaller. I'm using bookdown. The final output is pdf and I'm working in R Studio. To load the picture, I use the include_graphics
function from knitr
, because I've been told it's the best way (see here).
I only found the exact same question, but for html output here
An example .rmd
:
---
output: pdf_document
---
Normal text has the same size as the captions.
```{r, echo = FALSE, out.width = '50%', fig.cap = "The caption has the same size as normal text."}
knitr::include_graphics('logo.png')
```
As you can see, the caption font size and the regular text font size are exactly the same, which doesn't look that nice. How can I solve this problem?