Skip to content

Update to elsevier template #467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = "[email protected]"),
person("Yihui", "Xie", role = c("aut"), email = "[email protected]", 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to think about this. I don't mind doing that for new articles formats, but elsevier_article() is not a new function. Adding this requirement will make this a breaking change. They would need to have a newer Pandoc. Version 2.10 is not that old "2020-06-29" and even if RStudio is shipping with recent version, there could be some users still using an older 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