Last active
September 11, 2018 11:47
-
-
Save cgpu/d603bd65114ebaa1680d7669b10eb72f to your computer and use it in GitHub Desktop.
Convert from rmarkdown to word document
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://rmarkdown.rstudio.com/word_document_format | |
``` | |
--- | |
title: "From rmd to word document" | |
date: "`r Sys.Date()`" | |
output: | |
word_document: | |
toc : TRUE #to include a table of contents in the output | |
toc_depth : 3 # Depth of headers to include in table of contents | |
fig_width : # Default width (in inches) for figures | |
fig_height : # Default width (in inches) for figures | |
fig_caption : TRUE #to render figures with captions | |
df_print: "kable" | |
# {"default", "kable", "tibble", "paged"} | |
# "default": uses print.data.frame} | |
# "kable" : uses the knitr::kable function | |
# "tibble" : uses the tibble pckg, prints a summary of the df | |
# "paged" : creates a paginated HTML table | |
# *only valid for formats that produce HTML | |
# FALSE | |
smart: TRUE | |
# Produce typographically correct output | |
# converting straight quotes to curly quotes, | |
# — to em-dashes, – to en-dashes, and ... to ellipses. | |
highlight: "monochrome" | |
# {"default" , "tango" , "pygments", "kate", | |
# "monochrome", "espresso", "zenburn" , "haddock"} | |
# NULL: prevent syntax highlighting | |
reference_docx: # {"default", } or custom | |
# Use the specified file as a style reference in producing a docx file. | |
# For best results, the reference docx should be a modified version | |
# of a docx file produced using pandoc. | |
# Pass "default" to use the rmarkdown default styles. | |
keep_md: # Keep the markdown file generated by knitting. | |
md_extensions: # Markdown extensions to be added or removed from the default | |
# definition or RMarkdown. See the rmarkdown_format for additional details. | |
pandoc_args: # Additional command line options to pass to pandoc | |
--- | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment