|
1 | 1 | #' American Geophysical Union (AGU) format |
2 | 2 | #' |
3 | | -#' Format for creating a American Geophysical Union (AGU) article. |
4 | | -#' Adapted from |
5 | | -#' \href{https://publications.agu.org/author-resource-center/checklists-and-templates/}{https://publications.agu.org/author-resource-center/checklists-and-templates/}. |
6 | | -#' |
| 3 | +#' Format for creating a American Geophysical Union (AGU) article. Adapted from |
| 4 | +#' \url{https://publications.agu.org/author-resource-center/checklists-and-templates/}. |
7 | 5 | #' @inheritParams rmarkdown::pdf_document |
8 | | -#' @param ... Arguments to \code{rmarkdown::pdf_document} |
9 | | -#' |
10 | | -#' @return R Markdown output format to pass to \code{\link[rmarkdown:render]{render}} |
11 | | -#' |
| 6 | +#' @param ... Arguments to \code{rmarkdown::pdf_document()}. |
| 7 | +#' @return An R Markdown output format. |
12 | 8 | #' @examples |
13 | | -#' |
14 | 9 | #' \dontrun{ |
15 | | -#' library(rmarkdown) |
16 | | -#' draft("MyArticle.Rmd", template = "agu_article", package = "rticles") |
| 10 | +#' rmarkdown::draft("MyArticle.Rmd", template = "agu_article", package = "rticles") |
17 | 11 | #' } |
18 | | -#' |
19 | 12 | #' @export |
20 | | -agu_article <- function(..., keep_tex = TRUE, citation_package = 'natbib', |
21 | | - highlight = NULL, md_extensions = c("-autolink_bare_uris", |
22 | | - "-auto_identifiers")) { |
23 | | - template <- find_resource("agu_article", "template.tex") |
24 | | - inherit_pdf_document(template = template, |
25 | | - keep_tex = keep_tex, |
26 | | - citation_package = citation_package, |
27 | | - md_extensions = md_extensions, |
28 | | - highlight = highlight, |
29 | | - ...) |
| 13 | +agu_article <- function( |
| 14 | + ..., keep_tex = TRUE, citation_package = 'natbib', |
| 15 | + highlight = NULL, md_extensions = c("-autolink_bare_uris", "-auto_identifiers") |
| 16 | +) { |
| 17 | + inherit_pdf_document( |
| 18 | + template = find_resource("agu_article", "template.tex"), keep_tex = keep_tex, |
| 19 | + citation_package = citation_package, md_extensions = md_extensions, |
| 20 | + highlight = highlight, ... |
| 21 | + ) |
30 | 22 | } |
0 commit comments