我想要将R Markdown文档中所有标题(包括图片和表格)的字号变小。我正在使用bookdown,最终输出为pdf,并在R Studio中工作。为了加载图片,我使用来自knitr的
include_graphics
函数,因为我被告知这是最好的方法(请参见此处)。我只找到了同样的问题,但是针对html输出,请参见此处。一个示例.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')
```
如您所见,标题字体大小和正文字体大小完全相同,这看起来不太好看。我该如何解决这个问题?