2

Edit:

I installed again the previous version of the package (ver. 0.2.1) and the problem is solved.

__

I am making a Rmarkdown report with the officedown package.

My Word output imports well the Word Styles of the template document, but does not import the margins, header or footer of the same template, did the sintax change?, here is the YAML of the report:

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

The template works well when is used with the officer package, or when is used with the "normal" word output like this:

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

Any ideas?

Thanks a lot for the help, i have been using the officeverse packages a lot in the last year and these are awesome

1 Answers1

1

I had the same problem, but you can set these parameters in the YAML header as mentioned in the Officeverse book.

Units in inches

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 
  • I am trying to make the left margin closer to the edge of the page. I have tried increasing the page width and decreasing the left margin (using YAML parameters the same as your example). Both seem to have no effect. I have also tried manually changing them in the template docx with no result. Do you have any suggestions? – Nebulloyd Sep 05 '22 at 22:50