Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add whitespace to an RMarkdown document?

Is there a way to do it by adding latex code in the text or does the solution lie in (R)Markdown?

No sign of a solution here: http://rmarkdown.rstudio.com/pdf_document_format.html

At present I'm bodging a solution by adding my monospace signature to the bottom of the 1st page, to force the next section to start on page 2: https://github.com/Robinlovelace/Creating-maps-in-R/blob/master/intro-spatial-rl.pdf

like image 489
RobinLovelace Avatar asked Jun 26 '14 08:06

RobinLovelace


People also ask

How do you add space between words in R Markdown?

Only multiple space characters( ) are converted to a single space character, so you can combine the space character with   . So if you want, say, 6 spaces, you could combine 6 space characters with   .

Can you double space in R Markdown?

You can add \singlespacing before the each code block and \doublespacing after the code block to temporarily turn off double spacing.

How do you insert a line break in R Markdown PDF?

To break a line in R Markdown and have it appear in your output, use two trailing spaces and then hit return .

How do I add headings in R Markdown?

We can insert headings and subheadings in R Markdown using the pound sign # . There are six heading/subheading sizes in R Markdown. The number of pound signs before your line of text determines the heading size, 1 being the largest heading and 6 being the smallest.


1 Answers

Another easy way to do this is to just use HTML tags. Adding <br> will give a single line break and I've used that when, for whatever reason, using the (two-space indentation) is ignored.

like image 112
Zoë Clark Avatar answered Sep 18 '22 23:09

Zoë Clark