word_document: Custom Word document template

Description Usage Arguments Details See Also

Description

Export an Rmarkdown file to a Word document using a custom template.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
word_document_te(
  toc = FALSE,
  toc_depth = 3,
  fig_width = 5,
  fig_height = 4,
  fig_caption = TRUE,
  df_print = "default",
  smart = TRUE,
  highlight = "default",
  reference_docx = system.file("templates", "te", "template-te.docx", package =
    "teproj"),
  keep_md = FALSE,
  md_extensions = NULL,
  pandoc_args = NULL
)

word_document_rstudio(
  ...,
  reference_docx = system.file("templates", "rstudio", "template-default.docx", package
    = "teproj")
)

Arguments

toc

TRUE to include a table of contents in the output

toc_depth

Depth of headers to include in table of contents

fig_width

Default width (in inches) for figures

fig_height

Default height (in inches) for figures

fig_caption

TRUE to render figures with captions

df_print

Method to be used for printing data frames. Valid values include "default", "kable", "tibble", and "paged". The "default" method uses a corresponding S3 method of print, typically print.data.frame. The "kable" method uses the knitr::kable function. The "tibble" method uses the tibble package to print a summary of the data frame. The "paged" method creates a paginated HTML table (note that this method is only valid for formats that produce HTML). In addition to the named methods you can also pass an arbitrary function to be used for printing data frames. You can disable the df_print behavior entirely by setting the option rmarkdown.df_print to FALSE.

highlight

Syntax highlighting style. Supported styles include "default", "tango", "pygments", "kate", "monochrome", "espresso", "zenburn", and "haddock". Pass NULL to prevent syntax highlighting.

reference_docx

path. Refers to custom word document template.

keep_md

Keep the markdown file generated by knitting.

md_extensions

Markdown extensions to be added or removed from the default definition or R Markdown. See the rmarkdown_format for additional details.

pandoc_args

Additional command line options to pass to pandoc

...

dots. Arguments passed to word_dcoument_te().

Details

All of the default arguments are the same as those from the original rmarkdown::word_document(). The _te version uses a personally customized Word document. The _rstudio version is the document that is generated by knitting the default rmarkdown Word document template.

See Also

https://github.com/rstudio/rmarkdown/blob/master/R/word_document.R.


tonyelhabr/teproj documentation built on June 21, 2020, 12:56 p.m.