diff --git a/DESCRIPTION b/DESCRIPTION index 430fa3a8..8450fb21 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -5,7 +5,8 @@ Authors@R: c( person("Mitchell", "O'Hara-Wild", role=c("aut", "cre"), email = "mail@mitchelloharawild.com", comment=c(ORCID = "0000-0001-6729-7695")), person("Rob", "Hyndman", email="Rob.Hyndman@monash.edu", role=c("aut"), comment = c(ORCID = "0000-0002-2140-5352")), person("Yihui", "Xie", role = c("ctb"), comment = c(ORCID = "0000-0003-0645-5666")), - person("Albert", "Krewinkel", role = c("cph"), comment = c("Multiple bibliographies lua filter"))) + person("Albert", "Krewinkel", role = c("cph"), comment = c("Multiple bibliographies lua filter")), + person("JooYoung", "Seo", role="ctb", comment = c(ORCID = "0000-0002-4064-6012"))) Description: Provides templates and functions to simplify the production and maintenance of curriculum vitae. Imports: bookdown, diff --git a/NEWS.md b/NEWS.md index b40d3b01..1becb441 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,8 @@ * `bibliography_entries()` are now handled using a pandoc via a lua filter. This means that typical approaches for specifying CSL and other citeproc paramaters will work as expected. +* The `citation_package` and `latex_engine` options are now changeable by users + for all output formats. ## Breaking changes * All arguments of `bibliography_entries()` except for the bibliography `file` diff --git a/R/formats.R b/R/formats.R index 79962dec..f08ad06f 100644 --- a/R/formats.R +++ b/R/formats.R @@ -4,6 +4,7 @@ #' produce curriculum vitae #' #' @param \dots Arguments passed to \code{\link[vitae]{cv_document}}. +#' @inheritParams rmarkdown::pdf_document #' #' @return An R Markdown output format object. #' @@ -35,13 +36,13 @@ twentyseconds <- function(...) { #' @rdname cv_formats #' @export -awesomecv <- function(...) { +awesomecv <- function(..., latex_engine = "xelatex") { template <- system.file("rmarkdown", "templates", "awesomecv", "resources", "awesome-cv.tex", package = "vitae" ) copy_supporting_files("awesomecv") - cv_document(..., template = template, latex_engine = "xelatex") + cv_document(..., template = template, latex_engine = latex_engine) } #' @rdname cv_formats @@ -49,7 +50,8 @@ awesomecv <- function(...) { #' @param theme The theme used for the template. #' #' @export -moderncv <- function(..., theme = c("casual", "classic", "oldstyle", "banking", "fancy")) { +moderncv <- function(..., theme = c("casual", "classic", "oldstyle", "banking", "fancy"), + latex_engine = "pdflatex") { theme <- match.arg(theme) template <- system.file("rmarkdown", "templates", "moderncv", "resources", "moderncv.tex", @@ -57,7 +59,7 @@ moderncv <- function(..., theme = c("casual", "classic", "oldstyle", "banking", ) copy_supporting_files("moderncv") cv_document(..., pandoc_vars = list(theme = theme), - template = template, latex_engine = "pdflatex") + template = template, latex_engine = latex_engine) } #' @rdname cv_formats diff --git a/man/cv_formats.Rd b/man/cv_formats.Rd index 460bfdfb..19dfeeb9 100644 --- a/man/cv_formats.Rd +++ b/man/cv_formats.Rd @@ -13,15 +13,22 @@ hyndman(...) twentyseconds(...) -awesomecv(...) +awesomecv(..., latex_engine = "xelatex") -moderncv(..., theme = c("casual", "classic", "oldstyle", "banking", "fancy")) +moderncv( + ..., + theme = c("casual", "classic", "oldstyle", "banking", "fancy"), + latex_engine = "pdflatex" +) latexcv(..., theme = c("classic", "modern", "rows", "sidebar", "two_column")) } \arguments{ \item{\dots}{Arguments passed to \code{\link[vitae]{cv_document}}.} +\item{latex_engine}{LaTeX engine for producing PDF output. Options are +"pdflatex", "lualatex", and "xelatex".} + \item{theme}{The theme used for the template.} } \value{ diff --git a/man/vitae-package.Rd b/man/vitae-package.Rd index 0c09fc4e..53e21a13 100644 --- a/man/vitae-package.Rd +++ b/man/vitae-package.Rd @@ -31,6 +31,7 @@ Other contributors: \itemize{ \item Yihui Xie (\href{https://orcid.org/0000-0003-0645-5666}{ORCID}) [contributor] \item Albert Krewinkel (Multiple bibliographies lua filter) [copyright holder] + \item JooYoung Seo (\href{https://orcid.org/0000-0002-4064-6012}{ORCID}) [contributor] } }