% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/html_fragment.R
\name{html_fragment}
\alias{html_fragment}
\title{Convert to an HTML fragment.}
\usage{
html_fragment(number_sections = FALSE, fig_width = 7, fig_height = 5,
  fig_retina = if (!fig_caption) 2, fig_caption = FALSE, dev = "png",
  smart = TRUE, mathjax = TRUE, keep_md = FALSE, md_extensions = NULL,
  pandoc_args = NULL, ...)
}
\arguments{
\item{number_sections}{\code{TRUE} to number section headings}

\item{fig_width}{Default width (in inches) for figures}

\item{fig_height}{Default width (in inches) for figures}

\item{fig_retina}{Scaling to perform for retina displays (defaults to 2 when
\code{fig_caption} is \code{FALSE}, which currently works for all widely
used retina displays). Set to \code{NULL} to prevent retina scaling. Note
that this will always be \code{NULL} when \code{keep_md} is specified (this
is because \code{fig_retina} relies on outputting HTML directly into the
markdown document).}

\item{fig_caption}{\code{TRUE} to render figures with captions}

\item{dev}{Graphics device to use for figure output (defaults to png)}

\item{smart}{Produce typographically correct output, converting straight
quotes to curly quotes, --- to em-dashes, -- to en-dashes, and ... to
ellipses.}

\item{mathjax}{\code{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.}

\item{keep_md}{Keep the markdown file generated by knitting.}

\item{md_extensions}{Markdown extensions to be added or removed from the
default definition or R Markdown. See the \code{\link{rmarkdown_format}}
for additional details.}

\item{pandoc_args}{Additional command line options to pass to pandoc}

\item{...}{Additional function arguments to pass to the base R Markdown HTML
  output formatter}
}
\value{
R Markdown output format to pass to \code{\link{render}}
}
\description{
An html fragment is suitable for inclusion into an external html page. See
\code{\link{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).
}
\details{
See the \href{http://rmarkdown.rstudio.com/html_document_format.html}{online
documentation} for additional details on using the \code{html_fragment}
format.
}

