b41*_*154 6 r pandoc r-markdown
在R Studio中安装软件包rmarkdown,您可以使用Rmd文件创建docx文档并按下Knit Word按钮.
然后调用的命令是:
"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
Run Code Online (Sandbox Code Playgroud)
题
如何添加其他选项?我想补充一下:
--filter ./pandoc-word-pagebreak
Run Code Online (Sandbox Code Playgroud)
要得到:
"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
Run Code Online (Sandbox Code Playgroud)
你可以pandoc_args在你的yaml前面使用:
---
title: "Mytitle"
output:
word_document:
pandoc_args: [
"--filter", "./pandoc-word-pagebreak"
]
---
Run Code Online (Sandbox Code Playgroud)
请参阅此处的文档