Text Justification in Rmarkdown word document

旧城冷巷雨未停 提交于 2019-12-01 15:33:13

问题


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

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


回答1:


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

See:

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


来源:https://stackoverflow.com/questions/30238643/text-justification-in-rmarkdown-word-document

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!