diff --git a/R/rj_article.R b/R/rj_article.R index f63af8b..5447837 100644 --- a/R/rj_article.R +++ b/R/rj_article.R @@ -10,13 +10,12 @@ #' and `rticles::rjournal_article()` for pdf articles. #' @inheritParams distill::distill_article #' @param legacy_pdf whether an article is from the past and only have pdf version -#' @param web_only additional param for embedding PDF or using Rmd to produce HTML #' @importFrom rlang caller_env env_poke #' @return the rendered R Journal article #' @export #' @rdname rjournal_article rjournal_article <- function(toc = FALSE, self_contained = FALSE, - legacy_pdf = FALSE, web_only = !legacy_pdf, ...) { + legacy_pdf = FALSE, ...) { args <- c() base_format <- distill::distill_article( self_contained = self_contained, toc = toc, ... @@ -149,7 +148,7 @@ rjournal_article <- function(toc = FALSE, self_contained = FALSE, output_dir) { # Add embedded PDF - embed_pdf <- if(! web_only){ + embed_pdf <- if(legacy_pdf){ whisker::whisker.render( '
@@ -184,7 +183,7 @@ rjournal_article <- function(toc = FALSE, self_contained = FALSE, data <- c(data, list(BIOC = BIOC)) } } - if (web_only && legacy_pdf) { + if (FALSE && legacy_pdf) { TEXOR <- "This article is converted from a Legacy LaTeX article using the [texor](https://cran.r-project.org/package=texor) package. The pdf version is the official version. To report a problem with the html, @@ -204,7 +203,7 @@ rjournal_article <- function(toc = FALSE, self_contained = FALSE, yaml::as.yaml(metadata), "---", "", - if(! web_only) embed_pdf else input[(front_matter_delimiters[2]+1):length(input)], + if(legacy_pdf) embed_pdf else input[(front_matter_delimiters[2]+1):length(input)], "", appendix ), diff --git a/inst/rjdistill.html b/inst/rjdistill.html index 08ef409..17853a1 100644 --- a/inst/rjdistill.html +++ b/inst/rjdistill.html @@ -142,4 +142,27 @@ color: rgb(60, 60, 60); } + d-article h2 { + border-bottom: 0px solid rgba(0, 0, 0, 0.1); + padding-bottom: 0rem; + } + d-article h3 { + font-size: 20px; + } + d-article h4 { + font-size: 18px; + text-transform: none; + } + + @media (min-width: 1024px) { + d-article h2 { + font-size: 32px; + } + d-article h3 { + font-size: 24px; + } + d-article h4 { + font-size: 20px; + } + } diff --git a/man/rjournal_article.Rd b/man/rjournal_article.Rd index c3dbe16..303de16 100644 --- a/man/rjournal_article.Rd +++ b/man/rjournal_article.Rd @@ -7,13 +7,7 @@ \alias{rjournal_web_article} \title{R Markdown output formats for R Journal articles} \usage{ -rjournal_article( - toc = FALSE, - self_contained = FALSE, - legacy_pdf = FALSE, - web_only = !legacy_pdf, - ... -) +rjournal_article(toc = FALSE, self_contained = FALSE, legacy_pdf = FALSE, ...) rjournal_pdf_article(..., self_contained = FALSE) @@ -21,7 +15,6 @@ rjournal_web_article( toc = FALSE, self_contained = FALSE, legacy_pdf = FALSE, - web_only = !legacy_pdf, ... ) } @@ -36,8 +29,6 @@ its size).} \item{legacy_pdf}{whether an article is from the past and only have pdf version} -\item{web_only}{additional param for embedding PDF or using Rmd to produce HTML} - \item{...}{Arguments passed to \code{distill::distill_article()} for web articles, and \code{rticles::rjournal_article()} for pdf articles.} }