Installing package rmarkdown in R Studio you can create docx documents using a Rmd-file and pressing the Knit Word
button.
The invoked command is then:
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS hallo.utf8.md --to docx --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures
--output hallo.docx --highlight-style tango
Question
How to add other options? I want to add:
--filter ./pandoc-word-pagebreak
to get:
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS hallo.utf8.md --to docx --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --filter ./pandoc-word-pagebreak
--output hallo.docx --highlight-style tango
You can use pandoc_args
in your yaml front matter:
---
title: "Mytitle"
output:
word_document:
pandoc_args: [
"--filter", "./pandoc-word-pagebreak"
]
---
See the documentation here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With