diff --git a/DESCRIPTION b/DESCRIPTION index 2bb97be6e..f6f70e351 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: rticles Title: Article Formats for R Markdown -Version: 0.27.12 +Version: 0.27.13 Authors@R: c( person("JJ", "Allaire", , "jj@posit.co", role = "aut"), person("Yihui", "Xie", , "xie@yihui.name", role = "aut", diff --git a/NEWS.md b/NEWS.md index 490087fcc..796b62d86 100644 --- a/NEWS.md +++ b/NEWS.md @@ -36,6 +36,12 @@ supported by the `copernicus.cls`, and fix an issue where the section headers we ## MINOR CHANGES +- Update `jss_article()` template to align with new JSS example from `jss.cls` v3.6 (2026-04-28): + - `\documentclass` now defaults to `[article]` class option when none is specified in YAML. + - Removed `\usepackage[utf8]{inputenc}` (handled by modern LaTeX and `jss.cls`). + - Added `\setlength{\emergencystretch}{3em}` to prevent overfull lines. + - Updated CSL citation helper commands (`\CSLBlock`, `\CSLLeftMargin`, `\CSLRightInline`) to match current Pandoc defaults, improving bibliography spacing and baseline alignment. + - Adapt all templates to new Pandoc 3.8.2.1 change regarding table counter definition (#595). - Patch `WileyNDJ` template used in `sim_article()` to fix an issue with `etex` package not being useful anymore in recent LaTeX distributions (#593). diff --git a/inst/rmarkdown/templates/jss/resources/template.tex b/inst/rmarkdown/templates/jss/resources/template.tex index e5cfc190b..3c2d5724f 100644 --- a/inst/rmarkdown/templates/jss/resources/template.tex +++ b/inst/rmarkdown/templates/jss/resources/template.tex @@ -1,14 +1,8 @@ -\documentclass[ -$for(classoption)$ - $classoption$$sep$, -$endfor$ -]{$documentclass$} +\documentclass[$if(classoption)$$for(classoption)$$classoption$$sep$,$endfor$$else$article$endif$]{$documentclass$} %% recommended packages \usepackage{orcidlink,thumbpdf,lmodern} -\usepackage[utf8]{inputenc} - \author{ $for(author)$$author.name$$if(author.orcid)$~\orcidlink{$author.orcid$}$endif$\\$author.affiliation$$sep$ \And $endfor$ } @@ -67,6 +61,8 @@ \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +\setlength{\emergencystretch}{3em} % prevent overfull lines + $if(tables)$ % From pandoc table feature \usepackage{longtable,booktabs,array} @@ -187,9 +183,9 @@ {} $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{\CSLBlock}[1]{\hfill\break\parbox[t]{\linewidth}{\strut\ignorespaces#1\strut}} +\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{\strut#1\strut}} +\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{\strut#1\strut}} \newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} $endif$ diff --git a/inst/rmarkdown/templates/jss/skeleton/jss.bst b/inst/rmarkdown/templates/jss/skeleton/jss.bst index ae7541547..bb3bd45c3 100644 --- a/inst/rmarkdown/templates/jss/skeleton/jss.bst +++ b/inst/rmarkdown/templates/jss/skeleton/jss.bst @@ -6,7 +6,7 @@ %% %% merlin.mbs (with options: `ay,nat,nm-rvx,keyxyr,dt-beg,yr-par,note-yr,tit-qq,atit-u,trnum-it,vol-bf,volp-com,num-xser,pre-edn,isbn,issn,edpar,pp,ed,xedn,xand,etal-it,revdata,eprint,url,url-blk,doi,nfss') %% -%% ** BibTeX style file for JSS publications (http://www.jstatsoft.org/) +%% ** BibTeX style file for JSS publications (https://www.jstatsoft.org/) %% %% License: GPL-2 | GPL-3 % =============================================================== diff --git a/inst/rmarkdown/templates/jss/skeleton/jss.cls b/inst/rmarkdown/templates/jss/skeleton/jss.cls index a8eea5b88..35f972b7f 100644 --- a/inst/rmarkdown/templates/jss/skeleton/jss.cls +++ b/inst/rmarkdown/templates/jss/skeleton/jss.cls @@ -1,10 +1,10 @@ %% %% This is file `jss.cls', -\def\fileversion{3.3} +\def\fileversion{3.6} \def\filename{jss} -\def\filedate{2021/05/23} +\def\filedate{2026/04/28} %% -%% Package `jss' to use with LaTeX2e for JSS publications (http://www.jstatsoft.org/) +%% Package `jss' to use with LaTeX2e for JSS publications (https://www.jstatsoft.org/) %% License: GPL-2 | GPL-3 %% Copyright: (C) Achim Zeileis %% Please report errors to Achim.Zeileis@R-project.org @@ -51,7 +51,7 @@ \ProcessOptions \LoadClass[11pt,a4paper,twoside]{article} %% required packages -\RequirePackage{graphicx,xcolor,ae,fancyvrb} +\RequirePackage{graphicx,xcolor,fancyvrb} \RequirePackage[T1]{fontenc} \IfFileExists{upquote.sty}{\RequirePackage{upquote}}{} \IfFileExists{lmodern.sty}{\RequirePackage{lmodern}}{} @@ -115,7 +115,7 @@ \newcommand{\Seconddate}[1]{\def\@Seconddate{#1}} \newcommand{\Reviewauthor}[1]{\def\@Reviewauthor{#1}} %% defaults -\author{Firstname Lastname\\Affiliation} +\author{Givenname Familyname\\Affiliation} \title{Title} \Abstract{---!!!---an abstract is required---!!!---} \Plainauthor{\@author} @@ -126,15 +126,15 @@ \Submitdate{yyyy-mm-dd} \Acceptdate{yyyy-mm-dd} \Address{ - Firstname Lastname\\ + Givenname Familyname\\ Affiliation\\ Address, Country\\ E-mail: \email{name@address}\\ - URL: \url{http://link/to/webpage/} + URL: \url{https://link/to/webpage/} } -\Reviewer{Firstname Lastname\\Affiliation} -\Plainreviewer{Firstname Lastname} +\Reviewer{Givenname Familyname\\Affiliation} +\Plainreviewer{Givenname Familyname} \Booktitle{Book Title} \Bookauthor{Book Author} \Publisher{Publisher} @@ -143,7 +143,7 @@ \ISBN{x-xxxxx-xxx-x} \Pages{xv + 123} \Price{USD 69.95 (P)} -\URL{http://link/to/webpage/} +\URL{https://link/to/webpage/} \DOI{10.18637/jss.v000.i00} \if@article \Seriesname{Issue} @@ -230,10 +230,10 @@ \vspace{.1\baselineskip} {\fontfamily{pzc} \fontsize{13}{15} \selectfont Journal of Statistical Software} \hfill - \url{http://www.jstatsoft.org/}\\ \nopagebreak + \url{https://www.jstatsoft.org/}\\ \nopagebreak published by the Foundation for Open Access Statistics \hfill - \url{http://www.foastat.org/}\\[.3\baselineskip] \nopagebreak + \url{https://www.foastat.org/}\\[.3\baselineskip] \nopagebreak {\@Month{} \@Year, Volume~\@Volume, \@Seriesname~\@Issue} \hfill \@Firstdate\\ \nopagebreak @@ -253,6 +253,7 @@ %% required packages \RequirePackage{hyperref} %% new \maketitle +\newcommand{\centerheader}[1]{\null\hfill#1\hfill\null} \def\@myoddhead{ {\color{white} JSS}\\[-1.42cm] \hspace{-2em} \includegraphics[height=23mm,keepaspectratio]{jsslogo} \hfill @@ -287,9 +288,9 @@ \thispagestyle{empty} \if@nojss - \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hyperauthor}} + \markboth{\centerheader{\@Shorttitle}}{\centerheader{\@Hyperauthor}} \else - \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hypersubject}} + \markboth{\centerheader{\@Shorttitle}}{\centerheader{\@Hypersubject}} \fi \pagestyle{myheadings} } @@ -310,13 +311,13 @@ \setcounter{footnote}{0} \if@noheadings - %% \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hypersubject}} + %% \markboth{\centerheader{\@Shorttitle}}{\centerheader{\@Hypersubject}} \else \thispagestyle{empty} \if@nojss - \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hyperauthor}} + \markboth{\centerheader{\@Shorttitle}}{\centerheader{\@Hyperauthor}} \else - \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hypersubject}} + \markboth{\centerheader{\@Shorttitle}}{\centerheader{\@Hypersubject}} \fi \pagestyle{myheadings} \fi @@ -417,11 +418,12 @@ \renewcommand{\subsubsection}{\secdef \jsssubsubsec \jsssubsubsecnn} \fi %% colors +\AtBeginDocument{% \definecolor{Red}{rgb}{0.5,0,0} \definecolor{Blue}{rgb}{0,0,0.5} +} \if@review \hypersetup{% - hyperindex = {true}, colorlinks = {true}, linktocpage = {true}, plainpages = {false}, @@ -434,7 +436,6 @@ } \else \hypersetup{% - hyperindex = {true}, colorlinks = {true}, linktocpage = {true}, plainpages = {false}, @@ -467,7 +468,7 @@ \if@notitle %% \AtBeginDocument{\maketitle} \else - \@ifundefined{AddToHook}{\AtBeginDocument{\maketitle}}{\AddToHook{begindocument}[maketitle]{\maketitle}} + \@ifundefined{AddToHook}{\AtBeginDocument{\maketitle}}{\AddToHook{begindocument/end}[maketitle]{\maketitle}} \fi %% commands \newcommand\code{\bgroup\@makeother\_\@makeother\~\@makeother\$\@codex}