繁体   English   中英

在 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>

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM