summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/jmlr/jmlr.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/jmlr/jmlr.dtx')
-rw-r--r--Master/texmf-dist/source/latex/jmlr/jmlr.dtx415
1 files changed, 279 insertions, 136 deletions
diff --git a/Master/texmf-dist/source/latex/jmlr/jmlr.dtx b/Master/texmf-dist/source/latex/jmlr/jmlr.dtx
index 14215e52a9f..3471406f92a 100644
--- a/Master/texmf-dist/source/latex/jmlr/jmlr.dtx
+++ b/Master/texmf-dist/source/latex/jmlr/jmlr.dtx
@@ -1,14 +1,14 @@
%\iffalse
% jmlr.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -section "chapter"
-% -doc "jmlr-manual.tex"
% -author "Nicola Talbot"
+% -doc "jmlr-manual.tex"
+% -section "chapter"
% -src "jmlrutils.sty\Z=>jmlrutils.sty"
% -src "jmlr.cls\Z=>jmlr.cls"
-% -src "jmlrbook.cls\Z=>jmlrbook.cls"
+% -src "(jmlrbook.*\.cls)\Z=>\1"
% jmlr
-% Created on 2020/9/21 16:27
+% Created on 2022/1/29 14:54
%\fi
%\iffalse
%<*package>
@@ -31,11 +31,11 @@
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
-% Copyright (C) 2020 Nicola Talbot, all rights reserved.
+% Copyright (C) 2022 Nicola Talbot, all rights reserved.
% \fi
% \iffalse
%<*driver>
-\documentclass[report]{nlctdoc}
+\documentclass[report,widecs]{nlctdoc}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
@@ -45,14 +45,13 @@
bookmarks,
hyperindex=false,
pdfauthor={Nicola L.C. Talbot},
- pdftitle={jmlr: Classes for the Journal of Machine
-Learning Research (JMLR) and Proceedings of Machine Learning
+ pdftitle={Articles for Proceedings of Machine Learning
Research (PMLR)},
- pdfkeywords={LaTeX,jmlr}]{hyperref}
+ pdfkeywords={pmlr,jmlr wcp,jmlr}]{hyperref}
\doxitem{Option}{option}{package options}
-\CheckSum{5265}
+\CheckSum{5415}
\newcommand*{\appopt}[1]{\texttt{-{}-#1}}
@@ -64,47 +63,39 @@ Research (PMLR)},
%\MakeShortVerb{"}
%\DeleteShortVerb{\|}
%
-% \title{\LaTeXe\ Classes for the Journal of Machine
-%Learning Research (JMLR) and
-%Proceedings of Machine Learning Research (PMLR)}
+% \title{Articles for Proceedings of Machine Learning Research (PMLR)
+%formerly Journal of Machine Learning Research Workshop and
+%Conference Proceedings (JMLR W\&CP)}
% \author{Nicola L. C. Talbot\\[10pt]
%\url{http://www.dickimaw-books.com/}}
%
-% \date{2020-09-21 (version 1.28)}
+% \date{2022-01-29 (version 1.29)}
% \maketitle
%\tableofcontents
%
%\chapter{Introduction}
%
-%The \clsfmt{jmlr} class is for articles that need to be formatted
-%according to the Journal of Machine Learning Research style. This
-%class is based on the \sty{jmlr2e} and \sty{jmlrwcp2e} packages
-%but has been adapted to enable it to work better with the
-%\cls{combine} class to collate the articles into a book.
-%\sectionref{sec:jmlr} describes how to use the \clsfmt{jmlr} class.
-%Note that JMLR W\&CP (JMLR: Workshop and Conference Proceedings)
-%has been renamed PMLR (Proceedings of Machine Learning
-%Research). Articles for new proceedings should use the \clsopt{pmlr}
-%class option.
-%
-%The \clsfmt{jmlrbook} class is for combining articles that use the
-%\clsfmt{jmlr} class into a
-%book. The \clsfmt{jmlrbook} class uses \cls{combine} and \sty{hyperref}, which are
-%troublesome enough on their own but together are quite fragile. The
-%\clsfmt{jmlrbook} class redefines some internals to get
-%\clsfmt{combine} and \clsfmt{hyperref} to work together but some
-%packages (e.g.\ \sty{subfig} and \sty{pdfpages}) are likely to mess
-%everything up and cause errors. This is why the guidelines to
-%authors are fairly stringent and why the \clsfmt{jmlr} class will give an
-%error message if certain packages are loaded.\footnote{Currently
-%\clsfmt{jmlr} will check if \sty{subfig}, \sty{pdfpages},
-%\sty{geometry}, \sty{psfig}, \sty{epsfig}, \sty{theorem},
-%\sty{tabularx}, \sty{amsthm} and \sty{ntheorem} are loaded and will throw an error.
-%If other packages are found to be a problem, they will be added to
-%the list.} The \clsfmt{jmlrbook} class works best with PDF\LaTeX\ so
-%authors should ensure that their articles can compile with
-%PDF\LaTeX. \sectionref{sec:jmlrbook} describes how to use the
-%\clsfmt{jmlrbook} class.
+%The \clsfmt{jmlr} class was designed primarily for the Journal of
+%Machine Learning Research Workshop and Conference Proceedings (JMLR
+%W\&CP) based on the \sty{jmlrwcp2e} package to make it easier for
+%production editors to combine articles into a single book.
+%
+%The \clsopt{nowcp} option implements the \sty{jmlr2e} style to make it
+%easier to include reprints from JMLR articles. If you are an author
+%wanting to submit an article to the JMLR, please see their
+%guidelines and use their official package.
+%
+%Since the creation of this class, the JMLR W\&CP has changed its name to
+%the Proceedings of Machine Learning Research (PMLR). Articles
+%submitted to the PMLR should use the \clsopt{pmlr} option. Reprints of
+%old JMLR W\&CP articles should use the \clsopt{wcp} option.
+%
+%The \clsfmt{jmlrbook} class was provided to combine articles that
+%use the \clsfmt{jmlr} class into a book. The \cls{combine} class
+%internally used by \clsfmt{jmlrbook} has stopped work following
+%changes to the \LaTeX\ kernel in 2020. This means that the
+%\clsfmt{jmlrbook} class is now deprecated. This only affects
+%production editors not article authors.
%
%As from v1.24, some non-class dependent commands and environments
%have been moved to a new package \sty{jmlrutils} (see
@@ -132,26 +123,6 @@ Research (PMLR)},
%\documentclass{jmlr}
%\end{verbatim}
%
-%There is a Java application called \app{makejmlrbookgui} that can
-%compile all the individual papers from the book and generate the
-%bib file for the proceedings (according to the PMLR specifications). It can also
-%create a grey nonhyperlinked PDF/X compliant print version of the
-%book. The application can be downloaded from
-%\url{http://www.dickimaw-books.com/software/makejmlrbookgui/} where
-%there is also a
-%\href{http://www.dickimaw-books.com/software/makejmlrbookgui/manual/troubleshooting.html}{troubleshooting
-%section}.
-%
-%The Perl script \app{makejmlrbook} is now deprecated and will be
-%removed in future releases. It has been superseded by
-%\app{makejmlrbookgui}. Note that PMLR (formerly JMLR W\&CP) has new
-%format guidelines that are followed by new versions of
-%\app{makejmlrbookgui} but not by the Perl script \app{makejmlrbook},
-%so that script is no longer documented or supported.
-%The PMLR submission requirements for production editors are now much simpler
-%and can be followed without the assistance of \cls{jmlrbook} or
-%\app{makejmlrbookgui}.
-%
%\section{Required Packages}
%
%The \clsfmt{jmlr} class is based on the \cls{article} class and loads
@@ -162,28 +133,22 @@ Research (PMLR)},
%Note that unlike the \sty{jmlr2e} and \sty{jmlrwcp2e} packages,
%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}, \sty{setspace} and \sty{fink}.
-%
-%The \app{makejmlrbookgui} application requires Java and \TeX.
-%(GhostScript is also required for the print-ready version of the
-%book.)
-%
%\chapter{Guidelines for Article Authors}
%\label{sec:jmlr}
%
-%Article authors should use the \clsfmt{jmlr} class. This class
-%comes with example files \texttt{jmlr-sample.tex} and
-%\texttt{jmlrwcp-sample.tex}, which can be used as templates.
+%Article authors should use the \clsfmt{jmlr} class with the
+%\clsopt{pmlr} option. This class
+%comes with the example file \texttt{pmlr-sample.tex}, which can be used as
+%a template.
%
%The following class options are available:
%\begin{description}
-%\item[\clsopt{nowcp}]The article is for the Journal of Machine
-%Learning Research (default).
%\item[\clsopt{pmlr}] The article is for the Proceedings of Machine
-%Learning Research (PMLR).
+%Learning Research (PMLR).
%\item[\clsopt{wcp}] The article is for JMLR Workshop and Conference
%Proceedings (JMLR W\&CP).
+%\item[\clsopt{nowcp}] The article is for the Journal of Machine
+%Learning Research (default).
%
%\item[\clsopt{twocolumn}] Use two-column style. The title and author
%information will span both columns through the use of the optional
@@ -202,6 +167,12 @@ Research (PMLR)},
%\item[{\clsopt[bottom]{tablecaption}}] in a \env{table} environment,
%\ics{floatconts} puts the caption at the bottom.
%
+%\item[\clsopt{cleveref}] This option is passed to \sty{jmlrutils}
+%(see \sectionref{sec:jmlrutils}).
+%
+%\item[\clsopt{nocleveref}] This option is passed to \sty{jmlrutils}
+%(see \sectionref{sec:jmlrutils}).
+%
%\end{description}
%
%\section{Title Information}
@@ -317,6 +288,12 @@ Research (PMLR)},
%institute}}}
%\end{verbatim}
%
+%\begin{important}
+%Ensure no space occurs before \cs{nametag} otherwise the surname
+%will be interpreted as an empty string because the space is used to
+%separate the forenames from the surname.
+%\end{important}
+%
%\begin{definition}[\DescribeMacro{\Email}]
%\cs{Email}\marg{author's email}
%\end{definition}
@@ -516,6 +493,18 @@ Research (PMLR)},
%environments listed in \sectionref{sec:theorems}. (Default.)
%\item[\pkgopt{notheorems}] Don't define the theorem commands and
%environments.
+%
+%\item[\pkgopt{cleveref}] Loads \sty{aliascnt} and \sty{cleveref}
+%and defines the theorem environments with aliased counters. Note
+%that this option is largely redundant with \pkgopt{notheorems}. When
+%\sty{jmlrutils} is loaded implicitly by \cls{jmlr}, this option will
+%also ensure that \sty{hyperref} is loaded before \sty{cleveref}. If
+%\sty{jmlrutils} is loaded without \cls{jmlr} then \sty{hyperref}
+%won't be loaded unless \ics{jmlrprehyperref} is defined.
+%
+%\item[\pkgopt{nocleveref}] Don't load \sty{aliascnt} and
+%\sty{cleveref} (default).
+%
%\item[\pkgopt{subfloats}] Define the sub-figure and sub-table
%commands listed in \sectionref{sec:subfloats}. (Default.)
%\item[\pkgopt{nosubfloats}] Don't define the sub-figure and
@@ -639,6 +628,20 @@ Research (PMLR)},
%class, you can prevent \styfmt{jmlrutils} from defining these
%commands with the \pkgopt{nosubfloats} package option.
%
+%Sub-float captions that are wider than the corresponding sub-float content
+%are placed inside a \cs{parbox} set to the width of the sub-float
+%content. This allows long captions to line wrap in a mini-paragraph
+%below the sub-float. However, if the sub-float is very narrow, this
+%can lead to badly-broken sub-captions that generate overfull or
+%underfull hbox warnings. You can specify a minimum width for
+%sub-float captions by setting the following length:
+%\begin{definition}[\DescribeMacro{\jmlrminsubcaptionwidth}]
+%\cs{jmlrminsubcaptionwidth}
+%\end{definition}
+%The default value is 0pt. The value should be set with
+%\cs{setlength}. The assignment can be localised by placing it within
+%a group or environment.
+%
%\begin{definition}[\DescribeMacro{\subfigure}]
%\cs{subfigure}\oarg{title}\oarg{valign}\marg{contents}
%\end{definition}
@@ -1104,11 +1107,16 @@ Research (PMLR)},
%\section{Color vs Grayscale}
%\label{sec:color}
%
-%It's helpful if authors supply grayscale versions of their
-%articles in the event that the article is to be incorporated into
-%a black and white printed book. With external PDF, PNG or JPG
-%graphic files, you just need to supply a grayscale version of the
-%file. For example, if the file is called \texttt{myimage.png},
+%If the proceedings are to be incorporated into a black and white
+%printed book, it can be helpful if authors supply grayscale versions
+%of their image files. This section can be ignored if your article
+%will only be available online.
+%
+%With external PDF, PNG or JPG graphic files, the grayscale version
+%should be named with \texttt{-gray} added to the basename (before
+%the image file extension).
+%
+%For example, if the file is called \texttt{myimage.png},
%then the gray version should be \texttt{myimage-gray.png} or
%\texttt{myimage-gray.pdf} or \texttt{myimage-gray.jpg}. You don't
%need to modify your code. The \clsfmt{jmlr} class checks for
@@ -1178,25 +1186,19 @@ Research (PMLR)},
%\chapter{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
-%files are provided: \texttt{paper1/paper1.tex},
-%\texttt{paper2/paper2.tex}, \texttt{paper3/paper3.tex},
-%\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.
-%
-%Before you compile the book, make sure that all the articles
-%compile as stand-alone documents (and run Bib\TeX\ where
-%necessary). You can use the \app{makejmlrbookgui} application to compile
-%the book. See
-%\url{http://www.dickimaw-books.com/software/makejmlrbookgui/} for details.
+%The \clsfmt{jmlrbook} class is now obsolete as it has stopped
+%working following changes to the \LaTeX\ kernel in 2020. The class
+%is described here for archival purposes.
+%
+%To prepare articles for PMLR, you will need to manually set the
+%first page number using:
+%\begin{definition}[\DescribeMacro\firstpageno]
+%\cs{firstpageno}\marg{n}
+%\end{definition}
+%
+%Please follow the
+%\href{https://proceedings.mlr.press/spec.html}{PMLR specifications}.
+%
%
%\section{\clsfmt{jmlrbook} Class Options}
%\begin{description}
@@ -1731,12 +1733,6 @@ Research (PMLR)},
%\clsfmt{jmlrbook} won't find the graphics if the imported articles
%aren't in the same directory as the book.
%
-%The \app{makejmlrbookgui} application provides some diagnostic
-%tools, which can help detect some common problems. It's manual also
-%has a
-%\href{http://www.dickimaw-books.com/software/makejmlrbookgui/manual/troubleshooting.html}{troubleshooting
-%section}.
-%
%\StopEventually{\clearpage\phantomsection
% \PrintChanges
% \PrintIndex
@@ -1754,7 +1750,7 @@ Research (PMLR)},
%Non-class dependent code. This package is automatically loaded by
%\cls{jmlr} but may be used with other classes.
% \begin{macrocode}
-\ProvidesPackage{jmlrutils}[2020/09/21 v1.28 (NLCT)]
+\ProvidesPackage{jmlrutils}[2022/01/29 v1.29 (NLCT)]
% \end{macrocode}
% Package options:
%\begin{macro}{\ifjmlrutilsmaths}
@@ -1768,6 +1764,11 @@ Research (PMLR)},
\DeclareOption{maths}{\jmlrutilsmathstrue}
\DeclareOption{nomaths}{\jmlrutilsmathsfalse}
% \end{macrocode}
+% Provide US synonyms
+% \begin{macrocode}
+\DeclareOption{math}{\jmlrutilsmathstrue}
+\DeclareOption{nomath}{\jmlrutilsmathsfalse}
+% \end{macrocode}
%
%\begin{macro}{\ifjmlrutilstheorems}
%Determine if the theorem environments should be provided.
@@ -1781,6 +1782,19 @@ Research (PMLR)},
\DeclareOption{notheorems}{\jmlrutilstheoremsfalse}
% \end{macrocode}
%
+%\begin{macro}{\ifjmlrcleveref}
+%\changes{1.29}{2022-01-29}{new}
+%Determine whether or not to load \sty{cleveref}.
+% \begin{macrocode}
+\newif\ifjmlrcleveref
+\jmlrclevereffalse
+% \end{macrocode}
+%\end{macro}
+% \begin{macrocode}
+\DeclareOption{cleveref}{\jmlrclevereftrue}
+\DeclareOption{nocleveref}{\jmlrclevereffalse}
+% \end{macrocode}
+%
%\begin{macro}{\ifjmlrutilssubfloats}
%Determine if the sub-floats should be provided.
% \begin{macrocode}
@@ -1806,6 +1820,26 @@ Research (PMLR)},
\RequirePackage{amsmath}
\fi
% \end{macrocode}
+%Check if \sty{cleveref} is required. If it is and \sty{hyperref} is
+%also required (which it is if \styfmt{jmlrutils} is being loaded by
+%\cls{jmlr}) then \sty{hyperref} needs to be loaded before
+%\sty{cleveref}.
+% \begin{macrocode}
+\ifjmlrcleveref
+ \ifdef\jmlrprehyperref
+ {
+ \jmlrprehyperref
+ \@ifundefined{@pre@hyperref}{}{\@pre@hyperref\undef\@pre@hyperref}
+ \RequirePackage{hyperref}
+ \let\jmlrprehyperref\relax
+ \@ifundefined{@post@hyperref}{}{\@post@hyperref\undef\@post@hyperref}
+ }
+ {}
+ \RequirePackage{aliascnt}
+ \RequirePackage{cleveref}
+\fi
+% \end{macrocode}
+%
% The conditional \cs{iftablecaptiontop} will already have been
% defined by the \cls{jmlr} class, so only needs to be defined
% if not already done.
@@ -2017,20 +2051,31 @@ Research (PMLR)},
%the \sty{algorithm2e} package will have to be explicitly loaded.
%\begin{macro}{\algocfconts}
%\changes{1.09}{2010/12/01}{new}
+%\changes{1.29}{2022-01-29}{remove use of algorithm2e internal commands}
%Command used by \cs{floatconts} to display the caption contents.
% \begin{macrocode}
\newcommand{\algocfconts}[3]{%
- \@algocf@pre@ruled
- #2\label{#1}\kern2pt\hrule height.8pt depth0pt\kern2pt%
- #3\@algocf@pre@ruled
+ \jmlralgorule\par\smallskip
+ #2\label{#1}% caption and label
+ \jmlralgorule\par\smallskip
+ #3% algorithm content
+ \jmlralgorule
}
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\jmlralgorule}
+%\changes{1.29}{2022-01-29}{new}
+% \begin{macrocode}
+\newcommand{\jmlralgorule}{\kern2pt\hrule height.8pt depth0pt\kern2pt}
+% \end{macrocode}
+%\end{macro}
+%
% The \env{algorithm} environment should float like a figure or table.
% It should use the same counter as the \env{algorithm2e} environment.
%\changes{1.09}{2010/12/01}{caption set up so that it doesn't use a
%box}
+%\changes{1.29}{2022-01-29}{replaced \cs{hsize} with \cs{linewidth}}
% \begin{macrocode}
\newenvironment{algorithm}[1][htbp]%
{%
@@ -2041,7 +2086,7 @@ Research (PMLR)},
\begin{algocf}[#1]%
\renewcommand\@makecaption[2]{%
\hskip\AlCapHSkip
- \parbox[t]{\hsize}{\algocf@captiontext{##1}{##2}}%
+ \parbox[t]{\dimexpr\linewidth-\AlCapHSkip}{\algocf@captiontext{##1}{##2}}%
}%
}%
{%
@@ -2211,6 +2256,13 @@ Research (PMLR)},
\newsavebox\@subfloatcontsbox
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\jmlrminsubcaptionwidth}
+%Minimum sub-caption width.
+%\changes{1.29}{2022-01-29}{new}
+% \begin{macrocode}
+ \newlength\jmlrminsubcaptionwidth
+% \end{macrocode}
+%\end{macro}
%\begin{macro}{\subfigure}
% \begin{macrocode}
\newcommand*{\subfigure}[1][]{%
@@ -2221,6 +2273,7 @@ Research (PMLR)},
% \end{macrocode}
%\changes{1.09}{2010/12/01}{Added check to determine whether the
%subfigure caption is wider than the subfigure}
+%\changes{1.29}{2022-01-29}{added \cs{jmlrminsubcaptionwidth} comparison}
% \begin{macrocode}
\newcommand*{\@subfigure}[2][b]{%
\advance\c@figure by 1\relax
@@ -2236,8 +2289,18 @@ Research (PMLR)},
\ifdim\@tempdimb>\@tempdima
\settowidth\@tempdimb{\subfigurelabel{\thesubfigure}\space}%
\addtolength{\@tempdima}{-\@tempdimb}%
- \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space
- \parbox[t]{\@tempdima}{\@subfigcap}}%
+ \ifdim\@tempdima>\jmlrminsubcaptionwidth
+ \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space
+ \parbox[t]{\@tempdima}{\@subfigcap}}%
+ \else
+ \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space
+ \parbox[t]{\jmlrminsubcaptionwidth}{\@subfigcap}}%
+ \fi
+ \else
+ \ifdim\@tempdimb<\jmlrminsubcaptionwidth
+ \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space
+ \parbox[t]{\jmlrminsubcaptionwidth}{\@subfigcap}}%
+ \fi
\fi
\begin{tabular}[#1]{@{}c@{}}%
\usebox\@subfloatcontsbox\\\usebox\@subfloatcapbox
@@ -2354,6 +2417,7 @@ Research (PMLR)},
% \end{macrocode}
%\changes{1.09}{2010/12/01}{Added check to determine whether the
%subtable caption is wider than the subtable}
+%\changes{1.29}{2022-01-29}{added \cs{jmlrminsubcaptionwidth} comparison}
% \begin{macrocode}
\newcommand*{\@subtable}[2][t]{%
\refstepcounter{subtable}%
@@ -2368,8 +2432,18 @@ Research (PMLR)},
\ifdim\@tempdimb>\@tempdima
\settowidth\@tempdimb{\subtablelabel{\thesubtable}\space}%
\addtolength{\@tempdima}{-\@tempdimb}%
- \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space
- \parbox[t]{\@tempdima}{\@subtabcap}}%
+ \ifdim\@tempdima>\jmlrminsubcaptionwidth
+ \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space
+ \parbox[t]{\@tempdima}{\@subtabcap}}%
+ \else
+ \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space
+ \parbox[t]{\jmlrminsubcaptionwidth}{\@subtabcap}}%
+ \fi
+ \else
+ \ifdim\@tempdimb<\jmlrminsubcaptionwidth
+ \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space
+ \parbox[t]{\jmlrminsubcaptionwidth}{\@subtabcap}}%
+ \fi
\fi
\begin{tabular}[#1]{@{}c@{}}%
\usebox\@subfloatcapbox\\\usebox\@subfloatcontsbox
@@ -2699,37 +2773,86 @@ Research (PMLR)},
%\end{environment}
%\begin{environment}{lemma}
% \begin{macrocode}
- \newtheorem{lemma}[theorem]{Lemma}
+ \ifjmlrcleveref
+ \newaliascnt{lemma}{theorem}
+ \newtheorem{lemma}[theorem]{Lemma}
+ \aliascntresetthe{lemma}
+ \crefname{lemma}{lemma}{lemmas}
+ \else
+ \newtheorem{lemma}[theorem]{Lemma}
+ \fi
% \end{macrocode}
%\end{environment}
%\begin{environment}{proposition}
% \begin{macrocode}
- \newtheorem{proposition}[theorem]{Proposition}
+ \ifjmlrcleveref
+ \newaliascnt{proposition}{theorem}
+ \newtheorem{proposition}[proposition]{Proposition}
+ \aliascntresetthe{proposition}
+ \crefname{proposition}{proposition}{propositions}
+ \else
+ \newtheorem{proposition}[theorem]{Proposition}
+ \fi
% \end{macrocode}
%\end{environment}
%\begin{environment}{remark}
% \begin{macrocode}
- \newtheorem{remark}[theorem]{Remark}
+ \ifjmlrcleveref
+ \newaliascnt{remark}{theorem}
+ \newtheorem{remark}[remark]{Remark}
+ \aliascntresetthe{remark}
+ \crefname{remark}{remark}{remarks}
+ \else
+ \newtheorem{remark}[theorem]{Remark}
+ \fi
% \end{macrocode}
%\end{environment}
%\begin{environment}{corollary}
% \begin{macrocode}
- \newtheorem{corollary}[theorem]{Corollary}
+ \ifjmlrcleveref
+ \newaliascnt{corollary}{theorem}
+ \newtheorem{corollary}[corollary]{Corollary}
+ \aliascntresetthe{corollary}
+ \crefname{corollary}{corollary}{corollaries}
+ \else
+ \newtheorem{corollary}[theorem]{Corollary}
+ \fi
% \end{macrocode}
%\end{environment}
%\begin{environment}{definition}
% \begin{macrocode}
- \newtheorem{definition}[theorem]{Definition}
+ \ifjmlrcleveref
+ \newaliascnt{definition}{theorem}
+ \newtheorem{definition}[definition]{Definition}
+ \aliascntresetthe{definition}
+ \crefname{definition}{definition}{definitions}
+ \else
+ \newtheorem{definition}[theorem]{Definition}
+ \fi
% \end{macrocode}
%\end{environment}
%\begin{environment}{conjecture}
% \begin{macrocode}
- \newtheorem{conjecture}[theorem]{Conjecture}
+ \ifjmlrcleveref
+ \newaliascnt{conjecture}{theorem}
+ \newtheorem{conjecture}[conjecture]{Conjecture}
+ \aliascntresetthe{conjecture}
+ \crefname{conjecture}{conjecture}{conjectures}
+ \else
+ \newtheorem{conjecture}[theorem]{Conjecture}
+ \fi
% \end{macrocode}
%\end{environment}
%\begin{environment}{axiom}
% \begin{macrocode}
- \newtheorem{axiom}[theorem]{Axiom}
+ \ifjmlrcleveref
+ \newaliascnt{axiom}{theorem}
+ \newtheorem{axiom}[axiom]{axiom}
+ \aliascntresetthe{axiom}
+ \crefname{axiom}{axiom}{axioms}
+ \else
+ \newtheorem{axiom}[theorem]{Axiom}
+ \fi
% \end{macrocode}
%\end{environment}
% End of theorem definitions.
@@ -2754,7 +2877,7 @@ Research (PMLR)},
% Declare class and required TeX format:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{jmlr}[2020/09/21 v1.28 (NLCT) Journal of Machine Learning Research]
+\ProvidesClass{jmlr}[2022/01/29 v1.29 (NLCT) Journal of Machine Learning Research]
% \end{macrocode}
%\changes{1.10}{2011-01-05}{hyperref now loaded by jmlr instead of
%jmlrbook}
@@ -2802,13 +2925,13 @@ Research (PMLR)},
%\begin{option}{draft}
%\changes{1.18}{2013-10-17}{new}
% \begin{macrocode}
-\DeclareOptionX{draft}{\setlength\overfullrule{5pt}}
+\DeclareOptionX{draft}{\PassOptionsToClass{\CurrentOption}{article}}
% \end{macrocode}
%\end{option}
%\begin{option}{final}
%\changes{1.18}{2013-10-17}{new}
% \begin{macrocode}
-\DeclareOptionX{final}{\setlength\overfullrule{0pt}}
+\DeclareOptionX{final}{\PassOptionsToClass{\CurrentOption}{article}}
% \end{macrocode}
%\end{option}
% Can't load \sty{jmlrutils} here but need the \cs{iftablecaptiontop}
@@ -2941,6 +3064,11 @@ Research (PMLR)},
% \begin{macrocode}
\DeclareOptionX{pmlr}{\jmlrpmlr}
% \end{macrocode}
+%Pass cleveref option to jmlrutils
+%\changes{1.29}{2022-01-29}{added cleveref option}
+% \begin{macrocode}
+\DeclareOptionX{cleveref}{\PassOptionsToPackage{cleveref}{jmlrutils}}
+% \end{macrocode}
%\begin{option}{oneside}
%\changes{1.22}{2015/04/11}{new}
% \begin{macrocode}
@@ -3020,6 +3148,12 @@ Research (PMLR)},
% \begin{macrocode}
\AtEndDocument{\@jmlrenddoc}
% \end{macrocode}
+%\changes{1.29}{2022-01-29}{added \sty{placeins}}
+% Need \sty{placeins} to add float barrier at the end of the
+% article.
+% \begin{macrocode}
+\RequirePackage{placeins}
+% \end{macrocode}
% Required packages:
% \begin{macrocode}
\RequirePackage{amsmath}
@@ -3771,8 +3905,10 @@ Keywords:} \ignorespaces}%
% Label end page.
%\begin{macro}{\@jmlrenddoc}
% Label end page
+%\changes{1.29}{2022-01-29}{added float barrier}
% \begin{macrocode}
\newcommand*{\@jmlrenddoc}{%
+ \FloatBarrier
\phantomsection
\protected@edef\@currentlabelname{end of \@shorttitle}%
\label{jmlrend}\null
@@ -4688,6 +4824,14 @@ Keywords:} \ignorespaces}%
%\end{macro}
% Check for packages that are known to cause problems when
% combining articles into a book.
+% Since \cls{jmlrbook} is now deprecated some errors can be
+% converted to warnings, which are suppressed by default.
+%\begin{macro}{\@jmlr@check@warn}
+%\changes{1.29}{2022-01-29}{new}
+% \begin{macrocode}
+\newcommand*{\@jmlr@check@warn}[1]{}
+% \end{macrocode}
+%\end{macro}
%\begin{macro}{\@jmlr@check@packages}
% \begin{macrocode}
\newcommand*{\@jmlr@check@packages}{%
@@ -4702,13 +4846,13 @@ Keywords:} \ignorespaces}%
Please use \string\includegraphics\space to include images
instead}{}}{}%
\@ifpackageloaded{subfig}{%
- \ClassError{jmlr}{Package `subfig' detected.\MessageBreak
+ \@jmlr@check@warn{Package `subfig' detected.\MessageBreak
This will cause a conflict if the article is incorporated
\MessageBreak
into a book using jmlbook.cls.
\MessageBreak
Please use \string\subfigure\space and
- \string\subtable\space instead}{}}{}%
+ \string\subtable\space instead}}{}%
\@ifpackageloaded{theorem}{%
\ClassError{jmlr}{Package `theorem' detected.\MessageBreak
This can cause a conflict with other packages used by jmlr}{}}{}%
@@ -4718,10 +4862,12 @@ Keywords:} \ignorespaces}%
\@ifpackageloaded{amsthm}{%
\ClassError{jmlr}{Package `amsthm' detected.\MessageBreak
This package conflicts with the jmlr class}{}}{}%
- \@ifpackageloaded{pdfpages}{Package `pdfpages' detected.\MessageBreak
- This can cause a problem for jmlrbook}{}%
- \@ifpackageloaded{geometry}{Package `geometry' detected.\MessageBreak
- This can cause a problem for jmlrbook}{}%
+ \@ifpackageloaded{pdfpages}%
+ {\@jmlr@check@warn{Package `pdfpages' detected.\MessageBreak
+ This can cause a problem for jmlrbook}}{}%
+ \@ifpackageloaded{geometry}%
+ {\@jmlr@check@warn{Package `geometry' detected.\MessageBreak
+ This can cause a problem for jmlrbook}}{}%
\@ifpackageloaded{tabularx}{%
\ClassError{jmlr}{Package `tabularx' detected.\MessageBreak
This will break footnote links}{}}{}%
@@ -4740,8 +4886,6 @@ Keywords:} \ignorespaces}%
%\end{macro}
%\begin{macro}{\jmlrSuppressPackageChecks}
% Don't check for potentially problematic packages.
-% (If I find this in any paper sent to me for inclusion in a book,
-% it will annoy me.)
% \begin{macrocode}
\newcommand*{\jmlrSuppressPackageChecks}{%
\let\@jmlr@check@packages\relax
@@ -4889,7 +5033,7 @@ Keywords:} \ignorespaces}%
% \end{macrocode}
% Declare class:
% \begin{macrocode}
-\ProvidesClass{jmlrbook}[2020/09/21 v1.28 (NLCT) JMLR Book Style]
+\ProvidesClass{jmlrbook}[2022/01/29 v1.29 (NLCT) JMLR Book Style]
% \end{macrocode}
% Need \sty{xkeyval} package to have key=value class options
% \begin{macrocode}
@@ -4929,8 +5073,7 @@ Keywords:} \ignorespaces}%
% \end{macrocode}
% \sty{fink} version too old.
% \begin{macrocode}
- \ClassWarning{jmlrbook}{Install `currfile' package or update
- `fink' package}
+ \ClassWarning{jmlrbook}{`currfile' package required}
}
}
% \end{macrocode}