Skip to content

Commit

Permalink
Update to elsevier template (#467)
Browse files Browse the repository at this point in the history
This introduces a minimum requirement of Pandoc 2.10 and changes some YAML fields for the template. 

Co-authored-by: Christophe Dervieux <christophe.dervieux@gmail.com>
  • Loading branch information
robjhyndman and cderv authored Feb 10, 2022
1 parent c687c96 commit 3cc8bfc
Show file tree
Hide file tree
Showing 19 changed files with 911 additions and 1,444 deletions.
1 change: 1 addition & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:

- name: preinstall some CTAN packages
run: |
tlmgr update --self
tlmgr install achemso adobemapping ae algorithmicx algorithms ametsoc amscls apacite arphic babel-english babel-french beamer biblatex bookmark caption carlisle changepage charter chemgreek cite cjk cjkpunct cns colortbl courier crop ctablestack ctex datetime dblfloatfix draftwatermark endfloat endnotes enumitem environ epsf epstopdf eso-pic esvect etex-pkg everyhook everypage extsizes fancyhdr fandol floatflt fmtcount fontaxes fonts-tlwg footmisc forarray fp fpl garuda-c90 grfext hyphen-french hyphenat ifmtarg jknapltx kastrup lastpage latex-base-dev lettrine lineno listings logreq luatexbase luatexja ly1 marginnote marvosym mathpazo mathspec mdframed mhchem microtype minifp mnras morefloats moreverb mptopdf multirow needspace newfloat newtx norasi-c90 oberdiek palatino parskip pdfsync pgf placeins platex platex-tools preprint psfrag psnfss ptex ptex-base ptex-fonts ragged2e rsfs seqsplit setspace sidecap soul soulutf8 stix sttools subfigure svn-prov symbol tabto-ltx tcolorbox tex-gyre textcase titlesec totcount translator trimspaces ttfutils ucs uhc ulem units uplatex upquote uptex uptex-base uptex-fonts varwidth vruler wadalab wrapfig xcjk2uni xecjk xifthen xpinyin xstring xypic zapfchan zhmetrics zhmetrics-uptex zhnumber zref
- uses: r-lib/actions/setup-r-dependencies@v1
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rticles
Type: Package
Title: Article Formats for R Markdown
Version: 0.22.4
Version: 0.22.5
Authors@R: c(
person("JJ", "Allaire", role = "aut", email = "jj@rstudio.com"),
person("Yihui", "Xie", role = c("aut"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# rticles 0.23 (development version)

## BREAKING CHANGE

- Update Elsevier template and of `elsarticle.cls` to version 3.3 in `elsevier_article()`. This is a breaking change in the format that now **requires at least Pandoc 2.10** and uses the latest version of the `.cls` file, also provided in [elsarticle](https://ctan.org/pkg/elsarticle) on CTAN. See the included template for this format. Also, `natbib` is now used y default for citation processing. You can use [**renv**](https://pkgs.rstudio.com/renv/) to manage your project in locked environment of packages (thanks, @robjhyndman, #467).

## NEW FEATURES

- Update `jss_article()` template to handle ORCID links for each author from a new YAML field, and to use updated `jss.cls` class file (thanks, @remlapmot, #465).
Expand All @@ -10,7 +14,7 @@

- New `isba_article()` template for submissions to Bayesian Analysis journal (thanks, @dmi3kno, #461).

- Update Copernicus Publications template to version 6.6 from 2022-01-18 (@RLumSK, #463, #464)
- Update Copernicus Publications template to version 6.6 from 2022-01-18 (@RLumSK, #463, #464).

# rticles 0.22

Expand Down
14 changes: 12 additions & 2 deletions R/article.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,23 @@ ctex <- ctex_article
#' @section `elsevier_article`: Format for creating submissions to Elsevier
#' journals. Adapted from
#' <https://www.elsevier.com/authors/policies-and-guidelines/latex-instructions>.
#'
#' It requires a minimum version of 2.10 for Pandoc.
#' @export
#' @rdname article
elsevier_article <- function(
..., keep_tex = TRUE, md_extensions = c("-autolink_bare_uris")
..., keep_tex = TRUE, md_extensions = c("-autolink_bare_uris"),
citation_package = "natbib"
) {
if (citation_package == "biblatex") {
stop("Elsevier template does not support `biblatex` for citation processing.")
}
if (!rmarkdown::pandoc_available("2.10")) {
stop("`elsevier_article()` now requires a minimum of pandoc 2.10.")
}
pdf_document_format(
"elsevier", keep_tex = keep_tex, md_extensions = md_extensions, ...
"elsevier", keep_tex = keep_tex, md_extensions = md_extensions,
citation_package = citation_package, ...
)
}

Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Currently included templates and their contributors are the following:
| [Bulletin de l'AMQ](https://www.amq.math.ca/bulletin/)| [\@desautm](https://github.com/desautm)| [\#145](https://github.com/rstudio/rticles/pull/145) | `amq_article()`|
| [Copernicus Publications](https://publications.copernicus.org)| [\@nuest](https://github.com/nuest), [\@RLumSK](https://github.com/RLumSK) | [\#172](https://github.com/rstudio/rticles/pull/172), [\#342](https://github.com/rstudio/rticles/pull/342) | `copernicus_article()` |
| [CTeX](https://ctan.org/pkg/ctex) ||| `ctex()` |
| [Elsevier](https://www.elsevier.com)| [\@cboettig](https://github.com/cboettig)| [\#27](https://github.com/rstudio/rticles/pull/27) | `elsevier_article()` |
| [Elsevier](https://www.elsevier.com)| [\@cboettig](https://github.com/cboettig), [\@robjhyndman](https://github.com/robjhyndman) | [\#27](https://github.com/rstudio/rticles/pull/27), [\#467](https://github.com/rstudio/rticles/pull/467) | `elsevier_article()` |
| [Frontiers](https://www.frontiersin.org/) | [\@muschellij2](https://github.com/muschellij2)| [\#211](https://github.com/rstudio/rticles/pull/211) | `frontiers_article()`|
| [Glossa](https://www.glossa-journal.org) | [\@stefanocoretta](https://github.com/stefanocoretta) | [#361](https://github.com/rstudio/rticles/pull/361) | `glossa_article()` |
| [IEEE Transaction](http://www.ieee.org/publications_standards/publications/authors/author_templates.html) | [\@Emaasit](https://github.com/Emaasit), [\@espinielli](https://github.com/espinielli), [\@nathanweeks](https://github.com/nathanweeks), [\@DunLug](https://github.com/DunLug) | [\#97](https://github.com/rstudio/rticles/pull/97), [\#169](https://github.com/rstudio/rticles/pull/169), [\#227](https://github.com/rstudio/rticles/pull/227), [\#263](https://github.com/rstudio/rticles/pull/263), [\#264](https://github.com/rstudio/rticles/pull/264), [\#265](https://github.com/rstudio/rticles/pull/265) | `ieee_article()` |
Expand Down
Loading

0 comments on commit 3cc8bfc

Please sign in to comment.