如何缩进新段落?

How to indent new paragraphs?

如何更改 rmarkdown 设置,使新段落以首行缩进(LateX 中的默认设置)开始,而不是空白 space 且无缩进。

这是我通常得到的:

---
output: pdf_document
---

## 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:**

这就是我想要的:

Rmd 文档的页眉中,您可以添加 LaTeX 包含。要缩进段落,只需更改 parindent,例如

output: pdf_document
header-includes:
  - \setlength{\parindent}{4em}
  - \setlength{\parskip}{0em}

或者,您可以将 latex 命令存储在单独的文件中:

includes:
   in_header: header.tex

参见 advanced customization 部分。