Skip to content

Commit

Permalink
Merge pull request JmlrOrg#1 from JmlrOrg/fabianp-patch-1
Browse files Browse the repository at this point in the history
Add preprint option
  • Loading branch information
fabianp committed Aug 1, 2019
2 parents 07d929a + f3e252d commit d8cd00b
Show file tree
Hide file tree
Showing 2 changed files with 31 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}



11 changes: 11 additions & 0 deletions sample.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
% natbib citation styles, see the natbib documentation, a copy of which
% is archived at http:https://www.jmlr.org/format/natbib.pdf

% Available options for package jmlr2e are:
%
% - abbrvbib : use abbrvnat for the bibliography style
% - nohyperref : do not load the hyperref package
% - preprint : remove JMLR specific information from the template,
% useful for example for posting to preprint servers.
%
% Example of using the package with custom options:
%
% \usepackage[abbrvbib, preprint]{jmlr2e}

\usepackage{jmlr2e}

% Definitions of handy macros can go here
Expand Down

0 comments on commit d8cd00b

Please sign in to comment.