Minyi Han
Minyi Han

Reputation: 827

Rmarkdown to Word output - insert page number for word document

I am editing a Rmarkdown file, I want to know is there a solution to insert page numbers for word in rmd file which will output to a word document.

---
title: "title"
output:
word_document:
    reference_docx: ../template/template.docx

Upvotes: 9

Views: 5723

Answers (1)

DonJ
DonJ

Reputation: 963

In MS Word, edit the header or footer of your word template file (../template/template.docx) to include a Word placeholder for the page number. Not only will that provide page numbers, but they will update if the document is edited or reformatted.

Upvotes: 10

Related Questions