首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Rmarkdown中一组特定行的杯标字体

Rmarkdown中一组特定行的杯标字体
EN

Stack Overflow用户
提问于 2020-10-31 06:35:45
回答 1查看 745关注 0票数 0

下面是一个可重复的PDF Rmarkdown示例:

代码语言:javascript
复制
---
title: "Untitled"
output: pdf_document
---

```{r setup, include=FALSE}

knitr::opts_chunk$set(echo =真)

代码语言:javascript
复制
## 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)

代码语言:javascript
复制

我需要“这是一个R文档。Markdown是一种简单的格式语法,用于编写HTML和more文档。

比默认字体更符合标准字体。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-11-03 11:48:19

如果您可以将latex引擎设置为xelatex,可以使用\fontspec{Calibri}将字体设置为杯状字体,然后使用\normalfont将字体设置为默认字体。

代码语言:javascript
复制
---
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:

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64619107

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档