wpdf_document_base: Base output format for PDF/HTML/CSS output formats

Description Usage Arguments Value

Description

Creates a PDF base output format for HTML/CSS to PDF output formats.

Usage

1
2
3
4
5
6
7
8
wpdf_document_base(toc = FALSE, toc_depth = 3, fig_width = 5,
  fig_height = 4, fig_retina = 8, fig_caption = TRUE, dev = "png",
  dpi = 96, df_print = NULL, notes = c("endnotes", "footnotes"),
  attach_code = FALSE, smart = TRUE, highlight = "default",
  math_engine = "webtex_svg", template = NULL,
  wpdf_engine = c("weasyprint", "prince"), css = NULL, includes = NULL,
  keep_md = FALSE, keep_html = FALSE, self_contained = TRUE,
  verbose = FALSE, md_extensions = NULL, pandoc_args = NULL)

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 width (in inches) for figures

fig_retina

Setting this option to a ratio (for example, 2) will change the dpi parameter to dpi * fig.retina, and fig_width to fig_width * dpi / fig_retina internally; for example, the physical size of an image is doubled and its display size is halved when fig_retina = 2.

fig_caption

TRUE to render figures with captions

dev

Graphics device to use for figure output (defaults to png)

dpi

The DPI (dots per inch) for bitmap devices.

df_print

Method to be used for printing data frames. Valid values include "default", "kable" and "tibble". The "default" method uses print.data.frame. The "kable" method uses the knitr::kable() function. The "tibble" method uses the tibble::tibble-package to print a summary of the data frame. 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.

notes

Render notes as endnotes or footnotes. Footnotes are not yet supported by WeasyPrint and are only well rendered with Prince.

attach_code

Add the Rmd source code as an attachment to the PDF document.

smart

Produce typographically correct output, converting straight quotes to curly quotes, — to em-dashes, – to en-dashes, and ... to ellipses.

highlight

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

math_engine

Method to be used to render TeX math. Valid values include "unicode", "mathjax", "mathml", "webtex_svg", "webtex_png" and "katex". See the pandoc manual for details.

template

Pandoc template to use for rendering. Pass NULL to use pandoc's built-in template; pass a path to use a custom template that you've created. See the documentation on pandoc online documentation for details on creating custom templates.

wpdf_engine

HTML to PDF engine for producing PDF output. Options are "weasyprint" and "prince". Default is weasyprint.

css

One or more css files to include

includes

Named list of additional content to include within the document (typically created using the includes function).

keep_md

Keep the markdown file generated by knitting.

keep_html, self_contained

Keep intermediate HTML file. Use self_contained to indicate if external dependencies are embedded in HTML file.

verbose

Is --verbose option passed to pandoc? Use TRUE to inspect pandoc's HTML.

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

Value

R Markdown output format to pass to rmarkdown::render().


RLesur/weasydoc documentation built on May 21, 2019, 9:19 a.m.