Alex Alex - 7 months ago 240
R Question

How to indent new paragraphs?

How can I change the

settings in a way that a new paragraph starts with an indented first line (as the default in LateX) rather than with blank space and no indentation.

That is what I normally get:

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 <>.

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

That is what I want:

enter image description here


In the header of your Rmd document, you can add LaTeX includes. To indent the paragraph, just change parindent, e.g.

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

Alternatively, you could store the latex commands in a separate file:

   in_header: header.tex

See the advanced customization section.