在 R Studio 中安装 rmarkdown 包,您可以使用 Rmd 文件创建 docx 文档,然后按Knit Word
button.
那么调用的命令是:
"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
如何添加其他选项?我想补充一下:
--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
您可以使用pandoc_args
在你的 yaml 前面的问题中:
---
title: "Mytitle"
output:
word_document:
pandoc_args: [
"--filter", "./pandoc-word-pagebreak"
]
---
查看文档here https://bookdown.org/yihui/rmarkdown/html-document.html#pandoc-arguments
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)