From cfed44562985f2f168a5b2f6df46bcaec533d7e9 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Fri, 25 Mar 2011 22:31:43 +0000
Subject: jmlr 1.11 (24mar11)

git-svn-id: svn://tug.org/texlive/trunk@21830 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/source/latex/jmlr/jmlr.dtx | 321 ++++++++++++++++++++++-----
 1 file changed, 260 insertions(+), 61 deletions(-)

(limited to 'Master/texmf-dist/source/latex/jmlr/jmlr.dtx')

diff --git a/Master/texmf-dist/source/latex/jmlr/jmlr.dtx b/Master/texmf-dist/source/latex/jmlr/jmlr.dtx
index b64c1d955f0..6440de96f72 100644
--- a/Master/texmf-dist/source/latex/jmlr/jmlr.dtx
+++ b/Master/texmf-dist/source/latex/jmlr/jmlr.dtx
@@ -7,7 +7,7 @@
 %   -author "Nicola Talbot"
 %   -codetitle "jmlr.cls Code"
 %   jmlr
-% Created on 2011/1/5 14:41
+% Created on 2011/3/24 21:20
 %\fi
 %\iffalse
 %<*package>
@@ -47,9 +47,11 @@
             pdftitle={jmlr: LaTeX2e Classes for the Journal of Machine Learning Research},
             pdfkeywords={LaTeX,jmlr}]{hyperref}
 
-\CheckSum{3348}
+\CheckSum{3806}
 \OnlyDescription
 
+\newcommand*{\appopt}[1]{\texttt{-{}-#1}}
+
 \begin{document}
 \DocInput{jmlr.dtx}
 \end{document}
@@ -63,7 +65,7 @@
 % \author{Nicola L. C. Talbot\\[10pt]
 %\url{http://theoval.cmp.uea.ac.uk/~nlct/}}
 %
-% \date{2011-01-05 (version 1.10)}
+% \date{2011-03-24 (version 1.11)}
 % \maketitle
 %\tableofcontents
 %
@@ -112,7 +114,7 @@
 %this class file does not load the obsolete \sty{epsfig} package.
 %
 %The \clsfmt{jmlrbook} class additionally loads the \cls{combine} class
-%and the following packages: \sty{combnat} and \sty{setspace}.
+%and the following packages: \sty{combnat}, \sty{setspace} and \sty{fink}.
 %
 %The \app{makejmlrbook} script requires Perl, \TeX\ and \TeX4ht.
 %
@@ -924,16 +926,17 @@
 %\section{Guidelines for Production Editors}
 %\label{sec:jmlrbook}
 %
-%The \clsfmt{jmlrbook} class can be used to combine articles that
-%use the \clsfmt{jmlr} document class into a book. The following sample
+%The \clsfmt{jmlrbook} class can be used to combine articles that use
+%the \clsfmt{jmlr} document class into a book. The following sample
 %files are provided: \texttt{paper1/paper1.tex},
 %\texttt{paper2/paper2.tex}, \texttt{paper3/paper3.tex},
-%\texttt{jmlr-sample.tex}, \texttt{jmlrwcp-sample.tex} and
-%\texttt{jmlrbook-sample.tex}.  All but the last named one are
-%articles using the \clsfmt{jmlr} class. The last one
-%(\texttt{jmlrbook-sample.tex}) uses the \clsfmt{jmlrbook} class file to
-%combine the articles into a book.  Note that no modifications are
-%needed to the files using the \clsfmt{jmlr} class when they are
+%\texttt{jmlr-sample.tex}, \texttt{jmlrwcp-sample.tex},
+%\texttt{jmlrbook-sample.tex} and \texttt{proceedings-sample.tex}.
+%All but the last two are articles using the \clsfmt{jmlr} class. The
+%last two (\texttt{jmlrbook-sample.tex} and
+%\texttt{proceedings-sample.tex}) uses the \clsfmt{jmlrbook} class
+%file to combine the articles into a book. Note that no modifications
+%are needed to the files using the \clsfmt{jmlr} class when they are
 %imported into the book. They can either be compiled as stand-alone
 %articles or with the entire book.
 %
@@ -1108,7 +1111,7 @@
 %This environment may be used by the author signing off at the end of a chapter such as the
 %foreword. Within the environment use:
 %\begin{definition}[\DescribeMacro{\Author}]
-%\cs{author}\marg{details}
+%\cs{Author}\marg{details}
 %\end{definition}
 %for the author's details. More than one \cs{Author} should be used
 %if there is more than one author. Example:
@@ -1121,6 +1124,24 @@
 %\end{authorsignoff}
 %\end{verbatim}
 %
+%\begin{definition}[\DescribeEnv{preface}]
+%\cs{begin}\{preface\}\oarg{filename}
+%\end{definition}
+%This environment may be used to typeset the preface. This starts a
+%new chapter using
+%\begin{verbatim}
+%\chapter{\prefacename}
+%\end{verbatim}
+%\DescribeMacro{\prefacename}where \cs{prefacename} defaults to 
+%``Preface''. This environment should typically go in the front
+%matter and is provided to allow \app{makejmlrbook} create a
+%standalone document for the preface. The optional argument is the
+%filename (without any extension or path) that will be used by
+%\app{makejmlrbook}. This defaults to \texttt{preface} but, to
+%conform with JMLR guidelines, should be changed to the surname of
+%the first author (editor) followed by the final two digits of the
+%year. See the JMLR website for further details of the guidelines.
+%
 %\begin{definition}[\DescribeEnv{signoff}]
 %\cs{begin}\{signoff\}\oarg{team name}\marg{date}\\
 %\meta{editor list}\\
@@ -1128,9 +1149,11 @@
 %\end{definition}
 %This environment may be used by the editorial team when signing off
 %a chapter such as the preface. If the optional argument is omitted,
-%\qt{The Editorial Team} is used.
+%\qt{The Editorial Team} is used. If you are using the \env{preface}
+%environment described above, the \env{signoff} environment must go
+%inside the \env{preface} environment.
 %
-%Within the environment use:
+%Within the \env{signoff} environment use:
 %\begin{definition}[\DescribeMacro{\Editor}]
 %\cs{Editor}\marg{details}
 %\end{definition}
@@ -1414,7 +1437,11 @@
 %used packages. For example, it loads the \sty{algorithm2e}
 %package with the \pkgoptfmt{algo2e} and \pkgoptfmt{ruled} options and
 %provides the \env{algorithm} environment in addition to 
-%\sty{algorithm2e}'s \env{algorithm2e} environment.
+%\sty{algorithm2e}'s \env{algorithm2e} environment. Different
+%versions of the same package can also be a problem. To help
+%counteract the problem caused by different papers using different
+%versions of the \sty{algorithm2e} package, \sty{jmlrbook} defines
+%most of the old style commands if they don't exist.
 %
 %Articles that use different input encodings can also cause a
 %problem. For example, if one article uses \texttt{utf8} and another
@@ -1447,6 +1474,7 @@
 %for it to work properly, the articles must be imported using
 %\cs{importarticle}, \cs{importpaper} or \cs{importpubpaper}, and
 %the imported articles must use the \clsfmt{jmlr} class.
+%Note that I have only tested \app{makejmlrbook} on Linux.
 %
 %On UNIX style systems, the script can be invoked from a terminal
 %using:
@@ -1475,36 +1503,43 @@
 %
 %The options to \app{makejmlrbook} are as follows:
 %\begin{description}
-%\item[--online] Generate the color on-line version (default).
-%\item[--noonline] Don't generate the color on-line version.
-%\item[--print] Generate the grayscale print version (default).
-%\item[--noprint] Don't generate the grayscale print version.
-%\item[--html] Generate the HTML files and the individual article
+%\item[\appopt{online}] Generate the color on-line version (default).
+%\item[\appopt{noonline}] Don't generate the color on-line version.
+%\item[\appopt{print}] Generate the grayscale print version (default).
+%\item[\appopt{noprint}] Don't generate the grayscale print version.
+%\item[\appopt{html}] Generate the HTML files and the individual article
 %PDFs (default).
-%\item[--nohtml] Don't generate the HTML files and the individual
+%\item[\appopt{nohtml}] Don't generate the HTML files and the individual
 %article PDFs.
-%\item[--logourl \meta{url}] Make the logo on the HTML index page link
+%\item[\appopt{logourl} \meta{url}] Make the logo on the HTML index page link
 %to \meta{url}.
-%\item[--batchtex] Run \TeX\ in batch mode.
-%\item[--nobatchtex] Don't run \TeX\ in batch mode (default).
-%\item[--quieter] Reduce chatter to STDOUT (doesn't eliminate
+%\item[\appopt{extractpreface}] Extract the preface as a standalone document
+%with links in the HTML index. (Only has an effect if combined with
+%\appopt{html} option.) This will only work if the preface has been put
+%inside the \env{preface} environment with the \env{signoff}
+%environment that each editor with \ics{Editor}.
+%\item[\appopt{noextractpreface}] Don't try extracting the preface.
+%(Default.)
+%\item[\appopt{batchtex}] Run \TeX\ in batch mode.
+%\item[\appopt{nobatchtex}] Don't run \TeX\ in batch mode (default).
+%\item[\appopt{quieter}] Reduce chatter to STDOUT (doesn't eliminate
 %all messages). This also runs \TeX\ in batch mode.
-%\item[--noquieter] Don't reduce messages to STDOUT (default).
-%\item[--version] Display the version number and exit.
-%\item[--help] List all available options.
+%\item[\appopt{noquieter}] Don't reduce messages to STDOUT (default).
+%\item[\appopt{version}] Display the version number and exit.
+%\item[\appopt{help}] List all available options.
 %\end{description}
 %
 %There are also some more advanced options, but these haven't been
 %fully tested:
 %\begin{description}
-%\item[--latexapp \meta{name}] Application used to call \LaTeX.
+%\item[\appopt{latexapp} \meta{name}] Application used to call \LaTeX.
 %Defaults to \qt{pdflatex}.
-%\item[--latexopt \meta{string}] Options to pass to \LaTeX.
-%\item[--format \meta{string}] Output format (defaults to \qt{pdf}).
+%\item[\appopt{latexopt} \meta{string}] Options to pass to \LaTeX.
+%\item[\appopt{format} \meta{string}] Output format (defaults to \qt{pdf}).
 %This may need to be changed if you change the \LaTeX\ application.
-%\item[--bibtexapp \meta{name}] Application use to process the
+%\item[\appopt{bibtexapp} \meta{name}] Application use to process the
 %bibliography. Defaults to \qt{bibtex}.
-%\item[--bibtexopt \meta{string}] Options to pass to Bib\TeX.
+%\item[\appopt{bibtexopt} \meta{string}] Options to pass to Bib\TeX.
 %\end{description}
 %
 %\StopEventually{\clearpage\phantomsection
@@ -1527,7 +1562,7 @@
 % Declare class and required TeX format:
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{jmlr}[2011/01/05 v1.10 (NLCT) Journal of Machine Learning Research]
+\ProvidesClass{jmlr}[2011/03/24 v1.11 (NLCT) Journal of Machine Learning Research]
 %    \end{macrocode}
 %\changes{1.10}{2011-01-05}{hyperref now loaded by jmlr instead of
 %jmlrbook}
@@ -1631,9 +1666,10 @@
 %    \end{macrocode}
 %\end{macro}
 %\begin{macro}{\wcp}
+%\changes{1.11}{2011-03-24}{Fixed typo}
 %    \begin{macrocode}
 \newcommand*{\jmlrwcp}{%
-  \jmlrproceedings{JMLR WC\&P}{JMLR: Workshop and Conference Proceedings}%
+  \jmlrproceedings{JMLR W\&CP}{JMLR: Workshop and Conference Proceedings}%
 }
 %    \end{macrocode}
 %\end{macro}
@@ -1709,6 +1745,11 @@
 \RequirePackage{graphicx}
 \RequirePackage{url}
 \RequirePackage[x11names]{xcolor}
+%    \end{macrocode}
+% Allow old command names in the event that the proceedings contains
+% a mixture of papers that use old and new versions. (This means
+% that editors need to install the newer version.)
+%    \begin{macrocode}
 \RequirePackage[algo2e,ruled]{algorithm2e}
 %    \end{macrocode}
 % Do all the stuff that needs to be done before \sty{hyperref} is
@@ -2180,6 +2221,46 @@ Keywords:} \ignorespaces}%
 %    \end{macrocode}
 %\end{macro}
 %
+%\begin{macro}{\jmlrabbrnamelist}
+%\changes{1.11}{2011-03-24}{new}
+% Display list of names in abbreviated form. (Mainly designed for use with
+% makejmlrbook for the preface authors.) The author should be
+% grouped if the name contains a comma.
+%    \begin{macrocode}
+\newcommand*{\jmlrabbrnamelist}[1]{%
+  \def\nametag##1{}%
+  \def\@jmlr@authors@sep{, }%
+  \def\@jmlr@namelist{}%
+  \@for\@thisname:=#1\do{%
+    \expandafter\@jmlrabbrname\expandafter{\@thisname}%
+    \ifx\@jmlr@namelist\@empty
+       \protected@edef\@jmlr@namelist{%
+          \@initials\space\@surname
+       }%
+    \else
+       \protected@edef\@jmlr@namelist{%
+          \@jmlr@namelist
+          \noexpand\@jmlr@authors@sep
+          \@initials\space\@surname
+       }%
+    \fi
+  }%
+  \def\@jmlr@authors@sep{ \& }%
+  \@jmlr@namelist
+}
+%    \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@jmlrabbrname}
+%    \begin{macrocode}
+\newcommand*{\@jmlrabbrname}[1]{%
+  \def\@initials{}%
+  \def\@surname{}%
+  \def\@forenames{}%
+  \@parsename#1 \@nil\end@parsename
+}
+%    \end{macrocode}
+%\end{macro}
+%
 %\begin{macro}{\Email}
 %    \begin{macrocode}
 \newcommand*{\Email}[1]{{\@email #1}}
@@ -3186,7 +3267,7 @@ Keywords:} \ignorespaces}%
 % Disable chapters for articles.
 %    \begin{macrocode}
 \newcommand\artchapter{%
-  \ClassError{jmlrwcp}{Chapters not permitted in articles}{}}
+  \ClassError{jmlr}{Chapters not permitted in articles}{}}
 %    \end{macrocode}
 %\end{macro}
 %\begin{macro}{\chapter}
@@ -3643,7 +3724,7 @@ Keywords:} \ignorespaces}%
 %    \end{macrocode}
 % Declare class:
 %    \begin{macrocode}
-\ProvidesClass{jmlrbook}[2011/01/05 v1.10 (NLCT) JMLR Book Style]
+\ProvidesClass{jmlrbook}[2011/03/24 v1.11 (NLCT) JMLR Book Style]
 %    \end{macrocode}
 % Need \sty{xkeyval} package to have key=value class options
 %    \begin{macrocode}
@@ -3746,6 +3827,13 @@ Keywords:} \ignorespaces}%
 %    \begin{macrocode}
 \RequirePackage{setspace}
 %    \end{macrocode}
+%
+% Requires fink package to determine if the preface is in the main
+% document or in a separate file.
+%\changes{1.11}{2011-03-24}{fink package now required}
+%    \begin{macrocode}
+\RequirePackage{fink}
+%    \end{macrocode}
 % Switch on two-side mode
 %    \begin{macrocode}
 \@twosidetrue
@@ -3764,6 +3852,61 @@ Keywords:} \ignorespaces}%
   \rule[#1]{\linewidth}{2pt}\par}
 %    \end{macrocode}
 %\end{macro}
+%
+%\begin{environment}{preface}
+% The preface environment starts a new chapter but also writes
+% information to the main aux file for \app{makejmlrbook}. The
+% optional argument is the file name for the extracted preface.
+%\changes{1.11}{2011-03-24}{new}
+%    \begin{macrocode}
+\ifjmlrhtml
+  \newenvironment{preface}[1][preface]%
+  {%
+    \noindent\HCode{<h2>\prefacename</h2>}%
+  }%
+  {%
+  }
+\else
+  \newenvironment{preface}[1][preface]%
+  {%
+    \chapter{\prefacename}
+    \protected@write\@mainauxout
+      {}{\string\@prefacestart{\thepage}{\arabic{page}}}%
+    \protected@write\@mainauxout{}{\string\@prefacefile{\finkpath}{#1}}%
+  }%
+  {%
+    \protected@write\@mainauxout{}{\string\@prefaceend{\thepage}}%
+  }
+\fi
+%    \end{macrocode}
+%\end{environment}
+%\begin{macro}{\prefacename}
+%\changes{1.11}{2011-03-24}{new}
+%    \begin{macrocode}
+\newcommand*{\prefacename}{Preface}
+%    \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@prefacefile}
+%    \begin{macrocode}
+\newcommand*{\@prefacefile}[2]{}
+%    \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@prefacestart}
+%    \begin{macrocode}
+\newcommand*{\@prefacestart}[2]{}
+%    \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@prefaceend}
+%    \begin{macrocode}
+\newcommand*{\@prefaceend}[1]{}
+%    \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@prefaceeditor}
+%    \begin{macrocode}
+\newcommand*{\@prefaceeditor}[1]{}
+%    \end{macrocode}
+%\end{macro}
+%
 % Cross-reference chapters:
 %    \begin{macrocode}
 \newcommand*{\chapterrefname}{Chapter}
@@ -4111,27 +4254,51 @@ Keywords:} \ignorespaces}%
 % argument is the date, the optional argument is the team title.
 % Each editor should be separated with \ics{Editor}.
 %    \begin{macrocode}
-\newenvironment{signoff}[2][The Editorial Team]{%
-  \def\Editor##1{\begin{tabular}{@{}l@{}}%
-    ##1%
-    \end{tabular}%
-    \par\vskip\baselineskip\noindent\ignorespaces
+\ifjmlrhtml
+  \newenvironment{signoff}[2][The Editorial Team]{%
+    \def\Editor##1{##1\par\vskip\baselineskip\noindent\ignorespaces}%
+    \def\@editorialteam{#1}%
+    \def\@signoffdate{#2}%
+    \par\vskip\baselineskip\noindent
+    \ifx\@signoffdate\@empty
+    \else
+      \emph{\@signoffdate}\par
+      \vskip\baselineskip\noindent
+    \fi
+    \ifx\@editorialteam\@empty
+    \else
+      \@editorialteam:\par\vskip\baselineskip
+    \fi
+    \noindent\ignorespaces
   }%
-  \def\@editorialteam{#1}%
-  \def\@signoffdate{#2}%
-  \par\vskip\baselineskip\noindent
-  \ifx\@signoffdate\@empty
-  \else
-    \emph{\@signoffdate}\par
-    \vskip\baselineskip\noindent
-  \fi
-  \ifx\@editorialteam\@empty
-  \else
-    \@editorialteam:\par\vskip\baselineskip
-  \fi
-  \noindent\ignorespaces
-}{%
-}
+  {%
+  }%
+\else
+  \newenvironment{signoff}[2][The Editorial Team]{%
+    \def\Editor##1{%
+      \protected@write\@mainauxout{}{\string\@prefaceeditor{##1}}%
+      \begin{tabular}{@{}l@{}}%
+      ##1%
+      \end{tabular}%
+      \par\vskip\baselineskip\noindent\ignorespaces
+    }%
+    \def\@editorialteam{#1}%
+    \def\@signoffdate{#2}%
+    \par\vskip\baselineskip\noindent
+    \ifx\@signoffdate\@empty
+    \else
+      \emph{\@signoffdate}\par
+      \vskip\baselineskip\noindent
+    \fi
+    \ifx\@editorialteam\@empty
+    \else
+      \@editorialteam:\par\vskip\baselineskip
+    \fi
+    \noindent\ignorespaces
+  }%
+  {%
+  }
+\fi
 %    \end{macrocode}
 %\end{environment}
 %\begin{environment}{authorsignoff}
@@ -4341,6 +4508,7 @@ Keywords:} \ignorespaces}%
 \AtBeginDocument{\@jmlrbegindoc}
 %    \end{macrocode}
 %\begin{macro}{\@jmlrbegindoc}
+%    \begin{macrocode}
 \newcommand*\@jmlrbegindoc{
   \@setimportlabel
   \gdef\@setimportlabel{\let\ref\Xref \let\pageref\Xpageref}%
@@ -4455,13 +4623,13 @@ Keywords:} \ignorespaces}%
 }%
 %    \end{macrocode}
 %\end{macro}
-%\begin{macrocode}{\jmlrimporthook}
+%\begin{macro}{\jmlrimporthook}
 % Hook just before document is imported.
 %\changes{1.09}{2010/12/01}{new}
 %    \begin{macrocode}
 \newcommand*{\jmlrimporthook}{}
 %    \end{macrocode}
-%\end{macrocode}
+%\end{macro}
 %
 %\begin{macro}{\importpubpaper}
 % Import a document that has already been published.
@@ -4879,7 +5047,9 @@ not permitted outside `jmlrpapers' environment}{}%
 %    \begin{macrocode}
 \newcommand*\l@chapterauthor[2]{%
   \ifnum \c@tocdepth >\m@ne
-    \addpenalty{-\@highpenalty}%
+%    \end{macrocode}
+%\changes{1.11}{2011/01/06}{removed penalty}
+%    \begin{macrocode}
     \begingroup
       \parindent \z@ \rightskip \@pnumwidth
       \parfillskip -\@pnumwidth
@@ -5036,6 +5206,35 @@ not permitted outside `jmlrpapers' environment}{}%
 %    \begin{macrocode}
 \jmlrbookcommands
 %    \end{macrocode}
+%
+% In the event that authors have used different versions of
+% \sty{algorithm2e}, define old command names.
+%\changes{1.11}{2011-03-24}{added old algorithm2e commands}
+%    \begin{macrocode}
+\providecommand*{\SetNoLine}{\SetAlgoNoLine}
+\providecommand*{\SetVline}{\SetAlgoVlined}
+\providecommand*{\Setvlineskip}{\SetVlineSkip}
+\providecommand*{\SetLine}{\SetAlgoLined}
+\providecommand*{\dontprintsemicolon}{\DontPrintSemicolon}
+\providecommand*{\printsemicolon}{\PrintSemicolon}
+\providecommand*{\incmargin}{\IncMargin}
+\providecommand*{\decmargin}[1]{\DecMargin{-#1}}
+\providecommand*{\setnlskip}{\SetNlSkip}
+\providecommand*{\Setnlskip}{\SetNlSkip}
+\providecommand*{\setalcapskip}{\SetAlCapSkip}
+\providecommand*{\setalcaphskip}{\SetAlCapHSkip}
+\providecommand*{\nlSty}{\NlSty}
+\providecommand*{\Setnlsty}{\SetNlSty}
+\providecommand*{\linesnumbered}{\LinesNumbered}
+\providecommand*{\linesnotnumbered}{\LinesNotNumbered}
+\providecommand*{\linesnumberedhidden}{\LinesNumberedHidden}
+\providecommand*{\showln}{\ShowLn}
+\providecommand*{\showlnlabel}{\ShowLnLabel}
+\providecommand*{\nocaptionofalgo}{\NoCaptionOfAlgo}
+\providecommand*{\restorecaptionofalgo}{\RestoreCaptionOfAlgo}
+\providecommand*{\restylealgo}{\RestyleAlgo}
+\providecommand*{\Titleofalgo}{\TitleOfAlgo}
+%    \end{macrocode}
 %\iffalse
 %    \begin{macrocode}
 %</jmlrbook.cls>
-- 
cgit v1.2.3

