借助2个包officedown
和officer
,在需要断页的地方加r run_pagebreak()
output: word_document
library(officedown)
library(officer)
Hello world on page 1
`r run_pagebreak()`
Hello world on page 2
参考:[r - How to add a page break in word document generated by RStudio & markdown - Stack Overflow]https://stackoverflow.com/questions/24672111/how-to-add-a-page-break-in-word-document-generated-by-rstudio-markdown
网友评论