Skip to content

Commit 4d475b4

Browse files
committed
Freeze Quarto execution & enable Chinese fonts
Set execute.freeze to true in r-and-rmarkdown/_quarto.yml to freeze rendered outputs, and add an R code chunk calling showtext::showtext_auto() to r-and-rmarkdown/lectures/lecture2-data-viz.qmd so Chinese characters render correctly in plots.
1 parent 1d9cab9 commit 4d475b4

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

r-and-rmarkdown/_quarto.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ format:
132132
link-external-newwindow: true
133133

134134
execute:
135-
freeze: false
135+
freeze: true
136136
echo: true
137137

138138
bibliography: references.bib

r-and-rmarkdown/lectures/lecture2-data-viz.qmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ install.packages("tidyverse")
4747
library(tidyverse)
4848
```
4949

50+
```{r}
51+
# 支持图片显示中文字体
52+
showtext::showtext_auto()
53+
```
54+
5055
---
5156

5257
## 2. dplyr数据处理

0 commit comments

Comments
 (0)