rmarkdown (version 0.9.6)

html_fragment: Convert to an HTML fragment.

Description

An html fragment is suitable for inclusion into an external html page. See html_document for full details - this is a minor variation that assumes you will include the output into an existing document (e.g. a blog post).

Usage

html_fragment(number_sections = FALSE, fig_width = 7, fig_height = 5,
  fig_retina = 2, fig_caption = TRUE, dev = "png", smart = TRUE,
  mathjax = TRUE, keep_md = FALSE, md_extensions = NULL,
  pandoc_args = NULL, ...)

Arguments

number_sections
TRUE to number section headings
fig_width
Default width (in inches) for figures
fig_height
Default width (in inches) for figures
fig_retina
Scaling to perform for retina displays (defaults to 2, which currently works for all widely used retina displays). Set toNULL to prevent retina scaling. Note that this will always beNULL when keep_md is specified (th
fig_caption
TRUE to render figures with captions
dev
Graphics device to use for figure output (defaults to png)
smart
Produce typographically correct output, converting straight quotes to curly quotes, --- to em-dashes, -- to en-dashes, and ... to ellipses.
mathjax
TRUE to convert $ and $$ math blocks into MathJax compatible output. Note that you'll still need to ensure that the page where the fragment is included loads the required MathJax scripts.
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
...
Additional arguments passed to html_document

Value

  • R Markdown output format to pass to render

Details

See the http://rmarkdown.rstudio.com/html_document_format.html{online documentation} for additional details on using the html_fragment format.