15

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

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

Jot eN
  • 6,120
  • 4
  • 40
  • 59

1 Answers1

13

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:

Jot eN
  • 6,120
  • 4
  • 40
  • 59
michael
  • 9,161
  • 2
  • 52
  • 49