【问题标题】:control margin size knitr when producing word document生成word文档时控制边距大小knitr
【发布时间】:2017-04-03 16:09:39
【问题描述】:

我想减小 knitr 生成的 word 文档的边距大小。

我在 YAML 标头中尝试了两种方法:

title: mytitle
author: me
geometry: margin=1cm
output: word_document

还可以通过手动更改 docx 中的边距并保存为模板:

title: mytitle
author: me
output: word_document
reference_docx: template.docx

这两种方法都没有稍微改变边距。

我做错了什么?

【问题讨论】:

    标签: r latex knitr r-markdown


    【解决方案1】:

    yaml 似乎对格式化以明确显示选项层次结构很挑剔。当我在我的电脑上测试它并且是documented here

    ---
    title: mytitle
    author: me
    output: 
      word_document:
        reference_docx: template.docx
    ---
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-12-19
      • 1970-01-01
      • 1970-01-01
      • 2020-12-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多