【问题标题】:Change font size in RMarkdown PDF更改 RMarkdown PDF 中的字体大小
【发布时间】:2023-03-02 21:18:02
【问题描述】:

如何在 RMarkdown 中更改 PDF 输出的字体大小? 要更改的字体不在块中。 示例:

---
title: "Example"
author: "Tales Martins"
output:
   pdf_document:
    toc: TRUE
    number_sections: TRUE
---
\newpage

```{r, include=FALSE, echo=FALSE}
library(knitr)

```
# Introduction
This is my introduction

如何更改“这是我的介绍”的字体大小? PDF 输出中的默认字体很少。

提前致谢

【问题讨论】:

  • 我发现了一些帖子可以回答您的问题:here 和 here。 Rmarkdown reference 指南也有有用的信息。
  • 谢谢你,伙计。解决方案非常简单。这只是我脑子里的一个错误:)

标签: r pdf r-markdown


【解决方案1】:

你试过了吗?:

---
title: "Example"
author: "Tales Martins"
output:
   pdf_document:
    toc: true
    number_sections: yes
linestretch: 1.5
---

添加 YAML linestretch: 1.5,然后 将此toc: TRUE 更改为toc: true 并将number_sections: TRUE 更改为number_sections: yes

这里是一个例子

https://i.stack.imgur.com/VEdLL.png

你也可以选择 linestretch: 2 和其他

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-11-13
    • 2019-10-09
    • 2019-07-07
    • 2014-08-16
    • 2015-12-15
    • 1970-01-01
    • 1970-01-01
    • 2023-04-07
    相关资源
    最近更新 更多