|
10 | 10 | #' \code{\link[rmarkdown:render]{render}}
|
11 | 11 | #'
|
12 | 12 | #' @details This was adapted from
|
13 |
| -#' \href{https://publications.copernicus.org/for_authors/manuscript_preparation.html}{https://publications.copernicus.org/for_authors/manuscript_preparation.html}. |
| 13 | +#' \url{https://publications.copernicus.org/for_authors/manuscript_preparation.html}. |
14 | 14 | #'
|
15 | 15 | #' An number of required and optional manuscript sections, e.g. \code{acknowledgements}, \code{competinginterests}, or \code{authorcontribution}, must be declared using the respective properties of the R Markdown header - see skeleton file.
|
16 | 16 | #'
|
|
50 | 50 | #' }
|
51 | 51 | #'
|
52 | 52 | #' @export
|
53 |
| -copernicus_article <- function(..., |
54 |
| - keep_tex = TRUE, |
55 |
| - citation_package = "natbib", |
56 |
| - md_extensions = c( |
57 |
| - "-autolink_bare_uris", # disables automatic links, needed for plain email in \correspondence |
58 |
| - "-auto_identifiers" # disables \hypertarget commands |
59 |
| - )) { |
60 |
| - inherit_pdf_document( |
61 |
| - ..., citation_package = citation_package, keep_tex = keep_tex, |
62 |
| - md_extensions = md_extensions, |
63 |
| - template = find_resource("copernicus_article", "template.tex") |
| 53 | +copernicus_article <- function( |
| 54 | + ..., keep_tex = TRUE, citation_package = "natbib", md_extensions = c( |
| 55 | + "-autolink_bare_uris", # disables automatic links, needed for plain email in \correspondence |
| 56 | + "-auto_identifiers" # disables \hypertarget commands |
| 57 | + ) |
| 58 | +) { |
| 59 | + pdf_document_format( |
| 60 | + "copernicus_article", citation_package = citation_package, |
| 61 | + keep_tex = keep_tex, md_extensions = md_extensions, ... |
64 | 62 | )
|
65 | 63 | }
|
66 | 64 |
|
@@ -110,6 +108,7 @@ copernicus_journals <- list(
|
110 | 108 | #' @rdname copernicus_article
|
111 | 109 | #' @export
|
112 | 110 | copernicus_journal_abbreviations <- function(journal_name = "*") {
|
113 |
| - journal <- copernicus_journals[grepl(pattern = journal_name, x = names(copernicus_journals), ignore.case = TRUE)] |
114 |
| - return(unlist(journal)) |
| 111 | + unlist(copernicus_journals[grep( |
| 112 | + journal_name, names(copernicus_journals), ignore.case = TRUE |
| 113 | + )]) |
115 | 114 | }
|
0 commit comments