我有一个关于设置rmarkdown
的 word_document 输出边距的问题。
我浏览了大量信息并找到了http://metronetx.hgcbiz.com/npp/index.php
它可以使用geometry
进行设置。但是,我只想让字输出边距变得非常小。我还找到reference来设置边距
但是,它没有用。
---
title: "Set Margins"
output: word_document
geometry: margins: left = 0.1 cm
right = 0.1 cm
---
如何搞清楚?
答案 0 :(得分:2)
使用之前使用R markdown生成的word文档将其命名为margin_styles.docx
,并调整该文档中的边距以适合所需的输出。然后在rmarkdown(.Rmd)文件的yaml部分中包含以下内容:
---
output:
word_document:
reference_docx: margin_styles.docx
---
渲染文件的边距应设为margin_styles.docx
。
有关详细信息http://rmarkdown.rstudio.com/word_document_format.html#style_reference
,请参阅rmarkdown文档的样式参考部分