Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify a customized paper size in r markdown

I am using R Markdown to produce a booklet with specific height and length measures. Is there a way to specify to R Markdown to produce the article in 5.5"x8.5" measures.

I saw questions asked about producing A4 size pdf here but that does not help as my measure is very specific.

like image 793
Masood Sadat Avatar asked Feb 05 '19 00:02

Masood Sadat


1 Answers

Use the geometry option in the YAML (which becomes options to the geometry package in LaTeX). For example:

---
title: "Title"
author: "Me"
geometry: paperheight=8.5in,paperwidth=5.5in,margin=1in
output:
    pdf_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## 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>.
like image 59
user2554330 Avatar answered Oct 17 '22 12:10

user2554330