操作书目中标题、脚注和 table 描述的字体大小(for pdf_book)

Manipulating the font size of headings, footnote and table description in bookdown (for pdf_book)

我想提前更改所有章节的特定标题、脚注和 table 以及图片描述的默认字体大小(例如,通过在 index.Rmd yaml 中指定所需的大小)。例如,当我在 yaml 中执行 fontsize=10pt 时,它很好地将主要 body 文本大小更改为 10pt。有没有一种方法可以类似地操纵标题、脚注和 table 以及我书中的图形描述的字体大小?

这里是 index.Rmd 文件的 yaml 的示例。

--- 
title: "Looking for some help to change font size of headings in my book."
author: "Bird"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
documentclass: book
bibliography: [book.bib, packages.bib]
biblio-style: apalike
link-citations: yes
mainfont: Times New Roman
fontsize: 10pt
geometry: "left=2.5cm, right=2cm, top=2.5cm, bottom=2.5cm"
linestretch: 1.5
toc-depth: 1
secnumdepth: 1
lof: True
lot: True
---

这是在本地更改默认字体大小的解决方案。

---
title: "Untitled"
author: "bttomio"
date: "4/26/2021"
output: pdf_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## \scriptsize Use one slash for headings (\scriptsize)

For the footnote, it works similarly. Check here^[\tiny Using \tiny.]

## \huge Table description with {kableExtra} (\huge)

For example:

```{r pressure, echo=FALSE}
library(kableExtra)
kbl(mtcars[1:2, 1:4], booktabs = T, linesep = "", caption = "\huge Test with huge", escape = F) %>%
  kable_styling(latex_options = "hold_position")
```

更多样式,遵循 LaTeX 代码:https://i2.wp.com/texblog.org/Wordpress/wp-content/uploads/2012/08/font-size21.png (Source).

-输出