From 10c5a5ea86df129a20665419b74f9a1a3ef3bce7 Mon Sep 17 00:00:00 2001 From: mitchelloharawild Date: Fri, 6 Oct 2023 19:00:21 +1100 Subject: [PATCH] rjournal_web_article() doesn't produce pdf - use rjournal_article() Ref #112 --- NEWS.md | 6 ++++++ R/rj_web_article.R | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index c8759b7..9ca1472 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,12 @@ * handling of longtable * utilise system sty file, not author supplied +Breaking changes +* `rjournal_web_article()` will no longer produce the PDF via dual rendering, + to produce both HTML and PDF please use `rjournal_article()`. This breaking + change has been done to improve semantics and allow a way to quickly work + on articles by specifying which output format (web or pdf) is desired. + # rjtools 1.0.11 * removed return value, and set create_article to write a message diff --git a/R/rj_web_article.R b/R/rj_web_article.R index 75a41bf..bfd1c34 100644 --- a/R/rj_web_article.R +++ b/R/rj_web_article.R @@ -1,3 +1,9 @@ #' @export #' @rdname rjournal_article -rjournal_web_article <- rjournal_article +rjournal_web_article <- function(toc = FALSE, self_contained = FALSE, ...) { + base_format <- rjournal_article( + self_contained = self_contained, toc = toc, ... + ) + base_format$on_exit <- function() {} + base_format +}