gpt4 book ai didi

r - 如何缩进新段落?

转载 作者:行者123 更新时间:2023-12-04 10:33:12 25 4
gpt4 key购买 nike

我该如何更改 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:**

enter image description here

这就是我想要的:

enter image description here

最佳答案

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

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

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

advanced customization部分。

关于r - 如何缩进新段落?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39274894/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com