Skip to content

Commit

Permalink
Deprecate rjournal rticle in favor of rjtools (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
cderv committed May 11, 2023
1 parent 6d988f8 commit 49421fe
Show file tree
Hide file tree
Showing 15 changed files with 228 additions and 6 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: rticles
Title: Article Formats for R Markdown
Version: 0.24.12
Version: 0.24.13
Authors@R: c(
person("JJ", "Allaire", , "jj@posit.co", role = "aut"),
person("Yihui", "Xie", , "xie@yihui.name", role = "aut",
Expand Down Expand Up @@ -88,9 +88,11 @@ URL: https://github.com/rstudio/rticles
BugReports: https://github.com/rstudio/rticles/issues
Imports:
knitr (>= 1.30),
lifecycle,
rmarkdown (>= 2.14),
tinytex (>= 0.30),
utils,
withr,
xfun,
yaml
Suggests:
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

- `ajs_article()` and `jss_article()` require Pandoc 2.7+ (possibly required by some changes in `jss.cls`)

- `rjournal_article()` is now soft deprecated in favor of `rjtools::rjournal_pdf_article()` as **rjtools** package is now the recommended workflow at <https://rjournal.github.io/submissions.html>

## NEW FEATURES

- `ieee_article()` now supports several affiliations per `authors` when using the `wide: true` mode (thanks, @phamdn, #500).
Expand Down
12 changes: 11 additions & 1 deletion R/rjournal_article.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
#' R Journal format.
#'
#' @description
#' `r lifecycle::badge('deprecated')`
#'
#' This function is now deprecated in favor of the [**rjtools**](https://rjournal.github.io/rjtools/) package
#' which is now officialy recommanded by R Journal <https://rjournal.github.io/submissions.html>. See below for document
#'
#' @details # About this format and the R Journal requirements
#'
#' Format for creating R Journal articles. Adapted from
#' <https://journal.r-project.org/submissions.html>.
#'
#' This file is only a basic article template. For full details of _The R
#' Journal_ style and information on how to prepare your article for submission,
#' see the [Instructions for Authors](https://journal.r-project.org/share/author-guide.pdf)
#'
#' ## About this format and the R Journal requirements

#'
#' `rticles::rjournal_article` will help you build the correct files requirements:
#'
Expand Down Expand Up @@ -51,6 +59,8 @@
#' @param ... Arguments to [rmarkdown::pdf_document()].
#' @export
rjournal_article <- function(..., keep_tex = TRUE, citation_package = "natbib") {

lifecycle::deprecate_warn("0.25", "rjournal_article()", "rjtools::rjournal_pdf_article()", details = "See official recommandation at https://rjournal.github.io/submissions.html")
rmarkdown::pandoc_available("2.2", TRUE)

base <- pdf_document_format(
Expand Down
21 changes: 21 additions & 0 deletions man/figures/lifecycle-archived.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-defunct.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-deprecated.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-experimental.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-maturing.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-questioning.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-soft-deprecated.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions man/figures/lifecycle-stable.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-superseded.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 8 additions & 4 deletions man/rjournal_article.Rd

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

2 changes: 2 additions & 0 deletions tests/testit/test-formats.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
test_format <- function(name, output_options = NULL, skip = NULL) {

withr::local_options(lifecycle_verbosity = "quiet")

# don't run on CRAN due to complicated dependencies (Pandoc/LaTeX packages)
if (!identical(Sys.getenv("NOT_CRAN"), "true")) return()
# skip if requested
Expand Down
5 changes: 5 additions & 0 deletions tests/testthat/test-rjournal_article.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test_that("rjournal_article() is deprecated", {
expect_snapshot({
x <- rjournal_article()
})
})

0 comments on commit 49421fe

Please sign in to comment.