下面是一个可重复的PDF Rmarkdown示例:
---
title: "Untitled"
output: pdf_document
---
```{r setup, include=FALSE}knitr::opts_chunk$set(echo =真)
## R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
```{r cars}摘要(Cars)
我需要“这是一个R文档。Markdown是一种简单的格式语法,用于编写HTML和more文档。
比默认字体更符合标准字体。
发布于 2020-11-03 11:48:19
如果您可以将latex引擎设置为xelatex,可以使用\fontspec{Calibri}将字体设置为杯状字体,然后使用\normalfont将字体设置为默认字体。
---
title: "Untitled"
output:
pdf_document:
latex_engine: xelatex
---
## R Markdown
\fontspec{Calibri}
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
\normalfont
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

https://stackoverflow.com/questions/64619107
复制相似问题