22

How to set the aspect ratio of beamer slides created using Rmarkdown in Rstudio to 16:9? It does not seem to be a standard option. I tried changing the \documentclass{} options using a header.tex insert but this was not successful.

StasK
  • 1,525
  • 10
  • 21
Julian Karch
  • 444
  • 4
  • 20
  • 1
    Have you read this: http://stackoverflow.com/questions/34814100/table-of-content-in-beamer-generated-with-r-markdown-knitr – J_F Mar 09 '17 at 12:53
  • No I did not. Thanks for pointing me to it! After reading it, I tried classoption: aspectratio=169. This did not result in an error but also not in a 16:9 presentation – Julian Karch Mar 09 '17 at 17:44
  • 1
    Show us your YAML header. – J_F Mar 09 '17 at 18:20

1 Answers1

34

Put the option in double quotes:

output: 
  beamer_presentation:
classoption: "aspectratio=169"

Notice that classoption keyword is at the same level with output.

  • pandoc 1.19
  • texlive 2015
  • knitr 1.17
  • rmarkdown 1.6
tarleb
  • 19,863
  • 4
  • 51
  • 80
Ott Toomet
  • 1,894
  • 15
  • 25