在R Bookdown中,如何为不同级别的文本设置字体系列和大小?

In R Bookdown, how to set font family and size for different level text?

在R Bookdown中,如何为不同级别的文本设置字体系列和大小? (我想对整本书应用这个设置)

这里是想要设置的参数,如附图。谢谢! (另外,我想将代码字体也更改为'family:Arial size=9')

--- 
title: "A Minimal Book Example"
author: "John Doe"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
documentclass: book
bibliography: [book.bib, packages.bib]
link-citations: yes
github-repo: rstudio/bookdown-demo
---

# About

## Usage 

1. Find the **Build** pane in the RStudio IDE, and
Or build the book from the R console:

```{r, eval=FALSE}
bookdown::render_book()
```

那就别想了用CSS.

如果您有更多规则,请制作一个单独的 CSS 文件,使您的 .Rmd 文件更加清晰。

你的例子:

<style>
   h1 {
    font-family: 'Arial';
    font-size: 20pt; 
   }
   h2 {
    font-family: 'Arial Black';
    font-size: 15pt; 
   } 
   pg {
    font-family: 'MS UI Gothic'; 
    font-size: 6pt; 
   }
</style>  

# About

## Usage 

<pg> 1. Find the **Build** pane in the RStudio IDE, and
Or build the book from the R console: </pg>