如何缩进新段落?

Ale*_*lex 3 latex r r-markdown

如何rmarkdown以新段落以缩进的第一行(作为LateX中的默认行)开始而不是使用空格而不是缩进的方式更改设置.

这就是我通常得到的:

---
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:**
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

这就是我想要的:

在此输入图像描述

csg*_*pie 5

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

output: pdf_document
header-includes:
  - \setlength{\parindent}{4em}
  - \setlength{\parskip}{0em}
Run Code Online (Sandbox Code Playgroud)

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

includes:
   in_header: header.tex
Run Code Online (Sandbox Code Playgroud)

请参阅高级自定义部分.

  • 首行缩进怎么样?我使用了这个,除了开始该部分的段落外,每个段落都缩进了。 (3认同)