Change paper size and orientation in an rmarkdown pdf

后端 未结 1 1530
星月不相逢
星月不相逢 2020-12-18 05:53

I\'d like to create a PDF using rmarkdown that is A3 (or 11x17, ideally) and in landscape orientation. I can get it to do one or the other by specifying options in the YAML

相关标签:
1条回答
  • 2020-12-18 06:16

    It doesn't seem to be documented, but you can include more than one classoption by separating the options with commas or by using a bulleted list with hyphens. Either of the following will work:

    ---
    title: "Test"
    output: 
      pdf_document:
        toc: true
        number_sections: true
    documentclass: article
    classoption: 
      - landscape
      - a3paper
    ---
    
    
    ---
    title: "Test"
    output: 
      pdf_document:
        toc: true
        number_sections: true
    documentclass: article
    classoption: landscape, a3paper
    ---
    
    0 讨论(0)
提交回复
热议问题