How can I remove blank pages from rbookdown pdfs?
Asked Answered
C

1

5

I am using the default Bookdown example "A Minimal Book Example" which is available on GitHub: https://github.com/rstudio/bookdown-demo

How do I edit the template so that the PDF output does not have blank pages before all the chapters?

I don't speak TeX so basic clues for the clueless would be greatly appreciated.

Chrysalid answered 24/10, 2017 at 15:19 Comment(0)
P
14

This is not a problem with rbookdown itself, but it is because of a classoption in the documentclass "book" in LaTex. I found the hint here.

At the top of you index.Rmd file, you have documentclass: book in your YAML header. Right below it, add classoption: openany to fix this. For example:

--- 
title: "Fancy Title"
author: "Your Name"
date: "`r Sys.Date()`"
documentclass: book
classoption: openany
---
Pooler answered 2/11, 2017 at 13:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.