R 如何缩进新段落?
如何更改R 如何缩进新段落?,r,latex,r-markdown,R,Latex,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
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:**
---
输出:pdf\U文件
---
##降价
这是一份R降价文件。Markdown是一种用于编写HTML、PDF和MS Word文档的简单格式语法。有关使用R标记的更多详细信息,请参阅。
当您单击**Knit**按钮时,将生成一个文档,其中包括文档中任何嵌入的R代码块的内容和输出。您可以像这样嵌入R代码块:**
这就是我想要的:
在
Rmd
文档的标题中,您可以添加LaTeX includes。要缩进段落,只需更改parindent
,例如
output: pdf_document
header-includes:
- \setlength{\parindent}{4em}
- \setlength{\parskip}{0em}
或者,您可以将latex命令存储在单独的文件中:
includes:
in_header: header.tex
请参阅部分。谢谢!然而,两个段落之间的空白仍然存在。我想默认的tex模板会改变处理新段落的方式。因此,我认为可能有一种方法可以在
YAML
标题中使这部分静音。\parskip
控制段落之间的间距:\setlength{\parskip}{0em}
@scoa谢谢。我想出了同样的解决方案。第一行缩进怎么样?我用了这个,每个段落都缩进了,除了一节开头的段落。