pdf_document(toc = FALSE, toc_depth = 2, number_sections = FALSE,
fig_width = 6.5, fig_height = 4.5, fig_crop = TRUE,
fig_caption = TRUE, dev = "pdf", df_print = "default",
highlight = "default", template = "default", keep_tex = FALSE,
latex_engine = "pdflatex", citation_package = c("none", "natbib",
"biblatex"), includes = NULL, md_extensions = NULL, pandoc_args = NULL,
extra_dependencies = NULL)
TRUE
to include a table of contents in the outputTRUE
to number section headingsTRUE
to automatically apply the pdfcrop
utility
(if available) to pdf figuresTRUE
to render figures with captionsprint.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
.NULL
to prevent syntax highlighting.NULL
to use pandoc's
built-in template; pass a path to use a custom template that you've
created. See the documentation on
http://pandoc.org/README.html
for details on creating custom templates.natbib
or biblatex
. Use none
if neither package is to be used.includes
function).rmarkdown_format
for
additional details.latex_dependency()
, a
list of LaTeX dependencies, a character vector of LaTeX package names (e.g.
c("framed", "hyperref")
), or a named list of LaTeX package options
with the names being package names (e.g. list(hypreref =
c("unicode=true", "breaklinks=true"), lmodern = NULL)
). It can be used to
add custom LaTeX packages to the .tex header.render
pdf_document
format. Creating PDF output from R Markdown requires that LaTeX be installed. R Markdown documents can have optional metadata that is used to generate a
document header that includes the title, author, and date. For more details
see the documentation on R Markdown metadata. R Markdown documents also support citations. You can find more information on
the markdown syntax for citations in the
http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html article in the online documentation. Many aspects of the LaTeX template used to create PDF documents can be
customized using metadata. For example:
--- |
title: "Crop Analysis Q3 2013" |
fontsize: 11pt |
geometry: margin=1in |
lang
fontsize
documentclass
classoption
documentclass
(e.g. oneside); may be repeatedgeometry
mainfont, sansfont, monofont, mathfont
latex_engine
option)linkcolor, urlcolor, citecolor
linestretch
## Not run: ------------------------------------
#
# library(rmarkdown)
#
# # simple invocation
# render("input.Rmd", pdf_document())
#
# # specify an option for latex engine
# render("input.Rmd", pdf_document(latex_engine = "lualatex"))
#
# # add a table of contents and pass an option to pandoc
# render("input.Rmd", pdf_document(toc = TRUE, "--listings"))
## ---------------------------------------------
Run the code above in your browser using DataLab