2
%% This is file `jss.cls',
5
\def\filedate{2009/09/24}
7
%% Package `jss' to use with LaTeX2e for JSS publications (http://www.jstatsoft.org/)
9
%% Copyright: (C) Achim Zeileis
10
%% Please report errors to Achim.Zeileis@R-project.org
12
\NeedsTeXFormat{LaTeX2e}
13
\ProvidesClass{jss}[\filedate\space\fileversion\space jss class by Achim Zeileis]
18
\newif\if@softwarereview
35
\DeclareOption{article}{\@articletrue%
36
\@codesnippetfalse \@bookreviewfalse \@softwarereviewfalse}
37
\DeclareOption{codesnippet}{\@articlefalse%
38
\@codesnippettrue \@bookreviewfalse \@softwarereviewfalse}
39
\DeclareOption{bookreview}{\@articlefalse%
40
\@codesnippetfalse \@bookreviewtrue \@softwarereviewfalse}
41
\DeclareOption{softwarereview}{\@articlefalse%
42
\@codesnippetfalse \@bookreviewfalse \@softwarereviewtrue}
43
\DeclareOption{shortnames}{\@shortnamestrue}
44
\DeclareOption{nojss}{\@nojsstrue}
45
\DeclareOption{notitle}{\@notitletrue}
46
\DeclareOption{noheadings}{\@noheadingstrue}
49
\LoadClass[11pt,a4paper,twoside]{article}
51
\RequirePackage{graphicx,a4wide,color,ae,fancyvrb}
52
\RequirePackage[T1]{fontenc}
53
\IfFileExists{upquote.sty}{\RequirePackage{upquote}}{}
56
\usepackage[authoryear,round]{natbib}
58
\usepackage[authoryear,round,longnamesfirst]{natbib}
60
\bibpunct{(}{)}{;}{a}{}{,}
61
\bibliographystyle{jss}
63
\setlength{\parskip}{0.7ex plus0.1ex minus0.1ex}
64
\setlength{\parindent}{0em}
65
%% for all publications
66
\newcommand{\Address}[1]{\def\@Address{#1}}
67
\newcommand{\Plaintitle}[1]{\def\@Plaintitle{#1}}
68
\newcommand{\Shorttitle}[1]{\def\@Shorttitle{#1}}
69
\newcommand{\Plainauthor}[1]{\def\@Plainauthor{#1}}
70
\newcommand{\Volume}[1]{\def\@Volume{#1}}
71
\newcommand{\Year}[1]{\def\@Year{#1}}
72
\newcommand{\Month}[1]{\def\@Month{#1}}
73
\newcommand{\Issue}[1]{\def\@Issue{#1}}
74
\newcommand{\Submitdate}[1]{\def\@Submitdate{#1}}
75
%% for articles and code snippets
76
\newcommand{\Acceptdate}[1]{\def\@Acceptdate{#1}}
77
\newcommand{\Abstract}[1]{\def\@Abstract{#1}}
78
\newcommand{\Keywords}[1]{\def\@Keywords{#1}}
79
\newcommand{\Plainkeywords}[1]{\def\@Plainkeywords{#1}}
80
%% for book and software reviews
81
\newcommand{\Reviewer}[1]{\def\@Reviewer{#1}}
82
\newcommand{\Booktitle}[1]{\def\@Booktitle{#1}}
83
\newcommand{\Bookauthor}[1]{\def\@Bookauthor{#1}}
84
\newcommand{\Publisher}[1]{\def\@Publisher{#1}}
85
\newcommand{\Pubaddress}[1]{\def\@Pubaddress{#1}}
86
\newcommand{\Pubyear}[1]{\def\@Pubyear{#1}}
87
\newcommand{\ISBN}[1]{\def\@ISBN{#1}}
88
\newcommand{\Pages}[1]{\def\@Pages{#1}}
89
\newcommand{\Price}[1]{\def\@Price{#1}}
90
\newcommand{\Plainreviewer}[1]{\def\@Plainreviewer{#1}}
91
\newcommand{\Softwaretitle}[1]{\def\@Softwaretitle{#1}}
92
\newcommand{\URL}[1]{\def\@URL{#1}}
94
\newcommand{\Seriesname}[1]{\def\@Seriesname{#1}}
95
\newcommand{\Hypersubject}[1]{\def\@Hypersubject{#1}}
96
\newcommand{\Hyperauthor}[1]{\def\@Hyperauthor{#1}}
97
\newcommand{\Footername}[1]{\def\@Footername{#1}}
98
\newcommand{\Firstdate}[1]{\def\@Firstdate{#1}}
99
\newcommand{\Seconddate}[1]{\def\@Seconddate{#1}}
100
\newcommand{\Reviewauthor}[1]{\def\@Reviewauthor{#1}}
102
\author{Firstname Lastname\\Affiliation}
104
\Abstract{---!!!---an abstract is required---!!!---}
105
\Plainauthor{\@author}
110
\Submitdate{yyyy-mm-dd}
111
\Acceptdate{yyyy-mm-dd}
116
E-mail: \email{name@address}\\
117
URL: \url{http://link/to/webpage/}
120
\Reviewer{Firstname Lastname\\Affiliation}
121
\Plainreviewer{Firstname Lastname}
122
\Booktitle{Book Title}
123
\Bookauthor{Book Author}
124
\Publisher{Publisher}
125
\Pubaddress{Publisher's Address}
129
\Price{USD 69.95 (P)}
130
\URL{http://link/to/webpage/}
133
\Hypersubject{Journal of Statistical Software}
136
\Plainkeywords{\@Keywords}
140
\Seriesname{Code Snippet}
141
\Hypersubject{Journal of Statistical Software -- Code Snippets}
144
\Plainkeywords{\@Keywords}
148
\Seriesname{Book Review}
149
\Hypersubject{Journal of Statistical Software -- Book Reviews}
150
\Plaintitle{\@Booktitle}
151
\Shorttitle{\@Booktitle}
152
\Reviewauthor{\@Bookauthor\\
153
\@Publisher, \@Pubaddress, \@Pubyear.\\
154
ISBN~\@ISBN. \@Pages~pp. \@Price.\\
161
\Seriesname{Software Review}
162
\Hypersubject{Journal of Statistical Software -- Software Reviews}
163
\Plaintitle{\@Softwaretitle}
164
\Shorttitle{\@Softwaretitle}
165
\Booktitle{\@Softwaretitle}
166
\Reviewauthor{\@Publisher, \@Pubaddress. \@Price.\\
173
\Hyperauthor{\@Plainreviewer}
175
\Footername{Reviewer}
176
\Firstdate{\textit{Published:} \@Submitdate}
179
\Hyperauthor{\@Plainauthor}
180
\Keywords{---!!!---at least one keyword is required---!!!---}
181
\Footername{Affiliation}
182
\Firstdate{\textit{Submitted:} \@Submitdate}
183
\Seconddate{\textit{Accepted:} \@Acceptdate}
186
\DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl}
187
\DefineVerbatimEnvironment{Soutput}{Verbatim}{}
188
\DefineVerbatimEnvironment{Scode}{Verbatim}{fontshape=sl}
189
\newenvironment{Schunk}{}{}
190
\DefineVerbatimEnvironment{Code}{Verbatim}{}
191
\DefineVerbatimEnvironment{CodeInput}{Verbatim}{fontshape=sl}
192
\DefineVerbatimEnvironment{CodeOutput}{Verbatim}{}
193
\newenvironment{CodeChunk}{}{}
194
\setkeys{Gin}{width=0.8\textwidth}
196
\newlength{\footerskip}
197
\setlength{\footerskip}{2.5\baselineskip plus 2ex minus 0.5ex}
199
\newcommand{\makefooter}{%
204
\textbf{\large \@Footername: \nopagebreak}\\[.3\baselineskip] \nopagebreak
205
\@Address \nopagebreak
209
\textbf{\large \@Footername: \nopagebreak}\\[.3\baselineskip] \nopagebreak
210
\@Address \nopagebreak
213
\vspace{.1\baselineskip}
214
{\fontfamily{pzc} \fontsize{13}{15} \selectfont Journal of Statistical Software}
216
\url{http://www.jstatsoft.org/}\\ \nopagebreak
217
published by the American Statistical Association
219
\url{http://www.amstat.org/}\\[.3\baselineskip] \nopagebreak
220
{Volume~\@Volume, \@Seriesname~\@Issue}
222
\@Firstdate\\ \nopagebreak
225
\@Seconddate \nopagebreak
226
\vspace{.3\baselineskip}
231
\AtEndDocument{\makefooter}
233
\RequirePackage{hyperref}
236
{\color{white} JSS}\\[-1.42cm]
237
\hspace{-2em} \includegraphics[height=23mm,keepaspectratio]{jsslogo} \hfill
238
\parbox[b][23mm]{118mm}{\hrule height 3pt
240
{\fontfamily{pzc} \fontsize{28}{32} \selectfont Journal of Statistical Software}
242
{\it \small \@Month{} \@Year, Volume~\@Volume, \@Seriesname~\@Issue.%
243
\hfill \href{http://www.jstatsoft.org/}{http://www.jstatsoft.org/}}}\\[0.1cm]
246
\renewcommand{\maketitle}{
248
%% \@oddhead{\@myoddhead}\\[3\baselineskip]
250
\@oddhead{\@myoddhead}\\[3\baselineskip]
255
\vspace{\baselineskip}
257
\vspace{\baselineskip}
259
\begin{quotation} \noindent
262
\vspace{0.7\baselineskip}
264
\vspace{1.3\baselineskip}
267
\thispagestyle{empty}
269
\markboth{\centerline{\@Shorttitle}}{\centerline{\@Hyperauthor}}
271
\markboth{\centerline{\@Shorttitle}}{\centerline{\@Hypersubject}}
273
\pagestyle{myheadings}
278
%% \@oddhead{\@myoddhead} \par
280
\@oddhead{\@myoddhead} \par
283
\def\thefootnote{\fnsymbol{footnote}}
284
\def\@makefnmark{\hbox to 0pt{$^{\@thefnmark}$\hss}}
285
\long\def\@makefntext##1{\parindent 1em\noindent
286
\hbox to1.8em{\hss $\m@th ^{\@thefnmark}$}##1}
289
\setcounter{footnote}{0}
292
%% \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hypersubject}}
294
\thispagestyle{empty}
296
\markboth{\centerline{\@Shorttitle}}{\centerline{\@Hyperauthor}}
298
\markboth{\centerline{\@Shorttitle}}{\centerline{\@Hypersubject}}
300
\pagestyle{myheadings}
303
\let\maketitle\relax \let\@maketitle\relax
304
\gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax
307
\def\@maketitle{\vbox{\hsize\textwidth \linewidth\hsize
314
{\LARGE\bf \@title\par}
315
\vskip 0.2in plus 1fil minus 0.1in
317
\def\and{\unskip\enspace{\rm and}\enspace}%
318
\def\And{\end{tabular}\hss \egroup \hskip 1in plus 2fil
319
\hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\large\bf\rule{\z@}{24pt}\ignorespaces}%
320
\def\AND{\end{tabular}\hss\egroup \hfil\hfil\egroup
321
\vskip 0.1in plus 1fil minus 0.05in
322
\hbox to \linewidth\bgroup\rule{\z@}{10pt} \hfil\hfil
323
\hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\large\bf\rule{\z@}{24pt}\ignorespaces}
324
\hbox to \linewidth\bgroup\rule{\z@}{10pt} \hfil\hfil
325
\hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\large\bf\rule{\z@}{24pt}\@author
326
\end{tabular}\hss\egroup
328
\vskip 0.3in minus 0.1in
333
\textit{Keywords}:~\@Keywords.
334
\vskip 0.1in minus 0.05in
336
\vskip 0.2in minus 0.1in
339
%% sections, subsections, and subsubsections
340
\newlength{\preXLskip}
341
\newlength{\preLskip}
342
\newlength{\preMskip}
343
\newlength{\preSskip}
344
\newlength{\postMskip}
345
\newlength{\postSskip}
346
\setlength{\preXLskip}{1.8\baselineskip plus 0.5ex minus 0ex}
347
\setlength{\preLskip}{1.5\baselineskip plus 0.3ex minus 0ex}
348
\setlength{\preMskip}{1\baselineskip plus 0.2ex minus 0ex}
349
\setlength{\preSskip}{.8\baselineskip plus 0.2ex minus 0ex}
350
\setlength{\postMskip}{.5\baselineskip plus 0ex minus 0.1ex}
351
\setlength{\postSskip}{.3\baselineskip plus 0ex minus 0.1ex}
353
\newcommand{\jsssec}[2][default]{\vskip \preXLskip%
354
\pdfbookmark[1]{#1}{Section.\thesection.#1}%
355
\refstepcounter{section}%
356
\centerline{\textbf{\Large \thesection. #2}} \nopagebreak
357
\vskip \postMskip \nopagebreak}
358
\newcommand{\jsssecnn}[1]{\vskip \preXLskip%
359
\centerline{\textbf{\Large #1}} \nopagebreak
360
\vskip \postMskip \nopagebreak}
362
\newcommand{\jsssubsec}[2][default]{\vskip \preMskip%
363
\pdfbookmark[2]{#1}{Subsection.\thesubsection.#1}%
364
\refstepcounter{subsection}%
365
\textbf{\large \thesubsection. #2} \nopagebreak
366
\vskip \postSskip \nopagebreak}
367
\newcommand{\jsssubsecnn}[1]{\vskip \preMskip%
368
\textbf{\large #1} \nopagebreak
369
\vskip \postSskip \nopagebreak}
371
\newcommand{\jsssubsubsec}[2][default]{\vskip \preSskip%
372
\pdfbookmark[3]{#1}{Subsubsection.\thesubsubsection.#1}%
373
\refstepcounter{subsubsection}%
374
{\large \textit{#2}} \nopagebreak
375
\vskip \postSskip \nopagebreak}
376
\newcommand{\jsssubsubsecnn}[1]{\vskip \preSskip%
377
{\textit{\large #1}} \nopagebreak
378
\vskip \postSskip \nopagebreak}
380
\newcommand{\jsssimplesec}[2][default]{\vskip \preLskip%
381
%% \pdfbookmark[1]{#1}{Section.\thesection.#1}%
382
\refstepcounter{section}%
383
\textbf{\large #1} \nopagebreak
384
\vskip \postSskip \nopagebreak}
385
\newcommand{\jsssimplesecnn}[1]{\vskip \preLskip%
386
\textbf{\large #1} \nopagebreak
387
\vskip \postSskip \nopagebreak}
390
\renewcommand{\section}{\secdef \jsssimplesec \jsssimplesecnn}
391
\renewcommand{\subsection}{\secdef \jsssimplesec \jsssimplesecnn}
392
\renewcommand{\subsubsection}{\secdef \jsssimplesec \jsssimplesecnn}
394
\renewcommand{\section}{\secdef \jsssec \jsssecnn}
395
\renewcommand{\subsection}{\secdef \jsssubsec \jsssubsecnn}
396
\renewcommand{\subsubsection}{\secdef \jsssubsubsec \jsssubsubsecnn}
399
\definecolor{Red}{rgb}{0.5,0,0}
400
\definecolor{Blue}{rgb}{0,0,0.5}
405
linktocpage = {true},
406
plainpages = {false},
410
pdfstartview = {Fit},
411
pdfpagemode = {None},
412
pdfview = {XYZ null null null}
418
linktocpage = {true},
419
plainpages = {false},
423
pdfstartview = {Fit},
424
pdfpagemode = {UseOutlines},
425
pdfview = {XYZ null null null}
431
pdfauthor = {\@Hyperauthor},
432
pdftitle = {\@Plaintitle},
433
pdfkeywords = {\@Plainkeywords}
439
pdfauthor = {\@Hyperauthor},
440
pdftitle = {\@Plaintitle},
441
pdfsubject = {\@Hypersubject},
442
pdfkeywords = {\@Plainkeywords}
447
%% \AtBeginDocument{\maketitle}
449
\AtBeginDocument{\maketitle}
453
\newcommand\code{\bgroup\@makeother\_\@makeother\~\@makeother\$\@codex}
454
\def\@codex#1{{\normalfont\ttfamily\hyphenchar\font=-1 #1}\egroup}
457
\let\proglang=\textsf
458
\newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
459
\newcommand{\email}[1]{\href{mailto:#1}{\normalfont\texttt{#1}}}
460
\newcommand{\doi}[1]{\href{http://dx.doi.org/#1}{\normalfont\texttt{doi:#1}}}
461
\newcommand{\E}{\mathsf{E}}
462
\newcommand{\VAR}{\mathsf{VAR}}
463
\newcommand{\COV}{\mathsf{COV}}
464
\newcommand{\Prob}{\mathsf{P}}
467
%% End of file `jss.cls'.