Skip to content

Commit

Permalink
Update latex_engine defaults
Browse files Browse the repository at this point in the history
mitchelloharawild committed Apr 17, 2020
2 parents a365441 + 05d35dd commit 02393f2
Showing 5 changed files with 20 additions and 7 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -5,7 +5,8 @@ Authors@R: c(
person("Mitchell", "O'Hara-Wild", role=c("aut", "cre"), email = "[email protected]", comment=c(ORCID = "0000-0001-6729-7695")),
person("Rob", "Hyndman", email="[email protected]", 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,
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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`
10 changes: 6 additions & 4 deletions R/formats.R
Original file line number Diff line number Diff line change
@@ -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,29 +36,30 @@ 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
#'
#' @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",
package = "vitae"
)
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
11 changes: 9 additions & 2 deletions man/cv_formats.Rd

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

1 change: 1 addition & 0 deletions man/vitae-package.Rd

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

0 comments on commit 02393f2

Please sign in to comment.