Skip to content
Browse files

uploaded paper folder with beginning of paper and jss style sheets.

  • Loading branch information...
1 parent 17731bd commit e4bf380908be3d3264822c66e811bc977d18b989 @garrettgman garrettgman committed Aug 20, 2009
Showing with 4,149 additions and 0 deletions.
  1. +1,647 −0 paper/jss.bst
  2. +472 −0 paper/jss.cls
  3. +509 −0 paper/jss.dbj
  4. +48 −0 paper/jss.drv
  5. +1,347 −0 paper/jss.dtx
  6. +14 −0 paper/jss.ins
  7. BIN paper/jsslogo.jpg
  8. +112 −0 paper/lubridate.tex
View
1,647 paper/jss.bst
1,647 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
472 paper/jss.cls
@@ -0,0 +1,472 @@
+%%
+%% 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{1.8}
+\def\filename{jss}
+\def\filedate{2008/04/07}
+%%
+%% Package `jss' to use with LaTeX2e for JSS publications
+%% http://www.jstatsoft.org/
+%% Copyright (C) 2004 Achim Zeileis
+%% Please report errors to Achim.Zeileis@R-project.org
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{jss}[\filedate\space\fileversion\space jss class by Achim Zeileis]
+%% options
+\newif\if@article
+\newif\if@codesnippet
+\newif\if@bookreview
+\newif\if@softwarereview
+\newif\if@review
+\newif\if@shortnames
+\newif\if@nojss
+
+\@articletrue
+\@codesnippetfalse
+\@bookreviewfalse
+\@softwarereviewfalse
+\@reviewfalse
+\@shortnamesfalse
+\@nojssfalse
+
+\DeclareOption{article}{\@articletrue%
+ \@codesnippetfalse \@bookreviewfalse \@softwarereviewfalse}
+\DeclareOption{codesnippet}{\@articlefalse%
+ \@codesnippettrue \@bookreviewfalse \@softwarereviewfalse}
+\DeclareOption{bookreview}{\@articlefalse%
+ \@codesnippetfalse \@bookreviewtrue \@softwarereviewfalse}
+\DeclareOption{softwarereview}{\@articlefalse%
+ \@codesnippetfalse \@bookreviewfalse \@softwarereviewtrue}
+\DeclareOption{shortnames}{\@shortnamestrue}
+\DeclareOption{nojss}{\@nojsstrue}
+
+\ProcessOptions
+\LoadClass[11pt,a4paper,twoside]{article}
+%% required packages
+\RequirePackage{graphicx,a4wide,color,ae,fancyvrb}
+\RequirePackage[T1]{fontenc}
+\IfFileExists{upquote.sty}{\RequirePackage{upquote}}{}
+%% bibliography
+\if@shortnames
+ \usepackage[authoryear,round]{natbib}
+\else
+ \usepackage[authoryear,round,longnamesfirst]{natbib}
+\fi
+\bibpunct{(}{)}{;}{a}{}{,}
+\bibliographystyle{jss}
+%% paragraphs
+\setlength{\parskip}{0.7ex plus0.1ex minus0.1ex}
+\setlength{\parindent}{0em}
+%% for all publications
+\newcommand{\Address}[1]{\def\@Address{#1}}
+\newcommand{\Plaintitle}[1]{\def\@Plaintitle{#1}}
+\newcommand{\Shorttitle}[1]{\def\@Shorttitle{#1}}
+\newcommand{\Plainauthor}[1]{\def\@Plainauthor{#1}}
+\newcommand{\Volume}[1]{\def\@Volume{#1}}
+\newcommand{\Year}[1]{\def\@Year{#1}}
+\newcommand{\Month}[1]{\def\@Month{#1}}
+\newcommand{\Issue}[1]{\def\@Issue{#1}}
+\newcommand{\Submitdate}[1]{\def\@Submitdate{#1}}
+%% for articles and code snippets
+\newcommand{\Acceptdate}[1]{\def\@Acceptdate{#1}}
+\newcommand{\Abstract}[1]{\def\@Abstract{#1}}
+\newcommand{\Keywords}[1]{\def\@Keywords{#1}}
+\newcommand{\Plainkeywords}[1]{\def\@Plainkeywords{#1}}
+%% for book and software reviews
+\newcommand{\Reviewer}[1]{\def\@Reviewer{#1}}
+\newcommand{\Booktitle}[1]{\def\@Booktitle{#1}}
+\newcommand{\Bookauthor}[1]{\def\@Bookauthor{#1}}
+\newcommand{\Publisher}[1]{\def\@Publisher{#1}}
+\newcommand{\Pubaddress}[1]{\def\@Pubaddress{#1}}
+\newcommand{\Pubyear}[1]{\def\@Pubyear{#1}}
+\newcommand{\ISBN}[1]{\def\@ISBN{#1}}
+\newcommand{\Pages}[1]{\def\@Pages{#1}}
+\newcommand{\Price}[1]{\def\@Price{#1}}
+\newcommand{\Plainreviewer}[1]{\def\@Plainreviewer{#1}}
+\newcommand{\Softwaretitle}[1]{\def\@Softwaretitle{#1}}
+\newcommand{\URL}[1]{\def\@URL{#1}}
+%% for internal use
+\newcommand{\Seriesname}[1]{\def\@Seriesname{#1}}
+\newcommand{\Hypersubject}[1]{\def\@Hypersubject{#1}}
+\newcommand{\Hyperauthor}[1]{\def\@Hyperauthor{#1}}
+\newcommand{\Footername}[1]{\def\@Footername{#1}}
+\newcommand{\Firstdate}[1]{\def\@Firstdate{#1}}
+\newcommand{\Seconddate}[1]{\def\@Seconddate{#1}}
+\newcommand{\Reviewauthor}[1]{\def\@Reviewauthor{#1}}
+%% defaults
+\author{Firstname Lastname\\Affiliation}
+\title{Title}
+\Abstract{---!!!---an abstract is required---!!!---}
+\Plainauthor{\@author}
+\Volume{VV}
+\Year{YYYY}
+\Month{MMMMMM}
+\Issue{II}
+\Submitdate{yyyy-mm-dd}
+\Acceptdate{yyyy-mm-dd}
+\Address{
+ Firstname Lastname\\
+ Affiliation\\
+ Address, Country\\
+ E-mail: \email{name@address}\\
+ URL: \url{http://link/to/webpage/}
+}
+
+\Reviewer{Firstname Lastname\\Affiliation}
+\Plainreviewer{Firstname Lastname}
+\Booktitle{Book Title}
+\Bookauthor{Book Author}
+\Publisher{Publisher}
+\Pubaddress{Publisher's Address}
+\Pubyear{YYY}
+\ISBN{x-xxxxx-xxx-x}
+\Pages{xv + 123}
+\Price{USD 69.95 (P)}
+\URL{http://link/to/webpage/}
+\if@article
+ \Seriesname{Issue}
+ \Hypersubject{Journal of Statistical Software}
+ \Plaintitle{\@title}
+ \Shorttitle{\@title}
+ \Plainkeywords{\@Keywords}
+\fi
+
+\if@codesnippet
+ \Seriesname{Code Snippet}
+ \Hypersubject{Journal of Statistical Software -- Code Snippets}
+ \Plaintitle{\@title}
+ \Shorttitle{\@title}
+ \Plainkeywords{\@Keywords}
+\fi
+
+\if@bookreview
+ \Seriesname{Book Review}
+ \Hypersubject{Journal of Statistical Software -- Book Reviews}
+ \Plaintitle{\@Booktitle}
+ \Shorttitle{\@Booktitle}
+ \Reviewauthor{\@Bookauthor\\
+ \@Publisher, \@Pubaddress, \@Pubyear.\\
+ ISBN~\@ISBN. \@Pages~pp. \@Price.\\
+ \url{\@URL}}
+ \Plainkeywords{}
+ \@reviewtrue
+\fi
+
+\if@softwarereview
+ \Seriesname{Software Review}
+ \Hypersubject{Journal of Statistical Software -- Software Reviews}
+ \Plaintitle{\@Softwaretitle}
+ \Shorttitle{\@Softwaretitle}
+ \Booktitle{\@Softwaretitle}
+ \Reviewauthor{\@Publisher, \@Pubaddress. \@Price.\\
+ \url{\@URL}}
+ \Plainkeywords{}
+ \@reviewtrue
+\fi
+
+\if@review
+ \Hyperauthor{\@Plainreviewer}
+ \Keywords{}
+ \Footername{Reviewer}
+ \Firstdate{\textit{Published:} \@Submitdate}
+ \Seconddate{}
+\else
+ \Hyperauthor{\@Plainauthor}
+ \Keywords{---!!!---at least one keyword is required---!!!---}
+ \Footername{Affiliation}
+ \Firstdate{\textit{Submitted:} \@Submitdate}
+ \Seconddate{\textit{Accepted:} \@Acceptdate}
+\fi
+%% Sweave(-like)
+\DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl}
+\DefineVerbatimEnvironment{Soutput}{Verbatim}{}
+\DefineVerbatimEnvironment{Scode}{Verbatim}{fontshape=sl}
+\newenvironment{Schunk}{}{}
+\DefineVerbatimEnvironment{Code}{Verbatim}{}
+\DefineVerbatimEnvironment{CodeInput}{Verbatim}{fontshape=sl}
+\DefineVerbatimEnvironment{CodeOutput}{Verbatim}{}
+\newenvironment{CodeChunk}{}{}
+\setkeys{Gin}{width=0.8\textwidth}
+%% footer
+\newlength{\footerskip}
+\setlength{\footerskip}{2.5\baselineskip plus 2ex minus 0.5ex}
+
+\newcommand{\makefooter}{%
+ \vspace{\footerskip}
+
+ \if@nojss
+ \begin{samepage}
+ \textbf{\large \@Footername: \nopagebreak}\\[.3\baselineskip] \nopagebreak
+ \@Address \nopagebreak
+ \end{samepage}
+ \else
+ \begin{samepage}
+ \textbf{\large \@Footername: \nopagebreak}\\[.3\baselineskip] \nopagebreak
+ \@Address \nopagebreak
+ \vfill
+ \hrule \nopagebreak
+ \vspace{.1\baselineskip}
+ {\fontfamily{pzc} \fontsize{13}{15} \selectfont Journal of Statistical Software}
+ \hfill
+ \url{http://www.jstatsoft.org/}\\ \nopagebreak
+ published by the American Statistical Association
+ \hfill
+ \url{http://www.amstat.org/}\\[.3\baselineskip] \nopagebreak
+ {Volume~\@Volume, \@Seriesname~\@Issue}
+ \hfill
+ \@Firstdate\\ \nopagebreak
+ {\@Month{} \@Year}
+ \hfill
+ \@Seconddate \nopagebreak
+ \vspace{.3\baselineskip}
+ \hrule
+ \end{samepage}
+ \fi
+}
+\AtEndDocument{\makefooter}
+%% required packages
+\RequirePackage{hyperref}
+%% new \maketitle
+\def\@myoddhead{
+ {\color{white} JSS}\\[-1.42cm]
+ \hspace{-2em} \includegraphics[height=23mm,keepaspectratio]{jsslogo} \hfill
+ \parbox[b][23mm]{118mm}{\hrule height 3pt
+ \center{
+ {\fontfamily{pzc} \fontsize{28}{32} \selectfont Journal of Statistical Software}
+ \vfill
+ {\it \small \@Month{} \@Year, Volume~\@Volume, \@Seriesname~\@Issue.%
+ \hfill \href{http://www.jstatsoft.org/}{http://www.jstatsoft.org/}}}\\[0.1cm]
+ \hrule height 3pt}}
+\if@review
+ \renewcommand{\maketitle}{
+ \if@nojss
+ %% \@oddhead{\@myoddhead}\\[3\baselineskip]
+ \else
+ \@oddhead{\@myoddhead}\\[3\baselineskip]
+ \fi
+ {\large
+ \noindent
+ Reviewer: \@Reviewer
+ \vspace{\baselineskip}
+ \hrule
+ \vspace{\baselineskip}
+ \textbf{\@Booktitle}
+ \begin{quotation} \noindent
+ \@Reviewauthor
+ \end{quotation}
+ \vspace{0.7\baselineskip}
+ \hrule
+ \vspace{1.3\baselineskip}
+ }
+
+ \thispagestyle{empty}
+ \if@nojss
+ \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hyperauthor}}
+ \else
+ \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hypersubject}}
+ \fi
+ \pagestyle{myheadings}
+ }
+\else
+ \def\maketitle{
+ \if@nojss
+ %% \@oddhead{\@myoddhead} \par
+ \else
+ \@oddhead{\@myoddhead} \par
+ \fi
+ \begingroup
+ \def\thefootnote{\fnsymbol{footnote}}
+ \def\@makefnmark{\hbox to 0pt{$^{\@thefnmark}$\hss}}
+ \long\def\@makefntext##1{\parindent 1em\noindent
+ \hbox to1.8em{\hss $\m@th ^{\@thefnmark}$}##1}
+ \@maketitle \@thanks
+ \endgroup
+ \setcounter{footnote}{0}
+ \thispagestyle{empty}
+ \if@nojss
+ \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hyperauthor}}
+ \else
+ \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hypersubject}}
+ \fi
+ \pagestyle{myheadings}
+
+ \let\maketitle\relax \let\@maketitle\relax
+ \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax
+ }
+
+ \def\@maketitle{\vbox{\hsize\textwidth \linewidth\hsize
+ \if@nojss
+ %% \vskip 1in
+ \else
+ \vskip 1in
+ \fi
+ {\centering
+ {\LARGE\bf \@title\par}
+ \vskip 0.2in plus 1fil minus 0.1in
+ {
+ \def\and{\unskip\enspace{\rm and}\enspace}%
+ \def\And{\end{tabular}\hss \egroup \hskip 1in plus 2fil
+ \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\large\bf\rule{\z@}{24pt}\ignorespaces}%
+ \def\AND{\end{tabular}\hss\egroup \hfil\hfil\egroup
+ \vskip 0.1in plus 1fil minus 0.05in
+ \hbox to \linewidth\bgroup\rule{\z@}{10pt} \hfil\hfil
+ \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\large\bf\rule{\z@}{24pt}\ignorespaces}
+ \hbox to \linewidth\bgroup\rule{\z@}{10pt} \hfil\hfil
+ \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\large\bf\rule{\z@}{24pt}\@author
+ \end{tabular}\hss\egroup
+ \hfil\hfil\egroup}
+ \vskip 0.3in minus 0.1in
+ \hrule
+ \begin{abstract}
+ \@Abstract
+ \end{abstract}}
+ \textit{Keywords}:~\@Keywords.
+ \vskip 0.1in minus 0.05in
+ \hrule
+ \vskip 0.2in minus 0.1in
+ }}
+\fi
+%% sections, subsections, and subsubsections
+\newlength{\preXLskip}
+\newlength{\preLskip}
+\newlength{\preMskip}
+\newlength{\preSskip}
+\newlength{\postMskip}
+\newlength{\postSskip}
+\setlength{\preXLskip}{1.8\baselineskip plus 0.5ex minus 0ex}
+\setlength{\preLskip}{1.5\baselineskip plus 0.3ex minus 0ex}
+\setlength{\preMskip}{1\baselineskip plus 0.2ex minus 0ex}
+\setlength{\preSskip}{.8\baselineskip plus 0.2ex minus 0ex}
+\setlength{\postMskip}{.5\baselineskip plus 0ex minus 0.1ex}
+\setlength{\postSskip}{.3\baselineskip plus 0ex minus 0.1ex}
+
+\newcommand{\jsssec}[2][default]{\vskip \preXLskip%
+ \pdfbookmark[1]{#1}{Section.\thesection.#1}%
+ \refstepcounter{section}%
+ \centerline{\textbf{\Large \thesection. #2}} \nopagebreak
+ \vskip \postMskip \nopagebreak}
+\newcommand{\jsssecnn}[1]{\vskip \preXLskip%
+ \centerline{\textbf{\Large #1}} \nopagebreak
+ \vskip \postMskip \nopagebreak}
+
+\newcommand{\jsssubsec}[2][default]{\vskip \preMskip%
+ \pdfbookmark[2]{#1}{Subsection.\thesubsection.#1}%
+ \refstepcounter{subsection}%
+ \textbf{\large \thesubsection. #2} \nopagebreak
+ \vskip \postSskip \nopagebreak}
+\newcommand{\jsssubsecnn}[1]{\vskip \preMskip%
+ \textbf{\large #1} \nopagebreak
+ \vskip \postSskip \nopagebreak}
+
+\newcommand{\jsssubsubsec}[2][default]{\vskip \preSskip%
+ \pdfbookmark[3]{#1}{Subsubsection.\thesubsubsection.#1}%
+ \refstepcounter{subsubsection}%
+ {\large \textit{#2}} \nopagebreak
+ \vskip \postSskip \nopagebreak}
+\newcommand{\jsssubsubsecnn}[1]{\vskip \preSskip%
+ {\textit{\large #1}} \nopagebreak
+ \vskip \postSskip \nopagebreak}
+
+\newcommand{\jsssimplesec}[2][default]{\vskip \preLskip%
+%% \pdfbookmark[1]{#1}{Section.\thesection.#1}%
+ \refstepcounter{section}%
+ \textbf{\large #1} \nopagebreak
+ \vskip \postSskip \nopagebreak}
+\newcommand{\jsssimplesecnn}[1]{\vskip \preLskip%
+ \textbf{\large #1} \nopagebreak
+ \vskip \postSskip \nopagebreak}
+
+\if@review
+ \renewcommand{\section}{\secdef \jsssimplesec \jsssimplesecnn}
+ \renewcommand{\subsection}{\secdef \jsssimplesec \jsssimplesecnn}
+ \renewcommand{\subsubsection}{\secdef \jsssimplesec \jsssimplesecnn}
+\else
+ \renewcommand{\section}{\secdef \jsssec \jsssecnn}
+ \renewcommand{\subsection}{\secdef \jsssubsec \jsssubsecnn}
+ \renewcommand{\subsubsection}{\secdef \jsssubsubsec \jsssubsubsecnn}
+\fi
+%% colors
+\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},
+ linkcolor = {Blue},
+ citecolor = {Blue},
+ urlcolor = {Red},
+ pdfstartview = {Fit},
+ pdfpagemode = {None},
+ pdfview = {XYZ null null null}
+ }
+\else
+ \hypersetup{%
+ hyperindex = {true},
+ colorlinks = {true},
+ linktocpage = {true},
+ plainpages = {false},
+ linkcolor = {Blue},
+ citecolor = {Blue},
+ urlcolor = {Red},
+ pdfstartview = {Fit},
+ pdfpagemode = {UseOutlines},
+ pdfview = {XYZ null null null}
+ }
+\fi
+\if@nojss
+ \AtBeginDocument{
+ \hypersetup{%
+ pdfauthor = {\@Hyperauthor},
+ pdftitle = {\@Plaintitle},
+ pdfkeywords = {\@Plainkeywords}
+ }
+ }
+\else
+ \AtBeginDocument{
+ \hypersetup{%
+ pdfauthor = {\@Hyperauthor},
+ pdftitle = {\@Plaintitle},
+ pdfsubject = {\@Hypersubject},
+ pdfkeywords = {\@Plainkeywords}
+ }
+ }
+\fi
+\AtBeginDocument{\maketitle}
+%% commands
+\makeatletter
+\newcommand\code{\bgroup\@makeother\_\@makeother\~\@makeother\$\@codex}
+\def\@codex#1{{\normalfont\ttfamily\hyphenchar\font=-1 #1}\egroup}
+\makeatother
+%%\let\code=\texttt
+\let\proglang=\textsf
+\newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
+\newcommand{\email}[1]{\href{mailto:#1}{\normalfont\texttt{#1}}}
+\newcommand{\doi}[1]{\href{http://dx.doi.org/#1}{\normalfont\texttt{doi:#1}}}
+\newcommand{\E}{\mathsf{E}}
+\newcommand{\VAR}{\mathsf{VAR}}
+\newcommand{\COV}{\mathsf{COV}}
+\newcommand{\Prob}{\mathsf{P}}
+\endinput
+%%
+%% End of file `jss.cls'.
View
509 paper/jss.dbj
@@ -0,0 +1,509 @@
+%% Driver file to produce jss.bst from merlin.mbs
+%% Generated with makebst, version 4.0-beta1 (1999/08/26)
+%% Produced on 2004/07/20 at 16:32
+%%
+\input docstrip
+
+\preamble
+----------------------------------------
+*** Journal of Statistical Software ***
+
+\endpreamble
+
+\postamble
+End of customized bst file
+\endpostamble
+
+\keepsilent
+
+\askforoverwritefalse
+\def\MBopts{\from{merlin.mbs}{%
+%EXTERNAL FILES:
+%Name of language file: \cfile=.
+%No included files.
+%INTERNAL LANGUAGE SUPPORT (if no external language file)
+ %: (def) English
+% ,babel%: Babel
+%--------------------
+%STYLE OF CITATIONS:
+% %: (def) Numerical
+ ay%: Author-year
+% ,alph%: Alpha style, Jon90 or JWB90
+% ,alph,alf-1%: Alpha style, Jon90
+% ,alph,alf-f%: Alpha style, Jones90
+% ,cite%: Cite key
+%--------------------
+%HTML OUTPUT (if non author-year citations)
+% %: (def) Normal LaTeX
+% ,html%: Hypertext
+% ,html,htlist%: Hypertext list
+% ,html,htdes%: Hypertext with keys
+%--------------------
+%AUTHOR--YEAR SUPPORT SYSTEM (if author-year citations)
+ ,nat%: Natbib
+% %: (def) Older Natbib
+% ,alk%: Apalike
+% ,har%: Harvard
+% ,ast%: Astronomy
+% ,cay%: Chicago
+% ,nmd%: Named
+% ,cn%: Author-date
+%--------------------
+%HARVARD EXTENSIONS INCLUDED (if Harvard support selected)
+% ,harnm%: With Harvard extensions
+% %: (def) Older Harvard
+%--------------------
+%LANGUAGE FIELD
+ %: (def) No language field
+% ,lang%: Add language field
+%--------------------
+%ANNOTATIONS:
+ %: (def) No annotations
+% ,annote%: Annotations
+%--------------------
+%ORDERING OF REFERENCES (if non-author/year and non-alph)
+% %: (def) Alphabetical
+% ,seq-no%: Citation order
+% ,seq-yr%: Year ordered
+% ,seq-yrr%: Reverse year ordered
+%--------------------
+%ORDERING OF REFERENCES (if author-year citations)
+ %: (def) Alphabetical
+% ,seq-lab%: By label
+% ,seq-key%: By label and cite key
+% ,seq-yr%: Year ordered
+% ,seq-yrr%: Reverse year ordered
+% ,seq-no%: Citation order
+%--------------------
+%ORDER ON VON PART (if not citation order)
+ %: (def) Sort on von part
+% ,vonx%: Sort without von part
+%--------------------
+%AUTHOR NAMES:
+% ,ed-au%: Full, surname last
+% ,nm-revf%: Full, surname first
+% ,nm-init,ed-au%: Initials + surname
+% ,nm-rev%: Surname + initials
+% ,nm-rv%: Surname + dotless initials
+ ,nm-rvx%: Surname + pure initials
+% ,nm-rvv%: Surname + spaceless initials
+% ,nm-rev1%: Only first name reversed, initials
+% ,nm-revv1%: First name reversed, with full names
+%--------------------
+%EDITOR NAMES IN COLLECTIONS (if author names reversed)
+% ,ed-rev%: Editor names reversed
+%--------------------
+%POSITION OF JUNIOR (if author names reversed)
+% ,jnrlst%: Junior comes last
+% %: (def) Junior between
+%--------------------
+%JUNIOR PART IN THE CITATION (if author-year citations)
+ %: (def) No `junior' part in the citations
+% ,jnrlab%: `Junior' in citations
+%--------------------
+%PUNCTUATION BETWEEN AUTHOR NAMES:
+ %: (def) Author names separated by commas
+% ,aunm-semi%: Names separated by semi-colon
+% ,aunm-sl%: Names separated by slash
+%--------------------
+%ADJACENT REFERENCES WITH REPEATED NAMES:
+ %: (def) Author/editor names always present
+% ,nmdash%: Repeated author/editor names replaced by dash
+%--------------------
+%NUMBER OF AUTHORS:
+ %: (def) All authors
+% ,nmlm%: Limited authors
+%--------------------
+%TYPEFACE FOR AUTHORS IN LIST OF REFERENCES:
+ %: (def) Normal font for author names
+% ,nmft,nmft-sc%: Small caps authors
+% ,nmft,nmft-it%: Italic authors
+% ,nmft,nmft-bf%: Bold authors
+% ,nmft,nmft-def%: User defined author font
+%--------------------
+%FONT FOR FIRST NAMES (if non-default font for authors)
+% %: (def) First names same font as surnames
+% ,fnm-rm%: First names in normal font
+% ,fnm-def%: First names in user defined font
+%--------------------
+%EDITOR NAMES IN INCOLLECTION ETC:
+% %: (def) Editors incollection normal font
+% ,nmfted%: Editors incollection like authors
+%--------------------
+%FONT FOR `AND' IN LIST:
+% %: (def) `And' in author font
+% ,nmand-rm%: `And' in normal font
+%--------------------
+%FONT OF CITATION LABELS IN TEXT (if author-year citations)
+ %: (def) Cited authors plain
+% ,lab,lab-it%: Cited authors italic
+% ,lab,lab-sc%: Cited authors small caps
+% ,lab,lab-bf%: Cited authors bold
+% ,lab,lab-def%: User defined citation font
+%--------------------
+%FONT FOR `AND' IN CITATIONS (if non-default font for citation lables)
+% %: (def) Cited `and' in author font
+% ,and-rm%: Cited `and' in normal font
+%--------------------
+%FONT OF EXTRA LABEL (The extra letter on the year)
+ %: (def) Extra label plain
+% ,xlab-it%: Extra label italic
+%--------------------
+%LABEL WHEN AUTHORS MISSING (if author-year citations)
+ ,keyxyr%: Year blank when KEY replaces missing author
+% %: (def) Year included when KEY replaces missing author
+%--------------------
+%MISSING DATE (if author-year citations)
+ %: (def) Missing date set to ????
+% ,blkyear%: Missing date left blank
+%--------------------
+%DATE POSITION:
+% %: (def) Date at end
+ ,dt-beg%: Date after authors
+% ,dt-jnl%: Date part of journal spec.
+% ,dt-end%: Date at very end
+%--------------------
+%DATE FORMAT (if non author-year citations)
+% %: (def) Plain month and year
+% ,yr-par%: Date in parentheses
+% ,yr-brk%: Date in brackets
+% ,yr-col%: Date preceded by colon
+% ,yr-per%: Date preceded by period
+% ,yr-com%: Date preceded by comma
+% ,yr-blk%: Date preceded by space
+%--------------------
+%SUPPRESS MONTH:
+% %: (def) Date is month and year
+% ,xmth%: Date is year only
+%--------------------
+%REVERSED DATE (if including month)
+% %: (def) Date as month year
+% ,dtrev%: Date as year month
+%--------------------
+%DATE FORMAT (if author-year citations)
+% %: (def) Year plain
+ ,yr-par%: Year in parentheses
+% ,yr-brk%: Year in brackets
+% ,yr-col%: Year preceded by colon
+% ,yr-per%: Year preceded by period
+% ,yr-com%: Date preceded by comma
+% ,yr-blk%: Year preceded by space
+%--------------------
+%INCLUDE MONTHS:
+ %: (def) Date is year only
+% ,aymth%: Include month in date
+%--------------------
+%REVERSED DATE (if including month)
+% %: (def) Date as month year
+% ,dtrev%: Date as year month
+%--------------------
+%DATE PUNCTUATION (if date not at end)
+ %: (def) Date with standard block punctuation
+% ,yrp-col%: Colon after date
+% ,yrp-semi%: Semi-colon after date
+% ,yrp-per%: Period after date
+% ,yrp-x%: No punct. after date
+%--------------------
+%BLANK AFTER DATE:
+ %: (def) Space after date
+% ,yrpp-xsp%: No space after date
+%--------------------
+%DATE FONT:
+ %: (def) Date in normal font
+% ,dtbf%: Date in bold face
+%--------------------
+%TRUNCATE YEAR (if author-year citations)
+ ,note-yr%: Year text full
+% %: (def) Year truncated
+%--------------------
+%TITLE OF ARTICLE:
+% %: (def) Title plain
+% ,tit-it%: Title italic
+% ,tit-qq,qt-s%: Title and punctuation in single quotes
+ ,tit-qq%: Title and punctuation in double quotes
+% ,tit-qq,qt-g%: Title and punctuation in guillemets
+% ,tit-qq,qt-s,qx%: Title in single quotes
+% ,tit-qq,qx%: Title in double quotes
+% ,tit-qq,qt-g,qx%: Title in guillemets
+%--------------------
+%COLLECTION/PROCEEDINGS TITLES (if quoted title)
+ ,bt-qq%: Quote collection and proceedings titles
+% %: (def) Collection and proceedings titles not in quotes
+%--------------------
+%CAPITALIZATION OF ARTICLE TITLE:
+% %: (def) Sentence style
+ ,atit-u%: Title style
+%--------------------
+%ARTICLE TITLE PRESENT:
+ %: (def) Article title present
+% ,jtit-x%: No article title
+%--------------------
+%JOURNAL NAMES:
+ %: (def) Periods in journal names
+% ,jxper%: Dotless journal names
+%--------------------
+%JOURNAL NAME FONT:
+ %: (def) Journal name italics
+% ,jttl-rm%: Journal name normal
+%--------------------
+%THESIS TITLE:
+ %: (def) Thesis titles like books
+% ,thtit-a%: Thesis title like article
+% ,thtit-x%: No thesis title
+%--------------------
+%TECHNICAL REPORT TITLE:
+% %: (def) Tech. report title like articles
+% ,trtit-b%: Tech. report title like books
+%--------------------
+%TECHNICAL REPORT NUMBER:
+% %: (def) Tech. report and number plain
+ ,trnum-it%: Tech. report and number italic
+%--------------------
+%JOURNAL VOLUME:
+% %: (def) Volume plain
+% ,vol-it%: Volume italic
+ ,vol-bf%: Volume bold
+% ,vol-2bf%: Volume and number bold
+%--------------------
+%JOURNAL VOL AND NUMBER:
+ %: (def) Journal vol(num)
+% ,vnum-sp%: Journal vol (num)
+% ,vnum-cm%: Journal vol, num
+% ,vnum-nr%: Journal vol, no. num
+% ,vnum-h%: Journal vol, \# number
+% ,vnum-b%: Journal vol number
+% ,vnum-x%: Journal vol, without number
+%--------------------
+%VOLUME PUNCTUATION:
+% %: (def) Volume with colon
+% ,volp-sp%: Volume with colon and space
+% ,volp-semi%: Volume with semi-colon
+ ,volp-com%: Volume with comma
+% ,volp-blk%: Volume with blank
+%--------------------
+%YEAR IN JOURNAL SPECIFICATION:
+ %: (def) Journal year like others
+% ,jdt-v%: Journal vol(year)
+% ,jdt-vs%: Journal vol (year)
+% ,jdt-p%: Year with pages
+% ,jdt-pc%: Year, comma, pages
+%--------------------
+%PAGE NUMBERS:
+ %: (def) Start and stop page numbers
+% ,jpg-1%: Only start page number
+%--------------------
+%LARGE PAGE NUMBERS:
+ %: (def) No separators for large page numbers
+% ,pgsep-c%: Comma inserted over 9999
+% ,pgsep-s%: Thin space inserted over 9999
+% ,pgsep-p%: Period inserted over 9999
+%--------------------
+%WORD `PAGE' IN ARTICLES:
+ %: (def) Article pages numbers only
+% ,jwdpg%: Include `page' in articles
+%--------------------
+%POSITION OF PAGES:
+ %: (def) Pages given mid text
+% ,pp-last%: Pages at end
+%--------------------
+%WORD `VOLUME' IN ARTICLES:
+ %: (def) Article volume as number only
+% ,jwdvol%: Include `volume' in articles
+%--------------------
+%NUMBER AND SERIES FOR COLLECTIONS:
+ ,num-xser%: Allows number without series
+% %: (def) Standard BibTeX
+%--------------------
+%POSITION OF NUMBER AND SERIES:
+ %: (def) After chapter and pages
+% ,numser%: Just before publisher
+%--------------------
+%JOURNAL NAME PUNCTUATION:
+ %: (def) Comma after journal
+% ,jnm-x%: Space after journal
+%--------------------
+%BOOK TITLE:
+ %: (def) Book title italic
+% ,btit-rm,bt-rm%: Book title plain
+%--------------------
+%PAGES IN BOOKS:
+ %: (def) Pages in book plain
+% ,bkpg-par%: Pages in book in parentheses
+% ,bkpg-x%: Pages in book bare
+%--------------------
+%TOTAL PAGES OF A BOOK:
+ %: (def) Total book pages not printed
+% ,pg-bk%: For book: 345 pages
+%--------------------
+%PUBLISHER ADDRESS:
+ %: (def) Publisher, address
+% ,add-pub%: Address: Publisher
+%--------------------
+%PUBLISHER IN PARENTHESES:
+ %: (def) Publisher as normal block
+% ,pub-par%: Publisher in parentheses
+% ,pub-date%: Publisher and date in parentheses
+% ,pub-date,pub-xc%: Publisher and date in parentheses, no comma
+% ,pub-date,pub-xpar%: Publisher and date without parentheses
+% ,pub-date,pub-xpar,pub-xc%: Publisher and date, no parentheses, no comma
+%--------------------
+%PUBLISHER POSITION:
+ %: (def) Publisher after chapter, pages
+% ,pre-pub%: Publisher before chapter, pages
+% ,pre-edn%: Publisher after edition
+%--------------------
+%ISBN NUMBER:
+ ,isbn%: Include ISBN
+% %: (def) No ISBN
+%--------------------
+%ISSN NUMBER:
+ ,issn%: Include ISSN
+% %: (def) No ISSN
+%--------------------
+%`EDITOR' AFTER NAMES (EDITED BOOKS WITHOUT AUTHORS):
+% %: (def) Word `editor' after name
+ ,edpar%: `Name (editor),'
+% ,edpar,bkedcap%: `Name (Editor),'
+% ,edparc%: `Name, (editor)'
+% ,edparc,bkedcap%: `Name, (Editor)'
+% ,edparxc%: `Name (editor)'
+% ,edparxc,bkedcap%: `Name (Editor)'
+%--------------------
+%EDITOR IN COLLECTIONS:
+ %: (def) Same as for edited book
+% ,edby%: In booktitle, edited by ..
+% ,edby-par%: In booktitle (edited by ..)
+% ,edby-parc%: In booktitle, (edited by ..)
+% ,edby,edbyx%: In booktitle, editor ..
+% ,edby,edbyw%: In booktitle, (editor) ..
+% ,edby-par,edbyx%: In booktitle (editor..)
+% ,edby-parc,edbyx%: In booktitle, (editor..)
+% ,edby,edbyy%: In booktitle, .., editor
+% ,edby-par,edbyy%: In booktitle (.., editor)
+%--------------------
+%CAPITALIZE `EDITOR' OR `EDITED BY' (if editor capitalizable)
+% %: (def) `(editor,..)' or `(edited by..)'
+% ,edcap%: `(Editor,..)' or `(Edited by..)'
+%--------------------
+%PUNCTUATION BETWEEN SECTIONS (BLOCKS):
+ %: (def) \newblock after blocks
+% ,blk-com%: Comma between blocks
+% ,blk-com,com-semi%: Semi-colon between blocks
+% ,blk-com,com-blank%: Blanks between blocks
+% ,blk-tit%: Period after titles of articles, books, etc
+% ,blk-tita%: Period after titles of articles
+%--------------------
+%PUNCTUATION BEFORE NOTES (if not using \newblock)
+% %: (def) Notes have regular punctuation
+% ,blknt%: Notes preceded by period
+%--------------------
+%PUNCTUATION AFTER AUTHORS:
+ %: (def) Author block normal
+% ,au-col%: Author block with colon
+%--------------------
+%PUNCTUATION AFTER `IN':
+ %: (def) Space after `in'
+% ,in-col%: Colon after `in'
+% ,in-it%: Italic `in'
+% ,in-col,in-it%: Italic `in' and colon
+% ,in-x%: No word `in'
+%--------------------
+%`IN' WITH JOURNAL NAMES (if using 'in' with collections)
+ %: (def) No `in' before journal name
+% ,injnl%: Add `in' before journal name
+%--------------------
+%FINAL PUNCTUATION:
+ %: (def) Period at very end
+% ,fin-bare%: No period at end
+%--------------------
+%ABBREVIATE WORD `PAGES' (if not using external language file)
+% %: (def) `Page(s)'
+ ,pp%: `Page' abbreviated
+% ,ppx%: `Page' omitted
+%--------------------
+%ABBREVIATE WORD `EDITORS':
+% %: (def) `Editor(s)'
+ ,ed%: `Editor' abbreviated
+%--------------------
+%OTHER ABBREVIATIONS:
+ %: (def) No abbreviations
+% ,abr%: Abbreviations
+%--------------------
+%ABBREVIATION FOR `EDITION' (if abbreviating words)
+% %: (def) `Edition' abbreviated as `edn'
+% ,ednx%: `Edition' abbreviated as `ed'
+%--------------------
+%MONTHS WITH DOTS:
+% %: (def) Months with dots
+% ,mth-bare%: Months without dots
+%--------------------
+%EDITION NUMBERS:
+ ,xedn%: Editions as in database
+% %: (def) Write out editions
+% ,ord%: Numerical editions
+%--------------------
+%Reading external language file \cfile=
+%STORED JOURNAL NAMES:
+ %: (def) Full journal names
+% ,jabr%: Abbreviated journal names
+% ,jabr,jaa%: Abbreviated with astronomy shorthands
+%--------------------
+%AMPERSAND:
+ %: (def) Use word `and'
+% ,amper%: Use ampersand
+% ,varand%: Use \BIBand
+%--------------------
+%COMMA BEFORE `AND':
+ %: (def) Comma before `and'
+% ,and-xcom%: No comma before `and'
+% ,and-com%: Comma even with 2 authors
+%--------------------
+%COMMA BEFORE `AND' EVEN FOR COLLECTION EDITORS (if using comma before `and' with authors)
+% ,and-com-ed%: Comma with 2 editors
+% %: (def) Two editors without comma
+%--------------------
+%NO `AND' IN REFERENCE LIST:
+% %: (def) With `and'
+ ,xand%: No `and'
+%--------------------
+%FONT OF `ET AL':
+% %: (def) Plain et al
+ ,etal-it%: Italic et al
+% ,etal-rm%: Roman et al
+%--------------------
+%ADDITIONAL REVTeX DATA FIELDS:
+% %: (def) No additional fields
+ ,revdata,eprint,url,url-blk%: Include REVTeX data fields
+%--------------------
+%E-PRINT DATA FIELD: (without REVTeX fields)
+% %: (def) Do not include eprint field
+% ,eprint%: Include eprint and archive fields
+%--------------------
+%URL ADDRESS: (without REVTeX fields
+% %: (def) No URL
+% ,url,url-blk%: Include URL
+% ,url,url-nt%: URL as note
+% ,url,url-nl%: URL on new line
+%--------------------
+%DOI NUMBER:
+ ,doi%: Include DOI as "doi: number"
+% ,agu-doi,doi%: Insert DOI AGU style as part of page number
+% %: (def) No DOI
+%--------------------
+%REFERENCE COMPONENT TAGS:
+ %: (def) No reference component tags
+% ,bibinfo%: Reference component tags
+%--------------------
+%EMPHASIS: (affects all so-called italics)
+ %: (def) Use emphasis
+% ,em-it%: Use true italics
+% ,em-x%: No italics
+% ,em-ul%: Underlining
+%--------------------
+%NEW FONT SELECTION SCHEME:
+% %: (def) No NFSS
+ ,nfss%: NFSS
+%--------------------
+ }}
+\generate{\file{jss.bst}{\MBopts}}
+\endbatchfile
View
48 paper/jss.drv
@@ -0,0 +1,48 @@
+%%
+%% This is file `jss.drv',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% jss.dtx (with options: `driver')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from jss.drv.
+%%
+%% 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{1.8}
+\def\filename{jss}
+\def\filedate{2008/04/07}
+%%
+%% Package `jss' to use with LaTeX2e for JSS publications
+%% http://www.jstatsoft.org/
+%% Copyright (C) 2004 Achim Zeileis
+%% Please report errors to Achim.Zeileis@R-project.org
+%%
+\documentclass[a4paper]{ltxdoc}
+\providecommand{\file}[1]{\texttt{#1}}
+\providecommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
+\usepackage{color,hyperref,a4wide}
+\oddsidemargin1.2cm
+\textwidth14.2cm
+\textheight23.3cm
+\topmargin-.7cm
+\setlength{\parskip}{0.7ex plus0.1ex minus0.1ex}
+\setlength{\parindent}{0em}
+\begin{document}
+ \OnlyDescription
+ \DocInput{jss.dtx}
+\end{document}
+\endinput
+%%
+%% End of file `jss.drv'.
View
1,347 paper/jss.dtx
@@ -0,0 +1,1347 @@
+\def\fileversion{1.8}
+\def\filename{jss}
+\def\filedate{2008/04/07}
+%
+% \iffalse
+%
+%%
+%% Package `jss' to use with LaTeX2e for JSS publications
+%% http://www.jstatsoft.org/
+%% Copyright (C) 2004 Achim Zeileis
+%% Please report errors to Achim.Zeileis@R-project.org
+%%
+%
+% \fi
+%
+% \changes{0.1}{2004/08/09}
+% {First draft.}
+%
+% \changes{1.0}{2004/09/29}
+% {First release.
+% - new font size (11pt)
+% - better formatting of sections}
+%
+% \changes{1.1}{2004/10/01}
+% {Bug fix: sections and pdfbookmarks
+% (arguments were switched).}
+%
+% \changes{1.2}{2004/10/02}
+% {changed logo name, improved docs}
+%
+% \changes{1.3}{2004/10/05}
+% {fixed Shorttitle default}
+%
+% \changes{1.4}{2005/01/28}
+% {updated docs}
+%
+% \changes{1.5}{2005/12/09}
+% {now an official ASA journal}
+%
+% \changes{1.6}{2007/01/28}
+% {small enhancements}
+%
+% \changes{1.7}{2007/10/15}
+% {changed link colors, modifed hyperref inclusion for texlive}
+%
+% \changes{1.8}{2008/04/08}
+% {added option to omit JSS markup, slightly changed pkg markup}
+%
+%
+%
+% \MakeShortVerb{\|}
+% \newcommand{\foopkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}
+% \newcommand{\enquote}[1]{``#1''}
+%
+% \title{\foopkg{jss}: A Document Class for Publications in the Journal of Statistical Software}
+% \author{Achim Zeileis}
+%
+% \maketitle
+%
+% \section{Introduction} \label{sec:intro}
+%
+% The \LaTeXe{} document class \foopkg{jss} is an extension of the
+% standard \LaTeXe{} \foopkg{article} class for publications in the
+% Journal of Statistical Software (JSS, \url{http://www.jstatsoft.org/}).
+% It provides infrastructure for all four kinds of publications
+% in JSS: regular articles, code snippets, book reviews and
+% software reviews. Each document requires several declarations to
+% be made in the header (before |\begin{document}|)
+% which are described in Section~\ref{sec:ifa} separately
+% for articles/code snippets and book/software reviews
+% along with some general commands
+% which can be used in all documents.
+%
+% The final version of JSS papers should be prepared using this JSS style file;
+% the submission of the final version needs to include the full sources
+% (|.tex|, |.bib|, and all graphics). A quick check for the most important aspects
+% of the JSS style is given in Section~\ref{sec:check}; authors should make sure that all
+% of them are addressed in the final version.
+%
+% All documents need to be processed by pdf\TeX{}, some useful information
+% on this is provided in Section~\ref{sec:TeX}, which also contains some
+% information on using \textsc{Bib}\TeX{}. \textsc{Bib}\TeX{} together
+% with the style file |jss.bst| produces references
+% and citations in the required format.
+%
+% The actual code for the batch file (|jss.ins|), the
+% driver (|jss.drv|) and the class (|jss.cls|) are
+% briefly described in Section~\ref{sec:code}. Note, that usually
+% you do not have to read that section when you want to prepare
+% a submission for JSS.
+%
+%
+% \section{Instructions for authors} \label{sec:ifa}
+%
+% To use the JSS styles, you have to include the class file
+% |jss.cls|, the logo |jsslogo.jpg| and the \textsc{Bib}\TeX{}
+% style \texttt{jss.bst} in your search path. This can either be
+% your local working directory or in your |texmf| or
+% |localtexmf| tree.
+%
+% The \LaTeX{} documents have to include the |jss.cls| first by
+%
+% |\documentclass[|\textit{type}|]{jss}|
+%
+% where \textit{type} can be |article| (which is the default),
+% |codesnippet|, |bookreview| or |softwarereview|.
+% Templates with brief instructions are provided in
+% |article.tex|, |codesnippet.tex|, |bookreview.tex|
+% and |softwarereview.tex| respectively. The corresponding
+% commands used for the header declarations are described
+% in more detail in the following.
+%
+% By using |jss.cls|, the packages \foopkg{graphicx}, \foopkg{a4wide},
+% \foopkg{color}, \foopkg{hyperref}, \foopkg{ae}, \foopkg{fancyverb} and
+% \foopkg{natbib} are loaded automatically.
+% Authors may, of course, include further packages
+% but should not change the page layout
+% or change the font or font encoding. If the package \foopkg{thumbpdf}
+% is available, its inclusion is encouraged
+%
+% The titles of JSS publications are capitalized, i.e., in title style, but the section
+% headers are not and should be in sentence-style.
+%
+% Acknowledgments should be included at the end of the paper before the
+% references in a separate section set up via |\section*{Acknowledgments}|.
+%
+% \emph{Hint.} If you want to use markup in section headers you will usually
+% have to escape it for the PDF bookmarks by giving the text for the
+% bookmark explicitly without markup, e.g.,
+% \begin{verbatim}
+% \section[Calling C++ from R]{Calling \proglang{C++} from \proglang{R}}
+% \end{verbatim}
+%
+% \emph{Hint.} If compilation with pdf\TeX{} fails with an error at
+% |\begin{document}| the reason is almost surely that some of the
+% declarations in the header have not been made properly. For example,
+% |\Plainauthor|, |\Plaintitle| or |\Plainkeywords| might be missing
+% or still containing markup.
+%
+% \emph{Hint.} If you want to use the JSS style for a non-JSS paper
+% (or a modification of an JSS paper, e.g., in a vignette), you can
+% set the option |nojss| in the |\documentclass| statement to suppress
+% JSS-specific layout.
+%
+%
+% \subsection{Style checklist} \label{sec:check}
+% A quick check for the most important aspects of the JSS style is given below.
+% Authors should make sure that all of them are addressed in the final version.
+% More details can be found in the remainder of this manual.
+%
+% \begin{itemize}
+% \item The manuscript can be compiled by pdf\TeX{}.
+% \item |\proglang|, |\pkg| and |\code| has been used for highlighting
+% throughout the paper (including references).
+% \item References are provided in a |.bib| \textsc{Bib}\TeX{} database
+% and included in the text by |\cite|, |\citep|, |\citet|, etc.
+% \item Titles and headers are formatted properly:
+% \begin{itemize}
+% \item |\title| in title style,
+% \item |\section| etc.\ in sentence style,
+% \item all titles in the \textsc{Bib}\TeX{} file in title style.
+% \end{itemize}
+% \item Figures, tables and equations are marked with a |\label|
+% and referred to by |\ref|, e.g., ``|Figure~\ref{...}|''.
+% \item Software packes are |\cite{}|d properly.
+% \end{itemize}
+%
+%
+% \subsection{Articles and code snippets}
+%
+% For JSS articles and code snippets respectively,
+% the following declarations have to be made
+% in the header of the \TeX{} sources (before |\begin{document}|).
+% See also the template |article.tex| or |codesnippet.tex|
+% respectively.
+%
+% \DescribeMacro{\author}
+% The command |\author| specifies the list of authors. The name
+% of each author should be followed by a linebreak and his
+% affiliation (only the university, in a single line). The authors
+% should be separated by |\And| (instead of |\and|), e.g.,
+% \begin{verbatim}
+% \author{Achim Zeileis\\Wirtschaftsuniversit\"at Wien \And
+% Second Author\\Plus Affiliation}
+% \end{verbatim}
+% If not all authors fit into a single line, |\AND| (instead of
+% |\And|) should be used in front of authors that should go into
+% the next line.
+%
+% \DescribeMacro{\Plainauthor}
+% The list of authors without affiliations. It needs to be
+% comma-separated and must not contain any markup (bold fonts etc.), e.g.,
+% \begin{verbatim}
+% \Plainauthor{Achim Zeileis, Second Author}
+% \end{verbatim}
+%
+% \DescribeMacro{\title}
+% The title of the paper. It should be capitalized and may contain
+% further markup (in particular markup such as |\pkg| and |\proglang|), e.g.,
+% \begin{verbatim}
+% \title{A Capitalized Title for a Package \pkg{foo}}
+% \end{verbatim}
+%
+% \DescribeMacro{\Plaintitle}
+% The full title without any markup.
+% The default is to use |\title|, therefore it needs to be specified
+% only if it is different from |\title|, e.g.,
+% \begin{verbatim}
+% \Plaintitle{A Capitalized Title for a Package foo}
+% \end{verbatim}
+%
+% \DescribeMacro{\Shorttitle}
+% A shorter version of the title to be used for page headings.
+% The default is to use |\title|, therefore it needs to be specified
+% only if it is different from |\title|, e.g.,
+% \begin{verbatim}
+% \Shorttitle{A Capitalized Title}
+% \end{verbatim}
+%
+% \DescribeMacro{\Abstract}
+% Enter the abstract for your article here, e.g.,
+% \begin{verbatim}
+% \Abstract{
+% The abstract of the article.
+% }
+% \end{verbatim}
+%
+% \DescribeMacro{\Keywords}
+% A comma-separated list of (at least one) keyword(s) which
+% should not be capitalized, e.g.,
+% |\Keywords{keywords, comma-separated, not capitalized}|.
+%
+% \DescribeMacro{\Plainkeywords}
+% The list of keywords without any markup. The default is to use
+% |\Keywords|, therefore it needs to be specified only
+% if it is different from |\Keywords|.
+%
+% \DescribeMacro{\Volume}
+% The JSS volume number in which the article is published,
+% e.g., |\Volume{11}|. Note:
+% This information will be provided upon acceptance
+% or added by the technical editor. Prior to acceptance,
+% do not use this command.
+%
+% \DescribeMacro{\Issue}
+% The JSS issue number in which the article is published,
+% e.g., |\Issue{9}|. Note:
+% This information will be provided upon acceptance
+% or added by the technical editor. Prior to acceptance,
+% do not use this command.
+%
+% \DescribeMacro{\Month}
+% The month in which the article is published,
+% e.g., |\Month{September}|. Note:
+% This information will be provided upon acceptance
+% or added by the technical editor. Prior to acceptance,
+% do not use this command.
+%
+% \DescribeMacro{\Year}
+% The year in which the article is published,
+% e.g., |\Year{2004}|. Note:
+% This information will be provided upon acceptance
+% or added by the technical editor. Prior to acceptance,
+% do not use this command.
+%
+% \DescribeMacro{\Submitdate}
+% The date of submission for the article,
+% e.g., |\Submitdate{2004-09-29}|. Note:
+% This information will be provided upon acceptance
+% or added by the technical editor. Prior to acceptance,
+% do not use this command.
+%
+% \DescribeMacro{\Acceptdate}
+% The date of acceptance for the article,
+% e.g., |\Acceptdate{2004-09-29}|. Note:
+% This information will be provided upon acceptance
+% or added by the technical editor. Prior to acceptance,
+% do not use this command.
+%
+% \DescribeMacro{\Address}
+% The address of (at least) one author should be given in
+% the following format
+% \begin{verbatim}
+% \Address{
+% Achim Zeileis\\
+% Department of Statistics and Mathematics\\
+% Wirtschaftsuniversit\"at Wien\\
+% 1090 Wien, Austria\\
+% E-mail: \email{Achim.Zeileis@wu-wien.ac.at}\\
+% URL: \url{http://statmath.wu-wien.ac.at/~zeileis/}
+% }
+% \end{verbatim}
+% It is also possible to include your telephone and fax
+% number, by adding them in the format
+% \begin{verbatim}
+% Telephone: +43/1/31336-5053
+% Fax: +43/1/31336-734
+% \end{verbatim}
+% before the e-mail address.
+%
+% Furthermore, if the document is prepared using the |Sweave|
+% functions in \textsf{R}, something like the following line
+% \begin{verbatim}
+% %% need no \usepackage{Sweave.sty}
+% \end{verbatim}
+% (with `\%\%') needs to be included in the header.
+%
+% \subsection{Book and software reviews}
+%
+% For JSS book and software respectively,
+% the following declarations have to be made
+% in the header of the \TeX{} sources (before |\begin{document}|).
+% See also the template |bookreview.tex| or |softwarereview.tex|
+% respectively. Note that some commands might differ between
+% book and software reviews, this is always stated explicitely
+% below.
+%
+% \DescribeMacro{\Reviewer}
+% The command |\Reviewer| specifies the name of the reviewer
+% followed by a linebreak and his affiliation (only the university,
+% in a single line), e.g.,
+% \begin{verbatim}
+% \Reviewer{Frederic Udina\\Pompeu Fabra University}
+% \end{verbatim}
+%
+% \DescribeMacro{\Plainreviewer}
+% The name of the reviewer without affiliation.
+% It must not contain any markup (bold fonts etc.), e.g.,
+% \begin{verbatim}
+% \Plainauthor{Frederic Udina}
+% \end{verbatim}
+%
+% \emph{The following five commands are just required for book reviews.}
+%
+% \DescribeMacro{\Booktitle}
+% The title of the book. It should be capitalized and may contain
+% further markup (in particular markup such as |\pkg| and |\proglang|), e.g.,
+% \begin{verbatim}
+% \Booktitle{Visualizing Categorical Data}
+% \end{verbatim}
+%
+% \DescribeMacro{\Bookauthor}
+% Author(s) of the book, e.g.,
+% \begin{verbatim}
+% \Bookauthor{Michael Friendly}
+% \end{verbatim}
+% If there are several authors they should be comma-separated,
+% and the last author separated by |and|, e.g.,
+% |\Bookauthor{A and B}| or |\Bookauthor{A, B and C}|.
+%
+% \DescribeMacro{\Pubyear}
+% Year of publication, e.g., |\Pubyear{2000}|.
+%
+% \DescribeMacro{\ISBN}
+% ISBN number, e.g., |\ISBN{1-58025-660-0}|.
+%
+% \DescribeMacro{\Pages}
+% Number of pages, both arabic and roman (if available), e.g.,
+% |\Pages{456}| or |\Pages{xvi + 145}|.
+%
+% \emph{The following command is just required for software reviews.}
+%
+% \DescribeMacro{\Softwaretitle}
+% The title of the software. It should be capitalized and may contain
+% further markup (in particular markup such as |\pkg| and |\proglang|), e.g.,
+% \begin{verbatim}
+% \Softwaretitle{\pkg{Aabel} 1.5.7}
+% \end{verbatim}
+%
+% \emph{The remaining commands are again required for both book and software reviews.}
+%
+% \DescribeMacro{\Publisher}
+% Publisher of the book/software, e.g., |\Publisher{SAS Institute Inc.}|
+% or\\ |\Publisher{Gigawiz Ltd. Co.}|.
+%
+% \DescribeMacro{\Pubaddress}
+% Address of the publisher of the book/software, e.g., |\Pubaddress{Carey, NC}|.
+%
+% \DescribeMacro{\Price}
+% Price of the book/software. For books this might simply be
+% |\Price{USD 69.95}| or\\ |\Price{USD 69.95 (P)}|, but could also distinguish between hardcover
+% and paperback\\ versions |\Price{USD 69.95 (P), USD 89.95 (H)}|. Analogously,
+% for a software it could\\ be |\Price{USD 349 (standard), USD 249 (academic)}|.
+%
+% \DescribeMacro{\URL}
+% A URL for the book or software, e.g.,
+% \begin{verbatim}
+% \URL{http://www.math.yorku.ca/SCS/vcd/}
+% \end{verbatim}
+% If no URL is available, use |\URL{}|.
+%
+% \DescribeMacro{\Plaintitle}
+% The full book or software title without any markup (line breaks, bold fonts etc.).
+% The default is to use |\Booktitle| or |\Softwaretitle| respectively,
+% therefore it needs to be specified
+% only if it is different from |\Booktitle| or |\Softwaretitle|, e.g.,
+% \begin{verbatim}
+% \Plaintitle{Visualizing Categorical Data}
+% \end{verbatim}
+%
+% \DescribeMacro{\Shorttitle}
+% A shorter version of the book or software title to be used for page headings.
+% The default is to use |\Booktitle| or |\Softwaretitle| respectively,
+% therefore it needs to be specified
+% only if it is different from |\Booktitle| or |\Softwaretitle|, e.g.,
+% \begin{verbatim}
+% \Shorttitle{Visualizing Categorical Data}
+% \end{verbatim}
+%
+% \DescribeMacro{\Volume}
+% The JSS volume number in which the review is published,
+% e.g., |\Volume{11}|. Note:
+% This information will be provided upon acceptance
+% or added by the technical editor.
+%
+% \DescribeMacro{\Issue}
+% The JSS issue number in which the review is published,
+% e.g., |\Issue{9}|. Note:
+% This information will be provided upon acceptance
+% or added by the technical editor.
+%
+% \DescribeMacro{\Month}
+% The month in which the review is published,
+% e.g., |\Month{September}|. Note:
+% This information will be provided upon acceptance
+% or added by the technical editor.
+%
+% \DescribeMacro{\Year}
+% The year in which the review is published,
+% e.g., |\Year{2004}|. Note:
+% This information will be provided upon acceptance
+% or added by the technical editor.
+%
+% \DescribeMacro{\Submitdate}
+% The date of publication for the review,
+% e.g., |\Submitdate{2004-09-29}|. Note:
+% This information will be provided upon acceptance
+% or added by the technical editor.
+%
+% \DescribeMacro{\Address}
+% The address of (at least) one author should be given in
+% the following format
+% \begin{verbatim}
+% \Address{
+% Achim Zeileis\\
+% Department f\"ur Statistik \& Mathematik\\
+% Wirtschaftsuniversit\"at Wien\\
+% 1090 Wien, Austria\\
+% E-mail: \email{Achim.Zeileis@wu-wien.ac.at}\\
+% URL: \url{http://statmath.wu-wien.ac.at/~zeileis/}
+% }
+% \end{verbatim}
+% It is also possible to include your telephone and fax
+% number, by adding them in the format
+% \begin{verbatim}
+% Telephone: +43/1/31336-5053
+% Fax: +43/1/31336-734
+% \end{verbatim}
+% before the e-mail address.
+%
+% \subsection{Further commands}
+%
+% The \foopkg{jss} package provides several commands for typesetting
+% names related to software (programming languages, packages, code) and
+% mathematical formulae.
+%
+% \subsubsection*{Writing about software}
+%
+% \DescribeMacro{\proglang}
+% This should be used for typesetting the names of programming
+% languages, e.g., |\proglang{Java}|, |\proglang{C++}| or |\proglang{R}|.
+% This applies also to programmable environments which also have a GUI
+% like |\proglang{SAS}|, |\proglang{Stata}| or |\proglang{S-PLUS}|.
+%
+% \DescribeMacro{\pkg}
+% This should be used for typesetting the names of packages, e.g.,
+% |\pkg{CMregr}|, |\pkg{MATCH}| or |\pkg{strucchange}|.
+%
+% \DescribeMacro{\code}
+% This should be used for typesetting code chunks within
+% the text, e.g., |\code{plot(1:10)}|. Currently, this simply uses a typewriter
+% font. Although it escapes most special characters, it might still lead to
+% problems with some special characters.
+% In such cases the code can also be set using |\verb|, e.g.,
+% |\verb/print("hello world")/|.
+%
+% \subsubsection*{Layout of code}
+%
+% |jss.cls| only provides very simple means of including code which are mostly
+% borrowed from \foopkg{Sweave}. There are three verbatim environments for code: |Code|,
+% |CodeInput| and |CodeOutput|. Furthermore, there is an environment
+% |CodeChunk| which can be put around sequences of |CodeInput|s and
+% |CodeOutput|s to (hopefully) keep \LaTeX{} from page-breaking in the middle of
+% a code chunk. In short, there are two options: a) if no distinction between
+% input and output is necessary, the code is placed between |\begin{Code}|
+% and |\end{Code}|. b) If input and output should be distinguished, this can
+% be done like in the following example.
+% \begin{verbatim}
+% \begin{CodeChunk}
+% \begin{CodeInput}
+% first input first line
+% first input second line
+% \end{CodeInput}
+% \begin{CodeOutput}
+% output of first input
+% \end{CodeOutput}
+% \begin{CodeInput}
+% second input
+% \end{CodeInput}
+% \begin{CodeOutput}
+% second output
+% \end{CodeOutput}
+% \end{CodeChunk}
+% \end{verbatim}
+% An example what this could look like, is the following \textsf{R} code. The first
+% three lines are the input, the rest is output.
+% \begin{verbatim}
+% \begin{CodeChunk}
+% \begin{CodeInput}
+% R> data(cars)
+% R> fm <- lm(dist ~ speed, data = log(cars))
+% R> summary(fm)
+% \end{CodeInput}
+% \begin{CodeOutput}
+% Call:
+% lm(formula = dist ~ speed, data = log(cars))
+%
+% Residuals:
+% Min 1Q Median 3Q Max
+% -1.00215 -0.24578 -0.02898 0.20717 0.88289
+%
+% Coefficients:
+% Estimate Std. Error t value Pr(>|t|)
+% (Intercept) -0.7297 0.3758 -1.941 0.0581 .
+% speed 1.6024 0.1395 11.484 2.26e-15 ***
+% ---
+% Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
+%
+% Residual standard error: 0.4053 on 48 degrees of freedom
+% Multiple R-Squared: 0.7331, Adjusted R-squared: 0.7276
+% F-statistic: 131.9 on 1 and 48 DF, p-value: 2.259e-15
+% \end{CodeOutput}
+% \end{CodeChunk}
+% \end{verbatim}
+% If you prepare your paper using \foopkg{Sweave} (which is recommended
+% if you describe an \textsf{R} package) do \emph{not} include
+% |Sweave.sty| into your document, the necessary commands are already available within
+% |jss.cls|. To prevent \foopkg{Sweave} from including |Sweave.sty|
+% automatically you need to include a line like
+% \begin{verbatim}
+% %% need no \usepackage{Sweave.sty}
+% \end{verbatim}
+% (with `\%\%') into the header of your document.
+%
+% If this basic infrastructure for typesetting your code is not
+% sufficient, you can also use other \LaTeX{} packages like the
+% \foopkg{listings} package.
+%
+% \subsubsection*{Mathematical formulae}
+%
+% Commonly used operators like $\mathsf{E}$, $\mathsf{VAR}$, $\mathsf{COV}$, and $\mathsf{P}$ should be set
+% using the commands |\E|, |\VAR|, |\COV| and |\Prob|. Beyond this, \foopkg{jss} does not
+% provide (or enforce) a certain mathematical notation. However, using the \foopkg{statex}
+% package (e.g., available from CTAN and in \TeX{} Live) could be useful.
+%
+%
+% \section{Using pdf\TeX{} and \textbf{\sc Bib}\TeX{}} \label{sec:TeX}
+%
+% \subsubsection*{Using pdf\TeX{}}
+%
+% A \LaTeX{} document (|foo.tex|, say) using |jss.cls| needs to be compiled using
+% pdf\TeX{}, typically this will be done using either of the
+% following commands:
+% \begin{verbatim}
+% pdflatex foo.tex
+%
+% texi2dvi --pdf foo.tex
+%
+% texi2pdf foo.tex
+% \end{verbatim}
+% If you are not using command line tools but some integrated GUI editor for
+% \LaTeX{} documents you will have to press the `pdf\LaTeX{}' button
+% (as opposed to the `\LaTeX{}' button).
+%
+% All graphics included into the document have to be in a format pdf\TeX{} can
+% deal with, i.e., PDF for vector graphics or JPG/PNG/etc. for bitmaps/raster graphics.
+% If you cannot produce PDF graphics directly but only PS/EPS, these can
+% be converted using |ps2pdf| or |epstopdf| (usually preferred).
+%
+% \emph{Hint.} If you are used to compiling your documents with standard \LaTeX{}
+% and then getting automatic reloads of the resulting DVI document
+% in your DVI viewer, which is not possible with PDF documents in many
+% PDF viewers: you might want to look at \foopkg{xpdf} (Linux) or \foopkg{gsview}
+% (Windows, see \url{http://www.cs.wisc.edu/~ghost/gsview/})
+% which have a reload function.
+%
+% \emph{Hint.} If you want to use markup in section headers you will usually
+% have to escape it for the PDF bookmarks by giving the text for the
+% bookmark explicitly without markup, e.g.,
+% \begin{verbatim}
+% \section[Calling C++ from R]{Calling \proglang{C++} from \proglang{R}}
+% \end{verbatim}
+%
+% \emph{Hint.} If you know how to produce \LaTeX{} documents that can be
+% processed with both \LaTeX{} and pdf\TeX{}, you can do so if you provide
+% an EPS substitute for |jsslogo.jpg| (e.g. an empty or converted |jsslogo.eps|).
+% Note, however, that the final document needs to be processed with pdf\TeX{}.
+% Neither this manual nor the JSS encourage or support compilation of
+% JSS documents with standard \LaTeX{}.
+%
+%
+% \subsubsection*{References with \textbf{\sc Bib}\TeX{}}
+%
+% The format for references (e.g., articles, books, software, proceedings)
+% should look like this
+%
+% \begin{quote}
+% Brown RL, Durbin J, Evans JM (1975).
+% \newblock \enquote{Techniques for Testing the Constancy of Regression
+% Relationships over Time.}
+% \newblock \emph{Journal of the Royal Statistical Society B}, \textbf{37},
+% 149--163.
+%
+% Friendly M (2000).
+% \newblock \emph{Visualizing Categorical Data}.
+% \newblock SAS Insitute, Carey, NC.
+%
+% {\textsf{R} Development Core Team} (2004).
+% \newblock \emph{\textsf{R}: {A} Language and Environment for Statistical
+% Computing}.
+% \newblock \textsf{R} Foundation for Statistical Computing, Vienna, Austria.
+% \newblock {ISBN} 3-900051-00-3, URL~\url{http://www.R-project.org/}.
+%
+% Urbanek S, Theus M (2003).
+% \newblock \enquote{\foopkg{iPlots} -- {H}igh Interaction Graphics for \textsf{R}.}
+% \newblock In K~Hornik, F~Leisch, A~Zeileis (eds.), \enquote{Proceedings of the
+% 3rd International Workshop on Distributed Statistical Computing, Vienna,
+% Austria,} {ISSN 1609-395X},
+% URL~\url{http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Proceedings/}.
+% \end{quote}
+%
+% \emph{Important.} Note, that also the titles of papers are in title style
+% (as opposed to sentence style), i.e., they are capitalized.
+% The first word after a colon `:' is always capitalized. Furthermore, commands
+% like \verb/\proglang/ and \verb/\pkg/ should also be used for the
+% references. The names of journals or proceeding volumes should not
+% be abbreviated.
+%
+% The easiest way to achieve this
+% is to use \textsc{Bib}\TeX{} together with the style file |jss.bst|.
+% To do so, the references just have to be included in a \textsc{Bib}\TeX{} file,
+% |foo.bib| say, which has to be included at the end of the \LaTeX{}
+% document by |\bibliography{foo}|.
+% Note, that to obtain references in the format above, the |title| field
+% in your bib file, needs to be capitalized (contrary to the folklore,
+% there are \textsc{Bib}\TeX{} styles that rely on this even for |@Article|
+% entries), i.e. the entry |title = {Visualizing Categorical Data}| is
+% correct, while entries like |title = {Visualizing categorical data}|
+% or (even worse) |title = {{Visualizing categorical data}}| are not.
+%
+% The default in |jss.cls| is to use the \foopkg{natbib} package
+% with options |authoryear|, |round| and |longnamesfirst|. If you cite
+% any article with six or more authors the latter option should be
+% turned off. This can be done by using the option |shortnames|
+% when loading the |jss.cls| class
+% \begin{verbatim}
+% \documentclass[article,shortnames]{jss}
+% \end{verbatim}
+%
+%
+% %\newpage
+%
+% \section{The code} \label{sec:code}
+%
+% \subsection{The batch file}
+%
+% First comes the code for creating the batch file \file{\filename.ins}
+% which in turn can be used for producing the package and driver files.
+%
+% \begin{macrocode}
+%<*install>
+\begin{filecontents}{\filename.ins}
+% Simply TeX or LaTeX this file to extract various files from the source
+% file `jss.dtx'.
+\def\filedate{2004/09/29}
+\def\batchfile{jss.ins}
+\input docstrip.tex
+\generateFile{jss.drv}{t}{\from{jss.dtx}{driver}}
+\generateFile{jss.cls}{t}{\from{jss.dtx}{class}}
+\Msg{*******************************************************}
+\Msg{* For documentation, run LaTeX on jss.dtx or jss.drv. *}
+\Msg{*******************************************************}
+\end{filecontents}
+%</install>
+% \end{macrocode}
+%
+% \subsection{The driver}
+%
+% Next comes the documentation driver file for \TeX{}, i.e., the file
+% that will produce the documentation you are currently reading. It
+% will be extracted from this file by the \texttt{docstrip}
+% program. Since it is the first code in the file one can
+% alternatively process this file directly with \LaTeXe{} to obtain
+% the documentation.
+%
+% \begin{macrocode}
+%<*driver>
+\documentclass[a4paper]{ltxdoc}
+\providecommand{\file}[1]{\texttt{#1}}
+\providecommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
+\usepackage{color,hyperref,a4wide}
+\oddsidemargin1.2cm
+\textwidth14.2cm
+\textheight23.3cm
+\topmargin-.7cm
+\setlength{\parskip}{0.7ex plus0.1ex minus0.1ex}
+\setlength{\parindent}{0em}
+\begin{document}
+ \OnlyDescription
+ \DocInput{jss.dtx}
+\end{document}
+%</driver>
+% \end{macrocode}
+%
+% \subsection{The class}
+%
+% Next is the main part, the code for the class file.
+%
+% It requires \LaTeXe{}
+% \begin{macrocode}
+%<*class>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{jss}[\filedate\space\fileversion\space jss class by Achim Zeileis]
+%</class>
+% \end{macrocode}
+% and is based on the \texttt{article} class. But before we load
+% the class we declare and process some options.
+% These reflects wether we want to write an article, code snippet,
+% a book review or software review. The \texttt{shortnames} option
+% is for loading \texttt{natbib} \emph{without} the option
+% \texttt{longnamesfirst}. The \texttt{nojss} option suppresses JSS header and footer.
+% \begin{macrocode}
+%<*class>
+%% options
+\newif\if@article
+\newif\if@codesnippet
+\newif\if@bookreview
+\newif\if@softwarereview
+\newif\if@review
+\newif\if@shortnames
+\newif\if@nojss
+
+\@articletrue
+\@codesnippetfalse
+\@bookreviewfalse
+\@softwarereviewfalse
+\@reviewfalse
+\@shortnamesfalse
+\@nojssfalse
+
+\DeclareOption{article}{\@articletrue%
+ \@codesnippetfalse \@bookreviewfalse \@softwarereviewfalse}
+\DeclareOption{codesnippet}{\@articlefalse%
+ \@codesnippettrue \@bookreviewfalse \@softwarereviewfalse}
+\DeclareOption{bookreview}{\@articlefalse%
+ \@codesnippetfalse \@bookreviewtrue \@softwarereviewfalse}
+\DeclareOption{softwarereview}{\@articlefalse%
+ \@codesnippetfalse \@bookreviewfalse \@softwarereviewtrue}
+\DeclareOption{shortnames}{\@shortnamestrue}
+\DeclareOption{nojss}{\@nojsstrue}
+
+\ProcessOptions
+\LoadClass[11pt,a4paper,twoside]{article}
+%</class>
+% \end{macrocode}
+%
+% A few packages are required and the font encoding is specified.
+% \begin{macrocode}
+%<*class>
+%% required packages
+\RequirePackage{graphicx,a4wide,color,ae,fancyvrb}
+\RequirePackage[T1]{fontenc}
+\IfFileExists{upquote.sty}{\RequirePackage{upquote}}{}
+%</class>
+% \end{macrocode}
+%
+% In addition, \texttt{hyperref} is included later on.
+% The bibliography is generated using \texttt{natbib} and
+% the \textsc{Bib}\TeX{} style \file{jss.bst}.
+% \begin{macrocode}
+%<*class>
+%% bibliography
+\if@shortnames
+ \usepackage[authoryear,round]{natbib}
+\else
+ \usepackage[authoryear,round,longnamesfirst]{natbib}
+\fi
+\bibpunct{(}{)}{;}{a}{}{,}
+\bibliographystyle{jss}
+%</class>
+% \end{macrocode}
+%
+% Paragraphs are not indented, instead \verb/\parskip/ is
+% increased.
+% \begin{macrocode}
+%<*class>
+%% paragraphs
+\setlength{\parskip}{0.7ex plus0.1ex minus0.1ex}
+\setlength{\parindent}{0em}
+%</class>
+% \end{macrocode}
+%
+% To process the meta information we need some new commands:
+% for all publications,
+% \begin{macrocode}
+%<*class>
+%% for all publications
+\newcommand{\Address}[1]{\def\@Address{#1}}
+\newcommand{\Plaintitle}[1]{\def\@Plaintitle{#1}}
+\newcommand{\Shorttitle}[1]{\def\@Shorttitle{#1}}
+\newcommand{\Plainauthor}[1]{\def\@Plainauthor{#1}}
+\newcommand{\Volume}[1]{\def\@Volume{#1}}
+\newcommand{\Year}[1]{\def\@Year{#1}}
+\newcommand{\Month}[1]{\def\@Month{#1}}
+\newcommand{\Issue}[1]{\def\@Issue{#1}}
+\newcommand{\Submitdate}[1]{\def\@Submitdate{#1}}
+%</class>
+% \end{macrocode}
+% for articles and code snippets,
+% \begin{macrocode}
+%<*class>
+%% for articles and code snippets
+\newcommand{\Acceptdate}[1]{\def\@Acceptdate{#1}}
+\newcommand{\Abstract}[1]{\def\@Abstract{#1}}
+\newcommand{\Keywords}[1]{\def\@Keywords{#1}}
+\newcommand{\Plainkeywords}[1]{\def\@Plainkeywords{#1}}
+%</class>
+% \end{macrocode}
+% for book and software reviews,
+% \begin{macrocode}
+%<*class>
+%% for book and software reviews
+\newcommand{\Reviewer}[1]{\def\@Reviewer{#1}}
+\newcommand{\Booktitle}[1]{\def\@Booktitle{#1}}
+\newcommand{\Bookauthor}[1]{\def\@Bookauthor{#1}}
+\newcommand{\Publisher}[1]{\def\@Publisher{#1}}
+\newcommand{\Pubaddress}[1]{\def\@Pubaddress{#1}}
+\newcommand{\Pubyear}[1]{\def\@Pubyear{#1}}
+\newcommand{\ISBN}[1]{\def\@ISBN{#1}}
+\newcommand{\Pages}[1]{\def\@Pages{#1}}
+\newcommand{\Price}[1]{\def\@Price{#1}}
+\newcommand{\Plainreviewer}[1]{\def\@Plainreviewer{#1}}
+\newcommand{\Softwaretitle}[1]{\def\@Softwaretitle{#1}}
+\newcommand{\URL}[1]{\def\@URL{#1}}
+%</class>
+% \end{macrocode}
+% and for internal use only.
+% \begin{macrocode}
+%<*class>
+%% for internal use
+\newcommand{\Seriesname}[1]{\def\@Seriesname{#1}}
+\newcommand{\Hypersubject}[1]{\def\@Hypersubject{#1}}
+\newcommand{\Hyperauthor}[1]{\def\@Hyperauthor{#1}}
+\newcommand{\Footername}[1]{\def\@Footername{#1}}
+\newcommand{\Firstdate}[1]{\def\@Firstdate{#1}}
+\newcommand{\Seconddate}[1]{\def\@Seconddate{#1}}
+\newcommand{\Reviewauthor}[1]{\def\@Reviewauthor{#1}}
+%</class>
+% \end{macrocode}
+%
+% Some defaults for theses commands are specified, which
+% are (hopefully) a useful guidance when using the
+% \file{\filename.cls}.
+% \begin{macrocode}
+%<*class>
+%% defaults
+\author{Firstname Lastname\\Affiliation}
+\title{Title}
+\Abstract{---!!!---an abstract is required---!!!---}
+\Plainauthor{\@author}
+\Volume{VV}
+\Year{YYYY}
+\Month{MMMMMM}
+\Issue{II}
+\Submitdate{yyyy-mm-dd}
+\Acceptdate{yyyy-mm-dd}
+\Address{
+ Firstname Lastname\\
+ Affiliation\\
+ Address, Country\\
+ E-mail: \email{name@address}\\
+ URL: \url{http://link/to/webpage/}
+}
+
+\Reviewer{Firstname Lastname\\Affiliation}
+\Plainreviewer{Firstname Lastname}
+\Booktitle{Book Title}
+\Bookauthor{Book Author}
+\Publisher{Publisher}
+\Pubaddress{Publisher's Address}
+\Pubyear{YYY}
+\ISBN{x-xxxxx-xxx-x}
+\Pages{xv + 123}
+\Price{USD 69.95 (P)}
+\URL{http://link/to/webpage/}
+%</class>
+% \end{macrocode}
+%
+% Conditional on the type of document several other defaults
+% and some meta information is stored.
+% \begin{macrocode}
+%<*class>
+\if@article
+ \Seriesname{Issue}
+ \Hypersubject{Journal of Statistical Software}
+ \Plaintitle{\@title}
+ \Shorttitle{\@title}
+ \Plainkeywords{\@Keywords}
+\fi
+
+\if@codesnippet
+ \Seriesname{Code Snippet}
+ \Hypersubject{Journal of Statistical Software -- Code Snippets}
+ \Plaintitle{\@title}
+ \Shorttitle{\@title}
+ \Plainkeywords{\@Keywords}
+\fi
+
+\if@bookreview
+ \Seriesname{Book Review}
+ \Hypersubject{Journal of Statistical Software -- Book Reviews}
+ \Plaintitle{\@Booktitle}
+ \Shorttitle{\@Booktitle}
+ \Reviewauthor{\@Bookauthor\\
+ \@Publisher, \@Pubaddress, \@Pubyear.\\
+ ISBN~\@ISBN. \@Pages~pp. \@Price.\\
+ \url{\@URL}}
+ \Plainkeywords{}
+ \@reviewtrue
+\fi
+
+\if@softwarereview
+ \Seriesname{Software Review}
+ \Hypersubject{Journal of Statistical Software -- Software Reviews}
+ \Plaintitle{\@Softwaretitle}
+ \Shorttitle{\@Softwaretitle}
+ \Booktitle{\@Softwaretitle}
+ \Reviewauthor{\@Publisher, \@Pubaddress. \@Price.\\
+ \url{\@URL}}
+ \Plainkeywords{}
+ \@reviewtrue
+\fi
+
+\if@review
+ \Hyperauthor{\@Plainreviewer}
+ \Keywords{}
+ \Footername{Reviewer}
+ \Firstdate{\textit{Published:} \@Submitdate}
+ \Seconddate{}
+\else
+ \Hyperauthor{\@Plainauthor}
+ \Keywords{---!!!---at least one keyword is required---!!!---}
+ \Footername{Affiliation}
+ \Firstdate{\textit{Submitted:} \@Submitdate}
+ \Seconddate{\textit{Accepted:} \@Acceptdate}
+\fi
+%</class>
+% \end{macrocode}
+%
+% For typesetting of code some basic infrastructure along
+% the lines of Sweave is provided. First, the Sweave commands
+% are provided explicitly,
+% \begin{macrocode}
+%<*class>
+%% Sweave(-like)
+\DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl}
+\DefineVerbatimEnvironment{Soutput}{Verbatim}{}
+\DefineVerbatimEnvironment{Scode}{Verbatim}{fontshape=sl}
+\newenvironment{Schunk}{}{}
+%</class>
+% \end{macrocode}
+% and analogous commands with more neutral names for general
+% pieces of code.
+% \begin{macrocode}
+%<*class>
+\DefineVerbatimEnvironment{Code}{Verbatim}{}
+\DefineVerbatimEnvironment{CodeInput}{Verbatim}{fontshape=sl}
+\DefineVerbatimEnvironment{CodeOutput}{Verbatim}{}
+\newenvironment{CodeChunk}{}{}
+\setkeys{Gin}{width=0.8\textwidth}
+%</class>
+% \end{macrocode}
+%
+% The header and footer of JSS publications displays the logo,
+% the publication information and some further links. Here,
+% we define the footer first (because it must be included
+% before \texttt{hyperref} in {\TeX}live). It contains the somewhat extended
+% publication information (from the header), preceeded by the address of the
+% author/reviewer.
+% \begin{macrocode}
+%<*class>
+%% footer
+\newlength{\footerskip}
+\setlength{\footerskip}{2.5\baselineskip plus 2ex minus 0.5ex}
+
+\newcommand{\makefooter}{%
+ \vspace{\footerskip}
+
+ \if@nojss
+ \begin{samepage}
+ \textbf{\large \@Footername: \nopagebreak}\\[.3\baselineskip] \nopagebreak
+ \@Address \nopagebreak
+ \end{samepage}
+ \else
+ \begin{samepage}
+ \textbf{\large \@Footername: \nopagebreak}\\[.3\baselineskip] \nopagebreak
+ \@Address \nopagebreak
+ \vfill
+ \hrule \nopagebreak
+ \vspace{.1\baselineskip}
+ {\fontfamily{pzc} \fontsize{13}{15} \selectfont Journal of Statistical Software}
+ \hfill
+ \url{http://www.jstatsoft.org/}\\ \nopagebreak
+ published by the American Statistical Association
+ \hfill
+ \url{http://www.amstat.org/}\\[.3\baselineskip] \nopagebreak
+ {Volume~\@Volume, \@Seriesname~\@Issue}
+ \hfill
+ \@Firstdate\\ \nopagebreak
+ {\@Month{} \@Year}
+ \hfill
+ \@Seconddate \nopagebreak
+ \vspace{.3\baselineskip}
+ \hrule
+ \end{samepage}
+ \fi
+}
+%</class>
+% \end{macrocode}
+%
+% We include the footer at the end of the document.
+% \begin{macrocode}
+%<*class>
+\AtEndDocument{\makefooter}
+%</class>
+% \end{macrocode}
+%
+% After defining this, we can require the \texttt{hyperref} package.
+% \begin{macrocode}
+%<*class>
+%% required packages
+\RequirePackage{hyperref}
+%</class>
+% \end{macrocode}
+% and proceed to define the header.
+%
+% The header for all JSS publications has the logo \file{jsslogo.jpg}
+% along with the publication information.
+% \begin{macrocode}
+%<*class>
+%% new \maketitle
+\def\@myoddhead{
+ {\color{white} JSS}\\[-1.42cm]
+ \hspace{-2em} \includegraphics[height=23mm,keepaspectratio]{jsslogo} \hfill
+ \parbox[b][23mm]{118mm}{\hrule height 3pt
+ \center{
+ {\fontfamily{pzc} \fontsize{28}{32} \selectfont Journal of Statistical Software}
+ \vfill
+ {\it \small \@Month{} \@Year, Volume~\@Volume, \@Seriesname~\@Issue.%
+ \hfill \href{http://www.jstatsoft.org/}{http://www.jstatsoft.org/}}}\\[0.1cm]
+ \hrule height 3pt}}
+%</class>
+% \end{macrocode}
+%
+% This header is then used in the re-defined \verb/\maketitle/:
+% \begin{macrocode}
+%<*class>
+\if@review
+ \renewcommand{\maketitle}{
+ \if@nojss
+ %% \@oddhead{\@myoddhead}\\[3\baselineskip]
+ \else
+ \@oddhead{\@myoddhead}\\[3\baselineskip]
+ \fi
+ {\large
+ \noindent
+ Reviewer: \@Reviewer
+ \vspace{\baselineskip}
+ \hrule
+ \vspace{\baselineskip}
+ \textbf{\@Booktitle}
+ \begin{quotation} \noindent
+ \@Reviewauthor
+ \end{quotation}
+ \vspace{0.7\baselineskip}
+ \hrule
+ \vspace{1.3\baselineskip}
+ }
+
+ \thispagestyle{empty}
+ \if@nojss
+ \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hyperauthor}}
+ \else
+ \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hypersubject}}
+ \fi
+ \pagestyle{myheadings}
+ }
+\else
+ \def\maketitle{
+ \if@nojss
+ %% \@oddhead{\@myoddhead} \par
+ \else
+ \@oddhead{\@myoddhead} \par
+ \fi
+ \begingroup
+ \def\thefootnote{\fnsymbol{footnote}}
+ \def\@makefnmark{\hbox to 0pt{$^{\@thefnmark}$\hss}}
+ \long\def\@makefntext##1{\parindent 1em\noindent
+ \hbox to1.8em{\hss $\m@th ^{\@thefnmark}$}##1}
+ \@maketitle \@thanks
+ \endgroup
+ \setcounter{footnote}{0}
+ \thispagestyle{empty}
+ \if@nojss
+ \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hyperauthor}}
+ \else
+ \markboth{\centerline{\@Shorttitle}}{\centerline{\@Hypersubject}}
+ \fi
+ \pagestyle{myheadings}
+
+ \let\maketitle\relax \let\@maketitle\relax
+ \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax
+ }
+
+ \def\@maketitle{\vbox{\hsize\textwidth \linewidth\hsize
+ \if@nojss
+ %% \vskip 1in
+ \else
+ \vskip 1in
+ \fi
+ {\centering
+ {\LARGE\bf \@title\par}
+ \vskip 0.2in plus 1fil minus 0.1in
+ {
+ \def\and{\unskip\enspace{\rm and}\enspace}%
+ \def\And{\end{tabular}\hss \egroup \hskip 1in plus 2fil
+ \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\large\bf\rule{\z@}{24pt}\ignorespaces}%
+ \def\AND{\end{tabular}\hss\egroup \hfil\hfil\egroup
+ \vskip 0.1in plus 1fil minus 0.05in
+ \hbox to \linewidth\bgroup\rule{\z@}{10pt} \hfil\hfil
+ \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\large\bf\rule{\z@}{24pt}\ignorespaces}
+ \hbox to \linewidth\bgroup\rule{\z@}{10pt} \hfil\hfil
+ \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\large\bf\rule{\z@}{24pt}\@author
+ \end{tabular}\hss\egroup
+ \hfil\hfil\egroup}
+ \vskip 0.3in minus 0.1in
+ \hrule
+ \begin{abstract}
+ \@Abstract
+ \end{abstract}}
+ \textit{Keywords}:~\@Keywords.
+ \vskip 0.1in minus 0.05in
+ \hrule
+ \vskip 0.2in minus 0.1in
+ }}
+\fi
+%</class>
+% \end{macrocode}
+%
+% The appearance of sections, subsections and subsubsections is
+% controlled by
+% \begin{macrocode}
+%<*class>
+%% sections, subsections, and subsubsections
+\newlength{\preXLskip}
+\newlength{\preLskip}
+\newlength{\preMskip}
+\newlength{\preSskip}
+\newlength{\postMskip}
+\newlength{\postSskip}
+\setlength{\preXLskip}{1.8\baselineskip plus 0.5ex minus 0ex}
+\setlength{\preLskip}{1.5\baselineskip plus 0.3ex minus 0ex}
+\setlength{\preMskip}{1\baselineskip plus 0.2ex minus 0ex}
+\setlength{\preSskip}{.8\baselineskip plus 0.2ex minus 0ex}
+\setlength{\postMskip}{.5\baselineskip plus 0ex minus 0.1ex}
+\setlength{\postSskip}{.3\baselineskip plus 0ex minus 0.1ex}
+
+
+\newcommand{\jsssec}[2][default]{\vskip \preXLskip%
+ \pdfbookmark[1]{#1}{Section.\thesection.#1}%
+ \refstepcounter{section}%
+ \centerline{\textbf{\Large \thesection. #2}} \nopagebreak
+ \vskip \postMskip \nopagebreak}
+\newcommand{\jsssecnn}[1]{\vskip \preXLskip%
+ \centerline{\textbf{\Large #1}} \nopagebreak
+ \vskip \postMskip \nopagebreak}
+
+\newcommand{\jsssubsec}[2][default]{\vskip \preMskip%
+ \pdfbookmark[2]{#1}{Subsection.\thesubsection.#1}%
+ \refstepcounter{subsection}%
+ \textbf{\large \thesubsection. #2} \nopagebreak
+ \vskip \postSskip \nopagebreak}
+\newcommand{\jsssubsecnn}[1]{\vskip \preMskip%
+ \textbf{\large #1} \nopagebreak
+ \vskip \postSskip \nopagebreak}
+
+\newcommand{\jsssubsubsec}[2][default]{\vskip \preSskip%
+ \pdfbookmark[3]{#1}{Subsubsection.\thesubsubsection.#1}%
+ \refstepcounter{subsubsection}%
+ {\large \textit{#2}} \nopagebreak
+ \vskip \postSskip \nopagebreak}
+\newcommand{\jsssubsubsecnn}[1]{\vskip \preSskip%
+ {\textit{\large #1}} \nopagebreak
+ \vskip \postSskip \nopagebreak}
+
+\newcommand{\jsssimplesec}[2][default]{\vskip \preLskip%
+%% \pdfbookmark[1]{#1}{Section.\thesection.#1}%
+ \refstepcounter{section}%
+ \textbf{\large #1} \nopagebreak
+ \vskip \postSskip \nopagebreak}
+\newcommand{\jsssimplesecnn}[1]{\vskip \preLskip%
+ \textbf{\large #1} \nopagebreak
+ \vskip \postSskip \nopagebreak}
+
+\if@review
+ \renewcommand{\section}{\secdef \jsssimplesec \jsssimplesecnn}
+ \renewcommand{\subsection}{\secdef \jsssimplesec \jsssimplesecnn}
+ \renewcommand{\subsubsection}{\secdef \jsssimplesec \jsssimplesecnn}
+\else
+ \renewcommand{\section}{\secdef \jsssec \jsssecnn}
+ \renewcommand{\subsection}{\secdef \jsssubsec \jsssubsecnn}
+ \renewcommand{\subsubsection}{\secdef \jsssubsubsec \jsssubsubsecnn}
+\fi
+%</class>
+% \end{macrocode}
+%
+% The hypersetup uses some modified colors
+% \begin{macrocode}
+%<*class>
+%% colors
+\definecolor{Red}{rgb}{0.5,0,0}
+\definecolor{Blue}{rgb}{0,0,0.5}
+%</class>
+% \end{macrocode}
+% and is then defined by
+% \begin{macrocode}
+%<*class>
+\if@review
+ \hypersetup{%
+ hyperindex = {true},
+ colorlinks = {true},
+ linktocpage = {true},
+ plainpages = {false},
+ linkcolor = {Blue},
+ citecolor = {Blue},
+ urlcolor = {Red},
+ pdfstartview = {Fit},
+ pdfpagemode = {None},
+ pdfview = {XYZ null null null}
+ }
+\else
+ \hypersetup{%
+ hyperindex = {true},
+ colorlinks = {true},
+ linktocpage = {true},
+ plainpages = {false},
+ linkcolor = {Blue},
+ citecolor = {Blue},
+ urlcolor = {Red},
+ pdfstartview = {Fit},
+ pdfpagemode = {UseOutlines},
+ pdfview = {XYZ null null null}
+ }
+\fi
+%</class>
+% \end{macrocode}
+%
+% The information for the hyper summary requires
+% some information which has not been processed
+% before the beginning of the document. Therefore,
+% we need a second \verb/\hypersetup/.
+% \begin{macrocode}
+%<*class>
+\if@nojss
+ \AtBeginDocument{
+ \hypersetup{%
+ pdfauthor = {\@Hyperauthor},
+ pdftitle = {\@Plaintitle},
+ pdfkeywords = {\@Plainkeywords}
+ }
+ }
+\else
+ \AtBeginDocument{
+ \hypersetup{%
+ pdfauthor = {\@Hyperauthor},
+ pdftitle = {\@Plaintitle},
+ pdfsubject = {\@Hypersubject},
+ pdfkeywords = {\@Plainkeywords}
+ }
+ }
+\fi
+%</class>
+% \end{macrocode}
+%
+% We put the header at the beginning of the
+% document (for footer see above).
+% \begin{macrocode}
+%<*class>
+\AtBeginDocument{\maketitle}
+%</class>
+% \end{macrocode}
+%
+% Finally, some additional commands are provided for writing about
+% software (code, programming languages, packages),
+% \begin{macrocode}
+%<*class>
+%% commands
+\makeatletter
+\newcommand\code{\bgroup\@makeother\_\@makeother\~\@makeother\$\@codex}
+\def\@codex#1{{\normalfont\ttfamily\hyphenchar\font=-1 #1}\egroup}
+\makeatother
+%%\let\code=\texttt
+\let\proglang=\textsf
+\newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
+%</class>
+% \end{macrocode}
+% for specifying e-mail addresses,
+% \begin{macrocode}
+%<*class>
+\newcommand{\email}[1]{\href{mailto:#1}{\normalfont\texttt{#1}}}
+%</class>
+% \end{macrocode}
+% digital object identifiers (DOIs),
+% \begin{macrocode}
+%<*class>
+\newcommand{\doi}[1]{\href{http://dx.doi.org/#1}{\normalfont\texttt{doi:#1}}}
+%</class>
+% \end{macrocode}
+% and for mathematical notation.
+% \begin{macrocode}
+%<*class>
+\newcommand{\E}{\mathsf{E}}
+\newcommand{\VAR}{\mathsf{VAR}}
+\newcommand{\COV}{\mathsf{COV}}
+\newcommand{\Prob}{\mathsf{P}}
+%</class>
+% \end{macrocode}
View
14 paper/jss.ins
@@ -0,0 +1,14 @@
+%% LaTeX2e file `jss.ins'
+%% generated by the `filecontents' environment
+%% from source `jss' on 2007/01/28.
+%%
+% Simply TeX or LaTeX this file to extract various files from the source
+% file `jss.dtx'.
+\def\filedate{2004/09/29}
+\def\batchfile{jss.ins}
+\input docstrip.tex
+\generateFile{jss.drv}{t}{\from{jss.dtx}{driver}}
+\generateFile{jss.cls}{t}{\from{jss.dtx}{class}}
+\Msg{*******************************************************}
+\Msg{* For documentation, run LaTeX on jss.dtx or jss.drv. *}
+\Msg{*******************************************************}
View
BIN paper/jsslogo.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
112 paper/lubridate.tex
@@ -0,0 +1,112 @@
+\documentclass[article]{jss}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% declarations for jss.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% almost as usual
+\author{Garrett Grolemund\\Rice University \And
+ Hadley Wickham\\Rice University}
+\title{Dates and Times Made Easy with \pkg{lubridate}}
+
+%% for pretty printing and a nice hypersummary also set:
+\Plainauthor{Garrett Grolemund, Hadley Wickham} %% comma-separated
+\Plaintitle{Dates and Times Made Easy with lubridate} %% without formatting
+%\Shorttitle{A Capitalized Title} %% a short title (if necessary)
+
+%% an abstract and keywords
+\Abstract{
+ This paper presents the lubridate package for \proglang{R}, which facilitates working with dates and times.
+}
+\Keywords{dates, times, time zones, daylight savings time, manipulation, \proglang{R}}
+\Plainkeywords{dates, times, time zones, daylight savings time, manipulation, R} %% without formatting
+%% at least one keyword must be supplied
+
+%% publication information
+%% NOTE: Typically, this can be left commented and will be filled out by the technical editor
+%% \Volume{13}
+%% \Issue{9}
+%% \Month{September}
+%% \Year{2004}
+%% \Submitdate{2004-09-29}
+%% \Acceptdate{2004-09-29}
+
+%% The address of (at least) one author should be given
+%% in the following format:
+\Address{
+ Garrett Grolemund\\
+ Rice University\\
+ Houston, TX 77251-1892, United States of America\\
+ E-mail: \email{grolemund@rice.edu}
+}
+%% It is also possible to add a telephone and fax number
+%% before the e-mail in the following format:
+%% Telephone: +43/1/31336-5053
+%% Fax: +43/1/31336-734
+
+%% for those who use Sweave please include the following line (with % symbols):
+%% need no \usepackage{Sweave.sty}
+
+%% end of declarations %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\begin{document}
+\section{Introduction}
+Many data sets have a time component, which creates complicated problems for researchers. Unlike other measures, time is both exact and relative. It is measured in units that have a precise length, such as seconds, as well as units whose length constantly changes, such as months. Variations in Daylight Savings Time and time zones further complicate time data.\\
+
+Many \proglang{R} methods address these idiosyncrasies by creating new types of time objects. But this approach makes research more complicated, not less. Moreover, the proliferation of time formats further complicates recognizing and accurately parsing time data.\\
+
+\pkg{lubridate} simplifies working with time data in \proglang{R} by providing simple, intuitive solutions for manipulating date times, doing arithmetic with date-time objects, and reading in or parsing date-time objects. The package recognizes the dual nature of time and allows users to work with time as an exact measurement, a relative measurement, or both simultaneously. \pkg{lubridate} also offers simple methods for handling time zones and Daylight Savings Time(DST) and creates an improved user interface similar to object oriented programming languages.\\
+
+This paper introduces the dual nature of time measurement, which will help you think about time related research problems, and demonstrates how \pkg{lubridate} can help you overcome those problems. The paper also demonstrates other convenient tools provided in the \pkg{lubridate} package and ends with a case study, using \pkg{lubridate} in a real life example.\\
+
+\section{Relative time vs. specific time}
+Time seems like an obvious example of an interval scale. Each moment of time, referred to as a date-time, is unique. These moments occur in order, and each second represents the same amount of time no matter when it occurs. Why then is working with time scale frustrating? To answer this question, it is helpful to recognize that time is an attempt to make two different measures coexist on the same scale. \\
+
+In addition to measuring the passage of time, time also tracks both the rotation of the Earth and its revolution about the sun. A day is meant to be the time length of one rotation of the Earth, and a year one revolution about the sun. Further association is hinted at by the dual use of minutes and seconds as units of longitude. These astronomical conditions are often more important than the exact time, but they rarely align with each other and do not occur with the precision of an interval scale. The exact time has to be periodically re-calibrated to retain information about the Earth's astronomical position. The leap year system is one example of this re-calibration. Many man made conventions, such as Daylight Savings Time, have also been invented in attempts to better align astronomical events and the passage of interval time.\\
+
+In this way, two types of time coexist with each other: "exact" time that measures the interval progression of time, and "relative" time that measures the time relative to astronomical conditions and man-made conventions. Research involving time data may be interested in exact time, relative time, or both. The speed of a physical object is most precisely stated in exact time. The opening bids on most stock markets occur at the same relative time each day. Wind speed, which is measured with exact time, may change depending on the time of the day, which is relative.\\
+
+The coexistence of exact time and relative time creates many problems. Since, the Earth's angle of rotation appears different from one place to another, our labeling of time in different places varies accordingly. In other words, the same date-time will be given different labels at different locations on the globe. Alternatively, the same time label will correspond to different moments of date-time on different parts of the globe. This a problem of identity.\\
+
+Next, the re-calibrations and conventions made to pair relative time with exact time disrupt the consistency of many units of time. A year beginning on January 1st, 2000 is 366 days long or 31622400 seconds, but a year beginning on January 1st, 2001 is only 365 days long or 31536000 seconds. The length of a month can range from 28 days to 31 days depending on when the month begins. This presents a problem of duration, but it also poses a problem when we wish to convert between time units. How many hours does one day equal? What if that day is March 8th, 2009, the day when Daylight Savings Time goes into effect for parts of the world?
+And this is another problem, how do we handle conventions like Daylight Savings Time that would affect relative time durations, such as the time from the market's close today until the opening tomorrow, but not exact durations such as the life of a lightbulb?\\
+
+\section{Instants, Intervals, Durations, and Periods}
+
+Instants are specific moments in exact time. Each instant lasts a millisecond, and instants occur in order. The uniform occurrence of instants creates the interval scale of time which we refer to as exact time. A single instant can be, and is, labeled in many different ways. The most popular of these is clock time.\\
+
+Clock time refers to the time that would be recorded on a clock at a given instant in a given place. Usually clock time is only an approximation of when a specific instance occurs. For example, most digital clocks do not display dates and round time down to the nearest minute.\\
+
+Clock times vary from place to place, which makes them very consistent for measuring relative time. 7:00 am indicates one of the first hours of daylight no matter where you are on the planet. This also makes them poor indicators of instants. A single clock time could refer to many different instants depending on where it was measured.\\
+
+The time zone system attempts to fix this. By pairing a clock time with the time zone it occurred in, we can calculate the exact instant that clock time represents. When discussing exact time, it is standard to give the clock times that appear in the GMT or UTC time zones. This saves calculations, but can be annoying if your computer insists on translating times to your current time zone. It may also be inconvenient to discuss clock times that occur in a place unrelated to the data.\\
+
+Even with the time zone system, clock time cannot accurately measure both exact time and relative time. The astronomical cycles measured by relative time do not perfectly align with each other, which is why we have a leap day almost every four years. Astronomical cycles also do not unfold as consistently as exact time. Aperiodic leap seconds are necessary to reconcile the rotation of the Earth, which is decelerating, with the progression of exact time, which is not.\\
+
+In addition, clock time is sometimes adjusted to create a more convenient indication of relative time, such as when Daylight Savings Time occurs. These adjustments are usually location specific. Months, which originally modeled lunar cycles, have also been adopted but with inconsistent lengths.\\
+
+Because of all of this, the number of instants that have passed does not reliably tell us what changes have occurred in relative time. And likewise, a change in clock time does not reliably tell us how many instants have elapsed. In both cases we are missing a piece of information: when the change occurs. Since we know when inconsistencies between exact and relative time happen, we can use a starting time to calculate the instant and clock time that will result from elapsed time. This is similar to using a time zone to calculate what instant is being referred to by a given clock time.\\
+
+\proglang{Joda-Time} defines such time span, instant pairs as intervals. Intervals differ from other time spans in that they are anchored by two known instants. Both intervals and non-interval time spans can be measured in exact time or relative time. Is the researcher interested in the exact number of 24 hour periods that occurred between 5:00 p.m. on Monday and 5:00 p.m. on Friday, or is she interested in the number of business days that transpired? These answers would be different if Daylight Savings Time changed in the interim.\\
+
+We can evaluate an interval in either exact time or real time because it has been anchored to its starting time point. However, we must choose whether to define a floating time span in exact time or relative time.
+
+
+\section{Inputting date-times}
+\section{Working with date-times}
+\subsection{Time zones}
+\subsection{Daylight Savings Time}
+\section{Durations}
+\subsection{Object oriented interface}
+\section{Case Study}
+\section{Other convenience functions}
+\section{Comparison table}
+\section*{Acknowledgements}
+\section*{References}
+
+
+\section[About Java]{About \proglang{Java}}
+%% Note: If there is markup in \(sub)section, then it has to be escape as above.
+
+\end{document}

0 comments on commit e4bf380

Please sign in to comment.
Something went wrong with that request. Please try again.