【问题标题】:Change paper size and orientation in an rmarkdown pdf在 rmarkdown pdf 中更改纸张大小和方向
【发布时间】:2018-04-20 15:51:31
【问题描述】:

我想使用 rmarkdown 创建一个 PDF,它是 A3(或 11x17,理想情况下)并且是横向的。我可以通过在 YAML 标头中指定选项来执行其中一项操作,但不能同时执行这两项操作。这是我最好的尝试 - 每个 classoption 值单独工作,但不能一起工作:

---
title: "Test"
output: 
  pdf_document:
    toc: true
    number_sections: true
documentclass: article
classoption: 
  landscape
  a3paper
---

This question 是相关的,但在这种情况下没有答案。提前感谢您提供的任何帮助!

【问题讨论】:

    标签: r latex knitr r-markdown


    【解决方案1】:

    似乎没有记录,但您可以包含多个classoption,方法是用逗号分隔选项或使用带有连字符的项目符号列表。以下任一方法都可以:

    ---
    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
    ---
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-12-25
      • 2014-11-10
      • 2017-08-28
      • 2020-07-06
      • 2023-03-02
      • 2017-02-21
      • 1970-01-01
      • 2014-03-16
      相关资源
      最近更新 更多