Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 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.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",
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
16 changes: 6 additions & 10 deletions inst/rmarkdown/templates/jss/resources/template.tex
Original file line number Diff line number Diff line change
@@ -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$
}
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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$

Expand Down
2 changes: 1 addition & 1 deletion inst/rmarkdown/templates/jss/skeleton/jss.bst
Original file line number Diff line number Diff line change
Expand Up @@ -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
% ===============================================================
Expand Down
41 changes: 21 additions & 20 deletions inst/rmarkdown/templates/jss/skeleton/jss.cls
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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}}{}
Expand Down Expand Up @@ -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}
Expand All @@ -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}
Expand All @@ -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}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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}
}
Expand All @@ -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
Expand Down Expand Up @@ -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},
Expand All @@ -434,7 +436,6 @@
}
\else
\hypersetup{%
hyperindex = {true},
colorlinks = {true},
linktocpage = {true},
plainpages = {false},
Expand Down Expand Up @@ -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}
Expand Down
Loading