Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1161: default self_contained = TRUE for beamer_presentation() #1164

Merged
merged 1 commit into from
Oct 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions R/beamer_presentation.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@
#' @param theme Beamer theme (e.g. "AnnArbor").
#' @param colortheme Beamer color theme (e.g. "dolphin").
#' @param fonttheme Beamer font theme (e.g. "structurebold").
#' @param self_contained Whether to generate a full LaTeX document (\code{TRUE})
#' or just the body of a LaTeX document (\code{FALSE}). Note the LaTeX
#' document is an intermediate file unless \code{keep_tex = TRUE}.
#'
#' @return R Markdown output format to pass to \code{\link{render}}
#'
#' @details
#'
#' See the \href{http://rmarkdown.rstudio.com/beamer_presentation_format.html}{online
#' documentation} for additional details on using the \code{beamer_presentation} format.
#' See the
#' \href{http://rmarkdown.rstudio.com/beamer_presentation_format.html}{online
#' documentation} for additional details on using the \code{beamer_presentation}
#' format.
#'
#' Creating Beamer output from R Markdown requires that LaTeX be installed.
#'
Expand Down Expand Up @@ -69,6 +74,7 @@ beamer_presentation <- function(toc = FALSE,
keep_tex = FALSE,
latex_engine = "pdflatex",
citation_package = c("none", "natbib", "biblatex"),
self_contained = TRUE,
includes = NULL,
md_extensions = NULL,
pandoc_args = NULL) {
Expand Down Expand Up @@ -116,6 +122,9 @@ beamer_presentation <- function(toc = FALSE,
citation_package <- match.arg(citation_package)
if (citation_package != "none") args <- c(args, paste0("--", citation_package))

# generate a self-contained LaTeX document (including preamble)
if (self_contained) args <- c(args, "--self-contained")

# content includes
args <- c(args, includes_to_pandoc_args(includes))

Expand Down
2 changes: 1 addition & 1 deletion R/slidy_presentation.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#'
#' Format for converting from R Markdown to a slidy presentation.
#'
#' @inheritParams beamer_presentation
#' @inheritParams pdf_document
#' @inheritParams html_document
#' @inheritParams beamer_presentation
#'
#' @param duration Duration (in minutes) of the slide deck. This value is used
#' to add a countdown timer to the slide footer.
Expand Down
2 changes: 2 additions & 0 deletions inst/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ rmarkdown 1.7 (unreleased)
* `render()` will stop if the output format is PDF but there are any errors
during building the index or bibliography (#1166).

* `beamer_presentation()` doesn't work when `citation_package != 'none'` (#1161).

rmarkdown 1.6
--------------------------------------------------------------------------------

Expand Down
14 changes: 10 additions & 4 deletions man/beamer_presentation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.