Setting paper size for PDF output in bookdown with tufte-book
Asked Answered
G

1

5

In _output.yml, the following actually sets the paper size correctly:

bookdown::pdf_book:   
  pandoc_args: [    
   "-V", "papersize=a4"    
  ]

But when I want to use tufte_book, the papersize argument has no effect, and the output in in letter size no matter what:

bookdown::pdf_book:
  base_format: tufte::tufte_book
  pandoc_args: [
   "-V", "papersize=a4"
   ] 

How do I override the default paper size in tufte_book?

Gold answered 8/6, 2018 at 13:51 Comment(0)
S
6

You have to specify this as

bookdown::pdf_book:
  base_format: tufte::tufte_book
  pandoc_args: [
   "-V", "papersize=a4paper"
   ] 

I found this only by looking at the resulting .tex file. The reason is in the used templates. The Tufte templte includes $if(papersize)$$papersize$,$endif$ in the options to the document class, while the default template uses $if(papersize)$$papersize$paper,$endif$ with a literal paper.

BTW, you can also defines this in index.Rmd as

---
[...]
papersize: a4paper
---
Seaware answered 8/6, 2018 at 15:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.