Skip to content

Commit

Permalink
Update jss.cls (#355)
Browse files Browse the repository at this point in the history
This update contains the fix for #329
  • Loading branch information
cderv authored Dec 15, 2020
1 parent c42fc43 commit 1b6fa2d
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
^\.travis\.yml$
^\.github$
^README\.md$
^tools/
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
rticles 0.18
---------------------------------------------------------------------

- Update jss.cls to version 3.2 (#329).

- Options can now be passed to `hyperref` packages using `header-includes` and `\PassOptionsToPackage` in the AEA template (thanks, @nurfatimaj, #334)

- Update Copernicus Publications template to version 6.1. This is includes a final
Expand Down
3 changes: 0 additions & 3 deletions inst/rmarkdown/templates/jss/resources/template.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
% To remove when JSS.cls is fixed
% https://github.com/rstudio/rticles/issues/329
\RequirePackage[2020/02/02]{latexrelease}
\documentclass[
$for(classoption)$
$classoption$$sep$,
Expand Down
31 changes: 6 additions & 25 deletions inst/rmarkdown/templates/jss/skeleton/jss.cls
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
%%
%% This is file `jss.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% jss.dtx (with options: `class')
%%
%% IMPORTANT NOTICE:
%%
%% For the copyright see the source file.
%%
%% Any modified versions of this file must be renamed
%% with new filenames distinct from jss.cls.
%%
%% For distribution of the original source see the terms
%% for copying and modification in the file jss.dtx.
%%
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\def\fileversion{3.0}
%% This is file `jss.cls'
\def\fileversion{3.2}
\def\filename{jss}
\def\filedate{2015/09/01}
\def\filedate{2020/12/09}
%%
%% Package `jss' to use with LaTeX2e for JSS publications (http://www.jstatsoft.org/)
%% License: GPL-2 | GPL-3
Expand Down Expand Up @@ -74,6 +54,7 @@
\RequirePackage{graphicx,color,ae,fancyvrb}
\RequirePackage[T1]{fontenc}
\IfFileExists{upquote.sty}{\RequirePackage{upquote}}{}
\IfFileExists{lmodern.sty}{\RequirePackage{lmodern}}{}
%% bibliography
\if@shortnames
\usepackage[authoryear,round]{natbib}
Expand Down Expand Up @@ -486,14 +467,14 @@
\if@notitle
%% \AtBeginDocument{\maketitle}
\else
\AtBeginDocument{\maketitle}
\@ifundefined{AddToHook}{\AtBeginDocument{\maketitle}}{\AddToHook{begindocument}[maketitle]{\maketitle}}
\fi
%% commands
\newcommand\code{\bgroup\@makeother\_\@makeother\~\@makeother\$\@codex}
\def\@codex#1{{\normalfont\ttfamily\hyphenchar\font=-1 #1}\egroup}
%%\let\code=\texttt
\let\proglang=\textsf
\newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
\newcommand{\pkg}[1]{{\fontseries{m}\fontseries{b}\selectfont #1}}
\newcommand{\email}[1]{\href{mailto:#1}{\normalfont\texttt{#1}}}
\ifx\csname urlstyle\endcsname\relax
\newcommand\@doi[1]{doi:\discretionary{}{}{}#1}\else
Expand Down
19 changes: 19 additions & 0 deletions tools/update_cls.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Helper script for updating .cls file in this package

# JSS article -------------------------------------------------------------
# From https://www.jstatsoft.org/pages/view/style
dir.create(tmp_dir <- tempfile())
bundle <- "https://www.jstatsoft.org/public/journals/1/jss-article-tex.zip"
new_jss <- xfun::in_dir(tmp_dir, {
xfun::download_file(bundle)
unzip(basename(bundle))
xfun::normalize_path("jss.cls")
})
file.copy(new_jss,
"inst/rmarkdown/templates/jss/skeleton/jss.cls",
overwrite = TRUE)
unlink(tmp_dir, recursive = TRUE)
# Check git diff and commit



0 comments on commit 1b6fa2d

Please sign in to comment.