HertieDataScience / SyllabusAndLectures

Hertie School of Governance Introduction to Collaborative Social Science Data Analysis
MIT License
37 stars 60 forks source link

Double spacing for PDFs in LaTeX #20

Closed christophergandrud closed 9 years ago

christophergandrud commented 9 years ago

It occurred to me that you cannot easily create PDFs with double spacing in R Markdown. So I submitted a pull request to the rmarkdown repo adding this capability.

If you download the GitHub version of R Markdown now you will be able to use double spacing (the new CRAN version should be out soon-ish):

devtools::install_github('rstudio/rmarkdown')

Then in the YAML header of your .Rmd file use setspace: doublespacing. For example:


---
title: "Untitled"
author: "Christopher Gandrud"
date: "25 October 2014"
setspace: doublespacing
output: pdf_document

---
SaschaSchuster commented 9 years ago

That is pretty cool...I wish I'd known that like....17 hours ago ;)

christophergandrud commented 9 years ago

:+1:

Actually, it didn't exist 17 hours ago. I only added it in this morning.

christophergandrud commented 9 years ago

The rmarkdown syntax has changed for double spacing. Now use:

title: "Untitled"
author: "Somebody"
date: "8 December 2014"
linestretch: 2 
output: pdf_document
Zigzig commented 9 years ago

Hi, How to download the Github version of rmarkdown?

christophergandrud commented 9 years ago

@Zigzig I'm unclear about what you are talking about.

klocey commented 9 years ago

Thanks for this @christophergandrud!

christophergandrud commented 9 years ago

:+1: