r - How to add a page break in word document generated by RStudio & markdown -


i writing word document r markdown in r studio. can many things, @ moment not figuring out how can page break. have found solutions rendered latex / pdf document not case.

what trying force "page break" or "new page" in word document generated pandoc. have found way in environment i'm not sure work in every environment.

my environment: * r-studio / pandoc / ms-word starting "*.rmd" file , generating docx file.

in rmd file key idea i've created acts template document (myformattingdocument.docx) , in word document tweak styles things "heading 1" and/or "heading 2" , or "footnote" or whatever other predefined styles want tweak.

(see this: http://rmarkdown.rstudio.com/word_document_format.html#style-reference ) explanation of style reference , how set header information in rmd file specify reference document.

soooo in case... tweak "heading 1" style in word include forced "page break before" in paragraph formatting "heading 1". how force every "heading 1" "page break" different in different versions of microsoft word if follow word documentation , modify "heading 1" style every "heading 1" have pagebreak before it.

then... save template file in directory you're working rmd file... , used template. contents of file ignored.... don't worry... can put sample text in file , test formatting works.... contents ignored styles used in new word document built rmd file so.... every "heading 1" have break before it.

note: same style has one-to-one mapping pandoc markup instead make "heading 3" or whatever.... @ see in rmd created docx "style" being applied , tweak style if need insert "fake" lines blank content purpose of forcing style appear in docx


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -