Rmarkdown Word文档中的文本对齐 [英] Text Justification in Rmarkdown word document

查看:78
本文介绍了Rmarkdown Word文档中的文本对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Rmarkdown中创建word文档时,文本总是左对齐:

When I create the word document in Rmarkdown, text is always left-aligned:

是否有可能(以及如何)使Rmarkdown中的文本合理化?

Is it possible (and how) to justify the text in Rmarkdown?

推荐答案

可以在Word(或LibreOffice/OpenOffice)中创建模板(即自定义样式表),其中包含所需的任何页面格式和文档样式,并从rmarkdown文件引用,即

A template (i.e., like a custom style sheet) can be created in Word (or LibreOffice / OpenOffice), containing whatever page formatting and document styles you wish, and referenced from the rmarkdown file, i.e.,

---
title: "My Document"
output:
  word_document:
    reference_docx: mystyles.docx
---
...rest of your rmarkdown here...

请参阅:

  • https://vimeo.com/110804387
  • http://rmarkdown.rstudio.com/word_document_format.html
  • http://rmarkdown.rstudio.com/articles_docx.html

这篇关于Rmarkdown Word文档中的文本对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆