Skip to content

Commit

Permalink
Add preprint option
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianp committed Jun 17, 2019
1 parent 07d929a commit a70a4f8
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions jmlr2e.sty
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
% Intelligence Research (jair.sty)
%
% Suggestions: Submit an issue or pull request to
% https://github.com/JournalMLR/jmlr-style-file
% https://github.com/JmlrOrg/jmlr-style-file
%
% Last edited October 9, 2000 by Leslie Pack Kaelbling
% Last edited January 23, 2001 by Alex J. Smola (we should set up RCS or CVS)
Expand All @@ -13,16 +13,17 @@
% Last edited January 9, 2017 Charles Sutton
% (We have now set up GIT, good thing that we waited for it to
% be invented.)
% Last edited June 17, 2019 Fabian Pedregosa
% Added a preprint option
%
% The name of this file should follow the article document
% type, e.g. \documentstyle[jmlr]{article}

% Copied and edited from similar file for Machine Learning Journal.
% Original Author: Jeff Schlimmer
% Edited by: Kevin Thompson, Martha Del Alto, Helen Stewart, Steve Minton \& Pandu Nayak.
% Last edited: Mon May 3 20:40:00 1993 by kthompso (Kevin Thompson) on muir

\typeout{Document Style `jmlr' -- January 2016.}
\typeout{Document Style `jmlr'.}

\newif\if@abbrvbib\@abbrvbibfalse
\DeclareOption{abbrvbib}{\@abbrvbibtrue}
Expand All @@ -31,6 +32,13 @@
\DeclareOption{nohyperref}{\@usehyperfalse}
\DeclareOption{hyperref}{\@usehypertrue}

% declare preprint option, which creates a preprint version ready for
% upload to, e.g., arXiv
\newif\if@preprint\@preprintfalse
\DeclareOption{preprint}{
\@preprinttrue
}

\DeclareOption*{\PackageWarning{jmlr}{Unknown ‘\CurrentOption’}}
\ProcessOptions\relax

Expand Down Expand Up @@ -232,10 +240,12 @@
\def\name{\normalsize\bf}%
\def\AND{\@endauthor\rm\hss \vskip \interauthorskip \@startauthor}
\@startauthor \@author \@endauthor}

\vskip \aftermaketitskip
\if@preprint
\else
\noindent \@starteditor \@editor \@endeditor
\vskip \aftermaketitskip
\fi
}}

\def\editor#1{\gdef\@editor{#1}}
Expand All @@ -257,10 +267,16 @@
\def\firstpageno#1{\setcounter{page}{#1}}

\def\jmlrheading#1#2#3#4#5#6#7{\def\ps@jmlrtps{\let\@mkboth\@gobbletwo%
\if@preprint
\def\@oddhead{} % empty header if its a preprint
\def\@oddfoot{\parbox[t]{\textwidth}{\raggedright \scriptsize \copyright #2 #7.\\[5pt]
License: CC-BY 4.0, see \url{https://creativecommons.org/licenses/by/4.0/}.\hfill}}%
\else
\def\@oddhead{\scriptsize Journal of Machine Learning Research #1 (#2) #3 \hfill Submitted #4; Published #5}%
\def\@oddfoot{\parbox[t]{\textwidth}{\raggedright \scriptsize \copyright #2 #7.\\[5pt]
License: CC-BY 4.0, see \url{https://creativecommons.org/licenses/by/4.0/}. Attribution requirements
are provided at \url{http:https://jmlr.org/papers/v#1/#6.html}.\hfill}}%
\fi

\def\@evenhead{}\def\@evenfoot{}}%
\thispagestyle{jmlrtps}}
Expand Down Expand Up @@ -350,6 +366,3 @@ are provided at \url{http:https://jmlr.org/papers/v#1/#6.html}.\hfill}}%
\newtheorem{definition}[theorem]{Definition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{axiom}[theorem]{Axiom}



0 comments on commit a70a4f8

Please sign in to comment.