Debian Codegraph @

man/beamer_presentation.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/beamer_presentation.R
3 \name{beamer_presentation}
4 \alias{beamer_presentation}
5 \title{Convert to a Beamer presentation}
6 \usage{
7 beamer_presentation(
8 toc = FALSE,
9 slide_level = NULL,
10 number_sections = FALSE,
11 incremental = FALSE,
12 fig_width = 10,
13 fig_height = 7,
14 fig_crop = "auto",
15 fig_caption = TRUE,
16 dev = "pdf",
17 df_print = "default",
18 theme = "default",
19 colortheme = "default",
20 fonttheme = "default",
21 highlight = "default",
22 template = "default",
23 keep_tex = FALSE,
24 keep_md = FALSE,
25 latex_engine = "pdflatex",
26 citation_package = c("default", "natbib", "biblatex"),
27 self_contained = TRUE,
28 includes = NULL,
29 md_extensions = NULL,
30 pandoc_args = NULL,
31 extra_dependencies = NULL
32 )
33 }
34 \arguments{
35 \item{toc}{\code{TRUE} to include a table of contents in the output (only
36 level 1 headers will be included in the table of contents).}
37
38 \item{slide_level}{The heading level which defines individual slides. By
39 default this is the highest header level in the hierarchy that is followed
40 immediately by content, and not another header, somewhere in the document.
41 This default can be overridden by specifying an explicit
42 \code{slide_level}.}
43
44 \item{number_sections}{\code{TRUE} to number section headings}
45
46 \item{incremental}{\code{TRUE} to render slide bullets incrementally. Note
47 that if you want to reverse the default incremental behavior for an
48 individual bullet you can precede it with \code{>}. For example:
49 \emph{\verb{> - Bullet Text}}. See more in
50 \href{https://pandoc.org/MANUAL.html#incremental-lists}{Pandoc's Manual}}
51
52 \item{fig_width}{Default width (in inches) for figures}
53
54 \item{fig_height}{Default height (in inches) for figures}
55
56 \item{fig_crop}{Whether to crop PDF figures with the command
57 \command{pdfcrop}. This requires the tools \command{pdfcrop} and
58 \command{ghostscript} to be installed. By default, \code{fig_crop = TRUE}
59 if these two tools are available.}
60
61 \item{fig_caption}{\code{TRUE} to render figures with captions}
62
63 \item{dev}{Graphics device to use for figure output (defaults to pdf)}
64
65 \item{df_print}{Method to be used for printing data frames. Valid values
66 include "default", "kable", "tibble", and "paged". The "default" method
67 uses a corresponding S3 method of \code{print}, typically
68 \code{print.data.frame}. The "kable" method uses the
69 \code{\link[knitr:kable]{knitr::kable}} function. The "tibble" method uses
70 the \pkg{tibble} package to print a summary of the data frame. The "paged"
71 method creates a paginated HTML table (note that this method is only valid
72 for formats that produce HTML). In addition to the named methods you can
73 also pass an arbitrary function to be used for printing data frames. You
74 can disable the \code{df_print} behavior entirely by setting the option
75 \code{rmarkdown.df_print} to \code{FALSE}. See
76 \href{https://yihui.org/rmarkdown/html-document.html#data-frame-printing}{Data
77 frame printing section} in bookdown book for examples.}
78
79 \item{theme}{Beamer theme (e.g. "AnnArbor").}
80
81 \item{colortheme}{Beamer color theme (e.g. "dolphin").}
82
83 \item{fonttheme}{Beamer font theme (e.g. "structurebold").}
84
85 \item{highlight}{Syntax highlighting style passed to Pandoc.
86
87 Supported built-in styles include "default", "tango", "pygments", "kate",
88 "monochrome", "espresso", "zenburn", "haddock", and "breezedark".
89
90 Two custom styles are also included, "arrow", an accessible color scheme,
91 and "rstudio", which mimics the default IDE theme. Alternatively, supply a
92 path to a \samp{.theme} file to use
93 \href{https://pandoc.org/MANUAL.html#syntax-highlighting}{a custom Pandoc
94 style}. Note that custom theme requires Pandoc 2.0+.
95
96 Pass \code{NULL} to prevent syntax highlighting.}
97
98 \item{template}{Pandoc template to use for rendering. Pass "default" to use
99 the rmarkdown package default template; pass \code{NULL} to use pandoc's
100 built-in template; pass a path to use a custom template that you've
101 created. See the documentation on
102 \href{https://pandoc.org/MANUAL.html}{pandoc online documentation} for
103 details on creating custom templates.}
104
105 \item{keep_tex}{Keep the intermediate tex file used in the conversion to PDF.
106 Note that this argument does not control whether to keep the auxiliary
107 files (e.g., \file{.aux}) generated by LaTeX when compiling \file{.tex} to
108 \file{.pdf}. To keep these files, you may set \code{options(tinytex.clean =
109 FALSE)}.}
110
111 \item{keep_md}{Keep the markdown file generated by knitting.}
112
113 \item{latex_engine}{LaTeX engine for producing PDF output. Options are
114 "pdflatex", "lualatex", "xelatex" and "tectonic".}
115
116 \item{citation_package}{The LaTeX package to process citations, \code{natbib}
117 or \code{biblatex}. Use \code{default} if neither package is to be used,
118 which means citations will be processed via the command
119 \command{pandoc-citeproc}.}
120
121 \item{self_contained}{Whether to generate a full LaTeX document (\code{TRUE})
122 or just the body of a LaTeX document (\code{FALSE}). Note the LaTeX
123 document is an intermediate file unless \code{keep_tex = TRUE}.}
124
125 \item{includes}{Named list of additional content to include within the
126 document (typically created using the \code{\link{includes}} function).}
127
128 \item{md_extensions}{Markdown extensions to be added or removed from the
129 default definition of R Markdown. See the \code{\link{rmarkdown_format}} for
130 additional details.}
131
132 \item{pandoc_args}{Additional command line options to pass to pandoc}
133
134 \item{extra_dependencies}{A LaTeX dependency \code{latex_dependency()}, a
135 list of LaTeX dependencies, a character vector of LaTeX package names (e.g.
136 \code{c("framed", "hyperref")}), or a named list of LaTeX package options
137 with the names being package names (e.g. \code{list(hyperef =
138 c("unicode=true", "breaklinks=true"), lmodern = NULL)}). It can be used to
139 add custom LaTeX packages to the .tex header.}
140 }
141 \value{
142 R Markdown output format to pass to \code{\link[=render]{render()}}
143 }
144 \description{
145 Format for converting from R Markdown to a Beamer presentation.
146 }
147 \details{
148 See the \href{https://yihui.org/rmarkdown/beamer-presentation.html}{online documentation}
149 for additional details on using the \code{beamer_presentation} format.
150
151 Creating Beamer output from R Markdown requires that LaTeX be installed.
152
153 R Markdown documents can have optional metadata that is used to generate a
154 document header that includes the title, author, and date. For more details
155 see the documentation on R Markdown \link[=rmd_metadata]{metadata}.
156
157 R Markdown documents also support citations. You can find more information on
158 the markdown syntax for citations in the
159 \href{https://pandoc.org/MANUAL.html#citations}{Bibliographies and Citations}
160 article in the online documentation.
161 }
162 \examples{
163 \dontrun{
164
165 library(rmarkdown)
166
167 # simple invocation
168 render("pres.Rmd", beamer_presentation())
169
170 # specify an option for incremental rendering
171 render("pres.Rmd", beamer_presentation(incremental = TRUE))
172 }
173 }