From 2cd57785847562b0364ce35adf069ba1deb7a946 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 11 Dec 2025 11:31:23 +0100 Subject: [PATCH 1/4] rticles::rjournal_article() is now defunct Remove ressources which will help reduce package size and allow cran release --- DESCRIPTION | 2 +- NAMESPACE | 1 - R/rjournal_article.R | 165 +-------- .../rjournal/resources/RJwrapper.tex | 170 --------- .../templates/rjournal/resources/template.tex | 33 -- .../templates/rjournal/skeleton/RJournal.sty | 343 ------------------ .../rjournal/skeleton/RJreferences.bib | 18 - .../templates/rjournal/skeleton/Rlogo-5.png | Bin 10704 -> 0 bytes .../templates/rjournal/skeleton/skeleton.Rmd | 82 ----- .../templates/rjournal/template.yaml | 5 - man/rjournal_article.Rd | 67 +--- 11 files changed, 7 insertions(+), 879 deletions(-) delete mode 100644 inst/rmarkdown/templates/rjournal/resources/RJwrapper.tex delete mode 100644 inst/rmarkdown/templates/rjournal/resources/template.tex delete mode 100644 inst/rmarkdown/templates/rjournal/skeleton/RJournal.sty delete mode 100644 inst/rmarkdown/templates/rjournal/skeleton/RJreferences.bib delete mode 100644 inst/rmarkdown/templates/rjournal/skeleton/Rlogo-5.png delete mode 100644 inst/rmarkdown/templates/rjournal/skeleton/skeleton.Rmd delete mode 100644 inst/rmarkdown/templates/rjournal/template.yaml diff --git a/DESCRIPTION b/DESCRIPTION index 742a80e9d..2bb97be6e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -108,5 +108,5 @@ Config/Needs/website: magick, pdftools, gifski, tidyverse/tidytemplate, Config/testthat/edition: 3 Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.3 SystemRequirements: GNU make diff --git a/NAMESPACE b/NAMESPACE index 8929ca591..cffebc18a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -37,7 +37,6 @@ export(peerj_article) export(pihph_article) export(plos_article) export(pnas_article) -export(rjournal_article) export(rsos_article) export(rss_article) export(sage_article) diff --git a/R/rjournal_article.R b/R/rjournal_article.R index be76521aa..1ce50e824 100644 --- a/R/rjournal_article.R +++ b/R/rjournal_article.R @@ -3,169 +3,12 @@ #' @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 . See below for document +#' This function is now defunct in favor of the [**rjtools**](https://rjournal.github.io/rjtools/) package +#' which is now officialy recommanded by R Journal . #' -#' @details # About this format and the R Journal requirements -#' -#' Format for creating R Journal articles. Adapted from -#' . -#' -#' 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) -#' - -#' -#' `rticles::rjournal_article` will help you build the correct files requirements: -#' -#' - A R file will be generated automatically using `knitr::purl` - see -#' https://bookdown.org/yihui/rmarkdown-cookbook/purl.html for more information. -#' - A tex file will be generated from this Rmd file and correctly included in -#' `RJwapper.tex` as expected to build `RJwrapper.pdf`. -#' - All figure files will be kept in the default rmarkdown `*_files` folder. This -#' happens because `keep_tex = TRUE` by default in `rticles::rjournal_article` -#' - Only the bib filename is to be modified. An example bib file is included in the -#' template (`RJreferences.bib`) and you will have to name your bib file as the -#' tex, R, and pdf files. -#' -#' # About YAML header fields -#' -#' This section documents some of the YAML fields that can be used with this -#' formats. -#' -#' ## The `author` field in the YAML header -#' -#' | FIELD | TYPE | DESCRIPTION | -#' | ------ | ---- | ----------- | -#' | `name` | *required* | name and surname of the author | -#' | `affiliation` | *required* | name of the author's affiliation | -#' | `address` | *required* | at least one address line for the affiliation | -#' | `url` | *optional* | an additional url for the author or the main affiliation | -#' | `orcid` | *optional* | the authors ORCID if available | -#' | `email` | *required* | the author's e-mail address | -#' | `affiliation2` | *optional* | name of the author's 2nd affiliation | -#' | `address2` | *optional* | address lines belonging to the author's 2nd affiliation | -#' -#' *Please note: Only one `url`, `orcid` and `email` can be provided per author.* -#' -#' ## Other YAML fields -#' -#' | FIELD | TYPE | DESCRIPTION | -#' | ----- | ---- | ----------- | -#' | `bibliography` | *with default* | the BibTeX file with the reference entries | -#' -#' @inheritParams rmarkdown::pdf_document -#' @param ... Arguments to [rmarkdown::pdf_document()]. -#' @export +#' @internal 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( - "rjournal", - highlight = NULL, citation_package = citation_package, - keep_tex = keep_tex, ... - ) - - # Render will generate tex file, post-knit hook gerenates the R file, - # post-process hook generates appropriate RJwrapper.tex and - # use pandoc to build pdf from that - base$pandoc$to <- "latex" - base$pandoc$ext <- ".tex" - - # Generates R file expected by R journal requirement. - # We do that in the post-knit hook do access input file path. - pk <- base$post_knit - output_R <- NULL - base$post_knit <- function(metadata, input_file, runtime, ...) { - # run post_knit it exists - if (is.function(pk)) pk(metadata, input_file, runtime, ...) - - # purl the Rmd file to R code per requirement - temp_R <- tempfile(fileext = ".R") - output_R <<- knitr::purl(input_file, temp_R, documentation = 1, quiet = TRUE) - # Add magic comment about '"do not edit" (rstudio/rstudio#2082) - xfun::write_utf8(c( - "# Generated by `rjournal_article()` using `knitr::purl()`: do not edit by hand", - sprintf("# Please edit %s to modify this file", input_file), - "", - xfun::read_utf8(output_R) - ), output_R) - - NULL - } - - base$post_processor <- function(metadata, utf8_input, output_file, clean, verbose) { - filename <- basename(output_file) - # underscores in the filename will be problematic in \input{filename}; - # pandoc will escape underscores but it should not, i.e., should be - # \input{foo_bar} instead of \input{foo\_bar} - if (filename != (filename2 <- gsub("_", "-", filename))) { - file.rename(filename, filename2) - filename <- filename2 - } - - # Copy purl-ed R file with the correct name - dest_file <- xfun::with_ext(filename, "R") - our_file <- TRUE - if (file.exists(dest_file)) { - # we check this file is generated by us - # otherwise we leave it as is and warn - current_r <- xfun::read_utf8(dest_file) - our_file <- grepl("Generated.*rjournal_article.*do not edit by hand", current_r[1]) - if (!our_file) { - warning( - sprintf("R file with name '%s' already exists.", dest_file), - "\nIt will not be overwritten by the one generated", - " during rendering using `knitr::purl()`.", - "\nRemove the existing file to obtain the generated one.", - call. = FALSE - ) - } - } - if (our_file) { - # we only overwrite if it is our file - file.copy(output_R, xfun::with_ext(filename, "R"), overwrite = TRUE) - } - unlink(output_R) - - # post process TEX file - temp_tex <- xfun::read_utf8(filename) - temp_tex <- post_process_authors(temp_tex) - xfun::write_utf8(temp_tex, filename) - - # check bibliography name - bib_filename <- metadata$bibliography - if (length(bib_filename) == 1 && - xfun::sans_ext(bib_filename) != xfun::sans_ext(filename)) { - msg <- paste0( - "Per R journal requirement, bibliography file and tex file should", - " have the same name. Currently, you have a bib file ", bib_filename, - " and a tex file ", filename, ". Don't forget to rename and change", - " the bibliography field in the YAML header." - ) - warning(msg, call. = FALSE) - } - - # Create RJwrapper.tex per R Journal requirement - m <- list(filename = xfun::sans_ext(filename)) - h <- get_list_element(metadata, c("output", "rticles::rjournal_article", "includes", "in_header")) - h <- c(h, if (length(preamble <- unlist(metadata[c("preamble", "header-includes")]))) { - f <- tempfile(fileext = ".tex") - on.exit(unlink(f), add = TRUE) - xfun::write_utf8(preamble, f) - f - }) - t <- find_resource("rjournal", "RJwrapper.tex") - template_pandoc(m, t, "RJwrapper.tex", h, verbose) - - tinytex::latexmk("RJwrapper.tex", base$pandoc$latex_engine, clean = clean) - } - - # Mostly copied from knitr::render_sweave - base$knitr$opts_chunk$comment <- "#>" + lifecycle::deprecate_stop("0.25", "rjournal_article()", "rjtools::rjournal_pdf_article()", details = "See official recommandation at https://rjournal.github.io/submissions.html") - set_sweave_hooks(base) } diff --git a/inst/rmarkdown/templates/rjournal/resources/RJwrapper.tex b/inst/rmarkdown/templates/rjournal/resources/RJwrapper.tex deleted file mode 100644 index f96e6bb6b..000000000 --- a/inst/rmarkdown/templates/rjournal/resources/RJwrapper.tex +++ /dev/null @@ -1,170 +0,0 @@ -\documentclass[a4paper]{report} -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} -\usepackage{RJournal} -\usepackage{amsmath,amssymb,array} -\usepackage{booktabs} - -$if(highlighting-macros)$ -% Pandoc syntax highlighting -$highlighting-macros$ -$endif$ - -% tightlist command for lists without linebreak -\providecommand{\tightlist}{% - \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} - -$if(tables)$ -% From pandoc table feature -\usepackage{longtable,booktabs,array} -$if(pandoc3821)$\newcounter{none} % for unnumbered tables -$endif$ -$if(multirow)$ -\usepackage{multirow} -$endif$ -\usepackage{calc} % for calculating minipage widths -% Correct order of tables after \paragraph or \subparagraph -\usepackage{etoolbox} -\makeatletter -\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} -\makeatother -% Allow footnotes in longtable head/foot -\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} -\makesavenoteenv{longtable} -$endif$ - -% Add imagehandling -$-- Only needed for pandoc 3.2.1 and above requiring graphics for new command. -$if(graphics)$$if(pandoc321)$ -% Custom command from Pandoc 3.2.1 to scale images if necessary -\usepackage{graphicx} -\makeatletter -\newsavebox\pandoc@box -\newcommand*\pandocbounded[1]{% scales image to fit in text height/width - \sbox\pandoc@box{#1}% - \Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}% - \Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}% - \ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both - \ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}% - \else\usebox{\pandoc@box}% - \fi% -} -\makeatother -$endif$$endif$ - -$if(csl-refs)$ -% Pandoc citation processing -$if(pandoc318)$ -%From Pandoc 3.1.8 -% definitions for citeproc citations -\NewDocumentCommand\citeproctext{}{} -\NewDocumentCommand\citeproc{mm}{% - \begingroup\def\citeproctext{#2}\cite{#1}\endgroup} -\makeatletter - % allow citations to break across lines - \let\@cite@ofmt\@firstofone - % avoid brackets around text for \cite: - \def\@biblabel#1{} - \def\@cite#1#2{{#1\if@tempswa , #2\fi}} -\makeatother -\newlength{\cslhangindent} -\setlength{\cslhangindent}{1.5em} -\newlength{\csllabelwidth} -\setlength{\csllabelwidth}{3em} -\newenvironment{CSLReferences}[2] % #1 hanging-indent, #2 entry-spacing - {\begin{list}{}{% - \setlength{\itemindent}{0pt} - \setlength{\leftmargin}{0pt} - \setlength{\parsep}{0pt} - % turn on hanging indent if param 1 is 1 - \ifodd #1 - \setlength{\leftmargin}{\cslhangindent} - \setlength{\itemindent}{-1\cslhangindent} - \fi - % set entry spacing - \setlength{\itemsep}{#2\baselineskip}}} - {\end{list}} -$else$$if(pandoc317)$ -% definitions for citeproc citations -\NewDocumentCommand\citeproctext{}{} -\NewDocumentCommand\citeproc{mm}{% - \begingroup\def\citeproctext{#2}\cite{#1}\endgroup} -% avoid brackets around text for \cite: -\makeatletter - \def\@biblabel#1{} - \def\@cite#1#2{{#1\if@tempswa , #2\fi}} -\makeatother -\newlength{\cslhangindent} -\setlength{\cslhangindent}{1.5em} -\newlength{\csllabelwidth} -\setlength{\csllabelwidth}{3em} -\newlength{\cslentryspacing} -\setlength{\cslentryspacing}{0em} -\usepackage{enumitem} -\newlist{CSLReferences}{itemize}{1} -\setlist[CSLReferences]{label={}, - leftmargin=\cslhangindent, - itemindent=-1\cslhangindent, - parsep=\parskip, - itemsep=\cslentryspacing} -$else$ -\newlength{\cslhangindent} -\setlength{\cslhangindent}{1.5em} -\newlength{\csllabelwidth} -\setlength{\csllabelwidth}{3em} -\newlength{\cslentryspacingunit} % times entry-spacing -\setlength{\cslentryspacingunit}{\parskip} -% for Pandoc 2.8 to 2.10.1 -\newenvironment{cslreferences}% - {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% - \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% - {\par} -% For Pandoc 2.11+ -\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing - {% don't indent paragraphs - \setlength{\parindent}{0pt} - % turn on hanging indent if param 1 is 1 - \ifodd #1 - \let\oldpar\par - \def\par{\hangindent=\cslhangindent\oldpar} - \fi - % set entry spacing - \setlength{\parskip}{#2\cslentryspacingunit} - }% - {} -$endif$$endif$ -\usepackage{calc} -\newcommand{\CSLBlock}[1]{#1\hfill\break} -\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} -\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} -\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} -$endif$ - -$for(header-includes)$ -$header-includes$ -$endfor$ - -\begin{document} - -$for(include-before)$ -$include-before$ - -$endfor$ - -%% do not edit, for illustration only -\sectionhead{Contributed research article} -\volume{XX} -\volnumber{YY} -\year{20ZZ} -\month{AAAA} - -\begin{article} - \input{$filename$} -\end{article} - -$for(include-after)$ -$include-after$ - -$endfor$ - -\end{document} diff --git a/inst/rmarkdown/templates/rjournal/resources/template.tex b/inst/rmarkdown/templates/rjournal/resources/template.tex deleted file mode 100644 index 49e42eb0a..000000000 --- a/inst/rmarkdown/templates/rjournal/resources/template.tex +++ /dev/null @@ -1,33 +0,0 @@ -% !TeX root = RJwrapper.tex -\title{$title$} -\author{by $for(author)$$author.name$$sep$, $endfor$} - -\maketitle - -$if(abstract)$ -\abstract{% -$abstract$ -} -$endif$ - -$body$ - -$if(bibliography)$ -\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} -$endif$ - -$for(author)$ -\address{% -$author.name$\\ -$author.affiliation$\\% -$for(author.address)$$author.address$$sep$\\ $endfor$\\ -$if(author.affiliation2)$ -$author.affiliation2$\\% -$for(author.address2)$$author.address2$$sep$\\ $endfor$\\ -$endif$% -$if(author.url)$$author.url$\\$endif$% -$if(author.orcid)$\textit{ORCiD: \href{https://orcid.org/$author.orcid$}{$author.orcid$}}\\$endif$% -$if(author.email)$$author.email$$endif$% -} - -$endfor$ diff --git a/inst/rmarkdown/templates/rjournal/skeleton/RJournal.sty b/inst/rmarkdown/templates/rjournal/skeleton/RJournal.sty deleted file mode 100644 index 160054510..000000000 --- a/inst/rmarkdown/templates/rjournal/skeleton/RJournal.sty +++ /dev/null @@ -1,343 +0,0 @@ -% Package `RJournal' to use with LaTeX2e -% Copyright (C) 2010 by the R Foundation -% Copyright (C) 2013 by the R Journal -% -% Originally written by Kurt Hornik and Friedrich Leisch with subsequent -% edits by the editorial board -% -% CAUTION: -% Do not modify this style file. Any changes to this file will be reset when your -% article is submitted. -% If you must modify the style or add LaTeX packages to the article, these -% should be specified in RJwrapper.tex - -\NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{RJournal}[2022/06/27 v0.14 RJournal package] - -\RequirePackage{tikz} - -% Overall page layout, fonts etc ----------------------------------------------- - -% Issues of of \emph{The R Journal} are created from the standard \LaTeX{} -% document class \pkg{report}. - -\RequirePackage{geometry} -\geometry{a4paper, - textwidth=14cm, top=1cm, bottom=1cm, - includehead,includefoot,centering, - footskip=1.5cm} -\raggedbottom - -\RequirePackage{fancyhdr} -\fancyhead{} -\fancyheadoffset{2cm} -\fancyhead[L]{\textsc{\RJ@sectionhead}} -\fancyhead[R]{\thepage} -\fancyfoot{} -\fancyfoot[L]{The R Journal Vol. \RJ@volume/\RJ@number, \RJ@month~\RJ@year} -\fancyfoot[R]{ISSN 2073-4859} -\pagestyle{fancy} - -% We use the following fonts (all with T1 encoding): -% -% rm & palatino -% tt & inconsolata -% sf & helvetica -% math & palatino - -\RequirePackage{microtype} - -\RequirePackage[scaled=0.92]{helvet} -\RequirePackage{palatino,mathpazo} -\RequirePackage[scaled=1.02]{inconsolata} -\RequirePackage[T1]{fontenc} - -\RequirePackage[hyphens]{url} -\RequirePackage[pagebackref]{hyperref} -\renewcommand{\backref}[1]{[p#1]} - -% Dark blue colour for all links -\RequirePackage{color} -\definecolor{link}{rgb}{0.45,0.51,0.67} -\hypersetup{ - colorlinks,% - citecolor=link,% - filecolor=link,% - linkcolor=link,% - urlcolor=link -} - -% Give the text a little room to breath -\setlength{\parskip}{3pt} -\RequirePackage{setspace} -\setstretch{1.05} - -% Issue and article metadata --------------------------------------------------- - -% Basic front matter information about the issue: volume, number, and -% date. - -\newcommand{\volume}[1]{\def\RJ@volume{#1}} -\newcommand{\volnumber}[1]{\def\RJ@number{#1}} -\renewcommand{\month}[1]{\def\RJ@month{#1}} -\renewcommand{\year}[1]{\def\RJ@year{#1}} - - -% Individual articles correspond to -% chapters, and are contained in |article| environments. This makes it -% easy to have figures counted within articles and hence hyperlinked -% correctly. - -% An article has an author, a title, and optionally a subtitle. We use -% the obvious commands for specifying these. Articles will be put in certain -% journal sections, named by \sectionhead. - -\newcommand {\sectionhead} [1]{\def\RJ@sectionhead{#1}} -\renewcommand{\author} [1]{\def\RJ@author{#1}} -\renewcommand{\title} [1]{\def\RJ@title{#1}} -\newcommand {\subtitle} [1]{\def\RJ@subtitle{#1}} - -% Control appearance of titles: make slightly smaller than usual, and -% suppress section numbering. See http://tex.stackexchange.com/questions/69749 -% for why we don't use \setcounter{secnumdepth}{-1} - -\usepackage[medium]{titlesec} -\usepackage{titletoc} -\titleformat{\section} {\normalfont\large\bfseries}{\arabic{section}}{1em}{} -\titleformat{\subsection}{\normalfont\normalsize\bfseries}{}{0em}{} -\titlecontents{chapter} [0em]{}{}{}{\titlerule*[1em]{.}\contentspage} - -% Article layout --------------------------------------------------------------- - -% Environment |article| clears the article header information at its beginning. -% We use |\FloatBarrier| from the placeins package to keep floats within -% the article. -\RequirePackage{placeins} -\newenvironment{article}{\author{}\title{}\subtitle{}\FloatBarrier}{\FloatBarrier} - -% Refereed articles should have an abstract, so we redefine |\abstract| to -% give the desired style - -\renewcommand{\abstract}[1]{% -\setstretch{1}% -\noindent% -\small% -\textbf{Abstract} #1 -} - -% The real work is done by a redefined version of |\maketitle|. Note -% that even though we do not want chapters (articles) numbered, we -% need to increment the chapter counter, so that figures get correct -% labelling. - -\renewcommand{\maketitle}{% -\noindent - \chapter{\RJ@title}\refstepcounter{chapter} - \ifx\empty\RJ@subtitle - \else - \noindent\textbf{\RJ@subtitle} - \par\nobreak\addvspace{\baselineskip} - \fi - \ifx\empty\RJ@author - \else - \noindent\textit{\RJ@author} - \par\nobreak\addvspace{\baselineskip} - \fi - \@afterindentfalse\@nobreaktrue\@afterheading -} - -% Now for some ugly redefinitions. We do not want articles to start a -% new page. (Actually, we do, but this is handled via explicit -% \newpage -% -% The name@of@eq is a hack to get hyperlinks to equations to work -% within each article, even though there may be multiple eq.(1) -% \begin{macrocode} -\renewcommand\chapter{\secdef\RJ@chapter\@schapter} -\providecommand{\nohyphens}{% - \hyphenpenalty=10000\exhyphenpenalty=10000\relax} -\newcommand{\RJ@chapter}{% - \edef\name@of@eq{equation.\@arabic{\c@chapter}}% - \renewcommand{\@seccntformat}[1]{}% - \@startsection{chapter}{0}{0mm}{% - -2\baselineskip \@plus -\baselineskip \@minus -.2ex}{\p@}{% - \phantomsection\normalfont\huge\bfseries\raggedright}} - -% Book reviews should appear as sections in the text and in the pdf bookmarks, -% however we wish them to appear as chapters in the TOC. Thus we define an -% alternative to |\maketitle| for reviews. -\newcommand{\review}[1]{ - \pdfbookmark[1]{#1}{#1} - \section*{#1} - \addtocontents{toc}{\protect\contentsline{chapter}{#1}{\thepage}{#1.1}} -} - -% We want bibliographies as starred sections within articles. -% -\RequirePackage[sectionbib,round]{natbib} -\bibliographystyle{abbrvnat} - -% Equations, figures and tables are counted within articles, but we do -% not show the article number. For equations it becomes a bit messy to avoid -% having hyperref getting it wrong. - -% \numberwithin{equation}{chapter} -\renewcommand{\theequation}{\@arabic\c@equation} -\renewcommand{\thefigure}{\@arabic\c@figure} -\renewcommand{\thetable}{\@arabic\c@table} - -% Issue layout ----------------------------------------------------------------- - -% Need to provide our own version of |\tableofcontents|. We use the -% tikz package to get the rounded rectangle. Notice that |\section*| -% is really the same as |\chapter*|. -\renewcommand{\contentsname}{Contents} -\renewcommand\tableofcontents{% - \vspace{1cm} - \section*{\contentsname} - { \@starttoc{toc} } -} - -\renewcommand{\titlepage}{% - \thispagestyle{empty} - \hypersetup{ - pdftitle={The R Journal Volume \RJ@volume/\RJ@number, \RJ@month \RJ@year},% - pdfauthor={R Foundation for Statistical Computing},% - } - \noindent - \begin{center} - \fontsize{50pt}{50pt}\selectfont - The \raisebox{-8pt}{\includegraphics[height=77pt]{Rlogo-5}}\hspace{10pt} - Journal - - \end{center} - {\large \hfill Volume \RJ@volume/\RJ@number, \RJ@month{} \RJ@year \quad} - - \rule{\textwidth}{1pt} - \begin{center} - {\Large A peer-reviewed, open-access publication of the \\ - R Foundation for Statistical Computing} - \end{center} - - % And finally, put in the TOC box. Note the way |tocdepth| is adjusted - % before and after producing the TOC: thus, we can ensure that only - % articles show up in the printed TOC, but that in the PDF version, - % bookmarks are created for sections and subsections as well (provided - % that the non-starred forms are used). - \setcounter{tocdepth}{0} - \tableofcontents - \setcounter{tocdepth}{2} - \clearpage -} - -% Text formatting -------------------------------------------------------------- - -\newcommand{\R}{R} -\newcommand{\address}[1]{\addvspace{\baselineskip}\noindent\emph{#1}} -\newcommand{\email}[1]{\href{mailto:#1}{\normalfont\texttt{#1}}} - -% Simple font selection is not good enough. For example, |\texttt{--}| -% gives `\texttt{--}', i.e., an endash in typewriter font. Hence, we -% need to turn off ligatures, which currently only happens for commands -% |\code| and |\samp| and the ones derived from them. Hyphenation is -% another issue; it should really be turned off inside |\samp|. And -% most importantly, \LaTeX{} special characters are a nightmare. E.g., -% one needs |\~{}| to produce a tilde in a file name marked by |\file|. -% Perhaps a few years ago, most users would have agreed that this may be -% unfortunate but should not be changed to ensure consistency. But with -% the advent of the WWW and the need for getting `|~|' and `|#|' into -% URLs, commands which only treat the escape and grouping characters -% specially have gained acceptance - -\DeclareRobustCommand\code{\bgroup\@noligs\@codex} -\def\@codex#1{\texorpdfstring% -{{\normalfont\ttfamily\hyphenchar\font=-1 #1}}% -{#1}\egroup} -\newcommand{\kbd}[1]{{\normalfont\texttt{#1}}} -\newcommand{\key}[1]{{\normalfont\texttt{\uppercase{#1}}}} -\DeclareRobustCommand\samp{`\bgroup\@noligs\@sampx} -\def\@sampx#1{{\normalfont\texttt{#1}}\egroup'} -\newcommand{\var}[1]{{\normalfont\textsl{#1}}} -\let\env=\code -\newcommand{\file}[1]{{`\normalfont\textsf{#1}'}} -\let\command=\code -\let\option=\samp -\newcommand{\dfn}[1]{{\normalfont\textsl{#1}}} -% \acronym is effectively disabled since not used consistently -\newcommand{\acronym}[1]{#1} -\newcommand{\strong}[1]{\texorpdfstring% -{{\normalfont\fontseries{b}\selectfont #1}}% -{#1}} -\let\pkg=\strong -\newcommand{\CRANpkg}[1]{\href{https://CRAN.R-project.org/package=#1}{\pkg{#1}}}% -\let\cpkg=\CRANpkg -\newcommand{\ctv}[1]{\href{https://CRAN.R-project.org/view=#1}{\emph{#1}}} -\newcommand{\BIOpkg}[1]{\href{https://www.bioconductor.org/packages/release/bioc/html/#1.html}{\pkg{#1}}} - -% Example environments --------------------------------------------------------- -\RequirePackage{fancyvrb} -\RequirePackage{alltt} - -\DefineVerbatimEnvironment{example}{Verbatim}{} -\renewenvironment{example*}{\begin{alltt}}{\end{alltt}} - -% Support for output from Sweave, and generic session style code -% These used to have fontshape=sl for Sinput/Scode/Sin, but pslatex -% won't use a condensed font in that case. - -% Update (2015-05-28 by DS): remove fontsize=\small to match example environment - -\DefineVerbatimEnvironment{Sinput}{Verbatim}{} -\DefineVerbatimEnvironment{Soutput}{Verbatim}{} -\DefineVerbatimEnvironment{Scode}{Verbatim}{} -\DefineVerbatimEnvironment{Sin}{Verbatim}{} -\DefineVerbatimEnvironment{Sout}{Verbatim}{} -\newenvironment{Schunk}{}{} - -% Mathematics ------------------------------------------------------------------ - -% The implementation of |\operatorname| is similar to the mechanism -% \LaTeXe{} uses for functions like sin and cos, and simpler than the -% one of \AmSLaTeX{}. We use |\providecommand| for the definition in -% order to keep the one of the \pkg{amstex} if this package has -% already been loaded. -% \begin{macrocode} -\providecommand{\operatorname}[1]{% - \mathop{\operator@font#1}\nolimits} -\RequirePackage{amsfonts} - -\renewcommand{\P}{% - \mathop{\operator@font I\hspace{-1.5pt}P\hspace{.13pt}}} -\newcommand{\E}{% - \mathop{\operator@font I\hspace{-1.5pt}E\hspace{.13pt}}} -\newcommand{\VAR}{\operatorname{var}} -\newcommand{\COV}{\operatorname{cov}} -\newcommand{\COR}{\operatorname{cor}} - -% Figures ---------------------------------------------------------------------- - -\RequirePackage[font=small,labelfont=bf]{caption} - -% Wide environments for figures and tables ------------------------------------- -\RequirePackage{environ} - -% An easy way to make a figure span the full width of the page -\NewEnviron{widefigure}[1][]{ -\begin{figure}[#1] -\advance\leftskip-2cm -\begin{minipage}{\dimexpr\textwidth+4cm\relax}% - \captionsetup{margin=2cm} - \BODY -\end{minipage}% -\end{figure} -} - -\NewEnviron{widetable}[1][]{ -\begin{table}[#1] -\advance\leftskip-2cm -\begin{minipage}{\dimexpr\textwidth+4cm\relax}% - \captionsetup{margin=2cm} - \BODY -\end{minipage}% -\end{table} -} diff --git a/inst/rmarkdown/templates/rjournal/skeleton/RJreferences.bib b/inst/rmarkdown/templates/rjournal/skeleton/RJreferences.bib deleted file mode 100644 index f5d901444..000000000 --- a/inst/rmarkdown/templates/rjournal/skeleton/RJreferences.bib +++ /dev/null @@ -1,18 +0,0 @@ -@Manual{R, - title = {R: A Language and Environment for Statistical Computing}, - author = {{R Core Team}}, - organization = {R Foundation for Statistical Computing}, - address = {Vienna, Austria}, - year = {2012}, - note = {{ISBN} 3-900051-07-0}, - url = {http://www.R-project.org/}, -} - -@article{ihaka:1996, - Author = {Ihaka, Ross and Gentleman, Robert}, - Journal = {Journal of Computational and Graphical Statistics}, - Number = 3, - Pages = {299--314}, - Title = {R: A Language for Data Analysis and Graphics}, - Volume = 5, - Year = 1996} diff --git a/inst/rmarkdown/templates/rjournal/skeleton/Rlogo-5.png b/inst/rmarkdown/templates/rjournal/skeleton/Rlogo-5.png deleted file mode 100644 index 077505788af746f31e429d1a8ace75220d89f957..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10704 zcmWk!1yqzx7v2Jv*rmHxL{U<@VJQJ=1Ze~jT)L!d7x(}H0Z~E8r9(>TUO|v%=}rNW zRJ!^1Kku1$&Y5%O*4%mS+`02cUsoMQ#zF=F0AQLLs)mHVmeAs%#Du@h{mlVFNBlxd zT@`Tq{}0<*^qw$6>Y-ug4FHhS{=WeMX&Fp}L6X;+I%*^<5Ed#~L7q|(SpWb5&{S12 z@}J$!4DhEjo{V1F((Ooq$M;n%i^%*E5fzk*MM5J(v=9hxTOCt~k_V(?bKrL{C_&3Z zbp{ONrs`lwiLBx!i_{rmR+OabtjK*3q_GtoX5?4YJf`JSRF7QxO=>h%Ua?ggxIMm~ z5wzb(wgSQpWi|(Fm9$G$SkzM=Z=~M^+_j;5#PtF~QMf*fv|4t+n8%ERO396sxciRe z)gV9v%nRxYv?Z}%j0eYB22>IF8~H@-0g+LXVWgqblXzuEm*~3HO-Z-uhBrf*v(fI{ z*!g0fo0SS>bGeb0`3p*gSz4eMxv~{)u@A&eEuR#R!~(gF(H7_>GF2{?S1&FT9c$Cq zztL~p0u0p7sLwdwiGqrdy0Q9@4C3?NBfwQmPhzHQmvyaTqR;l>pVW^3^J9y zcBhDo>mE|LLpvg*5xcTEFKyMu7l!$PK`YQoohLa32ka_1dXVyJRmg@fj5jVn{s&-PqlUm9PI6%8iF)6NhLYP33HbJ zsdGvQO@UW2j8thKNTeuU$ADZFaAr!@Dm|Lo+ENr%{=HtwG?(*C`iy&uF{PypJRZYs z;5H_XTY)#4ZN-pDkeW=&p*!#ljyW0`2=WLW?3ds^X#?tyJnww|EBoYlbEZ3 z9`vHug4x#fC0s2}Rpob-Ce*Yl+zkOkp&21lf?Tj+x-em&@ zdqch%CqedOg-?-Rnzww-16pI;8k0mK;)}=KJb%S+8mmF7Ld;{rK@flw@*Q&Yy$J21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;F2<8!No7jp9 zIC%Y7>c@L%G|#t+ zIzPjfUb^VfxDwIqS7TZ$fk1_ioEu$VardYxF_YIK)a){u8a77P`Sh?3eG-U6D$VzE zKeHh&H4oWNM36%%4ND915arRYwgbf`fQz6W;Ee5+*$!CX5X4anK zwJ!$DEr>hYq8Y5cOA`4uskQ>h+aTkzwGDnuTR35Xy?fz2U{`8NYwAz|MQ~-aE^tK} zzsigU7-Q-OIo-4@nWJVak#RRST^HQZL&9Oe2j&-`8T6##pFgZ!w9)#*=Uo$e<|8`f zam55P-78rD?`lQsPvtL#0%Z5Zs-O@44Podrk`^jUBsqtVS4Z`A2}Wj^ z0ErA$Bi|+h;WdS@0D8w-JjK7jZ@W>yzP68t-Ur}|iOu%s@Vk#Qe zs-BNAF&PL6&zTAd%Tm=b_)MCO5#RV;_!W|4_0wsHgg zY@%~cSWwsS9K|&JwOcu3*O&*61$_(pOz#an2A11h-UAe+a!2OC+3o58m5nJl zJ|XobAkhtRuXHDVwY$LAk=U4z*SNXJs@B|n@p0J!Waf5ee>gN7l%dY57dSEEeiQbo XZ=YC#B{iJz_7b3}rmI?^Y!m)J!fa;$ diff --git a/inst/rmarkdown/templates/rjournal/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/rjournal/skeleton/skeleton.Rmd deleted file mode 100644 index 55258e638..000000000 --- a/inst/rmarkdown/templates/rjournal/skeleton/skeleton.Rmd +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: Capitalized Title Here -author: - # see ?rjournal_article for more information - - name: Author One - affiliation: Affiliation - address: - - line 1 - - line 2 - url: https://journal.r-project.org - orcid: 0000-0002-9079-593X - email: author1@work - - name: Author Two - url: https://journal.r-project.org - email: author2@work - orcid: 0000-0002-9079-593X - affiliation: Affiliation 1 - address: - - line 1 affiliation 1 - - line 2 affiliation 1 - affiliation2: Affiliation 2 - address2: - - line 1 affiliation 2 - - line 2 affiliation 2 - - name: Author Three - url: https://journal.r-project.org - email: author3@work - affiliation: Affiliation - address: - - line 1 affiliation - - line 2 affiliation -abstract: > - An abstract of less than 150 words. -preamble: | - % Any extra LaTeX you need in the preamble - -# per R journal requirement, the bib filename should be the same as the output -# tex file. Don't forget to rename the bib file and change this example value. -bibliography: RJreferences.bib - -output: rticles::rjournal_article ---- - -## Introduction - -Introductory section which may include references in parentheses -[@R], or cite a reference such as @R in the text. - -## Section title in sentence case - -This section may contain a figure such as Figure \ref{fig:Rlogo}. - -```{r, Rlogo, echo=FALSE, fig.cap='The logo of R.', out.width='2in', fig.align='center', fig.pos='htbp'} -knitr::include_graphics('Rlogo-5.png') -``` - -## Another section - -There will likely be several sections, perhaps including code snippets, such as: - -```{r} -x <- 1:10 -plot(x) -``` - -## Summary - -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: - -* A R file will be generated automatically using `knitr::purl` - see -https://bookdown.org/yihui/rmarkdown-cookbook/purl.html for more information. -* A tex file will be generated from this Rmd file and correctly included in -`RJwapper.tex` as expected to build `RJwrapper.pdf`. -* All figure files will be kept in the default rmarkdown `*_files` folder. This -happens because `keep_tex = TRUE` by default in `rticles::rjournal_article` -* Only the bib filename is to modifed. An example bib file is included in the -template (`RJreferences.bib`) and you will have to name your bib file as the -tex, R, and pdf files. diff --git a/inst/rmarkdown/templates/rjournal/template.yaml b/inst/rmarkdown/templates/rjournal/template.yaml deleted file mode 100644 index 570a3c351..000000000 --- a/inst/rmarkdown/templates/rjournal/template.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: R Journal Submission -description: > - Template for creating articles for the R journal. -create_dir: true - diff --git a/man/rjournal_article.Rd b/man/rjournal_article.Rd index d509cab28..018f8d12e 100644 --- a/man/rjournal_article.Rd +++ b/man/rjournal_article.Rd @@ -6,72 +6,9 @@ \usage{ rjournal_article(..., keep_tex = TRUE, citation_package = "natbib") } -\arguments{ -\item{...}{Arguments to \code{\link[rmarkdown:pdf_document]{rmarkdown::pdf_document()}}.} - -\item{keep_tex}{Keep the intermediate tex file used in the conversion to PDF. -Note that this argument does not control whether to keep the auxiliary -files (e.g., \file{.aux}) generated by LaTeX when compiling \file{.tex} to -\file{.pdf}. To keep these files, you may set \code{options(tinytex.clean = -FALSE)}.} - -\item{citation_package}{The LaTeX package to process citations, \code{natbib} -or \code{biblatex}. Use \code{default} if neither package is to be used, -which means citations will be processed via the command -\command{pandoc-citeproc}.} -} \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} -This function is now deprecated in favor of the \href{https://rjournal.github.io/rjtools/}{\strong{rjtools}} package -which is now officialy recommanded by R Journal \url{https://rjournal.github.io/submissions.html}. See below for document -} -\section{About this format and the R Journal requirements}{ -Format for creating R Journal articles. Adapted from -\url{https://journal.r-project.org/submissions.html}. - -This file is only a basic article template. For full details of \emph{The R -Journal} style and information on how to prepare your article for submission, -see the \href{https://journal.r-project.org/share/author-guide.pdf}{Instructions for Authors} - -\code{rticles::rjournal_article} will help you build the correct files requirements: -\itemize{ -\item A R file will be generated automatically using \code{knitr::purl} - see -https://bookdown.org/yihui/rmarkdown-cookbook/purl.html for more information. -\item A tex file will be generated from this Rmd file and correctly included in -\code{RJwapper.tex} as expected to build \code{RJwrapper.pdf}. -\item All figure files will be kept in the default rmarkdown \verb{*_files} folder. This -happens because \code{keep_tex = TRUE} by default in \code{rticles::rjournal_article} -\item Only the bib filename is to be modified. An example bib file is included in the -template (\code{RJreferences.bib}) and you will have to name your bib file as the -tex, R, and pdf files. -} -} - -\section{About YAML header fields}{ -This section documents some of the YAML fields that can be used with this -formats. -\subsection{The \code{author} field in the YAML header}{\tabular{lll}{ - FIELD \tab TYPE \tab DESCRIPTION \cr - \code{name} \tab \emph{required} \tab name and surname of the author \cr - \code{affiliation} \tab \emph{required} \tab name of the author's affiliation \cr - \code{address} \tab \emph{required} \tab at least one address line for the affiliation \cr - \code{url} \tab \emph{optional} \tab an additional url for the author or the main affiliation \cr - \code{orcid} \tab \emph{optional} \tab the authors ORCID if available \cr - \code{email} \tab \emph{required} \tab the author's e-mail address \cr - \code{affiliation2} \tab \emph{optional} \tab name of the author's 2nd affiliation \cr - \code{address2} \tab \emph{optional} \tab address lines belonging to the author's 2nd affiliation \cr +This function is now defunct in favor of the \href{https://rjournal.github.io/rjtools/}{\strong{rjtools}} package +which is now officialy recommanded by R Journal \url{https://rjournal.github.io/submissions.html}. } - - -\emph{Please note: Only one \code{url}, \code{orcid} and \code{email} can be provided per author.} -} - -\subsection{Other YAML fields}{\tabular{lll}{ - FIELD \tab TYPE \tab DESCRIPTION \cr - \code{bibliography} \tab \emph{with default} \tab the BibTeX file with the reference entries \cr -} - -} -} - From 9a8d8aeafaf08124db2d8ae3f35483eceb2b18d2 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 11 Dec 2025 11:43:21 +0100 Subject: [PATCH 2/4] remove from other docs and vignette --- R/rjournal_article.R | 2 +- R/utils.R | 2 +- man/journals.Rd | 2 +- man/rjournal_article.Rd | 1 + vignettes/articles/_child_examples.Rmd | 5 ----- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/R/rjournal_article.R b/R/rjournal_article.R index 1ce50e824..e0721c8b9 100644 --- a/R/rjournal_article.R +++ b/R/rjournal_article.R @@ -6,7 +6,7 @@ #' This function is now defunct in favor of the [**rjtools**](https://rjournal.github.io/rjtools/) package #' which is now officialy recommanded by R Journal . #' -#' @internal +#' @keywords internal rjournal_article <- function(..., keep_tex = TRUE, citation_package = "natbib") { lifecycle::deprecate_stop("0.25", "rjournal_article()", "rjtools::rjournal_pdf_article()", details = "See official recommandation at https://rjournal.github.io/submissions.html") diff --git a/R/utils.R b/R/utils.R index 70d6adaa2..684c221b9 100644 --- a/R/utils.R +++ b/R/utils.R @@ -5,7 +5,7 @@ #' These names can be useful in two ways: #' #' * You can add `_article` suffix to get the name of the output format (e.g., -#' [rjournal_article()]). +#' [jss_article()]). #' #' * You can use the name directly in the `template` argument of #' [rmarkdown::draft()]. diff --git a/man/journals.Rd b/man/journals.Rd index 3e3649cd0..b769bf3dd 100644 --- a/man/journals.Rd +++ b/man/journals.Rd @@ -16,7 +16,7 @@ List available journal names in this package. These names can be useful in two ways: \itemize{ \item You can add \verb{_article} suffix to get the name of the output format (e.g., -\code{\link[=rjournal_article]{rjournal_article()}}). +\code{\link[=jss_article]{jss_article()}}). \item You can use the name directly in the \code{template} argument of \code{\link[rmarkdown:draft]{rmarkdown::draft()}}. } diff --git a/man/rjournal_article.Rd b/man/rjournal_article.Rd index 018f8d12e..edbb01541 100644 --- a/man/rjournal_article.Rd +++ b/man/rjournal_article.Rd @@ -12,3 +12,4 @@ rjournal_article(..., keep_tex = TRUE, citation_package = "natbib") This function is now defunct in favor of the \href{https://rjournal.github.io/rjtools/}{\strong{rjtools}} package which is now officialy recommanded by R Journal \url{https://rjournal.github.io/submissions.html}. } +\keyword{internal} diff --git a/vignettes/articles/_child_examples.Rmd b/vignettes/articles/_child_examples.Rmd index 94e6b0ab0..c861f1d4d 100644 --- a/vignettes/articles/_child_examples.Rmd +++ b/vignettes/articles/_child_examples.Rmd @@ -64,11 +64,6 @@ for (journal in journals()) { path = xfun::with_ext(out_pdf, "gif"), delay = 1) message("Retrieving built files.") - # specific treatment for rjournal name - if (journal == "rjournal") { - file.rename(out_pdf, out_pdf <- file.path(dirname(out_pdf), "rjournal_article.pdf")) - file.rename(out_gif, out_gif <- file.path(dirname(out_gif), "rjournal_article.gif")) - } file.copy(out_pdf, out_dir) file.copy(out_gif, out_dir) # clean temp dir From 3701ee6e440cbf81fa4bcc7a94da62f00c0a2949 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 11 Dec 2025 11:43:34 +0100 Subject: [PATCH 3/4] Update test --- tests/testit/test-formats.R | 1 - tests/testthat/_snaps/rjournal_article.md | 6 +++--- tests/testthat/test-rjournal_article.R | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/testit/test-formats.R b/tests/testit/test-formats.R index 073b476a3..0b5e3f5c5 100644 --- a/tests/testit/test-formats.R +++ b/tests/testit/test-formats.R @@ -72,7 +72,6 @@ test_format("peerj") test_format("pihph") test_format("plos") test_format("pnas") -test_format("rjournal") test_format("rsos") test_format("rss") test_format("sage") diff --git a/tests/testthat/_snaps/rjournal_article.md b/tests/testthat/_snaps/rjournal_article.md index cd17d812f..994522821 100644 --- a/tests/testthat/_snaps/rjournal_article.md +++ b/tests/testthat/_snaps/rjournal_article.md @@ -1,10 +1,10 @@ -# rjournal_article() is deprecated +# rjournal_article() is defunct Code x <- rjournal_article() Condition - Warning: - `rjournal_article()` was deprecated in rticles 0.25. + Error: + ! `rjournal_article()` was deprecated in rticles 0.25 and is now defunct. i Please use `rjtools::rjournal_pdf_article()` instead. i See official recommandation at https://rjournal.github.io/submissions.html diff --git a/tests/testthat/test-rjournal_article.R b/tests/testthat/test-rjournal_article.R index 9f7d2ed6e..c1fb151cb 100644 --- a/tests/testthat/test-rjournal_article.R +++ b/tests/testthat/test-rjournal_article.R @@ -1,5 +1,5 @@ -test_that("rjournal_article() is deprecated", { +test_that("rjournal_article() is defunct", { expect_snapshot({ x <- rjournal_article() - }) + }, error = TRUE) }) From 4c9bdebdb71744417895bae1a37fe66686555bea Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 11 Dec 2025 11:46:25 +0100 Subject: [PATCH 4/4] Other removal --- R/utils.R | 7 ------- tests/testthat/test-check-template.R | 3 --- vignettes/usage.md | 3 --- 3 files changed, 13 deletions(-) diff --git a/R/utils.R b/R/utils.R index 684c221b9..5db5f63b8 100644 --- a/R/utils.R +++ b/R/utils.R @@ -47,13 +47,6 @@ merge_list <- function(x, y) { #' @param output Path to save output. #' @param in_header Paths to files to include in the header. #' @return (Invisibly) The path of the generate file. -#' @examples -#' x <- rticles:::template_pandoc( -#' list(preamble = "%abc", filename = "wickham"), -#' rticles:::find_resource("rjournal", "RJwrapper.tex"), -#' tempfile() -#' ) -#' if (interactive()) file.show(x) #' @noRd template_pandoc <- function(metadata, template, output, in_header = NULL, verbose = FALSE) { diff --git a/tests/testthat/test-check-template.R b/tests/testthat/test-check-template.R index f576f7b88..b802a4ff4 100644 --- a/tests/testthat/test-check-template.R +++ b/tests/testthat/test-check-template.R @@ -3,9 +3,6 @@ skip_on_cran() temp_file <- list.files(pkg_file_template(), recursive = TRUE, pattern = "template.tex$", full.names = TRUE) -# Rjournal template has another name -temp_file[grep("rjournal", temp_file)] <- pkg_file_template("rjournal", "resources", "RJwrapper.tex") - expect_contains <- function(file, pattern, nb = 1, at_least = NULL, ...) { content <- xfun::read_utf8(file) matched <- grepl(pattern, content, ...) diff --git a/vignettes/usage.md b/vignettes/usage.md index b339e11fd..dabdf3ac7 100644 --- a/vignettes/usage.md +++ b/vignettes/usage.md @@ -11,9 +11,6 @@ If you are not using RStudio, you'll also need to install [Pandoc](https://pando rmarkdown::draft( "MyJSSArticle.Rmd", template = "jss", package = "rticles" ) -rmarkdown::draft( - "MyRJournalArticle", template = "rjournal", package = "rticles" -) ``` This will create a folder containing a Rmd file using the corresponding output format and all the assets required by this format.