A question was previously asked on how to indent text without a bullet point in RMarkdown, but this was for HTML output: Indent without adding a bullet point or number in RMarkdown
How would a similar thing be done for a PDF output?
Update::
Line Blocks can be used to force R Markdown to respect indents. This works for multiple-output formats.
---
output:
pdf_document
---
This is normal text.
| Item 1
| Item 2
| Item 3
More Text
Original Answer:
If we are writing to a PDF file, LaTeX code can be used within the .Rmd file to expand the functionality of markdown. Pandoc will respect both the LaTeX and RMarkdown formatting when converting the file to the LaTeX file.
Here are some examples of how you could do it without having to install additional LaTeX packages:
---
title: "Untitled"
output:
pdf_document
---
This is normal text. If we want to indent a paragraph we could change the size of the left margin:
\setlength{\leftskip}{2cm}
Items 1
Item 2
Item 3
\setlength{\leftskip}{0pt}
Or we can make a list and suppress the items.
\begin{itemize}
\item[] First.
\item[] Second.
\end{itemize}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With