2

编辑:

我再次安装了之前版本的软件包(版本 0.2.1),问题就解决了。

__

我正在用包裹做Rmarkdown报告。officedown

我的 Word 输出很好地导入了模板文档的 Word Styles,但没有导入同一个模板的页边距、页眉或页脚,sintax 是否改变了?,这里是报告的 YAML:

---
output:
  officedown::rdocx_document:
   reference_docx: template.docx
---   

模板与包一起使用时效果很好officer,或者与“正常”字输出一起使用时,如下所示:

---
output:
  word_document:
    reference_docx: template.docx
---

有任何想法吗?

非常感谢您的帮助,去年我一直在使用 officeverse 软件包,这些都很棒

4

1 回答 1

0

我遇到了同样的问题,但是您可以按照Officeverse book中的说明在 YAML 标头中设置这些参数。

以英寸为单位

output: 
  officedown::rdocx_document:
  page_size:
    width: 8.3
    height: 11.7
    orient: "portrait"
  page_margins:
    bottom: 1
    top: 1
    right: 1.25
    left: 1.25
    header: 0.5
    footer: 0.5
    gutter: 0.5 
于 2021-07-05T07:52:56.693 回答