From 569c59914fed1f743994ef0b27bd15402aa6f603 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 1 Aug 2017 21:39:04 +0000 Subject: jmlr (1aug17) git-svn-id: svn://tug.org/texlive/trunk@44935 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/jmlr/CHANGES | 6 + Master/texmf-dist/doc/latex/jmlr/INSTALL | 9 +- Master/texmf-dist/doc/latex/jmlr/README | 22 +- Master/texmf-dist/doc/latex/jmlr/jmlr.pdf | Bin 600434 -> 615617 bytes .../latex/jmlr/sample-books/jmlrbook-sample.pdf | Bin 319028 -> 319039 bytes .../latex/jmlr/sample-books/proceedings-sample.pdf | Bin 419207 -> 419217 bytes .../doc/latex/jmlr/sample-papers/jmlr-sample.pdf | Bin 308981 -> 308987 bytes .../latex/jmlr/sample-papers/jmlrwcp-sample.pdf | Bin 297479 -> 297750 bytes .../latex/jmlr/sample-papers/jmlrwcp-sample.tex | 12 +- Master/texmf-dist/source/latex/jmlr/jmlr.dtx | 3470 +++++++++++--------- Master/texmf-dist/source/latex/jmlr/jmlr.ins | 10 +- Master/texmf-dist/tex/latex/jmlr/jmlr.cls | 439 +-- Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls | 6 +- Master/texmf-dist/tex/latex/jmlr/jmlrutils.sty | 495 +++ 14 files changed, 2441 insertions(+), 2028 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/jmlr/jmlrutils.sty (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/jmlr/CHANGES b/Master/texmf-dist/doc/latex/jmlr/CHANGES index 724745bfcc0..27268561aba 100644 --- a/Master/texmf-dist/doc/latex/jmlr/CHANGES +++ b/Master/texmf-dist/doc/latex/jmlr/CHANGES @@ -1,3 +1,9 @@ +v1.24: + + * moved non-class related code into new package jmlrutils.sty + + * fixed bug in \includeteximage + v1.23: * added pmlr class option diff --git a/Master/texmf-dist/doc/latex/jmlr/INSTALL b/Master/texmf-dist/doc/latex/jmlr/INSTALL index 805c257c5b3..0d207a9b8a0 100644 --- a/Master/texmf-dist/doc/latex/jmlr/INSTALL +++ b/Master/texmf-dist/doc/latex/jmlr/INSTALL @@ -31,10 +31,6 @@ Example (on UNIX like systems): unzip jmlr.tds.zip -d ~/texmf/ texhash ~/texmf/ -Move the makejmlrbook Perl script from scripts/jmlr/ to somewhere -on your path. If you are using Windows, you will also need to -move makejmlrbook.bat to the same location. - INSTALLING FROM DTX AND INS =========================== @@ -59,11 +55,8 @@ TEXMF/tex/latex/jmlr Move the documentation to TEXMF/doc/latex/jmlr/ -Move jmlr.cls and jmlrbook.cls to TEXMF/tex/latex/jmlr/ +Move jmlrutils.sty, jmlr.cls and jmlrbook.cls to TEXMF/tex/latex/jmlr/ *Remember to refresh TeX's database* -Move the makejmlrbook Perl script to somewhere on your path. If -you are using Windows, you will also need to move makejmlrbook.bat -to the same location. diff --git a/Master/texmf-dist/doc/latex/jmlr/README b/Master/texmf-dist/doc/latex/jmlr/README index 2a73bcc5443..92ce503fcfd 100644 --- a/Master/texmf-dist/doc/latex/jmlr/README +++ b/Master/texmf-dist/doc/latex/jmlr/README @@ -1,6 +1,6 @@ -LaTeX Class : jmlr bundle v1.23 +LaTeX Class : jmlr bundle v1.24 -Last Modified : 2017-03-09 +Last Modified : 2017-08-01 Author : Nicola L. C. Talbot @@ -8,20 +8,27 @@ This bundle provides: * jmlr class * jmlrbook class + * jmlrutils package -The jmlr class is a LaTeX2e class for articles for the Journal of -Machine Learning Research (JMLR) or the JMLR Workshop and Conference +The jmlr class is a LaTeX class for articles for the Journal of +Machine Learning Research (JMLR) or the Proceedings of Machine +Learning Research (PMLR) formerly JMLR Workshop and Conference Proceedings (JMLR W&CP). It is designed as a replacement for both jmlr2e.sty and jmlrwcp2e.sty. -The jmlrbook class is a LaTeX2e class that can be used to combine +The jmlrutils package is automatically loaded by the jmlr class, but +may be used with other classes. (You may need to additionally load +graphicx and algorithm2e, which jmlr.cls does automatically.) + +The jmlrbook class is a LaTeX class that can be used to combine articles written using the jmlr class into a book. The jmlrbook class uses the combine class and the hyperref package to produce either a colour hyperlinked book for on-line viewing or a greyscale nonhyperlinked book for printing. Production editors can use the makejmlrbookgui application (http://www.dickimaw-books.com/software/makejmlrbookgui/) to -generate the proceedings. +generate the proceedings. The makejmlrbook Perl script is deprecated +and may be removed in future releases. INSTALLATION @@ -31,6 +38,7 @@ REQUIREMENTS jmlr class requirements: + jmlrutils xcolor amsmath amssymb @@ -60,7 +68,7 @@ for the details of that license. RELATED SOFTWARE: -http://www.dickimaw-books.com/apps/makejmlrbookgui/ +http://www.dickimaw-books.com/software/makejmlrbookgui/ Author's home page: http://www.dickimaw-books.com/ diff --git a/Master/texmf-dist/doc/latex/jmlr/jmlr.pdf b/Master/texmf-dist/doc/latex/jmlr/jmlr.pdf index 54d062c23fe..6a75b8d526e 100644 Binary files a/Master/texmf-dist/doc/latex/jmlr/jmlr.pdf and b/Master/texmf-dist/doc/latex/jmlr/jmlr.pdf differ diff --git a/Master/texmf-dist/doc/latex/jmlr/sample-books/jmlrbook-sample.pdf b/Master/texmf-dist/doc/latex/jmlr/sample-books/jmlrbook-sample.pdf index 35d6c9ce609..4d2cabbda98 100644 Binary files a/Master/texmf-dist/doc/latex/jmlr/sample-books/jmlrbook-sample.pdf and b/Master/texmf-dist/doc/latex/jmlr/sample-books/jmlrbook-sample.pdf differ diff --git a/Master/texmf-dist/doc/latex/jmlr/sample-books/proceedings-sample.pdf b/Master/texmf-dist/doc/latex/jmlr/sample-books/proceedings-sample.pdf index b8ae83aff41..e71265841b9 100644 Binary files a/Master/texmf-dist/doc/latex/jmlr/sample-books/proceedings-sample.pdf and b/Master/texmf-dist/doc/latex/jmlr/sample-books/proceedings-sample.pdf differ diff --git a/Master/texmf-dist/doc/latex/jmlr/sample-papers/jmlr-sample.pdf b/Master/texmf-dist/doc/latex/jmlr/sample-papers/jmlr-sample.pdf index d1d1a82f665..4b6c39852fb 100644 Binary files a/Master/texmf-dist/doc/latex/jmlr/sample-papers/jmlr-sample.pdf and b/Master/texmf-dist/doc/latex/jmlr/sample-papers/jmlr-sample.pdf differ diff --git a/Master/texmf-dist/doc/latex/jmlr/sample-papers/jmlrwcp-sample.pdf b/Master/texmf-dist/doc/latex/jmlr/sample-papers/jmlrwcp-sample.pdf index a7b6567ea37..6115f7cbf25 100644 Binary files a/Master/texmf-dist/doc/latex/jmlr/sample-papers/jmlrwcp-sample.pdf and b/Master/texmf-dist/doc/latex/jmlr/sample-papers/jmlrwcp-sample.pdf differ diff --git a/Master/texmf-dist/doc/latex/jmlr/sample-papers/jmlrwcp-sample.tex b/Master/texmf-dist/doc/latex/jmlr/sample-papers/jmlrwcp-sample.tex index e64d2fcaf85..1e19ddd4369 100644 --- a/Master/texmf-dist/doc/latex/jmlr/sample-papers/jmlrwcp-sample.tex +++ b/Master/texmf-dist/doc/latex/jmlr/sample-papers/jmlrwcp-sample.tex @@ -552,13 +552,15 @@ both have \verb|[c]| as the second optional argument. Enumerated textual algorithms can be displayed using the \texttt{algorithm} environment. Within this environment, use -\verb|\caption| to set the caption and you can use an -\texttt{enumerate} or nested \texttt{enumerate} environments. +use an \texttt{enumerate} or nested \texttt{enumerate} environments. For example, see \algorithmref{alg:gauss}. Note that algorithms float like figures and tables. \begin{algorithm}[htbp] -\caption{The Gauss-Seidel Algorithm}\label{alg:gauss} +\floatconts +{alg:gauss}% label +{\caption{The Gauss-Seidel Algorithm}} +{% contents \begin{enumerate} \item For $k=1$ to maximum number of iterations \begin{enumerate} @@ -572,8 +574,12 @@ float like figures and tables. \end{enumerate} \end{enumerate} \end{enumerate} +} \end{algorithm} +You can use \verb|\caption| and \verb|\label| without using +\verb|\floatconts| (as in \algorithmref{alg:moore}). + If you'd rather have the same numbering throughout the algorithm but still want the convenient indentation of nested \texttt{enumerate} environments, you can use the diff --git a/Master/texmf-dist/source/latex/jmlr/jmlr.dtx b/Master/texmf-dist/source/latex/jmlr/jmlr.dtx index 59039a18f1e..57d9136911c 100644 --- a/Master/texmf-dist/source/latex/jmlr/jmlr.dtx +++ b/Master/texmf-dist/source/latex/jmlr/jmlr.dtx @@ -1,13 +1,14 @@ %\iffalse -% jmlr.dtx generated using makedtx version 1.1 (c) Nicola Talbot +% jmlr.dtx generated using makedtx version 1.2 (c) Nicola Talbot % Command line args: +% -doc "jmlr-manual.tex" +% -src "jmlrutils.sty\Z=>jmlrutils.sty" % -src "jmlr.cls\Z=>jmlr.cls" % -src "jmlrbook.cls\Z=>jmlrbook.cls" -% -section "chapter" % -author "Nicola Talbot" -% -doc "jmlr-manual.tex" +% -section "chapter" % jmlr -% Created on 2017/3/9 9:50 +% Created on 2017/8/1 16:57 %\fi %\iffalse %<*package> @@ -51,8 +52,7 @@ Research (PMLR)}, \doxitem{Option}{option}{package options} -\CheckSum{4965} - +\CheckSum{5030} \newcommand*{\appopt}[1]{\texttt{-{}-#1}} @@ -70,7 +70,7 @@ Research (PMLR)}, % \author{Nicola L. C. Talbot\\[10pt] %\url{http://www.dickimaw-books.com/}} % -% \date{2017-03-09 (version 1.23)} +% \date{2017-08-01 (version 1.24)} % \maketitle %\tableofcontents % @@ -83,10 +83,9 @@ Research (PMLR)}, %\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) -%will soon be renamed PMLR (Proceedings of Machine Learning -%Research). The new \clsopt{pmlr} class option has been added -%in anticipation of this, but only use it once the official -%name change has taken place. +%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 @@ -107,6 +106,13 @@ Research (PMLR)}, %PDF\LaTeX. \sectionref{sec:jmlrbook} describes how to use the %\clsfmt{jmlrbook} class. % +%As from v1.24, some non-class dependent commands and environments +%have been moved to a new package \sty{jmlrutils} (see +%\sectionref{sec:jmlrutils}). This package is automatically loaded by +%\clsfmt{jmlr}, but may be used with other classes. (Note that you +%will need to explicitly load \sty{algorithm2e} if you want to use +%the \env{algorithm} environment.) +% %\begin{important} %Note that the \clsfmt{jmlr} (and therefore \clsfmt{jmlrbook}) class automatically loads %the \sty{hyperref} package, but some packages need to be loaded @@ -131,23 +137,25 @@ Research (PMLR)}, %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/apps/makejmlrbookgui/} where +%\url{http://www.dickimaw-books.com/software/makejmlrbookgui/} where %there is also a -%\href{http://www.dickimaw-books.com/apps/makejmlrbookgui/manual/troubleshooting.html}{troubleshooting +%\href{http://www.dickimaw-books.com/software/makejmlrbookgui/manual/troubleshooting.html}{troubleshooting %section}. % %There is also a Perl script called \app{makejmlrbook}, which is %distributed with the \clsfmt{jmlr} and \clsfmt{jmlrbook} bundle, -%however 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 and may be dropped from future versions of this bundle. +%however it is now deprecated and 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 and may be +%dropped from future versions of this bundle. % %\section{Required Packages} % %The \clsfmt{jmlr} class is based on the \cls{article} class and loads -%the following packages: \sty{amsmath}, \sty{amssymb}, +%the following packages: \sty{jmlrutils} (see \sectionref{sec:jmlrutils}), +%\sty{amsmath}, \sty{amssymb}, %\sty{natbib}, \sty{url}, \sty{graphicx} and \sty{algorithm2e}, %\sty{hyperref}, \sty{nameref}, \sty{xcolor} and \sty{xkeyval}. %Note that unlike the \sty{jmlr2e} and \sty{jmlrwcp2e} packages, @@ -386,13 +394,17 @@ Research (PMLR)}, %\begin{verbatim} %\url{http://theoval.cmp.uea.ac.uk/~nlct/} %\end{verbatim} +%This command is provided by the \sty{url} package which is +%automatically loaded. % %\begin{definition}[\DescribeMacro{\mailto}] %\cs{mailto}\marg{email address} %\end{definition} %This will typeset the given email address in a typewriter font. %Note that this is not the same as \cs{Email}, which should only be -%used in the argument of \cs{author}. +%used in the argument of \cs{author}. This command is provided by the +%supplementary package \sty{jmlrutils}. Other commands are described +%in \sectionref{sec:jmlrutils}. % %\section{Structure} % @@ -480,7 +492,42 @@ Research (PMLR)}, % %See the \ctandoc{natbib} for further details. % -%\section{Figures and Tables} +%\section{\styfmt{jmlrutils} supplementary package} +%\label{sec:jmlrutils} +% +%The \sty{jmlrutils} package is automatically loaded by the +%\clsfmt{jmlr} class but may be used with other classes. +% +%\subsection{Package Options} +% +%The following options may be passed to the \styfmt{jmlrutils} +%package if it is to be used without the \clsfmt{jmlr} class. +%\begin{description} +%\item[\pkgopt{maths}] Define the commands \cs{set} and \cs{oldvec} +%and redefine \cs{vec}. This will also automatically load the +%\sty{amsmath} package. (Default.) +%\item[\pkgopt{nomaths}] Don't define \cs{set} and \cs{oldvec} +%and don't redefine \cs{vec}. +%\item[\pkgopt{theorems}] Define the theorem commands and +%environments listed in \sectionref{sec:theorems}. (Default.) +%\item[\pkgopt{notheorems}] Don't define the theorem commands and +%environments. +%\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 +%sub-table commands. +%\end{description} +%The non-default options are provided when \styfmt{jmlrutils} is +%loaded without the \clsfmt{jmlr} class. +%Don't try passing the non-default options to \styfmt{jmlrutils} if +%you are using the \clsfmt{jmlr} class as this could interfere with +%the build process for the proceedings or book. +% +%The \styfmt{jmlrutils} package doesn't recognise any of the +%\clsfmt{jmlr} class options (such as \pkgopt{tablecaption}). +% +%\subsection{Figures and Tables} +%\label{sec:floats} % %Floats, such as figures, tables and algorithms, are moving objects %and are supposed to float to the nearest convenient location. @@ -507,13 +554,13 @@ Research (PMLR)}, %\caption{A Sample Caption With Some \emph{Emphasized Words}.} %\end{verbatim} % -%The \clsfmt{jmlr} class provides the following command for displaying +%The \styfmt{jmlrutils} package provides the following command for displaying %the contents of a figure or table: %\begin{definition}[\DescribeMacro{\floatconts}] %\cs{floatconts}\marg{label}\marg{caption command}\marg{contents} %\end{definition} %This ensures that the caption is correctly positioned and that -%the contents are centered. For example: +%the contents are centred. For example: %\begin{verbatim} %\begin{table}[htbp] %\floatconts @@ -527,6 +574,11 @@ Research (PMLR)}, % } %\end{table} %\end{verbatim} +%If the \clsfmt{jmlr} class is used, the table caption (when used +%with \cs{floatconts}) will obey the \clsopt{tablecaption} class option, +%otherwise it will be placed above the table contents. Within the +%\env{figure} environment, \cs{floatconts} will put the caption below +%the contents. This command may be used within other floats. % %The \clsfmt{jmlr} class automatically loads \sty{graphicx} which %defines: @@ -534,6 +586,10 @@ Research (PMLR)}, %\cs{includegraphics}\oarg{options}\marg{file name} %\end{definition} %where \meta{options} is a comma-separated list of options. +%If you are using \styfmt{jmlrutils} with another class you need to load +%\sty{graphicx} in order to use this command. See the documentation +%for the \sty{graphicx} package for further details of this command +%and other provided commands. % %For example, suppose you have an image called %\texttt{mypic.png} in a subdirectory called \texttt{images}: @@ -547,14 +603,15 @@ Research (PMLR)}, %\end{verbatim} % %Note that you shouldn't specify the file extension when including -%the image. It's helpful if you can also provide a grayscale -%version of color images. This should be labeled as the color -%image but with \texttt{-gray} immediately before the extension. -%(The extension need not be the same as that of the color image.) -%For example, if you have an image called \texttt{mypic.pdf}, the -%grayscale can be called \texttt{mypic-gray.pdf}, -%\texttt{mypic-gray.png} or \texttt{mypic-gray.jpg}. -%See \sectionref{sec:color} for further details. +%the image when using the \clsfmt{jmlr} class. It's helpful if you +%can also provide a grayscale version of colour images. This should be +%labelled as the colour image but with \texttt{-gray} immediately +%before the extension. (The extension need not be the same as that +%of the colour image.) For example, if you have an image called +%\texttt{mypic.pdf}, the grayscale can be called +%\texttt{mypic-gray.pdf}, \texttt{mypic-gray.png} or +%\texttt{mypic-gray.jpg}. See \sectionref{sec:color} for further +%details. % %\begin{definition}[\DescribeMacro{\includeteximage}] %\cs{includeteximage}\oarg{options}\marg{file name} @@ -564,14 +621,19 @@ Research (PMLR)}, %The optional argument is a key=value comma-separated list %where the keys are a subset of those provided by %\linebreak\cs{includegraphics}. The main keys are: \texttt{width}, -%\texttt{height}, \texttt{scale} and \texttt{angle}. +%\texttt{height}, \texttt{scale} and \texttt{angle}. Some +%of the keys specific to image files (such as the bounding box +%and type keys) do nothing with \cs{includeteximage}. % -%\subsection{Sub-Figures and Sub-Tables} +%\subsubsection{Sub-Figures and Sub-Tables} +%\label{sec:subfloats} % %The \sty{subfig} package causes a problem for \clsfmt{jmlrbook} so %the \clsfmt{jmlr} class will give an error if it is used. Therefore %the \clsfmt{jmlr} class provides its own commands for including -%sub-figures and sub-tables. +%sub-figures and sub-tables. If you aren't using the \clsfmt{jmlr} +%class, you can prevent \styfmt{jmlrutils} from defining these +%commands with the \pkgopt{nosubfloats} package option. % %\begin{definition}[\DescribeMacro{\subfigure}] %\cs{subfigure}\oarg{title}\oarg{valign}\marg{contents} @@ -611,19 +673,23 @@ Research (PMLR)}, %This is an analogous command for sub-tables. The default value %for \meta{valign} is \texttt{t}. % -%\section{Algorithms} +%\subsection{Algorithms} +%The \clsfmt{jmlr} class automatically loads the \sty{algorithm2e} +%package. If you are using \styfmt{jmlrutils} with another class, you +%will need to load \sty{algorithm2e} if you want to use the +%\env{algorithm} and \env{algorithm2e} environments described below. % %\begin{definition}[\DescribeEnv{algorithm}] -%\cs{begin}\{algorithm\}\\ +%\cs{begin}\{algorithm\}\oarg{placement}\\ %\meta{contents}\\ %\cs{end}\{algorithm\} %\end{definition} %Enumerated textual algorithms can be displayed using the -%\envfmt{algorithm} environment. Within this environment, use -%\ics{caption} to set the caption (and \ics{label} to cross-reference -%it). Within the body of the environment you can use the -%\env{enumerate} environment. +%\envfmt{algorithm} environment. +%The optional argument is as for \env{figure} and \env{table}. % +%Within the body of the +%environment you can use the \env{enumerate} environment. %\begin{definition}[\DescribeEnv{enumerate*}] %\cs{begin}\{enumerate*\}\\ %\cs{item} \meta{text}\\ @@ -632,9 +698,13 @@ Research (PMLR)}, %\end{definition} %If you want to have nested \env{enumerate} environments but you want %to keep the same numbering throughout the algorithm, you can use the -%\envfmt{enumerate*} environment, provided by the \clsfmt{jmlr} -%class. For example: +%\envfmt{enumerate*} environment, provided by the \styfmt{jmlrutils} +%package. For example: %\begin{verbatim} +%\begin{algorithm} +%\floatconts{alg:path}%label +%{\caption{Shortest Path}}% caption +%{% contents %\begin{enumerate*} % \item Set the label of vertex $s$ to 0 % \item Set $i=0$ @@ -652,6 +722,7 @@ Research (PMLR)}, % \end{enumerate*} % \end{enumerate*} %\end{enumerate*} +%} %\end{algorithm} %\end{verbatim} % @@ -668,8 +739,8 @@ Research (PMLR)}, %\begin{algorithm2e} %\caption{Computing Net Activation} %\label{alg:net} -%\dontprintsemicolon -%\linesnumbered +%\DontPrintSemicolon +%\LinesNumbered %\KwIn{$x_1, \ldots, x_n, w_1, \ldots, w_n$} %\KwOut{$y$, the net activation} %$y\leftarrow 0$\; @@ -681,7 +752,7 @@ Research (PMLR)}, % %See the \ctandoc{algorithm2e} for more details. % -%\section{Description Lists} +%\subsection{Description Lists} % %\begin{definition}[\DescribeEnv{altdescription}] %\cs{begin}\{altdescription\}\marg{widest label}\\ @@ -699,9 +770,16 @@ Research (PMLR)}, %\end{altdescription} %\end{verbatim} % -%\section{Theorems, Lemmas etc} +%\subsection{Theorems, Lemmas etc} +%\label{sec:theorems} % -%The \clsfmt{jmlr} class provides the following theorem-like +%The \clsfmt{jmlrbook} class doesn't work well with common theorem +%packages, so \styfmt{jmlrutils} provides theorem code that won't +%conflict with \clsfmt{jmlrbook}. If you're using \styfmt{jmlrutils} +%without the \clsfmt{jmlr} class, you can prevent the definition of +%these commands with the \pkgopt{notheorems} package option. +% +%The \styfmt{jmlrutils} package provides the following theorem-like %environments: \env{theorem}, \env{example}, \env{lemma}, %\env{proposition}, \env{remark}, \env{corollary}, \env{definition}, %\env{conjecture} and \env{axiom}. Within the body of those @@ -778,11 +856,11 @@ Research (PMLR)}, %\end{note} %\end{verbatim} % -%\section{Cross-Referencing} +%\subsection{Cross-Referencing} %\label{sec:crossref} % %Always use \ics{label} when cross-referencing, rather than writing -%the number explicitly. The \clsfmt{jmlr} class provides some +%the number explicitly. The \styfmt{jmlrutils} package provides some %convenience commands to assist referencing. These commands, %described below, can all take a comma-separated list of labels. % @@ -880,22 +958,41 @@ Research (PMLR)}, %\end{definition} %Used to refer to an example or multiple examples. % -%\section{Mathematics} +%\subsection{Mathematics} % -%The \clsfmt{jmlr} class loads the \sty{amsmath} package so you can use -%any of the commands and environments defined in that package. A -%brief summary of some of the more common commands and environments -%is provided here. See the \ctandoc{amsmath} for further details. +%The \clsfmt{jmlr} class loads the \sty{amsmath} package so you can +%use any of the commands and environments defined in that package. +%The \styfmt{jmlrutils} package will load \sty{amsmath} if the +%default \pkgopt{maths} package option is used but won't load +%\sty{amsmath} if the \pkgopt{nomaths} option is used. A brief +%summary of some of the more common commands and environments is +%provided here. See the \ctandoc{amsmath} for further details. % %\begin{definition}[\DescribeMacro{\set}] -%\cs{set}\marg{text} +%\cs{set}\marg{maths} %\end{definition} %In addition to the commands provided by \sty{amsmath}, the -%\clsfmt{jmlr} class also provides the \cs{set} command which can +%\styfmt{jmlrutils} package also provides the \cs{set} command which can %be used to typeset a set. For example: %\begin{verbatim} %The universal set is denoted $\set{U}$ %\end{verbatim} +%This command won't be provided if the \pkgopt{nomaths} option is +%used. +% +%\begin{definition}[\DescribeMacro{\vec}] +%\cs{vec}\marg{maths} +%\end{definition} +%The \cs{vec} command is redefined by \styfmt{jmlrutils} to use +%\cs{boldsymbol}, which is provided by \sty{amsmath}. +%(This command won't be redefined if the \pkgopt{nomaths} option is +%used.) If you require +%the original \cs{vec}, you can access it with: +%\begin{definition}[\DescribeMacro{\orgvec}] +%\cs{orgvec}\marg{maths} +%\end{definition} +%This command won't be provided if the \pkgopt{nomaths} option is +%used. % %Unnumbered single-line equations should be displayed using %\cs{[} and \cs{]}. For example: @@ -909,6 +1006,10 @@ Research (PMLR)}, %\cos^2\theta + \sin^2\theta \equiv 1 %\end{equation} %\end{verbatim} +%The above are provided by the \LaTeX\ kernel but may be adjusted by +%packages such as \sty{amsmath}. The commands and environments below +%are provided by \sty{amsmath}. +% %Multi-lined numbered equations should be displayed using the %\env{align} environment. For example: %\begin{verbatim} @@ -1009,7 +1110,8 @@ Research (PMLR)}, %need to modify your code. The \clsfmt{jmlr} class checks for %the existence of the grayscale version if it is print mode %(provided you have used \ics{includegraphics} and haven't -%specified the file extension). +%specified the file extension). This check is performed by code +%provided by the \clsfmt{jmlr} class not the \styfmt{jmlrutils} package. % %\begin{definition}[\DescribeMacro{\ifprint}] %\cs{ifprint}\marg{true part}\marg{false part} @@ -1041,8 +1143,10 @@ Research (PMLR)}, %\urlfootref{http://www.tex.ac.uk/faq}{UK TUG FAQ}. % %If you are unfamiliar or just getting started with \LaTeX, there's -%a list of on-line introductions to \LaTeX\ at: +%a list of on-line introductions to \LaTeX\ at %\url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=man-latex} +%or have a look at +%\href{http://www.dickimaw-books.com/latex/novices}{\LaTeX\ for Complete Novices}. % %There are also forums, mailing lists and newsgroups. For example, %\TeX\ on StackExchange (\url{http://tex.stackexchange.com/}), @@ -1088,7 +1192,7 @@ Research (PMLR)}, %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/apps/makejmlrbookgui/} for details. +%\url{http://www.dickimaw-books.com/software/makejmlrbookgui/} for details. % %\section{\clsfmt{jmlrbook} Class Options} %\begin{description} @@ -1626,7 +1730,7 @@ Research (PMLR)}, %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/apps/makejmlrbookgui/manual/troubleshooting.html}{troubleshooting +%\href{http://www.dickimaw-books.com/software/makejmlrbookgui/manual/troubleshooting.html}{troubleshooting %section}. % %\StopEventually{\clearpage\phantomsection @@ -1638,2101 +1742,2291 @@ Research (PMLR)}, %\chapter{The Code} %\iffalse % \begin{macrocode} -%<*jmlr.cls> +%<*jmlrutils.sty> % \end{macrocode} %\fi -%\section{jmlr.cls Code} -% This class is based on the \sty{jmlr2e} package but was modified to make sure -% it works with \clsfmt{jmlrbook} which uses both \cls{combine} and -% \sty{hyperref}. -% -% Declare class and required TeX format: +%\section{jmlrutils.sty Code} +%Non-class dependent code. This package is automatically loaded by +%\cls{jmlr} but may be used with other classes. % \begin{macrocode} -\NeedsTeXFormat{LaTeX2e} -\ProvidesClass{jmlr}[2017/03/09 v1.23 (NLCT) Journal of Machine Learning Research] +\ProvidesPackage{jmlrutils}[2017/08/01] % \end{macrocode} -%\changes{1.10}{2011-01-05}{hyperref now loaded by jmlr instead of -%jmlrbook} -% Need \sty{xkeyval} package to have key=value class options +% Package options: +%\begin{macro}{\ifjmlrutilsmaths} +%Determine if the maths commands should be provided. % \begin{macrocode} -\RequirePackage{xkeyval} +\newif\ifjmlrutilsmaths +\jmlrutilsmathstrue % \end{macrocode} -%\changes{1.18}{2013-10-17}{now requires calc package} +%\end{macro} % \begin{macrocode} -\RequirePackage{calc} +\DeclareOption{maths}{\jmlrutilsmathstrue} +\DeclareOption{nomaths}{\jmlrutilsmathsfalse} % \end{macrocode} -%\changes{1.18}{2013-10-17}{now requires etoolbox package} +% +%\begin{macro}{\ifjmlrutilstheorems} +%Determine if the theorem environments should be provided. % \begin{macrocode} -\RequirePackage{etoolbox} +\newif\ifjmlrutilstheorems +\jmlrutilstheoremstrue % \end{macrocode} -% Some packages need to be loaded before \sty{hyperref} so provide a -% hook to do this: -%\begin{macro}{\jmlrprehyperref} -%\changes{1.12}{2012/01/05}{removed @ from name so it can be defined -%by user} +%\end{macro} % \begin{macrocode} -\providecommand*{\jmlrprehyperref}{} +\DeclareOption{theorems}{\jmlrutilstheoremstrue} +\DeclareOption{notheorems}{\jmlrutilstheoremsfalse} +% \end{macrocode} +% +%\begin{macro}{\ifjmlrutilssubfloats} +%Determine if the sub-floats should be provided. +% \begin{macrocode} +\newif\ifjmlrutilssubfloats +\jmlrutilssubfloatstrue % \end{macrocode} %\end{macro} -%\changes{1.12}{2012/01/05}{removed class option prehyperref} -% The following conditionals are provided to make this class play nicely -% with combine and aren't required for articles. % \begin{macrocode} -\newif\if@openright -\newif\if@mainmatter \@mainmattertrue +\DeclareOption{subfloats}{\jmlrutilssubfloatstrue} +\DeclareOption{nosubfloats}{\jmlrutilssubfloatsfalse} % \end{macrocode} -%\begin{macro}{\ifgrayscale} -% Determine whether to select grayscale alternatives +% % \begin{macrocode} -\@ifundefined{ifgrayscale}{ - \newif\ifgrayscale - \grayscalefalse -}{} -\DeclareOptionX{color}{\grayscalefalse - \PassOptionsToPackage{color}{xcolor}} -\DeclareOptionX{gray}{\grayscaletrue - \PassOptionsToPackage{gray}{xcolor}} +\ProcessOptions % \end{macrocode} -%\end{macro} -%\begin{option}{draft} -%\changes{1.18}{2013-10-17}{new} +% Requires \sty{etoolbox}: % \begin{macrocode} -\DeclareOptionX{draft}{\setlength\overfullrule{5pt}} +\RequirePackage{etoolbox} % \end{macrocode} -%\end{option} -%\begin{option}{final} -%\changes{1.18}{2013-10-17}{new} +%If the maths commands are needed, load \sty{amsmath}. % \begin{macrocode} -\DeclareOptionX{final}{\setlength\overfullrule{0pt}} +\ifjmlrutilsmaths + \RequirePackage{amsmath} +\fi % \end{macrocode} -%\end{option} +% The conditional \cs{iftablecaptiontop} will already have been +% defined by the \cls{jmlr} class, so only needs to be defined +% if not already done. %\begin{macro}{\iftablecaptiontop} -% Determine if the table captions should go at the top. -%\changes{1.07}{2010-06-17}{new} % \begin{macrocode} -\newif\iftablecaptiontop -\tablecaptiontoptrue -\DeclareOptionX{tablecaptiontop}{\tablecaptiontoptrue} -\DeclareOptionX{tablecaptionbottom}{\tablecaptiontopfalse} - -\define@choicekey{jmlr.cls}{tablecaption}[\val\nr]{top,bottom}{% - \ifcase\nr\relax - \tablecaptiontoptrue - \or - \tablecaptiontopfalse +\@ifundefined{iftablecaptiontop} +{\newif\iftablecaptiontop +\tablecaptiontoptrue} +{} +% \end{macrocode} +%\end{macro} +% +%\subsection{Cross-Referencing} +% Convenient macros for cross-referencing. +% \begin{macrocode} +\newcommand*{\@jmlr@reflistsep}{, } +\newcommand*{\@jmlr@reflistlastsep}{ and } +\newcommand*{\sectionrefname}{Section} +\newcommand*{\sectionsrefname}{Sections} +\newcommand*{\equationrefname}{Equation} +\newcommand*{\equationsrefname}{Equations} +\newcommand*{\tablerefname}{Table} +\newcommand*{\tablesrefname}{Tables} +\newcommand*{\figurerefname}{Figure} +\newcommand*{\figuresrefname}{Figures} +\newcommand*{\algorithmrefname}{Algorithm} +\newcommand*{\algorithmsrefname}{Algorithms} +\newcommand*{\theoremrefname}{Theorem} +\newcommand*{\theoremsrefname}{Theorems} +\newcommand*{\lemmarefname}{Lemma} +\newcommand*{\lemmasrefname}{Lemmas} +\newcommand*{\remarkrefname}{Remark} +\newcommand*{\remarksrefname}{Remarks} +\newcommand*{\corollaryrefname}{Corollary} +\newcommand*{\corollarysrefname}{Corollaries} +\newcommand*{\definitionrefname}{Definition} +\newcommand*{\definitionsrefname}{Definitions} +\newcommand*{\conjecturerefname}{Conjecture} +\newcommand*{\conjecturesrefname}{Conjectures} +\newcommand*{\axiomrefname}{Axiom} +\newcommand*{\axiomsrefname}{Axioms} +\newcommand*{\examplerefname}{Example} +\newcommand*{\examplesrefname}{Examples} +\newcommand*{\appendixrefname}{Appendix} +\newcommand*{\appendixsrefname}{Appendices} +\newcommand*{\partrefname}{Part} +\newcommand*{\partsrefname}{Parts} +% \end{macrocode} +%\begin{macro}{\objectref} +% Cross-reference a particular structural element. The first +% argument is the list of labels, the second argument is a +% control sequence containing the singular tag, the third +% argument a control sequence containing the plural tag, +% the fourth argument is text to go before the reference number, +% e.g.\ an opening bracket, and the fifth argument is text +% to go after the reference number, e.g.\ a closing bracket. +%\changes{1.24}{2017-08-01}{changed \cs{DeclareRobustCommand} +%to \cs{newrobustcmd}} +% \begin{macrocode} +\newrobustcmd*{\objectref}[5]{% + \let\@objectname\@empty + \def\@objectref{}% + \let\@prevsep\@empty + \@for\@thislabel:=#1\do{% + \toks@{\@prevsep}% + \protected@edef\@objectref{\@objectref\the\toks@ + #4\ref{\@thislabel}#5}% + \ifx\@objectname\@empty + \let\@objectname#2% singular tag + \else + \let\@objectname#3% plural tag + \let\@prevsep\@jmlr@reflistsep + \fi + }% + \ifx\@objectname#3% plural tag + \let\@prevsep\@jmlr@reflistlastsep \fi + \@objectname~\@objectref } % \end{macrocode} %\end{macro} -%\begin{macro}{\ifjmlrhtml} -% Determine if we are using \app{TeX4ht}. (Deprecated.) +%\begin{macro}{\sectionref} % \begin{macrocode} -\newif\ifjmlrhtml -\jmlrhtmlfalse -\DeclareOptionX{html}{\jmlrhtmltrue} -\DeclareOptionX{nohtml}{\jmlrhtmlfalse} +\newcommand*{\sectionref}[1]{% + \objectref{#1}{\sectionrefname}{\sectionsrefname}{}{}} % \end{macrocode} %\end{macro} -% Normal font size (default is 11pt). -%\changes{1.10}{2011-01-05}{font size options don't pass option to -%class} +%\begin{macro}{\equationref} % \begin{macrocode} -\def\pt@size{11pt} -\DeclareOptionX{10pt}{\renewcommand{\pt@size}{10pt}} -\DeclareOptionX{11pt}{\renewcommand{\pt@size}{11pt}} -\DeclareOptionX{12pt}{\renewcommand{\pt@size}{12pt}} +\newcommand*{\equationref}[1]{% + \objectref{#1}{\equationrefname}{\equationsrefname}()} % \end{macrocode} -%\begin{macro}{\@jmlrproceedings} -% The name of the proceedings. +%\end{macro} +%\begin{macro}{\tableref} % \begin{macrocode} -\newcommand*{\@jmlrproceedings}{Journal of Machine Learning Research} +\newcommand*{\tableref}[1]{% + \objectref{#1}{\tablerefname}{\tablesrefname}{}{}} % \end{macrocode} %\end{macro} -%\begin{macro}{\@jmlrabbrvproceedings} -% The abbreviated name of the proceedings. +%\begin{macro}{\figureref} % \begin{macrocode} -\newcommand*{\@jmlrabbrvproceedings}{JMLR} +\newcommand*{\figureref}[1]{% + \objectref{#1}{\figurerefname}{\figuresrefname}{}{}} % \end{macrocode} %\end{macro} -%\begin{macro}{\jmlrproceedings} -% Sets the title and abbreviation of the proceedings +%\begin{macro}{\algorithmref} % \begin{macrocode} -\newcommand*{\jmlrproceedings}[2]{% - \renewcommand*{\@jmlrabbrvproceedings}{#1}% - \renewcommand*{\@jmlrproceedings}{#2}% -} +\newcommand*{\algorithmref}[1]{% + \objectref{#1}{\algorithmrefname}{\algorithmsrefname}{}{}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\jmlrnowcp} +%\begin{macro}{\theoremmref} % \begin{macrocode} -\newcommand*{\jmlrnowcp}{% - \jmlrproceedings{JMLR}{Journal of Machine Learning Research}% -} +\newcommand*{\theoremref}[1]{% + \objectref{#1}{\theoremrefname}{\theoremsrefname}{}{}} % \end{macrocode} %\end{macro} -%\begin{macro}{\jmlrwcp} -%\changes{1.11}{2011-03-24}{Fixed typo} +%\begin{macro}{\lemmaref} % \begin{macrocode} -\newcommand*{\jmlrwcp}{% - \jmlrproceedings{JMLR W\&CP}{JMLR: Workshop and Conference Proceedings}% -} +\newcommand*{\lemmaref}[1]{% + \objectref{#1}{\lemmarefname}{\lemmasrefname}{}{}} % \end{macrocode} %\end{macro} -%\begin{macro}{\jmlrpmlr} -%\changes{1.23}{2017-03-09}{new} -%The JMLR W\&CP has been renamed PMLR, so provide code to switch to -%this instead, +%\begin{macro}{\remarkref} % \begin{macrocode} -\newcommand*{\jmlrpmlr}{% - \jmlrproceedings{PMLR}{Proceedings of Machine Learning Research}% -} +\newcommand*{\remarkref}[1]{% + \objectref{#1}{\remarkrefname}{\remarksrefname}{}{}} % \end{macrocode} %\end{macro} -% This isn't an article for a workshop: +%\begin{macro}{\corollaryref} % \begin{macrocode} -\DeclareOptionX{nowcp}{\jmlrnowcp} +\newcommand*{\corollaryref}[1]{% + \objectref{#1}{\corollaryrefname}{\corollarysrefname}{}{}} % \end{macrocode} -% This is an article for JMLR W\&CP +%\end{macro} +%\begin{macro}{\definitionref} % \begin{macrocode} -\DeclareOptionX{wcp}{\jmlrwcp} +\newcommand*{\definitionref}[1]{% + \objectref{#1}{\definitionrefname}{\definitionsrefname}{}{}} % \end{macrocode} -% This is an article for PMLR +%\end{macro} +%\begin{macro}{\conjectureref} % \begin{macrocode} -\DeclareOptionX{pmlr}{\jmlrpmlr} +\newcommand*{\conjectureref}[1]{% + \objectref{#1}{\conjecturerefname}{\conjecturesrefname}{}{}} % \end{macrocode} -%\begin{option}{oneside} -%\changes{1.22}{2015/04/11}{new} +%\end{macro} +%\begin{macro}{\axiomref} % \begin{macrocode} -\DeclareOptionX{oneside}{\@twosidefalse \@mparswitchfalse} +\newcommand*{\axiomref}[1]{% + \objectref{#1}{\axiomrefname}{\axiomsrefname}{}{}} % \end{macrocode} -%\end{option} -%\begin{option}{twoside} -%\changes{1.22}{2015/04/11}{new} +%\end{macro} +%\begin{macro}{\exampleref} % \begin{macrocode} -\DeclareOptionX{twoside}{\@twosidetrue \@mparswitchtrue} +\newcommand*{\exampleref}[1]{% + \objectref{#1}{\examplerefname}{\examplesrefname}{}{}} % \end{macrocode} -%\end{option} -% Set two-sided format +%\end{macro} +%\begin{macro}{\appendixref} % \begin{macrocode} -\@twosidetrue +\newcommand*{\appendixref}[1]{% + \objectref{#1}{\appendixrefname}{\appendixsrefname}{}{}} % \end{macrocode} -% The default paper size is letter, but provide $7 \times 10$in -% alternative: -% \begin{macrocode} -\newif\ifviiXx -\viiXxfalse -\DeclareOptionX{7x10}{\viiXxtrue} -\DeclareOptionX{letterpaper}{\PassOptionsToPackage{letterpaper}{typearea}} -% \end{macrocode} -% Pass all remaining options to \cls{article} class: +%\end{macro} +%\begin{macro}{\partref} % \begin{macrocode} -\DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{article}} +\newcommand*{\partref}[1]{% + \objectref{#1}{\partrefname}{\partsrefname}{}{}} % \end{macrocode} -% Execute required options: +%\end{macro} +% +%\subsection{Figures, Tables and Algorithms} +% +%\begin{macro}{\floatconts} +% The first argument is the label, the second argument contains the +% caption (using \cs{caption}) and the third argument contains the +% contents of the float % \begin{macrocode} -\ExecuteOptions{letterpaper} +\newcommand{\floatconts}[3]{% + \@ifundefined{\@captype conts}{\tableconts{#1}{#2}{#3}}% + {\csname\@captype conts\endcsname{#1}{#2}{#3}}% +} % \end{macrocode} -% Process options: +%\end{macro} +%\begin{macro}{\tableconts} +%This will already have been defined if the \clsfmt{jmlr} class was +%loaded. % \begin{macrocode} -\ProcessOptionsX +\providecommand{\tableconts}[3]{% + #2\label{#1}\vskip\baselineskip + {\centering #3\par}% +} % \end{macrocode} -% Load \cls{article} class. -%\changes{1.10}{2011-01-05}{passed \cs{pt@size} when loading article -%class} +%\end{macro} +%\begin{macro}{\figureconts} % \begin{macrocode} -\LoadClass[\pt@size]{article} +\newcommand{\figureconts}[3]{% + {\centering #3\par}% + \vskip\baselineskip + #2\label{#1}% +} % \end{macrocode} -% Can't use \sty{geometry} package because it doesn't play nicely -% with the \cls{combine} class. +%\end{macro} +% +%The following macro and environment assume that \sty{algorithm2e} +%has been loaded (which is done by the \cls{jmlr} class). If the +%\styfmt{jmlrutils} package is loaded without the \cls{jmlr} class, +%the \sty{algorithm2e} package will have to be explicitly loaded. +%\begin{macro}{\algocfconts} +%\changes{1.09}{2010/12/01}{new} +%Command used by \cs{floatconts} to display the caption contents. % \begin{macrocode} -\ifviiXx - \setlength{\paperwidth}{7in} - \setlength{\paperheight}{10in} - \setlength{\textwidth}{5.25in} - \setlength{\textheight}{8.2in} - \setlength{\topmargin}{0.4in} - \setlength{\headheight}{0.2in} - \setlength{\headsep}{0.2in} - \setlength{\hoffset}{-1in} - \setlength{\voffset}{-1in} - \setlength{\evensidemargin}{0.75in} - \setlength{\oddsidemargin}{1.0in} -\else - \setlength{\oddsidemargin}{0.25in} - \setlength{\evensidemargin}{0.25in} - \setlength{\marginparwidth}{0.07 true in} - \setlength{\topmargin}{-0.5in} - \addtolength{\headsep}{0.25in} - \setlength{\textheight}{8.5 true in} - \setlength{\textwidth}{6.0 true in} -\fi +\newcommand{\algocfconts}[3]{% + \@algocf@pre@ruled + #2\label{#1}\kern2pt\hrule height.8pt depth0pt\kern2pt% + #3\@algocf@pre@ruled +} % \end{macrocode} -% Need to add jmlr end document hook before natbib adds a -% \cs{clearpage} to it. +%\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} % \begin{macrocode} -\AtEndDocument{\@jmlrenddoc} +\newenvironment{algorithm}[1][htbp]% +{% + \ifundef{\algocf}% + {`algorithm2e' package is required if you want to + use the algorithm environment}% + {}% + \begin{algocf}[#1]% + \renewcommand\@makecaption[2]{% + \hskip\AlCapHSkip + \parbox[t]{\hsize}{\algocf@captiontext{##1}{##2}}% + }% +}% +{% + \end{algocf}% +} % \end{macrocode} -% Required packages: +% +%\begin{macro}{\@jmlr@ifgraphicxloaded} % \begin{macrocode} -\RequirePackage{amsmath} -\RequirePackage{amssymb} -\RequirePackage{natbib} -\RequirePackage{graphicx} -\RequirePackage{url} -\RequirePackage[x11names]{xcolor} +\AtBeginDocument{% + \@ifpackageloaded{graphicx}% + {\let\@jmlr@ifgraphicxloaded\@firstoftwo}% + {\let\@jmlr@ifgraphicxloaded\@secondoftwo}% +} % \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.) For some reason, -% loading \sty{algorithm2e} causes the message -%\begin{verbatim} -%(\end occurred inside a group at level 1) -%\end{verbatim} -% I don't know why, but it's outside the control of this class. +%\end{macro} +% +%\begin{macro}{\includeteximage} +% Provide a command like \cs{includegraphics} that includes a +% file containing \LaTeX\ picture code (e.g.\ \sty{pgf}). % \begin{macrocode} -\RequirePackage[algo2e,ruled]{algorithm2e} +\newcommand*{\includeteximage}[2][]{% + \@jmlr@ifgraphicxloaded + {% + \def\Gin@req@sizes{% + \Gin@req@height\Gin@nat@height + \Gin@req@width\Gin@nat@width}% + \begingroup + \let\input@path\Ginput@path + \IfFileExists{#2}% + {% + \toks@{\input{#2}}% + \ifstrempty{#1} + {}% + {% + \@tempswatrue + \setkeys{Gin}{#1}% + \Gin@esetsize + }% + \the\toks@ + }% + {\@warning{File `#2' not found}}% + \endgroup + }% + {\PackageError{jmlrutils}{`graphicx' package is required + if you want to use \string\includeteximage}{}}% +} % \end{macrocode} -% Do all the stuff that needs to be done before \sty{hyperref} is -% loaded: +%\end{macro} +% +%Sub floats. % \begin{macrocode} -\jmlrprehyperref +\ifjmlrutilssubfloats % \end{macrocode} -% Do stuff that has to come immediately before \sty{hyperref} is -% loaded: -%\changes{1.13}{2012/02/25}{added \cs{@pre@hyperref}} +% The \sty{subfig} package breaks jmlrbook.cls, so define \ics{subfig} +% here. (This is fairly primitive.) +%\begin{macro}{\c@subfigure} +% Define subfigure counter: % \begin{macrocode} -\@ifundefined{@pre@hyperref}{}{\@pre@hyperref} + \newcounter{subfigure} + \@addtoreset{subfigure}{figure} % \end{macrocode} -% Load \sty{hyperref}: -%\changes{1.19}{??}{replaced \cs{usepackage} with \cs{RequirePackage}} +%\end{macro} +%\begin{macro}{\thesubfigure} % \begin{macrocode} -\RequirePackage{hyperref} -\RequirePackage{nameref} + \renewcommand*{\thesubfigure}{\alph{subfigure}} % \end{macrocode} +%\end{macro} +%\begin{macro}{\p@subfigure} % \begin{macrocode} -% Do stuff that has to come immediately after \sty{hyperref} and -% \sty{nameref} are loaded: -%\changes{1.16}{2012/05/15}{added \cs{@post@hyperref}} -\@ifundefined{@post@hyperref}{}{\@post@hyperref} + \renewcommand*{\p@subfigure}{\expandafter\@p@subfigure} + \newcommand*{\@p@subfigure}[1]{% + \protect\@subfigurelabel{\thefigure}{\thesubfigure}% + } % \end{macrocode} -% Set up hyperref options: +%\end{macro} +%\begin{macro}{\@subfigurelabel} +% Define how label appears. % \begin{macrocode} -\hypersetup{colorlinks, - linkcolor=blue, - citecolor=blue, - urlcolor=magenta, - linktocpage, - plainpages=false} + \newcommand*\@subfigurelabel[2]{#1\subfigurelabel{#2}} % \end{macrocode} -% +%\end{macro} +%\begin{macro}{\subfigref} +% Reference the sub-figure without including the figure number. % \begin{macrocode} -\ifgrayscale + \newcommand*\@subfigref[1]{% + {% + \def\@subfigurelabel##1##2{\subfigurelabel{##2}}% + \ref{#1}% + }% + } + \newcommand*{\subfigref}[1]{% + \let\@objectname\@empty + \def\@objectref{}% + \let\@prevsep\@empty + \@for\@thislabel:=#1\do{% + \toks@{\@prevsep}% + \protected@edef\@objectref{\@objectref\the\toks@ + \protect\@subfigref{\@thislabel}}% + \ifx\@objectname\@empty + \let\@objectname\@nil + \else + \let\@objectname\relax + \let\@prevsep\@jmlr@reflistsep + \fi + }% + \ifx\@objectname\relax + \let\@prevsep\@jmlr@reflistlastsep + \fi + \@objectref + } % \end{macrocode} -% If this is the print version, need to disable the hyperlinks: +%\end{macro} +%\begin{macro}{\subfigurelabel} % \begin{macrocode} - \hypersetup{draft} -\fi + \newcommand*{\subfigurelabel}[1]{(\emph{#1})} % \end{macrocode} +%\end{macro} % -% Float parameters: the following settings were copied from jmlr2e.sty -% \begin{macrocode} -\renewcommand{\topfraction}{0.95} % let figure take up nearly whole page -\renewcommand{\textfraction}{0.05} % let figure take up nearly whole page -% \end{macrocode} -% widows/orphans +%\begin{macro}{\@subfloatcapbox} +% Box to store subfloat caption. % \begin{macrocode} -\widowpenalty=10000\relax -\clubpenalty=10000\relax + \newsavebox\@subfloatcapbox % \end{macrocode} -% Put marginal notes on the outside of the page +%\end{macro} +%\begin{macro}{\@subfloatcontsbox} +% Box to store subfloat contents. % \begin{macrocode} -\@mparswitchtrue + \newsavebox\@subfloatcontsbox % \end{macrocode} -%\changes{1.18}{2013-10-17}{removed \cs{ds@draft}} -% Use the plainnat bibliography style and set up the required -% punctuation. +%\end{macro} +%\begin{macro}{\subfigure} % \begin{macrocode} -\bibliographystyle{plainnat} -\bibpunct{(}{)}{;}{a}{,}{,} + \newcommand*{\subfigure}[1][]{% + \bgroup + \def\@subfigcap{#1}% + \@subfigure + } % \end{macrocode} -%\subsection{Sections} -%\begin{macro}{\section} +%\changes{1.09}{2010/12/01}{Added check to determine whether the +%subfigure caption is wider than the subfigure} % \begin{macrocode} -\renewcommand{\section}{\@startsection{section}{1}{\z@}% - {-0.24in \@plus -1ex \@minus -.2ex}% - {0.10in \@plus.2ex}% - {\normalfont\rmfamily\bfseries\large\raggedright}% -} + \newcommand*{\@subfigure}[2][b]{% + \advance\c@figure by 1\relax + \refstepcounter{subfigure}% + \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}% + \ifx\@subfigcap\@empty + \else + \space\@subfigcap + \fi}% + \sbox\@subfloatcontsbox{#2}% + \settowidth{\@tempdima}{\usebox\@subfloatcontsbox}% + \settowidth{\@tempdimb}{\usebox\@subfloatcapbox}% + \ifdim\@tempdimb>\@tempdima + \settowidth\@tempdimb{\subfigurelabel{\thesubfigure}\space}% + \addtolength{\@tempdima}{-\@tempdimb}% + \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space + \parbox[t]{\@tempdima}{\@subfigcap}}% + \fi + \begin{tabular}[#1]{@{}c@{}}% + \usebox\@subfloatcontsbox\\\usebox\@subfloatcapbox + \end{tabular}% + \egroup + } % \end{macrocode} %\end{macro} -%\begin{macro}{\subsection} +% +% Sub-tables: +%\begin{macro}{\c@subtable} +% Define subtable counter: % \begin{macrocode} -\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% - {-0.20in \@plus -1ex \@minus -.2ex}% - {0.08in \@plus .2ex}% - {\normalfont\rmfamily\bfseries\normalsize\raggedright}% -} + \newcounter{subtable} + \@addtoreset{subtable}{table} % \end{macrocode} %\end{macro} -%\begin{macro}{\subsubsection} +%\begin{macro}{\thesubtable} % \begin{macrocode} -\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% - {-0.18in \@plus -1ex \@minus -.2ex}% - {0.08in \@plus .2ex}% - {\normalfont\normalsize\rmfamily\mdseries\scshape\raggedright}% -} + \renewcommand*{\thesubtable}{\alph{subtable}} % \end{macrocode} %\end{macro} -%\begin{macro}{\paragraph} +%\begin{macro}{\p@subtable} % \begin{macrocode} -\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% - {1.5ex plus 0.5ex minus .2ex}% - {-1em}% - {\normalfont\normalsize\rmfamily\bfseries}% -} + \renewcommand*{\p@subtable}{\expandafter\@p@subtable} + \newcommand*{\@p@subtable}[1]{% + \protect\@subtablelabel{\thetable}{\thesubtable}% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\subparagraph} +%\begin{macro}{\@subtablelabel} +% Define how label appears. % \begin{macrocode} -\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}% - {1.5ex plus 0.5ex minus .2ex}% - {-1em}% - {\normalfont\normalsize\rmfamily\bfseries\itshape}} + \newcommand*\@subtablelabel[2]{#1\subtablelabel{#2}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\@seccntformat} -% Redefine the way the section number appears in the section -% heading. +%\begin{macro}{\subtabref} +% Reference the sub-table without including the table number. % \begin{macrocode} -\renewcommand*\@seccntformat[1]{% - \csname pre#1num\endcsname - \csname the#1\endcsname.\enskip -} + \newcommand*\@subtabref[1]{% + {% + \def\@subtablelabel##1##2{\subtablelabel{##2}}% + \ref{#1}% + }% + } + \newcommand*{\subtabref}[1]{% + \let\@objectname\@empty + \def\@objectref{}% + \let\@prevsep\@empty + \@for\@thislabel:=#1\do{% + \toks@{\@prevsep}% + \protected@edef\@objectref{\@objectref\the\toks@ + \protect\@subtabref{\@thislabel}}% + \ifx\@objectname\@empty + \let\@objectname\@nil + \else + \let\@objectname\relax + \let\@prevsep\@jmlr@reflistsep + \fi + }% + \ifx\@objectname\relax + \let\@prevsep\@jmlr@reflistlastsep + \fi + \@objectref + } % \end{macrocode} %\end{macro} -% -%\subsection{Footnotes} -%\begin{macro}{\@makefntext} -%\changes{1.08}{2010-07-27}{new} -% Redefine \cs{@makefntext} so that the text between the footnote -% symbol and the footnote text can be redefined. (It looks odd -% having a full stop after a symbol.) +%\begin{macro}{\subtablelabel} % \begin{macrocode} -\renewcommand*{\@makefntext}[1]{% - \@setpar - {% - \@@par - \@tempdima\hsize - \advance \@tempdima -15pt\relax - \parshape \@ne 15pt \@tempdima - }% - \par - \parindent 2em\noindent - \hbox to \z@ {\hss {\@thefnmark }\footnoteseptext\hfil }#1% -} + \newcommand*{\subtablelabel}[1]{(\emph{#1})} % \end{macrocode} %\end{macro} -%\begin{macro}{\footnoteseptext} -%\changes{1.08}{2010-07-27}{new} -% The separation text between the footnote symbol and the footnote -% text. +%\begin{macro}{\subtable} % \begin{macrocode} -\newcommand*{\footnoteseptext}{. } + \newcommand*{\subtable}[1][]{% + \def\@subtabcap{#1}% + \@subtable + } % \end{macrocode} -%\end{macro} -%\begin{macro}{\thanks} -%\changes{1.21}{2015-02-24}{added optional argument to \cs{footnotetext}} -%\changes{1.10}{2011-01-05}{Modified definition of \cs{thanks}} -%Added optional argument to \cs{footnotetext} as per -%\url{http://tex.stackexchange.com/questions/229295}. +%\changes{1.09}{2010/12/01}{Added check to determine whether the +%subtable caption is wider than the subtable} % \begin{macrocode} -\renewcommand*{\thanks}[1]{% - \footnotemark - \protected@xdef\@thanks{\@thanks - \protect\footnotetext[\arabic{footnote}]{#1}}% -} + \newcommand*{\@subtable}[2][t]{% + \refstepcounter{subtable}% + \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}% + \ifx\@subtabcap\@empty + \else + \space\@subtabcap + \fi}% + \sbox\@subfloatcontsbox{#2}% + \settowidth{\@tempdima}{\usebox\@subfloatcontsbox}% + \settowidth{\@tempdimb}{\usebox\@subfloatcapbox}% + \ifdim\@tempdimb>\@tempdima + \settowidth\@tempdimb{\subtablelabel{\thesubtable}\space}% + \addtolength{\@tempdima}{-\@tempdimb}% + \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space + \parbox[t]{\@tempdima}{\@subtabcap}}% + \fi + \begin{tabular}[#1]{@{}c@{}}% + \usebox\@subfloatcapbox\\\usebox\@subfloatcontsbox + \end{tabular} + } % \end{macrocode} %\end{macro} -% -%\subsection{Article abstract} -% This code has been taken from jmlr2e.sty but with \cs{bf} updated -% to \cs{bfseries} -%\begin{environment}{abstract} +%End of sub-floats. % \begin{macrocode} -\ifjmlrhtml - \renewenvironment{abstract}{\HCode{

}Abstract\HCode{

}}{}% -\else - \renewenvironment{abstract} +\fi % \end{macrocode} -%\changes{1.09}{2010/12/01}{changed \cs{centerline} to -%\cs{centering}\ldots\cs{par}} +% +%\subsection{General Markup} +%Provide maths command if required. % \begin{macrocode} - {{\centering\large\bfseries Abstract\par}\vspace{0.7ex}% - \bgroup - \leftskip 20pt\rightskip 20pt\small\noindent\ignorespaces}% - {\par\egroup\vskip 0.25ex} -\fi +\ifjmlrutilsmaths % \end{macrocode} -%\end{environment} -%\subsection{Keywords} -% This code has been taken from jmlr2e.sty but with \cs{bf} updated -% to \cs{bfseries}. -%\begin{environment}{keywords} +%\begin{macro}{\set} % \begin{macrocode} -\newenvironment{keywords} -{\bgroup\leftskip 20pt\rightskip 20pt \small\noindent{\bfseries -Keywords:} \ignorespaces}% -{\par\egroup\vskip 0.25ex} + \newcommand*{\set}[1]{\ensuremath{\mathcal{#1}}} % \end{macrocode} -%\end{environment} -%\subsection{Title Page Information} -% This code has been taken from jmlr2e.sty. +%\end{macro} % -% Title stuff, borrowed in part from aaai92.sty +%\begin{macro}{\orgvec} +%\changes{1.21}{2015-02-24}{new} +%Keep a copy of original \cs{vec} in case it's wanted. % \begin{macrocode} -\newlength\aftertitskip \newlength\beforetitskip -\newlength\interauthorskip \newlength\aftermaketitskip + \let\orgvec\vec % \end{macrocode} -%% Changeable parameters. +%\end{macro} +%\begin{macro}{\vec} +% Redefine \cs{vec} to produce a bold symbol. The \sty{amsmath} +%package is required for this. % \begin{macrocode} -\setlength\aftertitskip{0.1in plus 0.2in minus 0.2in} -\setlength\beforetitskip{0.05in plus 0.08in minus 0.08in} -\setlength\interauthorskip{0.08in plus 0.1in minus 0.1in} -\setlength\aftermaketitskip{0.3in plus 0.1in minus 0.1in} + \renewcommand*{\vec}[1]{\boldsymbol{#1}} % \end{macrocode} -% -%\begin{macro}{\titlebreak} -%\changes{1.12}{2012/01/05}{new} -% Acts like new line in the paper title, but with jmlrbook acts like a space in -% the table of contents and bookmarks. +%\end{macro} +%End of maths commands. % \begin{macrocode} -\newcommand*{\titlebreak}{\newline} +\fi % \end{macrocode} -%\end{macro} % -%\begin{macro}{\titletag} -%\changes{1.17}{2012/05/30}{new} +%\begin{environment}{enumerate*} +% Define an enumerate style environment where the nested environments +% all use the same counter. It uses the enumi counter. % \begin{macrocode} -\newcommand*{\titletag}[1]{} +\newenvironment{enumerate*}% +{% + \ifnum\@enumdepth=0\relax + \setcounter{enumi}{0}% + \fi + \ifnum\@enumdepth>\thr@@ + \@toodeep + \else + \advance\@enumdepth\@ne + \def\@enumctr{enumi}% + \list + {\labelenumi}% + {\@nmbrlisttrue\def\@listctr{enumi}% + \def\makelabel##1{\hss\llap{##1}}}% + \fi +}% +{\endlist} % \end{macrocode} -%\end{macro} +%\end{environment} % -%\begin{macro}{\title} -% Override definition of \cs{title} to allow for an optional -% argument (short title) +%\begin{environment}{altdescription} +% Define a description like environment where the indent is +% computed from the widest label. The optional argument is +% the widest label. % \begin{macrocode} -\renewcommand*{\title}[2][\@title]{% - \def\@shorttitle{#1}% - \def\@title{#2}% - \protected@write\@auxout{}{\string\jmlr@title{#1}{#2}}% - \jmlrtitlehook -} +\newenvironment{altdescription}[1]% + {\list{}% + {% + \settowidth{\labelwidth}{\altdescriptionlabel{#1}}% + \setlength{\labelsep}{15pt}% + \setlength{\leftmargin}{2\labelsep}% + \addtolength{\leftmargin}{\labelwidth}% + \setlength{\rightmargin}{\labelsep}% + \let\makelabel\altdescriptionlabel + }% + }% + {\endlist} + +\newcommand*{\altdescriptionlabel}[1]{\normalfont\bfseries #1\hfill} % \end{macrocode} -%\end{macro} -%\begin{macro}{\@shorttitle} -%\changes{1.12}{2012/01/05}{provided default value} -% The short title of the document is initialised to \cs{jobname} to -% ensure a basic document will compile even if no title is set. +%\end{environment} +% +%\begin{macro}{\mailto} +% Syntax: \cs{mailto}\marg{address} % \begin{macrocode} -\newcommand*{\@shorttitle}{\jobname} +\newcommand*{\mailto}[1]{\texttt{#1}} % \end{macrocode} %\end{macro} % -%\begin{macro}{\jmlrtitlehook} +%\subsection{Proofs and Theorems} % \begin{macrocode} -\newcommand*{\jmlrtitlehook}{} +\ifjmlrutilstheorems % \end{macrocode} -%\end{macro} -%\begin{macro}{\jmlr@title} -%\changes{1.20}{2014/10/15}{new} -% AUX command provided for MakeJmlrBookGUI +% This code is taken from jmlr2e.sty +%\begin{macro}{\jmlrBlackBox} +% End of proof marker. +%\changes{1.24}{2017-08-01}{new} +%This command was formerly called \cs{BlackBox} but has been renamed +%in case of a clash with symbol packages. % \begin{macrocode} -\newcommand*{\jmlr@title}[2]{} + \newcommand{\jmlrBlackBox}{\rule{1.5ex}{1.5ex}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\author} -% Override definition of \cs{author} to allow for an optional -% argument (list of authors for page heading) +%\begin{macro}{\BlackBox} +% Backward compatibility in case it was used explicitly. % \begin{macrocode} -\renewcommand*{\author}[2][]{% - \def\@author{#2}% - \def\@sauthor{#1}% - \def\@jmlr@aux@author{#2}\@onelevel@sanitize\@jmlr@aux@author - \ifx\@sauthor\@empty - \let\@jmlr@aux@sauthor\@jmlr@aux@author - \else - \let\@shortauthor\@sauthor - \def\@jmlr@aux@sauthor{#1}\@onelevel@sanitize\@jmlr@aux@sauthor - \fi - \jmlrauthorhook - \protected@write\@auxout - {}{\string\jmlr@author{\@jmlr@aux@sauthor}{\@jmlr@aux@author}}% -} + \providecommand{\BlackBox}{\jmlrBlackBox} % \end{macrocode} %\end{macro} -%\begin{macro}{\jmlrauthorhook} +%\begin{macro}{\jmlrQED} +%\changes{1.21}{2015-02-24}{new} +%\changes{1.24}{2017-08-01}{changed to use \cs{par}} % \begin{macrocode} -\newcommand*{\jmlrauthorhook}{} + \newcommand{\jmlrQED}{\hfill\jmlrBlackBox\par\bigskip} % \end{macrocode} %\end{macro} -%\begin{macro}{\jmlr@author} -%\changes{1.20}{2014/10/15}{new} -% AUX command provided for MakeJmlrBookGUI +%\begin{environment}{proof} +% Proof environment % \begin{macrocode} -\newcommand*{\jmlr@author}[2]{} + \newenvironment{proof}% + {% + \par\noindent{\bfseries\upshape Proof\ }% + }% + {\jmlrQED} % \end{macrocode} -%\end{macro} +%\end{environment} % -%\begin{macro}{\@shortauthor} +% Since \sty{theorem}, \sty{ntheorem} and \sty{amsthm} all cause +% problems with the \cls{jmlr} and \cls{jmlrbook} classes, +% this package provides a simple alternative. +% +%\begin{macro}{\theorembodyfont} +%\changes{1.18}{2013-10-17}{new} +%\begin{definition} +%\cs{theorembodyfont}\marg{font declarations} +%\end{definition} % \begin{macrocode} -\newcommand*{\@shortauthor}{} + \newcommand*{\theorembodyfont}[1]{% + \renewcommand*{\@theorembodyfont}{#1}% + } + \newcommand*{\@theorembodyfont}{\normalfont\itshape}% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\@firstauthor} +%\begin{macro}{\theoremheaderfont} +%\changes{1.18}{2013-10-17}{new} +%\begin{definition} +%\cs{theoremheaderfont}\marg{font declarations} +%\end{definition} % \begin{macrocode} -\newcommand*{\@firstauthor}{} + \newcommand*{\theoremheaderfont}[1]{% + \renewcommand*{\@theoremheaderfont}{#1}% + } + \newcommand*{\@theoremheaderfont}{\normalfont\bfseries }% % \end{macrocode} %\end{macro} -%\begin{macro}{\@firstsurname} +% +%\begin{macro}{\theoremsep} +%\changes{1.18}{2013-10-17}{new} +%\begin{definition} +%\cs{theoremsep}\marg{separation code} +%\end{definition} % \begin{macrocode} -\newcommand*{\@firstsurname}{} + \newcommand*{\theoremsep}[1]{% + \renewcommand*{\@theoremsep}{#1}% + } + \newcommand*{\@theoremsep}{}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\jmlrlength} +%\begin{macro}{\theorempostheader} +%\changes{1.18}{2013-10-17}{new} +%\begin{definition} +%\cs{theorempostheader}\marg{text} +%\end{definition} % \begin{macrocode} -\newlength\jmlrlength + \newcommand*{\theorempostheader}[1]{% + \renewcommand*{\@theorempostheader}{#1}% + } + \newcommand*{\@theorempostheader}{}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\jmlrmaketitle} -% Make the title -% \begin{macrocode} -\def\jmlrmaketitle{% - \jmlrpremaketitlehook - \def\@jmlr@authors@sep{, }% - \par - \begingroup -% \end{macrocode} -%\changes{1.08}{2010-07-27}{modified footnote marker in the footnote -%text so that it is raised and isn't followed by a full stop} +%\begin{macro}{\newtheorem} +%\changes{1.18}{2013-10-17}{new} % \begin{macrocode} - \def\footnoteseptext{ }% - \def\thempfn{\textsuperscript{\thefootnote}}% - \def\thefootnote{\fnsymbol{footnote}}% + \let\jmlr@org@newtheorem\newtheorem + \renewcommand*{\newtheorem}{\@ifstar\jmlr@snewtheorem\jmlr@newtheorem} % \end{macrocode} -%\changes{1.07}{2010-06-30}{added check for two column mode} +% Define starred version: +%\begin{definition} +%\cs{newtheorem*}\marg{env-name}\marg{title tag} +%\end{definition} % \begin{macrocode} - \if@twocolumn - \twocolumn[\@jmlrmaketitle]% - \else - \@jmlrmaketitle - \fi - \@thanks - \endgroup -\label{jmlrstart}% -\ifx\@sauthor\@empty - \settowidth{\jmlrlength}{\@evenhead}% - \ifdim\jmlrlength>\textwidth - \def\@shortauthor{\@firstsurname\space et al.}% - \fi -\fi -\settowidth{\jmlrlength}{\@titlefoot}% -\ifdim\jmlrlength>\textwidth - \def\@jmlrauthors{\@firstauthor\space \emph{et al}}% -\fi -\jmlrmaketitlehook -\thispagestyle{jmlrtps}% -\setcounter{footnote}{0}% -\let\maketitle\relax \let\@maketitle\relax -\gdef\@thanks{}\gdef\@author{}\let\thanks\@gobble -\def\@jmlr@authors@sep{ \& }% -} + \newcommand*{\jmlr@snewtheorem}[2]{% + \cslet{jmlr@thm@#1@body@font}{\@theorembodyfont}% + \cslet{jmlr@thm@#1@header@font}{\@theoremheaderfont}% + \cslet{jmlr@thm@#1@sep}{\@theoremsep}% + \cslet{jmlr@thm@#1@postheader}{\@theorempostheader}% + \newenvironment{#1}% + {% + \trivlist + \item + [% + \hskip\labelsep{\csuse{jmlr@thm@#1@header@font}#2% + \csuse{jmlr@thm@#1@postheader}% + }% + ]% + \mbox{}\csuse{jmlr@thm@#1@sep}% + \csuse{jmlr@thm@#1@body@font}% + }% + {% + \endtrivlist + }% + } % \end{macrocode} %\end{macro} -% -%\begin{macro}{\jmlrmaketitlehook} +% Unstarred version needs adjusting to take the style into account: +%\begin{macro}{\@othm} +%\changes{1.18}{2013-10-17}{new} % \begin{macrocode} -\newcommand*{\jmlrmaketitlehook}{} + \newcommand{\jmlr@newtheorem}[1]{% + \cslet{jmlr@thm@#1@body@font}{\@theorembodyfont}% + \cslet{jmlr@thm@#1@header@font}{\@theoremheaderfont}% + \cslet{jmlr@thm@#1@sep}{\@theoremsep}% + \cslet{jmlr@thm@#1@postheader}{\@theorempostheader}% + \jmlr@org@newtheorem{#1}% + } % \end{macrocode} %\end{macro} -%\begin{macro}{\jmlrpremaketitlehook} +%\begin{macro}{\@xthm} +%\changes{1.18}{2013-10-17}{new} % \begin{macrocode} -\newcommand*{\jmlrpremaketitlehook}{} + \renewcommand*{\@xthm}[2]{% + \def\@jmlr@currentthm{#1}% + \@begintheorem{#2}{\csname the#1\endcsname}% + \ignorespaces + } % \end{macrocode} %\end{macro} -% -% Provide a different title layout for HTML -%\begin{macro}{\jmlrhtmlmaketitle} +%\begin{macro}{\@ythm} +%\changes{1.18}{2013-10-17}{new} % \begin{macrocode} -\newcommand{\jmlrhtmlmaketitle}{% - \ifx\@jmlr@authors\@empty - \sbox\jmlrbox{\let\addr\relax\@author}% - \fi - \noindent\HCode{

}\@title\HCode{

} - \noindent\@jmlr@authors -} + \def\@ythm#1#2[#3]{% + \def\@jmlr@currentthm{#1}% + \@opargbegintheorem{#2}{\csname the#1\endcsname}{#3}% + \ignorespaces + } % \end{macrocode} %\end{macro} -%%\begin{macro}{\jmlrbox} -% Define a save box +%\begin{macro}{\@begintheorem} +%\changes{1.18}{2013-10-17}{new} % \begin{macrocode} -\newsavebox\jmlrbox + \renewcommand*{\@begintheorem}[2]{% + \ifdef{\@jmlr@currentthm}% + {% + \letcs{\jmlr@this@theoremheader}{jmlr@thm@\@jmlr@currentthm @header@font}% + \letcs{\jmlr@this@theorembody}{jmlr@thm@\@jmlr@currentthm @body@font}% + \letcs{\jmlr@this@theoremsep}{jmlr@thm@\@jmlr@currentthm @sep}% + \letcs{\jmlr@this@theorempostheader}% + {jmlr@thm@\@jmlr@currentthm @postheader}% + }% + {% + \let\jmlr@this@theorembody\@theorembodyfont + \let\jmlr@this@theoremheader\@theoremheaderfont + \let\jmlr@this@theoremsep\@theoremsep + \let\jmlr@this@theorempostheader\@theorempostheader + }% + \trivlist + \item + [% + \hskip\labelsep{\jmlr@this@theoremheader #1\ #2% + \jmlr@this@theorempostheader}% + ]% + \mbox{}\jmlr@this@theoremsep + \jmlr@this@theorembody + } % \end{macrocode} %\end{macro} -%\begin{macro}{\maketitle} -% If we're creating HTML, set \cs{maketitle} to -% \cs{jmlrhtmlmaketitle}, otherwise set it to \cs{jmlrmaketitle} +%\begin{macro}{\@opargbegintheorem} +%\changes{1.18}{2013-10-17}{new} % \begin{macrocode} -\ifjmlrhtml - \let\maketitle\jmlrhtmlmaketitle -\else - \let\maketitle\jmlrmaketitle -\fi + \renewcommand*{\@opargbegintheorem}[3]{% + \ifdef{\@jmlr@currentthm}% + {% + \letcs{\jmlr@this@theoremheader}{jmlr@thm@\@jmlr@currentthm @header@font}% + \letcs{\jmlr@this@theorembody}{jmlr@thm@\@jmlr@currentthm @body@font}% + \letcs{\jmlr@this@theoremsep}{jmlr@thm@\@jmlr@currentthm @sep}% + \letcs{\jmlr@this@theorempostheader}% + {jmlr@thm@\@jmlr@currentthm @postheader}% + }% + {% + \let\jmlr@this@theorembody\@theorembodyfont + \let\jmlr@this@theoremheader\@theoremheaderfont + \let\jmlr@this@theoremsep\@theoremsep + \let\jmlr@this@theorempostheader\@theorempostheader + }% + \trivlist + \item[\hskip\labelsep{\jmlr@this@theoremheader #1\ #2\ (#3)% + \jmlr@this@theorempostheader}]% + \mbox{}\jmlr@this@theoremsep + \jmlr@this@theorembody + } % \end{macrocode} %\end{macro} % -% Author and editor information. +%\begin{environment}{example} % \begin{macrocode} -\def\@startauthor{\noindent \normalsize\bfseries} -\def\@endauthor{} -\def\@starteditor{\noindent \small {\bfseries \@edname:~}} -\def\@endeditor{\normalsize} + \newtheorem{example}{Example} % \end{macrocode} -% Provide hooks to make it easier to adapted with \cls{combine} -% class. -%\begin{macro}{\jmlrpretitle} +%\end{environment} +%\begin{environment}{theorem} % \begin{macrocode} -\def\jmlrpretitle{\vskip\beforetitskip\begin{center}\Large\bfseries} + \newtheorem{theorem}{Theorem} % \end{macrocode} -%\end{macro} -%\begin{macro}{\jmlrposttitle} +%\end{environment} +%\begin{environment}{lemma} % \begin{macrocode} -\def\jmlrposttitle{\par\end{center}\vskip\aftertitskip} + \newtheorem{lemma}[theorem]{Lemma} % \end{macrocode} -%\end{macro} -%\begin{macro}{\nametag} -%\changes{1.09}{2010/12/01}{new} +%\end{environment} +%\begin{environment}{proposition} % \begin{macrocode} -\newcommand*{\nametag}[1]{} + \newtheorem{proposition}[theorem]{Proposition} % \end{macrocode} -%\end{macro} -%\begin{macro}{\jmlrpreauthor} -%\changes{1.09}{2010/12/01}{added \cs{nametag}} +%\end{environment} +%\begin{environment}{remark} % \begin{macrocode} -\def\jmlrpreauthor{% -\bgroup - \def\nametag##1{##1}% - \def\and{\unskip\enspace{\normalfont and}\enspace}% + \newtheorem{remark}[theorem]{Remark} % \end{macrocode} -%\changes{1.10}{2011-01-05}{added \cs{mdseries} to \cs{addr}} +%\end{environment} +%\begin{environment}{corollary} % \begin{macrocode} - \def\addr{\mdseries\small\itshape}% - \def\name{\ClassError{jmlr}{Use \string\Name{Author's Name} not \string\name}{}}% - \def\email{\ClassError{jmlr}{Use \string\Email{address} not \string\email}{}}% - \def\AND{\@endauthor\normalfont\hss \vskip \interauthorskip - \@startauthor}% - \@startauthor -} + \newtheorem{corollary}[theorem]{Corollary} % \end{macrocode} -%\end{macro} -%\begin{macro}{\addr} -%\changes{1.20}{2014/10/15}{initialised to nothing} -% Initialise to do nothing if used outside of \cs{author} +%\end{environment} +%\begin{environment}{definition} % \begin{macrocode} -\newcommand{\addr}{} + \newtheorem{definition}[theorem]{Definition} % \end{macrocode} -%\end{macro} -%\begin{macro}{\@email} +%\end{environment} +%\begin{environment}{conjecture} % \begin{macrocode} -\def\@email{\hfill\small\mdseries\scshape}% + \newtheorem{conjecture}[theorem]{Conjecture} % \end{macrocode} -%\end{macro} -%\begin{macro}{\@name} +%\end{environment} +%\begin{environment}{axiom} % \begin{macrocode} -\def\@name{\normalsize\upshape\bfseries}% + \newtheorem{axiom}[theorem]{Axiom} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\@parsename} -% Parse a name. Appends forename to \cs{@forenames} and stores -% surname in \cs{@surname}. +%\end{environment} +% End of theorem definitions. % \begin{macrocode} -\def\@parsename#1 #2\end@parsename{% - \def\@tmp{#2}% - \ifx\@tmp\@nnil - \def\@surname{#1}% - \let\@nextparsename\@parsenamenoop - \else - \@getinitial#1-\relax\relax\end@getinitial - \ifx\@forenames\@empty - \def\@forenames{#1}% - \protected@edef\@initials{\@initial}% - \else - \expandafter\toks@\expandafter{\@forenames}% - \edef\@forenames{\space\the\toks@}% - \expandafter\toks@\expandafter{\@initials}% - \protected@edef\@initials{\the\toks@\@initial}% - \fi - \let\@nextparsename\@parsename - \fi - \@nextparsename#2\end@parsename -} -\def\@parsenamenoop#1\end@parsename{} +\fi % \end{macrocode} -%\end{macro} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*jmlr.cls> +% \end{macrocode} +%\fi +%\section{jmlr.cls Code} +% This class is based on the \sty{jmlr2e} package but was modified to make sure +% it works with \clsfmt{jmlrbook} which uses both \cls{combine} and +% \sty{hyperref}. % -%\begin{macro}{\@getinitial} +% Declare class and required TeX format: % \begin{macrocode} -\def\@getinitial#1#2-#3#4\end@getinitial{% - \def\@jmlr@tmp{#3}% - \if\@jmlr@tmp\relax - \def\@initial{#1.}% - \else - \def\@initial{#1.-#3.}% - \fi -} +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{jmlr}[2017/08/01 v1.24 (NLCT) Journal of Machine Learning Research] +% \end{macrocode} +%\changes{1.10}{2011-01-05}{hyperref now loaded by jmlr instead of +%jmlrbook} +% Need \sty{xkeyval} package to have key=value class options +% \begin{macrocode} +\RequirePackage{xkeyval} +% \end{macrocode} +%\changes{1.18}{2013-10-17}{now requires calc package} +% \begin{macrocode} +\RequirePackage{calc} +% \end{macrocode} +%\changes{1.18}{2013-10-17}{now requires etoolbox package} +% \begin{macrocode} +\RequirePackage{etoolbox} +% \end{macrocode} +% Some packages need to be loaded before \sty{hyperref} so provide a +% hook to do this: +%\begin{macro}{\jmlrprehyperref} +%\changes{1.12}{2012/01/05}{removed @ from name so it can be defined +%by user} +% \begin{macrocode} +\providecommand*{\jmlrprehyperref}{} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\Name} -% Get the author's name and add surname to \cs{@shortauthors}. -% (Surnames with \qt{von} parts or with spaces in should be -% enclosed in braces) -%\changes{1.12}{2012/01/05}{added optional argument} +%\changes{1.12}{2012/01/05}{removed class option prehyperref} +% The following conditionals are provided to make this class play nicely +% with combine and aren't required for articles. % \begin{macrocode} -\newcommand*{\Name}[2][]{% - \def\@authorlist{#1}% - \def\@forenames{}% - \def\@surname{}% - \def\nametag##1{}% - \@parsename#2 \@nil\end@parsename - \ifx\@shortauthor\@empty - \ifx\@sauthor\@empty - \global\let\@shortauthor\@surname - \global\let\@firstsurname\@surname - \fi - \ifx\@authorlist\@empty - \protected@xdef\@jmlrauthors{\@initials\space\@surname}% - \else - \protected@xdef\@jmlrauthors{\@authorlist}% - \fi - \global\let\@firstauthor\@jmlrauthors - \else - \ifx\@sauthor\@empty - \expandafter\toks@\expandafter{\@shortauthor}% - \protected@xdef\@shortauthor{\the\toks@\space\@surname}% - \fi - \ifx\@authorlist\@empty - \ifx\@jmlrauthors\@empty - \protected@xdef\@jmlrauthors{\@initials\space\@surname}% - \else - \protected@xdef\@jmlrauthors{\@jmlrauthors - \noexpand\@jmlr@authors@sep - \@initials\space\@surname}% - \fi - \else - \ifx\@jmlrauthors\@empty - \protected@xdef\@jmlrauthors{\@authorlist}% - \else - \protected@xdef\@jmlrauthors{\@jmlrauthors - \noexpand\@jmlr@authors@sep - \@authorlist - }% - \fi - \fi - \fi - \def\nametag##1{##1}% - \@name #2% -} +\newif\if@openright +\newif\if@mainmatter \@mainmattertrue % \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{macro}{\ifgrayscale} +% Determine whether to select grayscale alternatives % \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 -} +\@ifundefined{ifgrayscale}{ + \newif\ifgrayscale + \grayscalefalse +}{} +\DeclareOptionX{color}{\grayscalefalse + \PassOptionsToPackage{color}{xcolor}} +\DeclareOptionX{gray}{\grayscaletrue + \PassOptionsToPackage{gray}{xcolor}} % \end{macrocode} %\end{macro} -%\begin{macro}{\@jmlrabbrname} +%\begin{option}{draft} +%\changes{1.18}{2013-10-17}{new} % \begin{macrocode} -\newcommand*{\@jmlrabbrname}[1]{% - \def\@initials{}% - \def\@surname{}% - \def\@forenames{}% - \@parsename#1 \@nil\end@parsename -} +\DeclareOptionX{draft}{\setlength\overfullrule{5pt}} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\Email} +%\end{option} +%\begin{option}{final} +%\changes{1.18}{2013-10-17}{new} % \begin{macrocode} -\newcommand*{\Email}[1]{{\@email #1}} +\DeclareOptionX{final}{\setlength\overfullrule{0pt}} +% \end{macrocode} +%\end{option} +% Can't load \sty{jmlrutils} here but need the \cs{iftablecaptiontop} +% conditional for the class options. +%\begin{macro}{\iftablecaptiontop} +%\changes{1.07}{2010-06-17}{new} +% \begin{macrocode} +\newif\iftablecaptiontop +\tablecaptiontoptrue % \end{macrocode} %\end{macro} -%\begin{macro}{\jmlrpostauthor} +% Provide table contents command that uses this conditional. +% (The \sty{jmlrutils} package doesn't use it.) +%\begin{macro}{\tableconts} % \begin{macrocode} -\def\jmlrpostauthor{\@endauthor\egroup - \par - \vskip \aftermaketitskip - \noindent - \ifx\@editor\@empty +\newcommand{\tableconts}[3]{% + \iftablecaptiontop + #2\label{#1}\vskip\baselineskip + {\centering #3\par}% \else - \@starteditor \@editor \@endeditor + {\centering #3\par}% + \vskip\baselineskip + #2\label{#1}% \fi - \vskip \aftermaketitskip } % \end{macrocode} %\end{macro} -%\begin{macro}{\@jmlrmaketitle} +% Determine if the table captions should go at the top. +%\begin{option}{tablecaptiontop} % \begin{macrocode} -\def\@jmlrmaketitle{\vbox{\hsize\textwidth - \linewidth\hsize - \jmlrpretitle - {% - \def\titletag##1{##1}% - \@title - }% - \jmlrposttitle - \jmlrpreauthor \@author \jmlrpostauthor -}} +\DeclareOptionX{tablecaptiontop}{\tablecaptiontoptrue} % \end{macrocode} -%\end{macro} -%\begin{macro}{\kernelmachines} -% Convenience command +%\end{option} +%\begin{option}{tablecaptiontop} % \begin{macrocode} -\newcommand*\kernelmachines{(for - {\textsc{http://www.kernel-machines.org}})} +\DeclareOptionX{tablecaptionbottom}{\tablecaptiontopfalse} % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\editorname} -% Label for the editor +%\end{option} +%\begin{option}{tablecaption} +%Key=value interface. % \begin{macrocode} -\newcommand*{\editorname}{Editor} +\define@choicekey{jmlr.cls}{tablecaption}[\val\nr]{top,bottom}{% + \ifcase\nr\relax + \tablecaptiontoptrue + \or + \tablecaptiontopfalse + \fi +} % \end{macrocode} -%\end{macro} -%\begin{macro}{\editorsname} -% Label for the editor +%\end{option} +%\begin{macro}{\ifjmlrhtml} +% Determine if we are using \app{TeX4ht}. (Deprecated.) +%This option should no longer be used. The PMLR have changed +%the submission guidelines and the production editor should +%no longer supply HTML files. % \begin{macrocode} -\newcommand*{\editorsname}{Editors} +\newif\ifjmlrhtml +\jmlrhtmlfalse +\DeclareOptionX{html}{% + \ClassWarning{jmlr}{html option is now deprecated}% + \jmlrhtmltrue} +\DeclareOptionX{nohtml}{\jmlrhtmlfalse} % \end{macrocode} %\end{macro} -%\begin{macro}{\@edname} -% This will either be Editor or Editors depending on whether -% \cs{editor} or \cs{editors} is used. Defaults to \cs{editorname} +% Normal font size (default is 11pt). +%\changes{1.10}{2011-01-05}{font size options don't pass option to +%class} % \begin{macrocode} -\let\@edname\editorname +\def\pt@size{11pt} +\DeclareOptionX{10pt}{\renewcommand{\pt@size}{10pt}} +\DeclareOptionX{11pt}{\renewcommand{\pt@size}{11pt}} +\DeclareOptionX{12pt}{\renewcommand{\pt@size}{12pt}} % \end{macrocode} -%\end{macro} -%\begin{macro}{\@editor} -% The editor or editors are stored in \cs{@editor} +%\begin{macro}{\@jmlrproceedings} +% The name of the proceedings. % \begin{macrocode} -\def\@editor{} +\newcommand*{\@jmlrproceedings}{Journal of Machine Learning Research} % \end{macrocode} %\end{macro} -%\begin{macro}{\editor} -% A single editor +%\begin{macro}{\@jmlrabbrvproceedings} +% The abbreviated name of the proceedings. % \begin{macrocode} -\def\editor#1{% - \global\let\@edname\editorname - \gdef\@editor{#1}% -} +\newcommand*{\@jmlrabbrvproceedings}{JMLR} % \end{macrocode} %\end{macro} -%\begin{macro}{\editors} -% Multiple editors +%\begin{macro}{\jmlrproceedings} +% Sets the title and abbreviation of the proceedings % \begin{macrocode} -\def\editors#1{% - \global\let\@edname\editorsname - \gdef\@editor{#1}% +\newcommand*{\jmlrproceedings}[2]{% + \renewcommand*{\@jmlrabbrvproceedings}{#1}% + \renewcommand*{\@jmlrproceedings}{#2}% } % \end{macrocode} %\end{macro} % -%\subsection{Pagestyles} -% This is taken from jmlr2e.sty -% -%\begin{macro}{\firstpageno} -% Set the page counter. +%\begin{macro}{\jmlrnowcp} % \begin{macrocode} -\def\firstpageno#1{\setcounter{page}{#1}} +\newcommand*{\jmlrnowcp}{% + \jmlrproceedings{JMLR}{Journal of Machine Learning Research}% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\startpage} -%\changes{1.10}{2011-01-05}{new} -% If \cs{startpage} has been defined, use its value for the first -% page. +%\begin{macro}{\jmlrwcp} +%\changes{1.11}{2011-03-24}{Fixed typo} % \begin{macrocode} -\@ifundefined{startpage}{}{\firstpageno{\startpage}} +\newcommand*{\jmlrwcp}{% + \jmlrproceedings{JMLR W\&CP}{JMLR: Workshop and Conference Proceedings}% +} % \end{macrocode} %\end{macro} -% -% Label end page. -%\begin{macro}{\@jmlrenddoc} -% Label end page +%\begin{macro}{\jmlrpmlr} +%\changes{1.23}{2017-03-09}{new} +%The JMLR W\&CP has been renamed PMLR, so provide code to switch to +%this instead, % \begin{macrocode} -\newcommand*{\@jmlrenddoc}{% - \phantomsection - \protected@edef\@currentlabelname{end of \@shorttitle}% - \label{jmlrend}\null - \global\let\@reprint\@empty +\newcommand*{\jmlrpmlr}{% + \jmlrproceedings{PMLR}{Proceedings of Machine Learning Research}% } % \end{macrocode} %\end{macro} -% -%\begin{macro}{\@titlefoot} -%\changes{1.09}{2010/12/01}{added \cs{@reprint}} +% This is a journal (non JMLR W\&CP\slash PMLR) article: % \begin{macrocode} -\newcommand*{\@titlefoot}{\scriptsize\copyright\space\@jmlryear - \space\@jmlr@authors.\hfill - \@reprint -} +\DeclareOptionX{nowcp}{\jmlrnowcp} % \end{macrocode} -%\end{macro} -%\begin{macro}{\reprint} -%\changes{1.09}{2010/12/01}{new} +% This is an article for JMLR W\&CP % \begin{macrocode} -\let\@reprint\@empty -\newcommand{\reprint}[1]{% - \gdef\@reprint{Reprinted with permission for JMLR#1}} +\DeclareOptionX{wcp}{\jmlrwcp} +% \end{macrocode} +% This is an article for PMLR +% \begin{macrocode} +\DeclareOptionX{pmlr}{\jmlrpmlr} +% \end{macrocode} +%\begin{option}{oneside} +%\changes{1.22}{2015/04/11}{new} +% \begin{macrocode} +\DeclareOptionX{oneside}{\@twosidefalse \@mparswitchfalse} +% \end{macrocode} +%\end{option} +%\begin{option}{twoside} +%\changes{1.22}{2015/04/11}{new} +% \begin{macrocode} +\DeclareOptionX{twoside}{\@twosidetrue \@mparswitchtrue} +% \end{macrocode} +%\end{option} +% Set two-sided format +% \begin{macrocode} +\@twosidetrue +% \end{macrocode} +% The default paper size is letter, but provide $7 \times 10$in +% alternative: +% \begin{macrocode} +\newif\ifviiXx +\viiXxfalse +\DeclareOptionX{7x10}{\viiXxtrue} +\DeclareOptionX{letterpaper}{\PassOptionsToPackage{letterpaper}{typearea}} +% \end{macrocode} +% Pass all remaining options to \cls{article} class: +% \begin{macrocode} +\DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{article}} +% \end{macrocode} +% Execute required options: +% \begin{macrocode} +\ExecuteOptions{letterpaper} +% \end{macrocode} +% Process options: +% \begin{macrocode} +\ProcessOptionsX +% \end{macrocode} +% Load \cls{article} class. +%\changes{1.10}{2011-01-05}{passed \cs{pt@size} when loading article +%class} +% \begin{macrocode} +\LoadClass[\pt@size]{article} +% \end{macrocode} +% Can't use \sty{geometry} package because it doesn't play nicely +% with the \cls{combine} class. +% \begin{macrocode} +\ifviiXx + \setlength{\paperwidth}{7in} + \setlength{\paperheight}{10in} + \setlength{\textwidth}{5.25in} + \setlength{\textheight}{8.2in} + \setlength{\topmargin}{0.4in} + \setlength{\headheight}{0.2in} + \setlength{\headsep}{0.2in} + \setlength{\hoffset}{-1in} + \setlength{\voffset}{-1in} + \setlength{\evensidemargin}{0.75in} + \setlength{\oddsidemargin}{1.0in} +\else + \setlength{\oddsidemargin}{0.25in} + \setlength{\evensidemargin}{0.25in} + \setlength{\marginparwidth}{0.07 true in} + \setlength{\topmargin}{-0.5in} + \addtolength{\headsep}{0.25in} + \setlength{\textheight}{8.5 true in} + \setlength{\textwidth}{6.0 true in} +\fi +% \end{macrocode} +% Need to add jmlr end document hook before natbib adds a +% \cs{clearpage} to it. +% \begin{macrocode} +\AtEndDocument{\@jmlrenddoc} +% \end{macrocode} +% Required packages: +% \begin{macrocode} +\RequirePackage{amsmath} +\RequirePackage{amssymb} +\RequirePackage{natbib} +\RequirePackage{graphicx} +\RequirePackage{url} +\PassOptionsToPackage{x11names}{xcolor} +\RequirePackage{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.) For some reason, +% loading \sty{algorithm2e} causes the message +%\begin{verbatim} +%(\end occurred inside a group at level 1) +%\end{verbatim} +% I don't know why, but it's outside the control of this class. +% \begin{macrocode} +\PassOptionsToPackage{algo2e,ruled}{algorithm2e} +\RequirePackage{algorithm2e} +% \end{macrocode} +% Set the algorithm margin to zero. +% \begin{macrocode} +\setlength\algomargin{0pt} +% \end{macrocode} +%Load \sty{jmlrutils} before \sty{hyperref}. +%\changes{1.24}{??}{added \styfmt{jmlrutils}} +% \begin{macrocode} +\RequirePackage{jmlrutils} +% \end{macrocode} +% Do all the stuff that needs to be done before \sty{hyperref} is +% loaded: +% \begin{macrocode} +\jmlrprehyperref +% \end{macrocode} +% Do stuff that has to come immediately before \sty{hyperref} is +% loaded: +%\changes{1.13}{2012/02/25}{added \cs{@pre@hyperref}} +% \begin{macrocode} +\@ifundefined{@pre@hyperref}{}{\@pre@hyperref} +% \end{macrocode} +% Load \sty{hyperref}: +%\changes{1.19}{??}{replaced \cs{usepackage} with \cs{RequirePackage}} +% \begin{macrocode} +\RequirePackage{hyperref} +\RequirePackage{nameref} +% \end{macrocode} +% \begin{macrocode} +% Do stuff that has to come immediately after \sty{hyperref} and +% \sty{nameref} are loaded: +%\changes{1.16}{2012/05/15}{added \cs{@post@hyperref}} +\@ifundefined{@post@hyperref}{}{\@post@hyperref} +% \end{macrocode} +% Set up hyperref options: +% \begin{macrocode} +\hypersetup{colorlinks, + linkcolor=blue, + citecolor=blue, + urlcolor=magenta, + linktocpage, + plainpages=false} % \end{macrocode} -%\end{macro} % -%\begin{macro}{\ps@jmlrtps} -% Title page style % \begin{macrocode} -\newcommand\ps@jmlrtps{% - \let\@mkboth\@gobbletwo - \def\@oddhead{\scriptsize \@jmlrproceedings - \ifx\@jmlrvolume\@empty - \else - \space\@jmlrvolume - \ifx\@jmlrissue\@empty\else(\@jmlrissue)\fi - \ifx\@jmlrpages\@empty - \ifx\@jmlryear\@empty - \else - \if\@jmlrissue\@empty,\fi - \fi - \else - :% - \fi - \fi - \ifx\@jmlrpages\@empty - \else - \ifx\@jmlrvolume\@empty\space\fi - \@jmlrpages - \ifx\@jmlryear\@empty\else,\fi - \fi - \ifx\@jmlryear\@empty\else\space\@jmlryear\fi - \hfill - \ifx\@jmlrworkshop\@empty - \ifx\@jmlrsubmitted\@empty - \else - Submitted \@jmlrsubmitted - \ifx\@jmlrpublished\@empty\else;\fi - \fi - \ifx\@jmlrpublished\@empty - \else - \space Published \@jmlrpublished - \fi - \else - \space\@jmlrworkshop - \fi - }% - \let\@evenhead\@oddhead - \def\@oddfoot{\@titlefoot}% - \let\@evenfoot\@oddfoot -} +\ifgrayscale % \end{macrocode} -%\end{macro} -%\begin{macro}{\ps@jmlrps} -% Page style for subsequent pages +% If this is the print version, need to disable the hyperlinks: % \begin{macrocode} -\def\ps@jmlrps{% - \let\@mkboth\@gobbletwo - \def\@oddhead{\hfill {\small\scshape \@shorttitle} \hfill}% - \def\@oddfoot{\hfill \small\rmfamily \thepage \hfill}% - \def\@evenhead{\hfill {\small\scshape \@shortauthor} \hfill}% - \def\@evenfoot{\hfill \small\rmfamily \thepage \hfill}% -}% + \hypersetup{draft} +\fi % \end{macrocode} -% Set the page style: +% +% Float parameters: the following settings were copied from jmlr2e.sty % \begin{macrocode} -\pagestyle{jmlrps} +\renewcommand{\topfraction}{0.95} % let figure take up nearly whole page +\renewcommand{\textfraction}{0.05} % let figure take up nearly whole page % \end{macrocode} -%\end{macro} -% Set the heading information: -%\begin{macro}{\@jmlrvolume} -% The volume number: -%\changes{1.17}{2012/05/30}{changed initial definition to use -%\cs{providecommand}} +% widows/orphans % \begin{macrocode} -\providecommand*{\@jmlrvolume}{} +\widowpenalty=10000\relax +\clubpenalty=10000\relax % \end{macrocode} -%\end{macro} -%\begin{macro}{\jmlrvolume} +% Put marginal notes on the outside of the page +% \begin{macrocode} +\@mparswitchtrue +% \end{macrocode} +%\changes{1.18}{2013-10-17}{removed \cs{ds@draft}} +% Use the plainnat bibliography style and set up the required +% punctuation. % \begin{macrocode} -\newcommand*{\jmlrvolume}[1]{\renewcommand*{\@jmlrvolume}{#1}} +\bibliographystyle{plainnat} +\bibpunct{(}{)}{;}{a}{,}{,} % \end{macrocode} -%\end{macro} -%\begin{macro}{\@jmlrissue} -% The issue number: +%\subsection{Sections} +%\begin{macro}{\section} % \begin{macrocode} -\providecommand*{\@jmlrissue}{} +\renewcommand{\section}{\@startsection{section}{1}{\z@}% + {-0.24in \@plus -1ex \@minus -.2ex}% + {0.10in \@plus.2ex}% + {\normalfont\rmfamily\bfseries\large\raggedright}% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\jmlrissue} +%\begin{macro}{\subsection} % \begin{macrocode} -\newcommand*{\jmlrissue}[1]{\renewcommand*{\@jmlrissue}{#1}} +\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% + {-0.20in \@plus -1ex \@minus -.2ex}% + {0.08in \@plus .2ex}% + {\normalfont\rmfamily\bfseries\normalsize\raggedright}% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\@jmlryear} -% The year of publication: -%\changes{1.17}{2012/05/30}{changed initial definition to use -%\cs{providecommand}} +%\begin{macro}{\subsubsection} % \begin{macrocode} -\providecommand*{\@jmlryear}{} +\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {-0.18in \@plus -1ex \@minus -.2ex}% + {0.08in \@plus .2ex}% + {\normalfont\normalsize\rmfamily\mdseries\scshape\raggedright}% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\jmlryear} +%\begin{macro}{\paragraph} % \begin{macrocode} -\newcommand*{\jmlryear}[1]{\renewcommand*{\@jmlryear}{#1}} +\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% + {1.5ex plus 0.5ex minus .2ex}% + {-1em}% + {\normalfont\normalsize\rmfamily\bfseries}% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\@jmlrpages} -% The page range: -%\changes{1.17}{2012/05/30}{changed initial definition to use -%\cs{providecommand}} +%\begin{macro}{\subparagraph} % \begin{macrocode} -\providecommand*\@jmlrpages{\pageref{jmlrstart}--\pageref{jmlrend}} +\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}% + {1.5ex plus 0.5ex minus .2ex}% + {-1em}% + {\normalfont\normalsize\rmfamily\bfseries\itshape}} % \end{macrocode} %\end{macro} -%\begin{macro}{\jmlrpages} +% +%\begin{macro}{\@seccntformat} +% Redefine the way the section number appears in the section +% heading. % \begin{macrocode} -\newcommand*{\jmlrpages}[1]{\renewcommand*{\@jmlrpages}{#1}} +\renewcommand*\@seccntformat[1]{% + \csname pre#1num\endcsname + \csname the#1\endcsname.\enskip +} % \end{macrocode} %\end{macro} -%\begin{macro}{\@jmlrsubmitted} -% The date the article was submitted: -%\changes{1.17}{2012/05/30}{changed initial definition to use -%\cs{providecommand}} +% +%\subsection{Footnotes} +%\begin{macro}{\@makefntext} +%\changes{1.08}{2010-07-27}{new} +% Redefine \cs{@makefntext} so that the text between the footnote +% symbol and the footnote text can be redefined. (It looks odd +% having a full stop after a symbol.) % \begin{macrocode} -\providecommand*\@jmlrsubmitted{} +\renewcommand*{\@makefntext}[1]{% + \@setpar + {% + \@@par + \@tempdima\hsize + \advance \@tempdima -15pt\relax + \parshape \@ne 15pt \@tempdima + }% + \par + \parindent 2em\noindent + \hbox to \z@ {\hss {\@thefnmark }\footnoteseptext\hfil }#1% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\jmlrsubmitted} +%\begin{macro}{\footnoteseptext} +%\changes{1.08}{2010-07-27}{new} +% The separation text between the footnote symbol and the footnote +% text. % \begin{macrocode} -\newcommand*{\jmlrsubmitted}[1]{\renewcommand*{\@jmlrsubmitted}{#1}} +\newcommand*{\footnoteseptext}{. } % \end{macrocode} %\end{macro} -%\begin{macro}{\@jmlrpublished} -% The date the article was published: -%\changes{1.17}{2012/05/30}{changed initial definition to use -%\cs{providecommand}} +%\begin{macro}{\thanks} +%\changes{1.21}{2015-02-24}{added optional argument to \cs{footnotetext}} +%\changes{1.10}{2011-01-05}{Modified definition of \cs{thanks}} +%Added optional argument to \cs{footnotetext} as per +%\url{http://tex.stackexchange.com/questions/229295}. % \begin{macrocode} -\providecommand*\@jmlrpublished{} +\renewcommand*{\thanks}[1]{% + \footnotemark + \protected@xdef\@thanks{\@thanks + \protect\footnotetext[\arabic{footnote}]{#1}}% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\jmlrpublished} +% +%\subsection{Article abstract} +% This code has been taken from jmlr2e.sty but with \cs{bf} updated +% to \cs{bfseries} +%\begin{environment}{abstract} % \begin{macrocode} -\newcommand*{\jmlrpublished}[1]{\renewcommand*{\@jmlrpublished}{#1}} +\ifjmlrhtml + \renewenvironment{abstract}{\HCode{

}Abstract\HCode{

}}{}% +\else + \renewenvironment{abstract} % \end{macrocode} -%\end{macro} -%\begin{macro}{\@jmlrworkshop} -% The name of the workshop: -%\changes{1.17}{2012/05/30}{changed initial definition to use -%\cs{providecommand}} +%\changes{1.09}{2010/12/01}{changed \cs{centerline} to +%\cs{centering}\ldots\cs{par}} % \begin{macrocode} -\providecommand*\@jmlrworkshop{} + {{\centering\large\bfseries Abstract\par}\vspace{0.7ex}% + \bgroup + \leftskip 20pt\rightskip 20pt\small\noindent\ignorespaces}% + {\par\egroup\vskip 0.25ex} +\fi % \end{macrocode} -%\end{macro} -%\begin{macro}{\jmlrworkshop} +%\end{environment} +%\subsection{Keywords} +% This code has been taken from jmlr2e.sty but with \cs{bf} updated +% to \cs{bfseries}. +%\begin{environment}{keywords} % \begin{macrocode} -\newcommand*{\jmlrworkshop}[1]{% - \renewcommand*{\@jmlrworkshop}{#1}% - \protected@write\@auxout{}{\string\jmlr@workshop{#1}}% -} +\newenvironment{keywords} +{\bgroup\leftskip 20pt\rightskip 20pt \small\noindent{\bfseries +Keywords:} \ignorespaces}% +{\par\egroup\vskip 0.25ex} % \end{macrocode} -%\end{macro} -%\begin{macro}{\jmlr@workshop} -%\changes{1.20}{2014/10/15}{new} +%\end{environment} +%\subsection{Title Page Information} +% This code has been taken from jmlr2e.sty. +% +% Title stuff, borrowed in part from aaai92.sty % \begin{macrocode} -\newcommand*{\jmlr@workshop}[1]{} +\newlength\aftertitskip \newlength\beforetitskip +\newlength\interauthorskip \newlength\aftermaketitskip % \end{macrocode} -%\end{macro} -%\begin{macro}{\date} +%% Changeable parameters. % \begin{macrocode} -\renewcommand*{\date}[1]{% - \renewcommand*{\@date}{#1}% - \protected@write\@auxout{}{\string\jmlr@date{#1}}% -} +\setlength\aftertitskip{0.1in plus 0.2in minus 0.2in} +\setlength\beforetitskip{0.05in plus 0.08in minus 0.08in} +\setlength\interauthorskip{0.08in plus 0.1in minus 0.1in} +\setlength\aftermaketitskip{0.3in plus 0.1in minus 0.1in} % \end{macrocode} -%\end{macro} -%\begin{macro}{\jmlr@date} -%\changes{1.20}{2014/10/15}{new} +% +%\begin{macro}{\titlebreak} +%\changes{1.12}{2012/01/05}{new} +% Acts like new line in the paper title, but with jmlrbook acts like a space in +% the table of contents and bookmarks. % \begin{macrocode} -\newcommand*{\jmlr@date}[1]{} +\newcommand*{\titlebreak}{\newline} % \end{macrocode} %\end{macro} -%\begin{macro}{\@jmlrauthors} +% +%\begin{macro}{\titletag} +%\changes{1.17}{2012/05/30}{new} % \begin{macrocode} -\newcommand*{\@jmlrauthors}{} +\newcommand*{\titletag}[1]{} % \end{macrocode} %\end{macro} -%\begin{macro}{\@jmlr@authors} -%\changes{1.12}{2012/01/05}{new} +% +%\begin{macro}{\title} +% Override definition of \cs{title} to allow for an optional +% argument (short title) % \begin{macrocode} -\newcommand*{\@jmlr@authors}{\@jmlrauthors} +\renewcommand*{\title}[2][\@title]{% + \def\@shorttitle{#1}% + \def\@title{#2}% + \protected@write\@auxout{}{\string\jmlr@title{#1}{#2}}% + \jmlrtitlehook +} % \end{macrocode} %\end{macro} -%\begin{macro}{\jmlrauthors} -% This is provided in case \cs{Name} doesn't set \cs{@jmlrauthors} -% correctly. -%\changes{1.12}{2012/01/05}{\cs{jmlrauthors} now redefines -%\cs{@jmlr@authors} instead of \cs{@jmlrauthors}} +%\begin{macro}{\@shorttitle} +%\changes{1.12}{2012/01/05}{provided default value} +% The short title of the document is initialised to \cs{jobname} to +% ensure a basic document will compile even if no title is set. % \begin{macrocode} -\newcommand*{\jmlrauthors}[1]{\global\def\@jmlr@authors{#1}} +\newcommand*{\@shorttitle}{\jobname} % \end{macrocode} %\end{macro} % -% -%\subsection{Miscellany} -% This code was taken from jmlr2e.sty. - -% Define macros for figure captions and table titles +%\begin{macro}{\jmlrtitlehook} % \begin{macrocode} -\def\figurecaption#1#2{\noindent\hangindent 40pt - \hbox to 36pt {\small\slshape #1 \hfil} - \ignorespaces {\small #2}} +\newcommand*{\jmlrtitlehook}{} % \end{macrocode} -% Figurecenter prints the caption title centered. +%\end{macro} +%\begin{macro}{\jmlr@title} +%\changes{1.20}{2014/10/15}{new} +% AUX command provided for MakeJmlrBookGUI % \begin{macrocode} -\def\figurecenter#1#2{\centerline{{\slshape #1} #2}} -\def\figurecenter#1#2{\centerline{{\small\slshape #1} {\small #2}}} +\newcommand*{\jmlr@title}[2]{} % \end{macrocode} +%\end{macro} % -% Allow ``hanging indents'' in long captions -% -%\begin{macro}{\@makecaption} +%\begin{macro}{\author} +% Override definition of \cs{author} to allow for an optional +% argument (list of authors for page heading) % \begin{macrocode} -\long\def\@makecaption#1#2{% - \vskip 10pt - \setbox\@tempboxa\hbox{#1: #2}% - \ifdim \wd\@tempboxa >\hsize % IF longer than one line: - \begin{list}{#1:}{% - \settowidth{\labelwidth}{#1:} - \setlength{\leftmargin}{\labelwidth} - \addtolength{\leftmargin}{\labelsep} - }\item #2 \end{list}\par % Output in quote mode - \else % ELSE center. - \hbox to\hsize{\hfil\box\@tempboxa\hfil} - \fi} +\renewcommand*{\author}[2][]{% + \def\@author{#2}% + \def\@sauthor{#1}% + \def\@jmlr@aux@author{#2}\@onelevel@sanitize\@jmlr@aux@author + \ifx\@sauthor\@empty + \let\@jmlr@aux@sauthor\@jmlr@aux@author + \else + \let\@shortauthor\@sauthor + \def\@jmlr@aux@sauthor{#1}\@onelevel@sanitize\@jmlr@aux@sauthor + \fi + \jmlrauthorhook + \protected@write\@auxout + {}{\string\jmlr@author{\@jmlr@aux@sauthor}{\@jmlr@aux@author}}% +} % \end{macrocode} %\end{macro} -% Define strut macros for skipping spaces above and below text in a -% tabular environment. -% \begin{macrocode} -\def\abovestrut#1{\rule[0in]{0in}{#1}\ignorespaces} -\def\belowstrut#1{\rule[-#1]{0in}{#1}\ignorespaces} -% \end{macrocode} -%\begin{macro}{\acks} -% Acknowledgments +%\begin{macro}{\jmlrauthorhook} % \begin{macrocode} -\long\def\acks#1{\section*{Acknowledgments}#1} +\newcommand*{\jmlrauthorhook}{} % \end{macrocode} %\end{macro} -% Research Note -%\begin{macro}{\researchnote} +%\begin{macro}{\jmlr@author} +%\changes{1.20}{2014/10/15}{new} +% AUX command provided for MakeJmlrBookGUI % \begin{macrocode} -\long\def\researchnote#1{\noindent {\LARGE\itshape Research Note} #1} +\newcommand*{\jmlr@author}[2]{} % \end{macrocode} %\end{macro} % -%\begin{macro}{\set} +%\begin{macro}{\@shortauthor} % \begin{macrocode} -\newcommand*{\set}[1]{\ensuremath{\mathcal{#1}}} +\newcommand*{\@shortauthor}{} % \end{macrocode} %\end{macro} % -% Convenient macros for cross-referencing. -% \begin{macrocode} -\newcommand*{\@jmlr@reflistsep}{, } -\newcommand*{\@jmlr@reflistlastsep}{ and } -\newcommand*{\sectionrefname}{Section} -\newcommand*{\sectionsrefname}{Sections} -\newcommand*{\equationrefname}{Equation} -\newcommand*{\equationsrefname}{Equations} -\newcommand*{\tablerefname}{Table} -\newcommand*{\tablesrefname}{Tables} -\newcommand*{\figurerefname}{Figure} -\newcommand*{\figuresrefname}{Figures} -\newcommand*{\algorithmrefname}{Algorithm} -\newcommand*{\algorithmsrefname}{Algorithms} -\newcommand*{\theoremrefname}{Theorem} -\newcommand*{\theoremsrefname}{Theorems} -\newcommand*{\lemmarefname}{Lemma} -\newcommand*{\lemmasrefname}{Lemmas} -\newcommand*{\remarkrefname}{Remark} -\newcommand*{\remarksrefname}{Remarks} -\newcommand*{\corollaryrefname}{Corollary} -\newcommand*{\corollarysrefname}{Corollaries} -\newcommand*{\definitionrefname}{Definition} -\newcommand*{\definitionsrefname}{Definitions} -\newcommand*{\conjecturerefname}{Conjecture} -\newcommand*{\conjecturesrefname}{Conjectures} -\newcommand*{\axiomrefname}{Axiom} -\newcommand*{\axiomsrefname}{Axioms} -\newcommand*{\examplerefname}{Example} -\newcommand*{\examplesrefname}{Examples} -\newcommand*{\appendixrefname}{Appendix} -\newcommand*{\appendixsrefname}{Appendices} -\newcommand*{\partrefname}{Part} -\newcommand*{\partsrefname}{Parts} -% \end{macrocode} -%\begin{macro}{\objectref} -% Cross-reference a particular structural element. The first -% argument is the list of labels, the second argument is a -% control sequence containing the singular tag, the third -% argument a control sequence containing the plural tag, -% the fourth argument is text to go before the reference number, -% e.g.\ an opening bracket, and the fifth argument is text -% to go after the reference number, e.g.\ a closing bracket. +%\begin{macro}{\@firstauthor} % \begin{macrocode} -\DeclareRobustCommand*{\objectref}[5]{% - \let\@objectname\@empty - \def\@objectref{}% - \let\@prevsep\@empty - \@for\@thislabel:=#1\do{% - \toks@{\@prevsep}% - \protected@edef\@objectref{\@objectref\the\toks@ - #4\ref{\@thislabel}#5}% - \ifx\@objectname\@empty - \let\@objectname#2% singular tag - \else - \let\@objectname#3% plural tag - \let\@prevsep\@jmlr@reflistsep - \fi - }% - \ifx\@objectname#3% plural tag - \let\@prevsep\@jmlr@reflistlastsep - \fi - \@objectname~\@objectref -} +\newcommand*{\@firstauthor}{} % \end{macrocode} %\end{macro} -%\begin{macro}{\sectionref} +%\begin{macro}{\@firstsurname} % \begin{macrocode} -\newcommand*{\sectionref}[1]{% - \objectref{#1}{\sectionrefname}{\sectionsrefname}{}{}} +\newcommand*{\@firstsurname}{} % \end{macrocode} %\end{macro} -%\begin{macro}{\equationref} +% +%\begin{macro}{\jmlrlength} % \begin{macrocode} -\newcommand*{\equationref}[1]{% - \objectref{#1}{\equationrefname}{\equationsrefname}()} +\newlength\jmlrlength % \end{macrocode} %\end{macro} -%\begin{macro}{\tableref} +% +%\begin{macro}{\jmlrmaketitle} +% Make the title % \begin{macrocode} -\newcommand*{\tableref}[1]{% - \objectref{#1}{\tablerefname}{\tablesrefname}{}{}} +\def\jmlrmaketitle{% + \jmlrpremaketitlehook + \def\@jmlr@authors@sep{, }% + \par + \begingroup % \end{macrocode} -%\end{macro} -%\begin{macro}{\figureref} +%\changes{1.08}{2010-07-27}{modified footnote marker in the footnote +%text so that it is raised and isn't followed by a full stop} % \begin{macrocode} -\newcommand*{\figureref}[1]{% - \objectref{#1}{\figurerefname}{\figuresrefname}{}{}} + \def\footnoteseptext{ }% + \def\thempfn{\textsuperscript{\thefootnote}}% + \def\thefootnote{\fnsymbol{footnote}}% % \end{macrocode} -%\end{macro} -%\begin{macro}{\algorithmref} +%\changes{1.07}{2010-06-30}{added check for two column mode} % \begin{macrocode} -\newcommand*{\algorithmref}[1]{% - \objectref{#1}{\algorithmrefname}{\algorithmsrefname}{}{}} + \if@twocolumn + \twocolumn[\@jmlrmaketitle]% + \else + \@jmlrmaketitle + \fi + \@thanks + \endgroup +\label{jmlrstart}% +\ifx\@sauthor\@empty + \settowidth{\jmlrlength}{\@evenhead}% + \ifdim\jmlrlength>\textwidth + \def\@shortauthor{\@firstsurname\space et al.}% + \fi +\fi +\settowidth{\jmlrlength}{\@titlefoot}% +\ifdim\jmlrlength>\textwidth + \def\@jmlrauthors{\@firstauthor\space \emph{et al}}% +\fi +\jmlrmaketitlehook +\thispagestyle{jmlrtps}% +\setcounter{footnote}{0}% +\let\maketitle\relax \let\@maketitle\relax +\gdef\@thanks{}\gdef\@author{}\let\thanks\@gobble +\def\@jmlr@authors@sep{ \& }% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\theoremmref} +% +%\begin{macro}{\jmlrmaketitlehook} % \begin{macrocode} -\newcommand*{\theoremref}[1]{% - \objectref{#1}{\theoremrefname}{\theoremsrefname}{}{}} +\newcommand*{\jmlrmaketitlehook}{} % \end{macrocode} %\end{macro} -%\begin{macro}{\lemmaref} +%\begin{macro}{\jmlrpremaketitlehook} % \begin{macrocode} -\newcommand*{\lemmaref}[1]{% - \objectref{#1}{\lemmarefname}{\lemmasrefname}{}{}} +\newcommand*{\jmlrpremaketitlehook}{} % \end{macrocode} %\end{macro} -%\begin{macro}{\remarkref} +% +% Provide a different title layout for HTML +%\begin{macro}{\jmlrhtmlmaketitle} % \begin{macrocode} -\newcommand*{\remarkref}[1]{% - \objectref{#1}{\remarkrefname}{\remarksrefname}{}{}} +\newcommand{\jmlrhtmlmaketitle}{% + \ifx\@jmlr@authors\@empty + \sbox\jmlrbox{\let\addr\relax\@author}% + \fi + \noindent\HCode{

}\@title\HCode{

} + \noindent\@jmlr@authors +} % \end{macrocode} %\end{macro} -%\begin{macro}{\corollaryref} +%%\begin{macro}{\jmlrbox} +% Define a save box % \begin{macrocode} -\newcommand*{\corollaryref}[1]{% - \objectref{#1}{\corollaryrefname}{\corollarysrefname}{}{}} +\newsavebox\jmlrbox % \end{macrocode} %\end{macro} -%\begin{macro}{\definitionref} +%\begin{macro}{\maketitle} +% If we're creating HTML, set \cs{maketitle} to +% \cs{jmlrhtmlmaketitle}, otherwise set it to \cs{jmlrmaketitle} % \begin{macrocode} -\newcommand*{\definitionref}[1]{% - \objectref{#1}{\definitionrefname}{\definitionsrefname}{}{}} +\ifjmlrhtml + \let\maketitle\jmlrhtmlmaketitle +\else + \let\maketitle\jmlrmaketitle +\fi % \end{macrocode} %\end{macro} -%\begin{macro}{\conjectureref} +% +% Author and editor information. % \begin{macrocode} -\newcommand*{\conjectureref}[1]{% - \objectref{#1}{\conjecturerefname}{\conjecturesrefname}{}{}} +\def\@startauthor{\noindent \normalsize\bfseries} +\def\@endauthor{} +\def\@starteditor{\noindent \small {\bfseries \@edname:~}} +\def\@endeditor{\normalsize} % \end{macrocode} -%\end{macro} -%\begin{macro}{\axiomref} +% Provide hooks to make it easier to adapted with \cls{combine} +% class. +%\begin{macro}{\jmlrpretitle} % \begin{macrocode} -\newcommand*{\axiomref}[1]{% - \objectref{#1}{\axiomrefname}{\axiomsrefname}{}{}} +\def\jmlrpretitle{\vskip\beforetitskip\begin{center}\Large\bfseries} % \end{macrocode} %\end{macro} -%\begin{macro}{\exampleref} +%\begin{macro}{\jmlrposttitle} % \begin{macrocode} -\newcommand*{\exampleref}[1]{% - \objectref{#1}{\examplerefname}{\examplesrefname}{}{}} +\def\jmlrposttitle{\par\end{center}\vskip\aftertitskip} % \end{macrocode} %\end{macro} -%\begin{macro}{\appendixref} +%\begin{macro}{\nametag} +%\changes{1.09}{2010/12/01}{new} % \begin{macrocode} -\newcommand*{\appendixref}[1]{% - \objectref{#1}{\appendixrefname}{\appendixsrefname}{}{}} +\newcommand*{\nametag}[1]{} % \end{macrocode} %\end{macro} -%\begin{macro}{\partref} +%\begin{macro}{\jmlrpreauthor} +%\changes{1.09}{2010/12/01}{added \cs{nametag}} % \begin{macrocode} -\newcommand*{\partref}[1]{% - \objectref{#1}{\partrefname}{\partsrefname}{}{}} +\def\jmlrpreauthor{% +\bgroup + \def\nametag##1{##1}% + \def\and{\unskip\enspace{\normalfont and}\enspace}% % \end{macrocode} -%\end{macro} -% -%\begin{macro}{\floatconts} -% The first argument is the label, the second argument contains the -% caption (using \cs{caption}) and the third argument is the -% contents of the float +%\changes{1.10}{2011-01-05}{added \cs{mdseries} to \cs{addr}} % \begin{macrocode} -\newcommand{\floatconts}[3]{% - \@ifundefined{\@captype conts}{\tableconts{#1}{#2}{#3}}% - {\csname\@captype conts\endcsname{#1}{#2}{#3}}% + \def\addr{\mdseries\small\itshape}% + \def\name{\ClassError{jmlr}{Use \string\Name{Author's Name} not \string\name}{}}% + \def\email{\ClassError{jmlr}{Use \string\Email{address} not \string\email}{}}% + \def\AND{\@endauthor\normalfont\hss \vskip \interauthorskip + \@startauthor}% + \@startauthor } % \end{macrocode} %\end{macro} -%\begin{macro}{\tableconts} -% \begin{macrocode} -\newcommand{\tableconts}[3]{% - \iftablecaptiontop - #2\label{#1}\vskip\baselineskip - {\centering #3\par}% - \else - {\centering #3\par}% - \vskip\baselineskip - #2\label{#1}% - \fi -} +%\begin{macro}{\addr} +%\changes{1.20}{2014/10/15}{initialised to nothing} +% Initialise to do nothing if used outside of \cs{author} +% \begin{macrocode} +\newcommand{\addr}{} % \end{macrocode} %\end{macro} -%\begin{macro}{\figureconts} +%\begin{macro}{\@email} % \begin{macrocode} -\newcommand{\figureconts}[3]{% - {\centering #3\par}% - \vskip\baselineskip - #2\label{#1}% -} +\def\@email{\hfill\small\mdseries\scshape}% % \end{macrocode} %\end{macro} -%\begin{macro}{\algocfconts} -%\changes{1.09}{2010/12/01}{new} +%\begin{macro}{\@name} % \begin{macrocode} -\newcommand{\algocfconts}[3]{% - \@algocf@pre@ruled - #2\label{#1}\kern2pt\hrule height.8pt depth0pt\kern2pt% - #3\@algocf@pre@ruled -} +\def\@name{\normalsize\upshape\bfseries}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\includeteximage} -% Provide a command like \cs{includegraphics} that includes a -% file containing \LaTeX\ picture code (e.g.\ \sty{pgf}). +%\begin{macro}{\@parsename} +% Parse a name. Appends forename to \cs{@forenames} and stores +% surname in \cs{@surname}. % \begin{macrocode} -\newcommand*{\includeteximage}[2][]{% - \def\Gin@req@sizes{% - \Gin@req@height\Gin@nat@height - \Gin@req@width\Gin@nat@width}% - \begingroup - \@tempswafalse - \let\input@path\Ginput@path - \toks@{\InputIfFileExists{#2}{}{\@warning{File `#1' not found}}}% - \setkeys{Gin}{#1}% - \Gin@esetsize - \the\toks@ - \endgroup +\def\@parsename#1 #2\end@parsename{% + \def\@tmp{#2}% + \ifx\@tmp\@nnil + \def\@surname{#1}% + \let\@nextparsename\@parsenamenoop + \else + \@getinitial#1-\relax\relax\end@getinitial + \ifx\@forenames\@empty + \def\@forenames{#1}% + \protected@edef\@initials{\@initial}% + \else + \expandafter\toks@\expandafter{\@forenames}% + \edef\@forenames{\space\the\toks@}% + \expandafter\toks@\expandafter{\@initials}% + \protected@edef\@initials{\the\toks@\@initial}% + \fi + \let\@nextparsename\@parsename + \fi + \@nextparsename#2\end@parsename } +\def\@parsenamenoop#1\end@parsename{} % \end{macrocode} %\end{macro} % -%\begin{macro}{\ifprint} -% Provide command to check if this is the printed greyscale -% version or the online colour version. +%\begin{macro}{\@getinitial} % \begin{macrocode} -\providecommand{\ifprint}[2]{\ifgrayscale#1\else#2\fi} +\def\@getinitial#1#2-#3#4\end@getinitial{% + \def\@jmlr@tmp{#3}% + \if\@jmlr@tmp\relax + \def\@initial{#1.}% + \else + \def\@initial{#1.-#3.}% + \fi +} % \end{macrocode} %\end{macro} % -% Modify \cs{includegraphics} so that it can pick up the greyscale -% version of images if this is the print version. -%% \begin{macrocode} -\ifjmlrhtml -\else - \let\@org@Ginclude@graphics\Ginclude@graphics - \def\Ginclude@graphics#1{% - \begingroup - \let\input@path\Ginput@path - \ifprint{\filename@parse{#1-gray}}{\filename@parse{#1}}% - \ifx\filename@ext\relax - \@for\Gin@temp:=\Gin@extensions\do{% - \ifx\Gin@ext\relax - \Gin@getbase\Gin@temp - \fi}% +%\begin{macro}{\Name} +% Get the author's name and add surname to \cs{@shortauthors}. +% (Surnames with \qt{von} parts or with spaces in should be +% enclosed in braces) +%\changes{1.12}{2012/01/05}{added optional argument} +% \begin{macrocode} +\newcommand*{\Name}[2][]{% + \def\@authorlist{#1}% + \def\@forenames{}% + \def\@surname{}% + \def\nametag##1{}% + \@parsename#2 \@nil\end@parsename + \ifx\@shortauthor\@empty + \ifx\@sauthor\@empty + \global\let\@shortauthor\@surname + \global\let\@firstsurname\@surname + \fi + \ifx\@authorlist\@empty + \protected@xdef\@jmlrauthors{\@initials\space\@surname}% \else - \ifprint{\filename@parse{#1}}{}% - \Gin@getbase{\Gin@sepdefault\filename@ext}% - \ifx\Gin@ext\relax - \@warning{File `#1' not found}% - \def\Gin@base{\filename@area\filename@base}% - \edef\Gin@ext{\Gin@sepdefault\filename@ext}% - \fi + \protected@xdef\@jmlrauthors{\@authorlist}% \fi - \ifx\Gin@ext\relax - \ifprint{\@org@Ginclude@graphics{#1}}% - {% - \@latex@error{File `#1' not found}% - {I could not locate the file with any of these extensions:^^J% - \Gin@extensions^^J\@ehc}% - }% + \global\let\@firstauthor\@jmlrauthors + \else + \ifx\@sauthor\@empty + \expandafter\toks@\expandafter{\@shortauthor}% + \protected@xdef\@shortauthor{\the\toks@\space\@surname}% + \fi + \ifx\@authorlist\@empty + \ifx\@jmlrauthors\@empty + \protected@xdef\@jmlrauthors{\@initials\space\@surname}% \else - \@ifundefined{Gin@rule@\Gin@ext}% - {\ifx\Gin@rule@*\@undefined - \@latex@error{Unknown graphics extension: \Gin@ext}\@ehc - \else - \expandafter\Gin@setfile\Gin@rule@*{\Gin@base\Gin@ext}% - \fi}% - {\expandafter\expandafter\expandafter\Gin@setfile - \csname Gin@rule@\Gin@ext\endcsname{\Gin@base\Gin@ext}}% + \protected@xdef\@jmlrauthors{\@jmlrauthors + \noexpand\@jmlr@authors@sep + \@initials\space\@surname}% \fi - \endgroup} -\fi + \else + \ifx\@jmlrauthors\@empty + \protected@xdef\@jmlrauthors{\@authorlist}% + \else + \protected@xdef\@jmlrauthors{\@jmlrauthors + \noexpand\@jmlr@authors@sep + \@authorlist + }% + \fi + \fi + \fi + \def\nametag##1{##1}% + \@name #2% +} % \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} +%\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} -\newenvironment{algorithm}[1][htbp]% -{% - \begin{algocf}[#1]% - \renewcommand\@makecaption[2]{% - \hskip\AlCapHSkip - \parbox[t]{\hsize}{\algocf@captiontext{##1}{##2}}% +\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 }% -}% -{% - \end{algocf}% + \def\@jmlr@authors@sep{ \& }% + \@jmlr@namelist } % \end{macrocode} -% -% Set the algorithm margin to zero. +%\end{macro} +%\begin{macro}{\@jmlrabbrname} % \begin{macrocode} -\setlength\algomargin{0pt} +\newcommand*{\@jmlrabbrname}[1]{% + \def\@initials{}% + \def\@surname{}% + \def\@forenames{}% + \@parsename#1 \@nil\end@parsename +} % \end{macrocode} +%\end{macro} % -%\begin{macro}{\artappendix} -% Switch to appendices in an article +%\begin{macro}{\Email} % \begin{macrocode} -\newcommand{\artappendix}{\par - \setcounter{section}{0} - \setcounter{subsection}{0} - \def\thesection{\Alph{section}} +\newcommand*{\Email}[1]{{\@email #1}} % \end{macrocode} -%\changes{1.12}{2012/01/05}{added chapter to \cs{theHsection} to ensure unique -%hyperlink names in book} +%\end{macro} +%\begin{macro}{\jmlrpostauthor} % \begin{macrocode} - \def\theHsection{\theHchapter.\Alph{section}} - \def\presectionnum{Appendix~}% +\def\jmlrpostauthor{\@endauthor\egroup + \par + \vskip \aftermaketitskip + \noindent + \ifx\@editor\@empty + \else + \@starteditor \@editor \@endeditor + \fi + \vskip \aftermaketitskip } % \end{macrocode} %\end{macro} -% The default assumes a stand-alone article. -%\begin{macro}{\appendix} +%\begin{macro}{\@jmlrmaketitle} % \begin{macrocode} -\let\appendix\artappendix +\def\@jmlrmaketitle{\vbox{\hsize\textwidth + \linewidth\hsize + \jmlrpretitle + {% + \def\titletag##1{##1}% + \@title + }% + \jmlrposttitle + \jmlrpreauthor \@author \jmlrpostauthor +}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\booklinebreak} -%\changes{1.18}{2013-10-17}{new} -% Provided for book production editors to fine tune the book -% line breaking. Does nothing in the standalone article. +%\begin{macro}{\kernelmachines} +% Convenience command % \begin{macrocode} -\newcommand{\booklinebreak}[1][]{} +\newcommand*\kernelmachines{(for + {\textsc{http://www.kernel-machines.org}})} % \end{macrocode} %\end{macro} % -%\subsection{Proofs and Theorems} -% This code is taken from jmlr2e.sty -%\begin{macro}{\BlackBox} -% End of proof marker +%\begin{macro}{\editorname} +% Label for the editor % \begin{macrocode} -\newcommand{\BlackBox}{\rule{1.5ex}{1.5ex}} +\newcommand*{\editorname}{Editor} % \end{macrocode} %\end{macro} -%\begin{macro}{\jmlrQED} -%\changes{1.21}{2015-02-24}{new} +%\begin{macro}{\editorsname} +% Label for the editor % \begin{macrocode} -\newcommand*{\jmlrQED}{\hfill\BlackBox\\[2mm]} +\newcommand*{\editorsname}{Editors} % \end{macrocode} %\end{macro} -%\begin{environment}{proof} -% Proof environment -% \begin{macrocode} -\newenvironment{proof}% -{% - \par\noindent{\bfseries\upshape Proof\ }% -}% -{\jmlrQED} -% \end{macrocode} -%\end{environment} -% -% Since \sty{theorem}, \sty{ntheorem} and \sty{amsthm} all cause -% problems with this class, provide a simple alternative. -% -%\begin{macro}{\theorembodyfont} -%\changes{1.18}{2013-10-17}{new} -%\begin{definition} -%\cs{theorembodyfont}\marg{font declarations} -%\end{definition} +%\begin{macro}{\@edname} +% This will either be Editor or Editors depending on whether +% \cs{editor} or \cs{editors} is used. Defaults to \cs{editorname} % \begin{macrocode} -\newcommand*{\theorembodyfont}[1]{% - \renewcommand*{\@theorembodyfont}{#1}% -} -\newcommand*{\@theorembodyfont}{\normalfont\itshape}% +\let\@edname\editorname % \end{macrocode} %\end{macro} -%\begin{macro}{\theoremheaderfont} -%\changes{1.18}{2013-10-17}{new} -%\begin{definition} -%\cs{theoremheaderfont}\marg{font declarations} -%\end{definition} +%\begin{macro}{\@editor} +% The editor or editors are stored in \cs{@editor} % \begin{macrocode} -\newcommand*{\theoremheaderfont}[1]{% - \renewcommand*{\@theoremheaderfont}{#1}% -} -\newcommand*{\@theoremheaderfont}{\normalfont\bfseries }% +\def\@editor{} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\theoremsep} -%\changes{1.18}{2013-10-17}{new} -%\begin{definition} -%\cs{theoremsep}\marg{separation code} -%\end{definition} +%\begin{macro}{\editor} +% A single editor % \begin{macrocode} -\newcommand*{\theoremsep}[1]{% - \renewcommand*{\@theoremsep}{#1}% +\def\editor#1{% + \global\let\@edname\editorname + \gdef\@editor{#1}% } -\newcommand*{\@theoremsep}{}% % \end{macrocode} %\end{macro} -% -%\begin{macro}{\theorempostheader} -%\changes{1.18}{2013-10-17}{new} -%\begin{definition} -%\cs{theorempostheader}\marg{text} -%\end{definition} +%\begin{macro}{\editors} +% Multiple editors % \begin{macrocode} -\newcommand*{\theorempostheader}[1]{% - \renewcommand*{\@theorempostheader}{#1}% +\def\editors#1{% + \global\let\@edname\editorsname + \gdef\@editor{#1}% } -\newcommand*{\@theorempostheader}{}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\newtheorem} -%\changes{1.18}{2013-10-17}{new} -% \begin{macrocode} -\let\jmlr@org@newtheorem\newtheorem -\renewcommand*{\newtheorem}{\@ifstar\jmlr@snewtheorem\jmlr@newtheorem} -% \end{macrocode} -% Define starred version: -%\begin{definition} -%\cs{newtheorem*}\marg{env-name}\marg{title tag} -%\end{definition} +%\subsection{Pagestyles} +% This is taken from jmlr2e.sty +% +%\begin{macro}{\firstpageno} +% Set the page counter. % \begin{macrocode} -\newcommand*{\jmlr@snewtheorem}[2]{% - \cslet{jmlr@thm@#1@body@font}{\@theorembodyfont}% - \cslet{jmlr@thm@#1@header@font}{\@theoremheaderfont}% - \cslet{jmlr@thm@#1@sep}{\@theoremsep}% - \cslet{jmlr@thm@#1@postheader}{\@theorempostheader}% - \newenvironment{#1}% - {% - \trivlist - \item - [% - \hskip\labelsep{\csuse{jmlr@thm@#1@header@font}#2% - \csuse{jmlr@thm@#1@postheader}% - }% - ]% - \mbox{}\csuse{jmlr@thm@#1@sep}% - \csuse{jmlr@thm@#1@body@font}% - }% - {% - \endtrivlist - }% -} +\def\firstpageno#1{\setcounter{page}{#1}} % \end{macrocode} %\end{macro} -% Unstarred version needs adjusting to take the style into account: -%\begin{macro}{\@othm} -%\changes{1.18}{2013-10-17}{new} +%\begin{macro}{\startpage} +%\changes{1.10}{2011-01-05}{new} +% If \cs{startpage} has been defined, use its value for the first +% page. % \begin{macrocode} -\newcommand{\jmlr@newtheorem}[1]{% - \cslet{jmlr@thm@#1@body@font}{\@theorembodyfont}% - \cslet{jmlr@thm@#1@header@font}{\@theoremheaderfont}% - \cslet{jmlr@thm@#1@sep}{\@theoremsep}% - \cslet{jmlr@thm@#1@postheader}{\@theorempostheader}% - \jmlr@org@newtheorem{#1}% -} +\@ifundefined{startpage}{}{\firstpageno{\startpage}} % \end{macrocode} %\end{macro} -%\begin{macro}{\@xthm} -%\changes{1.18}{2013-10-17}{new} +% +% Label end page. +%\begin{macro}{\@jmlrenddoc} +% Label end page % \begin{macrocode} -\renewcommand*{\@xthm}[2]{% - \def\@jmlr@currentthm{#1}% - \@begintheorem{#2}{\csname the#1\endcsname}% - \ignorespaces +\newcommand*{\@jmlrenddoc}{% + \phantomsection + \protected@edef\@currentlabelname{end of \@shorttitle}% + \label{jmlrend}\null + \global\let\@reprint\@empty } % \end{macrocode} %\end{macro} -%\begin{macro}{\@ythm} -%\changes{1.18}{2013-10-17}{new} +% +%\begin{macro}{\@titlefoot} +%\changes{1.09}{2010/12/01}{added \cs{@reprint}} % \begin{macrocode} -\def\@ythm#1#2[#3]{% - \def\@jmlr@currentthm{#1}% - \@opargbegintheorem{#2}{\csname the#1\endcsname}{#3}% - \ignorespaces +\newcommand*{\@titlefoot}{\scriptsize\copyright\space\@jmlryear + \space\@jmlr@authors.\hfill + \@reprint } % \end{macrocode} %\end{macro} -%\begin{macro}{\@begintheorem} -%\changes{1.18}{2013-10-17}{new} +%\begin{macro}{\reprint} +%\changes{1.09}{2010/12/01}{new} % \begin{macrocode} -\renewcommand*{\@begintheorem}[2]{% - \ifdef{\@jmlr@currentthm}% - {% - \letcs{\jmlr@this@theoremheader}{jmlr@thm@\@jmlr@currentthm @header@font}% - \letcs{\jmlr@this@theorembody}{jmlr@thm@\@jmlr@currentthm @body@font}% - \letcs{\jmlr@this@theoremsep}{jmlr@thm@\@jmlr@currentthm @sep}% - \letcs{\jmlr@this@theorempostheader}% - {jmlr@thm@\@jmlr@currentthm @postheader}% - }% - {% - \let\jmlr@this@theorembody\@theorembodyfont - \let\jmlr@this@theoremheader\@theoremheaderfont - \let\jmlr@this@theoremsep\@theoremsep - \let\jmlr@this@theorempostheader\@theorempostheader - }% - \trivlist - \item - [% - \hskip\labelsep{\jmlr@this@theoremheader #1\ #2% - \jmlr@this@theorempostheader}% - ]% - \mbox{}\jmlr@this@theoremsep - \jmlr@this@theorembody -} +\let\@reprint\@empty +\newcommand{\reprint}[1]{% + \gdef\@reprint{Reprinted with permission for JMLR#1}} % \end{macrocode} %\end{macro} -%\begin{macro}{\@opargbegintheorem} -%\changes{1.18}{2013-10-17}{new} +% +%\begin{macro}{\ps@jmlrtps} +% Title page style % \begin{macrocode} -\renewcommand*{\@opargbegintheorem}[3]{% - \ifdef{\@jmlr@currentthm}% - {% - \letcs{\jmlr@this@theoremheader}{jmlr@thm@\@jmlr@currentthm @header@font}% - \letcs{\jmlr@this@theorembody}{jmlr@thm@\@jmlr@currentthm @body@font}% - \letcs{\jmlr@this@theoremsep}{jmlr@thm@\@jmlr@currentthm @sep}% - \letcs{\jmlr@this@theorempostheader}% - {jmlr@thm@\@jmlr@currentthm @postheader}% - }% - {% - \let\jmlr@this@theorembody\@theorembodyfont - \let\jmlr@this@theoremheader\@theoremheaderfont - \let\jmlr@this@theoremsep\@theoremsep - \let\jmlr@this@theorempostheader\@theorempostheader +\newcommand\ps@jmlrtps{% + \let\@mkboth\@gobbletwo + \def\@oddhead{\scriptsize \@jmlrproceedings + \ifx\@jmlrvolume\@empty + \else + \space\@jmlrvolume + \ifx\@jmlrissue\@empty\else(\@jmlrissue)\fi + \ifx\@jmlrpages\@empty + \ifx\@jmlryear\@empty + \else + \if\@jmlrissue\@empty,\fi + \fi + \else + :% + \fi + \fi + \ifx\@jmlrpages\@empty + \else + \ifx\@jmlrvolume\@empty\space\fi + \@jmlrpages + \ifx\@jmlryear\@empty\else,\fi + \fi + \ifx\@jmlryear\@empty\else\space\@jmlryear\fi + \hfill + \ifx\@jmlrworkshop\@empty + \ifx\@jmlrsubmitted\@empty + \else + Submitted \@jmlrsubmitted + \ifx\@jmlrpublished\@empty\else;\fi + \fi + \ifx\@jmlrpublished\@empty + \else + \space Published \@jmlrpublished + \fi + \else + \space\@jmlrworkshop + \fi }% - \trivlist - \item[\hskip\labelsep{\jmlr@this@theoremheader #1\ #2\ (#3)% - \jmlr@this@theorempostheader}]% - \mbox{}\jmlr@this@theoremsep - \jmlr@this@theorembody + \let\@evenhead\@oddhead + \def\@oddfoot{\@titlefoot}% + \let\@evenfoot\@oddfoot } % \end{macrocode} %\end{macro} -% -%\begin{environment}{example} -% \begin{macrocode} -\newtheorem{example}{Example} -% \end{macrocode} -%\end{environment} -%\begin{environment}{theorem} +%\begin{macro}{\ps@jmlrps} +% Page style for subsequent pages % \begin{macrocode} -\newtheorem{theorem}{Theorem} +\def\ps@jmlrps{% + \let\@mkboth\@gobbletwo + \def\@oddhead{\hfill {\small\scshape \@shorttitle} \hfill}% + \def\@oddfoot{\hfill \small\rmfamily \thepage \hfill}% + \def\@evenhead{\hfill {\small\scshape \@shortauthor} \hfill}% + \def\@evenfoot{\hfill \small\rmfamily \thepage \hfill}% +}% % \end{macrocode} -%\end{environment} -%\begin{environment}{lemma} +% Set the page style: % \begin{macrocode} -\newtheorem{lemma}[theorem]{Lemma} +\pagestyle{jmlrps} % \end{macrocode} -%\end{environment} -%\begin{environment}{proposition} +%\end{macro} +% Set the heading information: +%\begin{macro}{\@jmlrvolume} +% The volume number: +%\changes{1.17}{2012/05/30}{changed initial definition to use +%\cs{providecommand}} % \begin{macrocode} -\newtheorem{proposition}[theorem]{Proposition} +\providecommand*{\@jmlrvolume}{} % \end{macrocode} -%\end{environment} -%\begin{environment}{remark} +%\end{macro} +%\begin{macro}{\jmlrvolume} % \begin{macrocode} -\newtheorem{remark}[theorem]{Remark} +\newcommand*{\jmlrvolume}[1]{\renewcommand*{\@jmlrvolume}{#1}} % \end{macrocode} -%\end{environment} -%\begin{environment}{corollary} +%\end{macro} +%\begin{macro}{\@jmlrissue} +% The issue number: % \begin{macrocode} -\newtheorem{corollary}[theorem]{Corollary} +\providecommand*{\@jmlrissue}{} % \end{macrocode} -%\end{environment} -%\begin{environment}{definition} +%\end{macro} +%\begin{macro}{\jmlrissue} % \begin{macrocode} -\newtheorem{definition}[theorem]{Definition} +\newcommand*{\jmlrissue}[1]{\renewcommand*{\@jmlrissue}{#1}} % \end{macrocode} -%\end{environment} -%\begin{environment}{conjecture} +%\end{macro} +%\begin{macro}{\@jmlryear} +% The year of publication: +%\changes{1.17}{2012/05/30}{changed initial definition to use +%\cs{providecommand}} % \begin{macrocode} -\newtheorem{conjecture}[theorem]{Conjecture} +\providecommand*{\@jmlryear}{} % \end{macrocode} -%\end{environment} -%\begin{environment}{axiom} +%\end{macro} +%\begin{macro}{\jmlryear} % \begin{macrocode} -\newtheorem{axiom}[theorem]{Axiom} +\newcommand*{\jmlryear}[1]{\renewcommand*{\@jmlryear}{#1}} % \end{macrocode} -%\end{environment} -% -%\begin{macro}{\orgvec} -%\changes{1.21}{2015-02-24}{new} -%Keep a copy of original \cs{vec} in case it's wanted. +%\end{macro} +%\begin{macro}{\@jmlrpages} +% The page range: +%\changes{1.17}{2012/05/30}{changed initial definition to use +%\cs{providecommand}} % \begin{macrocode} -\let\orgvec\vec +\providecommand*\@jmlrpages{\pageref{jmlrstart}--\pageref{jmlrend}} % \end{macrocode} %\end{macro} -%\begin{macro}{\vec} -% Redefine \cs{vec} to produce a bold symbol +%\begin{macro}{\jmlrpages} % \begin{macrocode} -\renewcommand*{\vec}[1]{\boldsymbol{#1}} +\newcommand*{\jmlrpages}[1]{\renewcommand*{\@jmlrpages}{#1}} % \end{macrocode} %\end{macro} -% -%\begin{environment}{enumerate*} -% Define an enumerate style environment where the nested environments -% all use the same counter. It uses the enumi counter. -% \begin{macrocode} -\newenvironment{enumerate*}% -{% - \ifnum\@enumdepth=0\relax - \setcounter{enumi}{0}% - \fi - \ifnum\@enumdepth>\thr@@ - \@toodeep - \else - \advance\@enumdepth\@ne - \def\@enumctr{enumi}% - \list - {\labelenumi}% - {\@nmbrlisttrue\def\@listctr{enumi}% - \def\makelabel##1{\hss\llap{##1}}}% - \fi -}% -{\endlist} +%\begin{macro}{\@jmlrsubmitted} +% The date the article was submitted: +%\changes{1.17}{2012/05/30}{changed initial definition to use +%\cs{providecommand}} +% \begin{macrocode} +\providecommand*\@jmlrsubmitted{} % \end{macrocode} -%\end{environment} -% -%\begin{environment}{altdescription} -% Define a description like environment where the indent is -% computed from the widest label. The optional argument is -% the widest label. +%\end{macro} +%\begin{macro}{\jmlrsubmitted} % \begin{macrocode} -\newenvironment{altdescription}[1]% - {\list{}% - {% - \settowidth{\labelwidth}{\altdescriptionlabel{#1}}% - \setlength{\labelsep}{15pt}% - \setlength{\leftmargin}{2\labelsep}% - \addtolength{\leftmargin}{\labelwidth}% - \setlength{\rightmargin}{\labelsep}% - \let\makelabel\altdescriptionlabel - }% - }% - {\endlist} - -\newcommand*{\altdescriptionlabel}[1]{\normalfont\bfseries #1\hfill} +\newcommand*{\jmlrsubmitted}[1]{\renewcommand*{\@jmlrsubmitted}{#1}} % \end{macrocode} -%\end{environment} -% -%\begin{macro}{\mailto} -% Syntax: \cs{mailto}\marg{address} +%\end{macro} +%\begin{macro}{\@jmlrpublished} +% The date the article was published: +%\changes{1.17}{2012/05/30}{changed initial definition to use +%\cs{providecommand}} % \begin{macrocode} -\newcommand*{\mailto}[1]{\texttt{#1}} +\providecommand*\@jmlrpublished{} % \end{macrocode} %\end{macro} -% -% The \sty{subfig} package breaks jmlrbook.cls, so define \ics{subfig} -% here. (This is fairly primitive.) -%\begin{macro}{\c@subfigure} -% Define subfigure counter: +%\begin{macro}{\jmlrpublished} % \begin{macrocode} -\newcounter{subfigure} -\@addtoreset{subfigure}{figure} +\newcommand*{\jmlrpublished}[1]{\renewcommand*{\@jmlrpublished}{#1}} % \end{macrocode} %\end{macro} -%\begin{macro}{\thesubfigure} +%\begin{macro}{\@jmlrworkshop} +% The name of the workshop: +%\changes{1.17}{2012/05/30}{changed initial definition to use +%\cs{providecommand}} % \begin{macrocode} -\renewcommand*{\thesubfigure}{\alph{subfigure}} +\providecommand*\@jmlrworkshop{} % \end{macrocode} %\end{macro} -%\begin{macro}{\p@subfigure} +%\begin{macro}{\jmlrworkshop} % \begin{macrocode} -\renewcommand*{\p@subfigure}{\expandafter\@p@subfigure} -\newcommand*{\@p@subfigure}[1]{% - \protect\@subfigurelabel{\thefigure}{\thesubfigure}% +\newcommand*{\jmlrworkshop}[1]{% + \renewcommand*{\@jmlrworkshop}{#1}% + \protected@write\@auxout{}{\string\jmlr@workshop{#1}}% } % \end{macrocode} %\end{macro} -%\begin{macro}{\@subfigurelabel} -% Define how label appears. +%\begin{macro}{\jmlr@workshop} +%\changes{1.20}{2014/10/15}{new} % \begin{macrocode} -\newcommand*\@subfigurelabel[2]{#1\subfigurelabel{#2}} +\newcommand*{\jmlr@workshop}[1]{} % \end{macrocode} %\end{macro} -%\begin{macro}{\subfigref} -% Reference the sub-figure without including the figure number. +%\begin{macro}{\date} % \begin{macrocode} -\newcommand*\@subfigref[1]{% - {% - \def\@subfigurelabel##1##2{\subfigurelabel{##2}}% - \ref{#1}% - }% -} -\newcommand*{\subfigref}[1]{% - \let\@objectname\@empty - \def\@objectref{}% - \let\@prevsep\@empty - \@for\@thislabel:=#1\do{% - \toks@{\@prevsep}% - \protected@edef\@objectref{\@objectref\the\toks@ - \protect\@subfigref{\@thislabel}}% - \ifx\@objectname\@empty - \let\@objectname\@nil - \else - \let\@objectname\relax - \let\@prevsep\@jmlr@reflistsep - \fi - }% - \ifx\@objectname\relax - \let\@prevsep\@jmlr@reflistlastsep - \fi - \@objectref +\renewcommand*{\date}[1]{% + \renewcommand*{\@date}{#1}% + \protected@write\@auxout{}{\string\jmlr@date{#1}}% } % \end{macrocode} %\end{macro} -%\begin{macro}{\subfigurelabel} +%\begin{macro}{\jmlr@date} +%\changes{1.20}{2014/10/15}{new} % \begin{macrocode} -\newcommand*{\subfigurelabel}[1]{(\emph{#1})} +\newcommand*{\jmlr@date}[1]{} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\@subfloatcapbox} -% Box to store subfloat caption. +%\begin{macro}{\@jmlrauthors} % \begin{macrocode} -\newsavebox\@subfloatcapbox +\newcommand*{\@jmlrauthors}{} % \end{macrocode} %\end{macro} -%\begin{macro}{\@subfloatcontsbox} -% Box to store subfloat contents. +%\begin{macro}{\@jmlr@authors} +%\changes{1.12}{2012/01/05}{new} +% \begin{macrocode} +\newcommand*{\@jmlr@authors}{\@jmlrauthors} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrauthors} +% This is provided in case \cs{Name} doesn't set \cs{@jmlrauthors} +% correctly. +%\changes{1.12}{2012/01/05}{\cs{jmlrauthors} now redefines +%\cs{@jmlr@authors} instead of \cs{@jmlrauthors}} % \begin{macrocode} -\newsavebox\@subfloatcontsbox +\newcommand*{\jmlrauthors}[1]{\global\def\@jmlr@authors{#1}} % \end{macrocode} %\end{macro} -%\begin{macro}{\subfigure} +% +% +%\subsection{Miscellany} +% This code was taken from jmlr2e.sty. + +% Define macros for figure captions and table titles % \begin{macrocode} -\newcommand*{\subfigure}[1][]{% - \bgroup - \def\@subfigcap{#1}% - \@subfigure -} +\def\figurecaption#1#2{\noindent\hangindent 40pt + \hbox to 36pt {\small\slshape #1 \hfil} + \ignorespaces {\small #2}} % \end{macrocode} -%\changes{1.09}{2010/12/01}{Added check to determine whether the -%subfigure caption is wider than the subfigure} +% Figurecenter prints the caption title centered. % \begin{macrocode} -\newcommand*{\@subfigure}[2][b]{% - \advance\c@figure by 1\relax - \refstepcounter{subfigure}% - \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}% - \ifx\@subfigcap\@empty - \else - \space\@subfigcap - \fi}% - \sbox\@subfloatcontsbox{#2}% - \settowidth{\@tempdima}{\usebox\@subfloatcontsbox}% - \settowidth{\@tempdimb}{\usebox\@subfloatcapbox}% - \ifdim\@tempdimb>\@tempdima - \settowidth\@tempdimb{\subfigurelabel{\thesubfigure}\space}% - \addtolength{\@tempdima}{-\@tempdimb}% - \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space - \parbox[t]{\@tempdima}{\@subfigcap}}% - \fi - \begin{tabular}[#1]{@{}c@{}}% - \usebox\@subfloatcontsbox\\\usebox\@subfloatcapbox - \end{tabular}% - \egroup -} +\def\figurecenter#1#2{\centerline{{\slshape #1} #2}} +\def\figurecenter#1#2{\centerline{{\small\slshape #1} {\small #2}}} % \end{macrocode} -%\end{macro} % -% Sub-tables: -%\begin{macro}{\c@subtable} -% Define subtable counter: +% Allow ``hanging indents'' in long captions +% +%\begin{macro}{\@makecaption} % \begin{macrocode} -\newcounter{subtable} -\@addtoreset{subtable}{table} +\long\def\@makecaption#1#2{% + \vskip 10pt + \setbox\@tempboxa\hbox{#1: #2}% + \ifdim \wd\@tempboxa >\hsize % IF longer than one line: + \begin{list}{#1:}{% + \settowidth{\labelwidth}{#1:} + \setlength{\leftmargin}{\labelwidth} + \addtolength{\leftmargin}{\labelsep} + }\item #2 \end{list}\par % Output in quote mode + \else % ELSE center. + \hbox to\hsize{\hfil\box\@tempboxa\hfil} + \fi} % \end{macrocode} %\end{macro} -%\begin{macro}{\thesubtable} +% Define strut macros for skipping spaces above and below text in a +% tabular environment. % \begin{macrocode} -\renewcommand*{\thesubtable}{\alph{subtable}} +\def\abovestrut#1{\rule[0in]{0in}{#1}\ignorespaces} +\def\belowstrut#1{\rule[-#1]{0in}{#1}\ignorespaces} % \end{macrocode} -%\end{macro} -%\begin{macro}{\p@subtable} +%\begin{macro}{\acks} +% Acknowledgements % \begin{macrocode} -\renewcommand*{\p@subtable}{\expandafter\@p@subtable} -\newcommand*{\@p@subtable}[1]{% - \protect\@subtablelabel{\thetable}{\thesubtable}% -} +\newcommand{\acks}[1]{\section*{Acknowledgments}#1} % \end{macrocode} %\end{macro} -%\begin{macro}{\@subtablelabel} -% Define how label appears. +% Research Note +%\begin{macro}{\researchnote} % \begin{macrocode} -\newcommand*\@subtablelabel[2]{#1\subtablelabel{#2}} +\newcommand{\researchnote}[1]{\noindent {\LARGE\itshape Research Note} #1} % \end{macrocode} %\end{macro} -%\begin{macro}{\subtabref} -% Reference the sub-table without including the table number. +% +%Other macros now moved to \sty{jmlrutils}. +% +%\begin{macro}{\ifprint} +% Provide command to check if this is the printed greyscale +% version or the online colour version. % \begin{macrocode} -\newcommand*\@subtabref[1]{% - {% - \def\@subtablelabel##1##2{\subtablelabel{##2}}% - \ref{#1}% - }% -} -\newcommand*{\subtabref}[1]{% - \let\@objectname\@empty - \def\@objectref{}% - \let\@prevsep\@empty - \@for\@thislabel:=#1\do{% - \toks@{\@prevsep}% - \protected@edef\@objectref{\@objectref\the\toks@ - \protect\@subtabref{\@thislabel}}% - \ifx\@objectname\@empty - \let\@objectname\@nil +\providecommand{\ifprint}[2]{\ifgrayscale#1\else#2\fi} +% \end{macrocode} +%\end{macro} +% +% Modify \cs{includegraphics} so that it can pick up the greyscale +% version of images if this is the print version. +%% \begin{macrocode} +\ifjmlrhtml +\else + \let\@org@Ginclude@graphics\Ginclude@graphics + \def\Ginclude@graphics#1{% + \begingroup + \let\input@path\Ginput@path + \ifprint{\filename@parse{#1-gray}}{\filename@parse{#1}}% + \ifx\filename@ext\relax + \@for\Gin@temp:=\Gin@extensions\do{% + \ifx\Gin@ext\relax + \Gin@getbase\Gin@temp + \fi}% + \else + \ifprint{\filename@parse{#1}}{}% + \Gin@getbase{\Gin@sepdefault\filename@ext}% + \ifx\Gin@ext\relax + \@warning{File `#1' not found}% + \def\Gin@base{\filename@area\filename@base}% + \edef\Gin@ext{\Gin@sepdefault\filename@ext}% + \fi + \fi + \ifx\Gin@ext\relax + \ifprint{\@org@Ginclude@graphics{#1}}% + {% + \@latex@error{File `#1' not found}% + {I could not locate the file with any of these extensions:^^J% + \Gin@extensions^^J\@ehc}% + }% \else - \let\@objectname\relax - \let\@prevsep\@jmlr@reflistsep + \@ifundefined{Gin@rule@\Gin@ext}% + {\ifx\Gin@rule@*\@undefined + \@latex@error{Unknown graphics extension: \Gin@ext}\@ehc + \else + \expandafter\Gin@setfile\Gin@rule@*{\Gin@base\Gin@ext}% + \fi}% + {\expandafter\expandafter\expandafter\Gin@setfile + \csname Gin@rule@\Gin@ext\endcsname{\Gin@base\Gin@ext}}% \fi - }% - \ifx\@objectname\relax - \let\@prevsep\@jmlr@reflistlastsep - \fi - \@objectref -} + \endgroup} +\fi % \end{macrocode} -%\end{macro} -%\begin{macro}{\subtablelabel} +% +%\begin{macro}{\artappendix} +% Switch to appendices in an article % \begin{macrocode} -\newcommand*{\subtablelabel}[1]{(\emph{#1})} +\newcommand{\artappendix}{\par + \setcounter{section}{0} + \setcounter{subsection}{0} + \def\thesection{\Alph{section}} % \end{macrocode} -%\end{macro} -%\begin{macro}{\subtable} +%\changes{1.12}{2012/01/05}{added chapter to \cs{theHsection} to ensure unique +%hyperlink names in book} % \begin{macrocode} -\newcommand*{\subtable}[1][]{% - \def\@subtabcap{#1}% - \@subtable + \def\theHsection{\theHchapter.\Alph{section}} + \def\presectionnum{Appendix~}% } % \end{macrocode} -%\changes{1.09}{2010/12/01}{Added check to determine whether the -%subtable caption is wider than the subtable} +%\end{macro} +% The default assumes a stand-alone article. +%\begin{macro}{\appendix} % \begin{macrocode} -\newcommand*{\@subtable}[2][t]{% - \refstepcounter{subtable}% - \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}% - \ifx\@subtabcap\@empty - \else - \space\@subtabcap - \fi}% - \sbox\@subfloatcontsbox{#2}% - \settowidth{\@tempdima}{\usebox\@subfloatcontsbox}% - \settowidth{\@tempdimb}{\usebox\@subfloatcapbox}% - \ifdim\@tempdimb>\@tempdima - \settowidth\@tempdimb{\subtablelabel{\thesubtable}\space}% - \addtolength{\@tempdima}{-\@tempdimb}% - \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space - \parbox[t]{\@tempdima}{\@subtabcap}}% - \fi - \begin{tabular}[#1]{@{}c@{}}% - \usebox\@subfloatcapbox\\\usebox\@subfloatcontsbox - \end{tabular} -} +\let\appendix\artappendix +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\booklinebreak} +%\changes{1.18}{2013-10-17}{new} +% Provided for book production editors to fine tune the book +% line breaking. Does nothing in the standalone article. +% \begin{macrocode} +\newcommand{\booklinebreak}[1][]{} % \end{macrocode} %\end{macro} % @@ -4384,7 +4678,7 @@ Keywords:} \ignorespaces}% % \end{macrocode} % Declare class: % \begin{macrocode} -\ProvidesClass{jmlrbook}[2017/03/09 v1.23 (NLCT) JMLR Book Style] +\ProvidesClass{jmlrbook}[2017/08/01 v1.24 (NLCT) JMLR Book Style] % \end{macrocode} % Need \sty{xkeyval} package to have key=value class options % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/jmlr/jmlr.ins b/Master/texmf-dist/source/latex/jmlr/jmlr.ins index 4af6c73991a..0fff82ddfd0 100644 --- a/Master/texmf-dist/source/latex/jmlr/jmlr.ins +++ b/Master/texmf-dist/source/latex/jmlr/jmlr.ins @@ -1,4 +1,4 @@ -% jmlr.ins generated using makedtx version 1.1 2017/3/9 9:50 +% jmlr.ins generated using makedtx version 1.2 2017/8/1 16:57 \input docstrip \preamble @@ -8,7 +8,7 @@ This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 - of this license of (at your option) any later version. + of this license or (at your option) any later version. The latest version of this license is in http://www.latex-project.org/lppl.txt and version 1.3 or later is part of all distributions of LaTeX @@ -18,13 +18,15 @@ The Current Maintainer of this work is Nicola Talbot. - This work consists of the files jmlr.dtx and jmlr.ins and the derived files jmlr.cls, jmlrbook.cls. + This work consists of the files jmlr.dtx and jmlr.ins and the derived files jmlrutils.sty, jmlr.cls, jmlrbook.cls. \endpreamble \askforoverwritefalse -\generate{\file{jmlr.cls}{\usepreamble\defaultpreamble +\generate{\file{jmlrutils.sty}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{jmlr.dtx}{jmlrutils.sty,package}} +\file{jmlr.cls}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{jmlr.dtx}{jmlr.cls,package}} \file{jmlrbook.cls}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{jmlr.dtx}{jmlrbook.cls,package}} diff --git a/Master/texmf-dist/tex/latex/jmlr/jmlr.cls b/Master/texmf-dist/tex/latex/jmlr/jmlr.cls index 0576e3a24d3..9dab2b8fe3e 100644 --- a/Master/texmf-dist/tex/latex/jmlr/jmlr.cls +++ b/Master/texmf-dist/tex/latex/jmlr/jmlr.cls @@ -11,7 +11,7 @@ %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 -%% of this license of (at your option) any later version. +%% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files jmlr.dtx and jmlr.ins and the derived files jmlr.cls, jmlrbook.cls. +%% This work consists of the files jmlr.dtx and jmlr.ins and the derived files jmlrutils.sty, jmlr.cls, jmlrbook.cls. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -41,7 +41,7 @@ %% First editor: %% Second editor: \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{jmlr}[2017/03/09 v1.23 (NLCT) Journal of Machine Learning Research] +\ProvidesClass{jmlr}[2017/08/01 v1.24 (NLCT) Journal of Machine Learning Research] \RequirePackage{xkeyval} \RequirePackage{calc} \RequirePackage{etoolbox} @@ -60,9 +60,18 @@ \DeclareOptionX{final}{\setlength\overfullrule{0pt}} \newif\iftablecaptiontop \tablecaptiontoptrue +\newcommand{\tableconts}[3]{% + \iftablecaptiontop + #2\label{#1}\vskip\baselineskip + {\centering #3\par}% + \else + {\centering #3\par}% + \vskip\baselineskip + #2\label{#1}% + \fi +} \DeclareOptionX{tablecaptiontop}{\tablecaptiontoptrue} \DeclareOptionX{tablecaptionbottom}{\tablecaptiontopfalse} - \define@choicekey{jmlr.cls}{tablecaption}[\val\nr]{top,bottom}{% \ifcase\nr\relax \tablecaptiontoptrue @@ -72,7 +81,9 @@ } \newif\ifjmlrhtml \jmlrhtmlfalse -\DeclareOptionX{html}{\jmlrhtmltrue} +\DeclareOptionX{html}{% + \ClassWarning{jmlr}{html option is now deprecated}% + \jmlrhtmltrue} \DeclareOptionX{nohtml}{\jmlrhtmlfalse} \def\pt@size{11pt} \DeclareOptionX{10pt}{\renewcommand{\pt@size}{10pt}} @@ -134,8 +145,12 @@ \RequirePackage{natbib} \RequirePackage{graphicx} \RequirePackage{url} -\RequirePackage[x11names]{xcolor} -\RequirePackage[algo2e,ruled]{algorithm2e} +\PassOptionsToPackage{x11names}{xcolor} +\RequirePackage{xcolor} +\PassOptionsToPackage{algo2e,ruled}{algorithm2e} +\RequirePackage{algorithm2e} +\setlength\algomargin{0pt} +\RequirePackage{jmlrutils} \jmlrprehyperref \@ifundefined{@pre@hyperref}{}{\@pre@hyperref} \RequirePackage{hyperref} @@ -570,128 +585,8 @@ Keywords:} \ignorespaces}% \fi} \def\abovestrut#1{\rule[0in]{0in}{#1}\ignorespaces} \def\belowstrut#1{\rule[-#1]{0in}{#1}\ignorespaces} -\long\def\acks#1{\section*{Acknowledgments}#1} -\long\def\researchnote#1{\noindent {\LARGE\itshape Research Note} #1} -\newcommand*{\set}[1]{\ensuremath{\mathcal{#1}}} -\newcommand*{\@jmlr@reflistsep}{, } -\newcommand*{\@jmlr@reflistlastsep}{ and } -\newcommand*{\sectionrefname}{Section} -\newcommand*{\sectionsrefname}{Sections} -\newcommand*{\equationrefname}{Equation} -\newcommand*{\equationsrefname}{Equations} -\newcommand*{\tablerefname}{Table} -\newcommand*{\tablesrefname}{Tables} -\newcommand*{\figurerefname}{Figure} -\newcommand*{\figuresrefname}{Figures} -\newcommand*{\algorithmrefname}{Algorithm} -\newcommand*{\algorithmsrefname}{Algorithms} -\newcommand*{\theoremrefname}{Theorem} -\newcommand*{\theoremsrefname}{Theorems} -\newcommand*{\lemmarefname}{Lemma} -\newcommand*{\lemmasrefname}{Lemmas} -\newcommand*{\remarkrefname}{Remark} -\newcommand*{\remarksrefname}{Remarks} -\newcommand*{\corollaryrefname}{Corollary} -\newcommand*{\corollarysrefname}{Corollaries} -\newcommand*{\definitionrefname}{Definition} -\newcommand*{\definitionsrefname}{Definitions} -\newcommand*{\conjecturerefname}{Conjecture} -\newcommand*{\conjecturesrefname}{Conjectures} -\newcommand*{\axiomrefname}{Axiom} -\newcommand*{\axiomsrefname}{Axioms} -\newcommand*{\examplerefname}{Example} -\newcommand*{\examplesrefname}{Examples} -\newcommand*{\appendixrefname}{Appendix} -\newcommand*{\appendixsrefname}{Appendices} -\newcommand*{\partrefname}{Part} -\newcommand*{\partsrefname}{Parts} -\DeclareRobustCommand*{\objectref}[5]{% - \let\@objectname\@empty - \def\@objectref{}% - \let\@prevsep\@empty - \@for\@thislabel:=#1\do{% - \toks@{\@prevsep}% - \protected@edef\@objectref{\@objectref\the\toks@ - #4\ref{\@thislabel}#5}% - \ifx\@objectname\@empty - \let\@objectname#2% singular tag - \else - \let\@objectname#3% plural tag - \let\@prevsep\@jmlr@reflistsep - \fi - }% - \ifx\@objectname#3% plural tag - \let\@prevsep\@jmlr@reflistlastsep - \fi - \@objectname~\@objectref -} -\newcommand*{\sectionref}[1]{% - \objectref{#1}{\sectionrefname}{\sectionsrefname}{}{}} -\newcommand*{\equationref}[1]{% - \objectref{#1}{\equationrefname}{\equationsrefname}()} -\newcommand*{\tableref}[1]{% - \objectref{#1}{\tablerefname}{\tablesrefname}{}{}} -\newcommand*{\figureref}[1]{% - \objectref{#1}{\figurerefname}{\figuresrefname}{}{}} -\newcommand*{\algorithmref}[1]{% - \objectref{#1}{\algorithmrefname}{\algorithmsrefname}{}{}} -\newcommand*{\theoremref}[1]{% - \objectref{#1}{\theoremrefname}{\theoremsrefname}{}{}} -\newcommand*{\lemmaref}[1]{% - \objectref{#1}{\lemmarefname}{\lemmasrefname}{}{}} -\newcommand*{\remarkref}[1]{% - \objectref{#1}{\remarkrefname}{\remarksrefname}{}{}} -\newcommand*{\corollaryref}[1]{% - \objectref{#1}{\corollaryrefname}{\corollarysrefname}{}{}} -\newcommand*{\definitionref}[1]{% - \objectref{#1}{\definitionrefname}{\definitionsrefname}{}{}} -\newcommand*{\conjectureref}[1]{% - \objectref{#1}{\conjecturerefname}{\conjecturesrefname}{}{}} -\newcommand*{\axiomref}[1]{% - \objectref{#1}{\axiomrefname}{\axiomsrefname}{}{}} -\newcommand*{\exampleref}[1]{% - \objectref{#1}{\examplerefname}{\examplesrefname}{}{}} -\newcommand*{\appendixref}[1]{% - \objectref{#1}{\appendixrefname}{\appendixsrefname}{}{}} -\newcommand*{\partref}[1]{% - \objectref{#1}{\partrefname}{\partsrefname}{}{}} -\newcommand{\floatconts}[3]{% - \@ifundefined{\@captype conts}{\tableconts{#1}{#2}{#3}}% - {\csname\@captype conts\endcsname{#1}{#2}{#3}}% -} -\newcommand{\tableconts}[3]{% - \iftablecaptiontop - #2\label{#1}\vskip\baselineskip - {\centering #3\par}% - \else - {\centering #3\par}% - \vskip\baselineskip - #2\label{#1}% - \fi -} -\newcommand{\figureconts}[3]{% - {\centering #3\par}% - \vskip\baselineskip - #2\label{#1}% -} -\newcommand{\algocfconts}[3]{% - \@algocf@pre@ruled - #2\label{#1}\kern2pt\hrule height.8pt depth0pt\kern2pt% - #3\@algocf@pre@ruled -} -\newcommand*{\includeteximage}[2][]{% - \def\Gin@req@sizes{% - \Gin@req@height\Gin@nat@height - \Gin@req@width\Gin@nat@width}% - \begingroup - \@tempswafalse - \let\input@path\Ginput@path - \toks@{\InputIfFileExists{#2}{}{\@warning{File `#1' not found}}}% - \setkeys{Gin}{#1}% - \Gin@esetsize - \the\toks@ - \endgroup -} +\newcommand{\acks}[1]{\section*{Acknowledgments}#1} +\newcommand{\researchnote}[1]{\noindent {\LARGE\itshape Research Note} #1} \providecommand{\ifprint}[2]{\ifgrayscale#1\else#2\fi} %% \begin{macrocode} \ifjmlrhtml @@ -734,18 +629,6 @@ Keywords:} \ignorespaces}% \fi \endgroup} \fi -\newenvironment{algorithm}[1][htbp]% -{% - \begin{algocf}[#1]% - \renewcommand\@makecaption[2]{% - \hskip\AlCapHSkip - \parbox[t]{\hsize}{\algocf@captiontext{##1}{##2}}% - }% -}% -{% - \end{algocf}% -} -\setlength\algomargin{0pt} \newcommand{\artappendix}{\par \setcounter{section}{0} \setcounter{subsection}{0} @@ -755,280 +638,6 @@ Keywords:} \ignorespaces}% } \let\appendix\artappendix \newcommand{\booklinebreak}[1][]{} -\newcommand{\BlackBox}{\rule{1.5ex}{1.5ex}} -\newcommand*{\jmlrQED}{\hfill\BlackBox\\[2mm]} -\newenvironment{proof}% -{% - \par\noindent{\bfseries\upshape Proof\ }% -}% -{\jmlrQED} -\newcommand*{\theorembodyfont}[1]{% - \renewcommand*{\@theorembodyfont}{#1}% -} -\newcommand*{\@theorembodyfont}{\normalfont\itshape}% -\newcommand*{\theoremheaderfont}[1]{% - \renewcommand*{\@theoremheaderfont}{#1}% -} -\newcommand*{\@theoremheaderfont}{\normalfont\bfseries }% -\newcommand*{\theoremsep}[1]{% - \renewcommand*{\@theoremsep}{#1}% -} -\newcommand*{\@theoremsep}{}% -\newcommand*{\theorempostheader}[1]{% - \renewcommand*{\@theorempostheader}{#1}% -} -\newcommand*{\@theorempostheader}{}% -\let\jmlr@org@newtheorem\newtheorem -\renewcommand*{\newtheorem}{\@ifstar\jmlr@snewtheorem\jmlr@newtheorem} -\newcommand*{\jmlr@snewtheorem}[2]{% - \cslet{jmlr@thm@#1@body@font}{\@theorembodyfont}% - \cslet{jmlr@thm@#1@header@font}{\@theoremheaderfont}% - \cslet{jmlr@thm@#1@sep}{\@theoremsep}% - \cslet{jmlr@thm@#1@postheader}{\@theorempostheader}% - \newenvironment{#1}% - {% - \trivlist - \item - [% - \hskip\labelsep{\csuse{jmlr@thm@#1@header@font}#2% - \csuse{jmlr@thm@#1@postheader}% - }% - ]% - \mbox{}\csuse{jmlr@thm@#1@sep}% - \csuse{jmlr@thm@#1@body@font}% - }% - {% - \endtrivlist - }% -} -\newcommand{\jmlr@newtheorem}[1]{% - \cslet{jmlr@thm@#1@body@font}{\@theorembodyfont}% - \cslet{jmlr@thm@#1@header@font}{\@theoremheaderfont}% - \cslet{jmlr@thm@#1@sep}{\@theoremsep}% - \cslet{jmlr@thm@#1@postheader}{\@theorempostheader}% - \jmlr@org@newtheorem{#1}% -} -\renewcommand*{\@xthm}[2]{% - \def\@jmlr@currentthm{#1}% - \@begintheorem{#2}{\csname the#1\endcsname}% - \ignorespaces -} -\def\@ythm#1#2[#3]{% - \def\@jmlr@currentthm{#1}% - \@opargbegintheorem{#2}{\csname the#1\endcsname}{#3}% - \ignorespaces -} -\renewcommand*{\@begintheorem}[2]{% - \ifdef{\@jmlr@currentthm}% - {% - \letcs{\jmlr@this@theoremheader}{jmlr@thm@\@jmlr@currentthm @header@font}% - \letcs{\jmlr@this@theorembody}{jmlr@thm@\@jmlr@currentthm @body@font}% - \letcs{\jmlr@this@theoremsep}{jmlr@thm@\@jmlr@currentthm @sep}% - \letcs{\jmlr@this@theorempostheader}% - {jmlr@thm@\@jmlr@currentthm @postheader}% - }% - {% - \let\jmlr@this@theorembody\@theorembodyfont - \let\jmlr@this@theoremheader\@theoremheaderfont - \let\jmlr@this@theoremsep\@theoremsep - \let\jmlr@this@theorempostheader\@theorempostheader - }% - \trivlist - \item - [% - \hskip\labelsep{\jmlr@this@theoremheader #1\ #2% - \jmlr@this@theorempostheader}% - ]% - \mbox{}\jmlr@this@theoremsep - \jmlr@this@theorembody -} -\renewcommand*{\@opargbegintheorem}[3]{% - \ifdef{\@jmlr@currentthm}% - {% - \letcs{\jmlr@this@theoremheader}{jmlr@thm@\@jmlr@currentthm @header@font}% - \letcs{\jmlr@this@theorembody}{jmlr@thm@\@jmlr@currentthm @body@font}% - \letcs{\jmlr@this@theoremsep}{jmlr@thm@\@jmlr@currentthm @sep}% - \letcs{\jmlr@this@theorempostheader}% - {jmlr@thm@\@jmlr@currentthm @postheader}% - }% - {% - \let\jmlr@this@theorembody\@theorembodyfont - \let\jmlr@this@theoremheader\@theoremheaderfont - \let\jmlr@this@theoremsep\@theoremsep - \let\jmlr@this@theorempostheader\@theorempostheader - }% - \trivlist - \item[\hskip\labelsep{\jmlr@this@theoremheader #1\ #2\ (#3)% - \jmlr@this@theorempostheader}]% - \mbox{}\jmlr@this@theoremsep - \jmlr@this@theorembody -} -\newtheorem{example}{Example} -\newtheorem{theorem}{Theorem} -\newtheorem{lemma}[theorem]{Lemma} -\newtheorem{proposition}[theorem]{Proposition} -\newtheorem{remark}[theorem]{Remark} -\newtheorem{corollary}[theorem]{Corollary} -\newtheorem{definition}[theorem]{Definition} -\newtheorem{conjecture}[theorem]{Conjecture} -\newtheorem{axiom}[theorem]{Axiom} -\let\orgvec\vec -\renewcommand*{\vec}[1]{\boldsymbol{#1}} -\newenvironment{enumerate*}% -{% - \ifnum\@enumdepth=0\relax - \setcounter{enumi}{0}% - \fi - \ifnum\@enumdepth>\thr@@ - \@toodeep - \else - \advance\@enumdepth\@ne - \def\@enumctr{enumi}% - \list - {\labelenumi}% - {\@nmbrlisttrue\def\@listctr{enumi}% - \def\makelabel##1{\hss\llap{##1}}}% - \fi -}% -{\endlist} -\newenvironment{altdescription}[1]% - {\list{}% - {% - \settowidth{\labelwidth}{\altdescriptionlabel{#1}}% - \setlength{\labelsep}{15pt}% - \setlength{\leftmargin}{2\labelsep}% - \addtolength{\leftmargin}{\labelwidth}% - \setlength{\rightmargin}{\labelsep}% - \let\makelabel\altdescriptionlabel - }% - }% - {\endlist} - -\newcommand*{\altdescriptionlabel}[1]{\normalfont\bfseries #1\hfill} -\newcommand*{\mailto}[1]{\texttt{#1}} -\newcounter{subfigure} -\@addtoreset{subfigure}{figure} -\renewcommand*{\thesubfigure}{\alph{subfigure}} -\renewcommand*{\p@subfigure}{\expandafter\@p@subfigure} -\newcommand*{\@p@subfigure}[1]{% - \protect\@subfigurelabel{\thefigure}{\thesubfigure}% -} -\newcommand*\@subfigurelabel[2]{#1\subfigurelabel{#2}} -\newcommand*\@subfigref[1]{% - {% - \def\@subfigurelabel##1##2{\subfigurelabel{##2}}% - \ref{#1}% - }% -} -\newcommand*{\subfigref}[1]{% - \let\@objectname\@empty - \def\@objectref{}% - \let\@prevsep\@empty - \@for\@thislabel:=#1\do{% - \toks@{\@prevsep}% - \protected@edef\@objectref{\@objectref\the\toks@ - \protect\@subfigref{\@thislabel}}% - \ifx\@objectname\@empty -\let\@objectname\@nil - \else -\let\@objectname\relax - \let\@prevsep\@jmlr@reflistsep - \fi - }% - \ifx\@objectname\relax - \let\@prevsep\@jmlr@reflistlastsep - \fi - \@objectref -} -\newcommand*{\subfigurelabel}[1]{(\emph{#1})} -\newsavebox\@subfloatcapbox -\newsavebox\@subfloatcontsbox -\newcommand*{\subfigure}[1][]{% - \bgroup - \def\@subfigcap{#1}% - \@subfigure -} -\newcommand*{\@subfigure}[2][b]{% - \advance\c@figure by 1\relax - \refstepcounter{subfigure}% - \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}% - \ifx\@subfigcap\@empty - \else - \space\@subfigcap - \fi}% - \sbox\@subfloatcontsbox{#2}% - \settowidth{\@tempdima}{\usebox\@subfloatcontsbox}% - \settowidth{\@tempdimb}{\usebox\@subfloatcapbox}% - \ifdim\@tempdimb>\@tempdima - \settowidth\@tempdimb{\subfigurelabel{\thesubfigure}\space}% - \addtolength{\@tempdima}{-\@tempdimb}% - \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space - \parbox[t]{\@tempdima}{\@subfigcap}}% - \fi - \begin{tabular}[#1]{@{}c@{}}% - \usebox\@subfloatcontsbox\\\usebox\@subfloatcapbox - \end{tabular}% - \egroup -} -\newcounter{subtable} -\@addtoreset{subtable}{table} -\renewcommand*{\thesubtable}{\alph{subtable}} -\renewcommand*{\p@subtable}{\expandafter\@p@subtable} -\newcommand*{\@p@subtable}[1]{% - \protect\@subtablelabel{\thetable}{\thesubtable}% -} -\newcommand*\@subtablelabel[2]{#1\subtablelabel{#2}} -\newcommand*\@subtabref[1]{% - {% - \def\@subtablelabel##1##2{\subtablelabel{##2}}% - \ref{#1}% - }% -} -\newcommand*{\subtabref}[1]{% - \let\@objectname\@empty - \def\@objectref{}% - \let\@prevsep\@empty - \@for\@thislabel:=#1\do{% - \toks@{\@prevsep}% - \protected@edef\@objectref{\@objectref\the\toks@ - \protect\@subtabref{\@thislabel}}% - \ifx\@objectname\@empty -\let\@objectname\@nil - \else -\let\@objectname\relax - \let\@prevsep\@jmlr@reflistsep - \fi - }% - \ifx\@objectname\relax - \let\@prevsep\@jmlr@reflistlastsep - \fi - \@objectref -} -\newcommand*{\subtablelabel}[1]{(\emph{#1})} -\newcommand*{\subtable}[1][]{% - \def\@subtabcap{#1}% - \@subtable -} -\newcommand*{\@subtable}[2][t]{% - \refstepcounter{subtable}% - \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}% - \ifx\@subtabcap\@empty - \else - \space\@subtabcap - \fi}% - \sbox\@subfloatcontsbox{#2}% - \settowidth{\@tempdima}{\usebox\@subfloatcontsbox}% - \settowidth{\@tempdimb}{\usebox\@subfloatcapbox}% - \ifdim\@tempdimb>\@tempdima - \settowidth\@tempdimb{\subtablelabel{\thesubtable}\space}% - \addtolength{\@tempdima}{-\@tempdimb}% - \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space - \parbox[t]{\@tempdima}{\@subtabcap}}% - \fi - \begin{tabular}[#1]{@{}c@{}}% - \usebox\@subfloatcapbox\\\usebox\@subfloatcontsbox - \end{tabular} -} \newcounter{chapter} \renewcommand\thechapter{\@arabic\c@chapter} \newcommand\@chapapp{\chaptername} diff --git a/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls b/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls index b74c1ab12ff..71423d3b34a 100644 --- a/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls +++ b/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls @@ -11,7 +11,7 @@ %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 -%% of this license of (at your option) any later version. +%% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files jmlr.dtx and jmlr.ins and the derived files jmlr.cls, jmlrbook.cls. +%% This work consists of the files jmlr.dtx and jmlr.ins and the derived files jmlrutils.sty, jmlr.cls, jmlrbook.cls. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -41,7 +41,7 @@ %% First editor: %% Second editor: \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{jmlrbook}[2017/03/09 v1.23 (NLCT) JMLR Book Style] +\ProvidesClass{jmlrbook}[2017/08/01 v1.24 (NLCT) JMLR Book Style] \RequirePackage{xkeyval} \RequirePackage{setspace} \newcommand*\jmlrprefacepath{} diff --git a/Master/texmf-dist/tex/latex/jmlr/jmlrutils.sty b/Master/texmf-dist/tex/latex/jmlr/jmlrutils.sty new file mode 100644 index 00000000000..8c6d6209bf2 --- /dev/null +++ b/Master/texmf-dist/tex/latex/jmlr/jmlrutils.sty @@ -0,0 +1,495 @@ +%% +%% This is file `jmlrutils.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% jmlr.dtx (with options: `jmlrutils.sty,package') +%% +%% jmlr.dtx +%% Copyright 2017 Nicola Talbot +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Nicola Talbot. +%% +%% This work consists of the files jmlr.dtx and jmlr.ins and the derived files jmlrutils.sty, jmlr.cls, jmlrbook.cls. +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% First editor: +%% Second editor: +\ProvidesPackage{jmlrutils}[2017/08/01] +\newif\ifjmlrutilsmaths +\jmlrutilsmathstrue +\DeclareOption{maths}{\jmlrutilsmathstrue} +\DeclareOption{nomaths}{\jmlrutilsmathsfalse} +\newif\ifjmlrutilstheorems +\jmlrutilstheoremstrue +\DeclareOption{theorems}{\jmlrutilstheoremstrue} +\DeclareOption{notheorems}{\jmlrutilstheoremsfalse} +\newif\ifjmlrutilssubfloats +\jmlrutilssubfloatstrue +\DeclareOption{subfloats}{\jmlrutilssubfloatstrue} +\DeclareOption{nosubfloats}{\jmlrutilssubfloatsfalse} +\ProcessOptions +\RequirePackage{etoolbox} +\ifjmlrutilsmaths + \RequirePackage{amsmath} +\fi +\@ifundefined{iftablecaptiontop} +{\newif\iftablecaptiontop +\tablecaptiontoptrue} +{} +\newcommand*{\@jmlr@reflistsep}{, } +\newcommand*{\@jmlr@reflistlastsep}{ and } +\newcommand*{\sectionrefname}{Section} +\newcommand*{\sectionsrefname}{Sections} +\newcommand*{\equationrefname}{Equation} +\newcommand*{\equationsrefname}{Equations} +\newcommand*{\tablerefname}{Table} +\newcommand*{\tablesrefname}{Tables} +\newcommand*{\figurerefname}{Figure} +\newcommand*{\figuresrefname}{Figures} +\newcommand*{\algorithmrefname}{Algorithm} +\newcommand*{\algorithmsrefname}{Algorithms} +\newcommand*{\theoremrefname}{Theorem} +\newcommand*{\theoremsrefname}{Theorems} +\newcommand*{\lemmarefname}{Lemma} +\newcommand*{\lemmasrefname}{Lemmas} +\newcommand*{\remarkrefname}{Remark} +\newcommand*{\remarksrefname}{Remarks} +\newcommand*{\corollaryrefname}{Corollary} +\newcommand*{\corollarysrefname}{Corollaries} +\newcommand*{\definitionrefname}{Definition} +\newcommand*{\definitionsrefname}{Definitions} +\newcommand*{\conjecturerefname}{Conjecture} +\newcommand*{\conjecturesrefname}{Conjectures} +\newcommand*{\axiomrefname}{Axiom} +\newcommand*{\axiomsrefname}{Axioms} +\newcommand*{\examplerefname}{Example} +\newcommand*{\examplesrefname}{Examples} +\newcommand*{\appendixrefname}{Appendix} +\newcommand*{\appendixsrefname}{Appendices} +\newcommand*{\partrefname}{Part} +\newcommand*{\partsrefname}{Parts} +\newrobustcmd*{\objectref}[5]{% + \let\@objectname\@empty + \def\@objectref{}% + \let\@prevsep\@empty + \@for\@thislabel:=#1\do{% + \toks@{\@prevsep}% + \protected@edef\@objectref{\@objectref\the\toks@ + #4\ref{\@thislabel}#5}% + \ifx\@objectname\@empty + \let\@objectname#2% singular tag + \else + \let\@objectname#3% plural tag + \let\@prevsep\@jmlr@reflistsep + \fi + }% + \ifx\@objectname#3% plural tag + \let\@prevsep\@jmlr@reflistlastsep + \fi + \@objectname~\@objectref +} +\newcommand*{\sectionref}[1]{% + \objectref{#1}{\sectionrefname}{\sectionsrefname}{}{}} +\newcommand*{\equationref}[1]{% + \objectref{#1}{\equationrefname}{\equationsrefname}()} +\newcommand*{\tableref}[1]{% + \objectref{#1}{\tablerefname}{\tablesrefname}{}{}} +\newcommand*{\figureref}[1]{% + \objectref{#1}{\figurerefname}{\figuresrefname}{}{}} +\newcommand*{\algorithmref}[1]{% + \objectref{#1}{\algorithmrefname}{\algorithmsrefname}{}{}} +\newcommand*{\theoremref}[1]{% + \objectref{#1}{\theoremrefname}{\theoremsrefname}{}{}} +\newcommand*{\lemmaref}[1]{% + \objectref{#1}{\lemmarefname}{\lemmasrefname}{}{}} +\newcommand*{\remarkref}[1]{% + \objectref{#1}{\remarkrefname}{\remarksrefname}{}{}} +\newcommand*{\corollaryref}[1]{% + \objectref{#1}{\corollaryrefname}{\corollarysrefname}{}{}} +\newcommand*{\definitionref}[1]{% + \objectref{#1}{\definitionrefname}{\definitionsrefname}{}{}} +\newcommand*{\conjectureref}[1]{% + \objectref{#1}{\conjecturerefname}{\conjecturesrefname}{}{}} +\newcommand*{\axiomref}[1]{% + \objectref{#1}{\axiomrefname}{\axiomsrefname}{}{}} +\newcommand*{\exampleref}[1]{% + \objectref{#1}{\examplerefname}{\examplesrefname}{}{}} +\newcommand*{\appendixref}[1]{% + \objectref{#1}{\appendixrefname}{\appendixsrefname}{}{}} +\newcommand*{\partref}[1]{% + \objectref{#1}{\partrefname}{\partsrefname}{}{}} +\newcommand{\floatconts}[3]{% + \@ifundefined{\@captype conts}{\tableconts{#1}{#2}{#3}}% + {\csname\@captype conts\endcsname{#1}{#2}{#3}}% +} +\providecommand{\tableconts}[3]{% + #2\label{#1}\vskip\baselineskip + {\centering #3\par}% +} +\newcommand{\figureconts}[3]{% + {\centering #3\par}% + \vskip\baselineskip + #2\label{#1}% +} +\newcommand{\algocfconts}[3]{% + \@algocf@pre@ruled + #2\label{#1}\kern2pt\hrule height.8pt depth0pt\kern2pt% + #3\@algocf@pre@ruled +} +\newenvironment{algorithm}[1][htbp]% +{% + \ifundef{\algocf}% + {`algorithm2e' package is required if you want to + use the algorithm environment}% + {}% + \begin{algocf}[#1]% + \renewcommand\@makecaption[2]{% + \hskip\AlCapHSkip + \parbox[t]{\hsize}{\algocf@captiontext{##1}{##2}}% + }% +}% +{% + \end{algocf}% +} +\AtBeginDocument{% + \@ifpackageloaded{graphicx}% + {\let\@jmlr@ifgraphicxloaded\@firstoftwo}% + {\let\@jmlr@ifgraphicxloaded\@secondoftwo}% +} +\newcommand*{\includeteximage}[2][]{% + \@jmlr@ifgraphicxloaded + {% + \def\Gin@req@sizes{% + \Gin@req@height\Gin@nat@height + \Gin@req@width\Gin@nat@width}% + \begingroup + \let\input@path\Ginput@path + \IfFileExists{#2}% + {% + \toks@{\input{#2}}% + \ifstrempty{#1} + {}% + {% + \@tempswatrue + \setkeys{Gin}{#1}% + \Gin@esetsize + }% + \the\toks@ + }% + {\@warning{File `#2' not found}}% + \endgroup + }% + {\PackageError{jmlrutils}{`graphicx' package is required + if you want to use \string\includeteximage}{}}% +} +\ifjmlrutilssubfloats + \newcounter{subfigure} + \@addtoreset{subfigure}{figure} + \renewcommand*{\thesubfigure}{\alph{subfigure}} + \renewcommand*{\p@subfigure}{\expandafter\@p@subfigure} + \newcommand*{\@p@subfigure}[1]{% + \protect\@subfigurelabel{\thefigure}{\thesubfigure}% + } + \newcommand*\@subfigurelabel[2]{#1\subfigurelabel{#2}} + \newcommand*\@subfigref[1]{% + {% + \def\@subfigurelabel##1##2{\subfigurelabel{##2}}% + \ref{#1}% + }% + } + \newcommand*{\subfigref}[1]{% + \let\@objectname\@empty + \def\@objectref{}% + \let\@prevsep\@empty + \@for\@thislabel:=#1\do{% + \toks@{\@prevsep}% + \protected@edef\@objectref{\@objectref\the\toks@ + \protect\@subfigref{\@thislabel}}% + \ifx\@objectname\@empty + \let\@objectname\@nil + \else + \let\@objectname\relax + \let\@prevsep\@jmlr@reflistsep + \fi + }% + \ifx\@objectname\relax + \let\@prevsep\@jmlr@reflistlastsep + \fi + \@objectref + } + \newcommand*{\subfigurelabel}[1]{(\emph{#1})} + \newsavebox\@subfloatcapbox + \newsavebox\@subfloatcontsbox + \newcommand*{\subfigure}[1][]{% + \bgroup + \def\@subfigcap{#1}% + \@subfigure + } + \newcommand*{\@subfigure}[2][b]{% + \advance\c@figure by 1\relax + \refstepcounter{subfigure}% + \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}% + \ifx\@subfigcap\@empty + \else + \space\@subfigcap + \fi}% + \sbox\@subfloatcontsbox{#2}% + \settowidth{\@tempdima}{\usebox\@subfloatcontsbox}% + \settowidth{\@tempdimb}{\usebox\@subfloatcapbox}% + \ifdim\@tempdimb>\@tempdima + \settowidth\@tempdimb{\subfigurelabel{\thesubfigure}\space}% + \addtolength{\@tempdima}{-\@tempdimb}% + \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space + \parbox[t]{\@tempdima}{\@subfigcap}}% + \fi + \begin{tabular}[#1]{@{}c@{}}% + \usebox\@subfloatcontsbox\\\usebox\@subfloatcapbox + \end{tabular}% + \egroup + } + \newcounter{subtable} + \@addtoreset{subtable}{table} + \renewcommand*{\thesubtable}{\alph{subtable}} + \renewcommand*{\p@subtable}{\expandafter\@p@subtable} + \newcommand*{\@p@subtable}[1]{% + \protect\@subtablelabel{\thetable}{\thesubtable}% + } + \newcommand*\@subtablelabel[2]{#1\subtablelabel{#2}} + \newcommand*\@subtabref[1]{% + {% + \def\@subtablelabel##1##2{\subtablelabel{##2}}% + \ref{#1}% + }% + } + \newcommand*{\subtabref}[1]{% + \let\@objectname\@empty + \def\@objectref{}% + \let\@prevsep\@empty + \@for\@thislabel:=#1\do{% + \toks@{\@prevsep}% + \protected@edef\@objectref{\@objectref\the\toks@ + \protect\@subtabref{\@thislabel}}% + \ifx\@objectname\@empty + \let\@objectname\@nil + \else + \let\@objectname\relax + \let\@prevsep\@jmlr@reflistsep + \fi + }% + \ifx\@objectname\relax + \let\@prevsep\@jmlr@reflistlastsep + \fi + \@objectref + } + \newcommand*{\subtablelabel}[1]{(\emph{#1})} + \newcommand*{\subtable}[1][]{% + \def\@subtabcap{#1}% + \@subtable + } + \newcommand*{\@subtable}[2][t]{% + \refstepcounter{subtable}% + \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}% + \ifx\@subtabcap\@empty + \else + \space\@subtabcap + \fi}% + \sbox\@subfloatcontsbox{#2}% + \settowidth{\@tempdima}{\usebox\@subfloatcontsbox}% + \settowidth{\@tempdimb}{\usebox\@subfloatcapbox}% + \ifdim\@tempdimb>\@tempdima + \settowidth\@tempdimb{\subtablelabel{\thesubtable}\space}% + \addtolength{\@tempdima}{-\@tempdimb}% + \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space + \parbox[t]{\@tempdima}{\@subtabcap}}% + \fi + \begin{tabular}[#1]{@{}c@{}}% + \usebox\@subfloatcapbox\\\usebox\@subfloatcontsbox + \end{tabular} + } +\fi +\ifjmlrutilsmaths + \newcommand*{\set}[1]{\ensuremath{\mathcal{#1}}} + \let\orgvec\vec + \renewcommand*{\vec}[1]{\boldsymbol{#1}} +\fi +\newenvironment{enumerate*}% +{% + \ifnum\@enumdepth=0\relax + \setcounter{enumi}{0}% + \fi + \ifnum\@enumdepth>\thr@@ + \@toodeep + \else + \advance\@enumdepth\@ne + \def\@enumctr{enumi}% + \list + {\labelenumi}% + {\@nmbrlisttrue\def\@listctr{enumi}% + \def\makelabel##1{\hss\llap{##1}}}% + \fi +}% +{\endlist} +\newenvironment{altdescription}[1]% + {\list{}% + {% + \settowidth{\labelwidth}{\altdescriptionlabel{#1}}% + \setlength{\labelsep}{15pt}% + \setlength{\leftmargin}{2\labelsep}% + \addtolength{\leftmargin}{\labelwidth}% + \setlength{\rightmargin}{\labelsep}% + \let\makelabel\altdescriptionlabel + }% + }% + {\endlist} + +\newcommand*{\altdescriptionlabel}[1]{\normalfont\bfseries #1\hfill} +\newcommand*{\mailto}[1]{\texttt{#1}} +\ifjmlrutilstheorems + \newcommand{\jmlrBlackBox}{\rule{1.5ex}{1.5ex}} + \providecommand{\BlackBox}{\jmlrBlackBox} + \newcommand{\jmlrQED}{\hfill\jmlrBlackBox\par\bigskip} + \newenvironment{proof}% + {% + \par\noindent{\bfseries\upshape Proof\ }% + }% + {\jmlrQED} + \newcommand*{\theorembodyfont}[1]{% + \renewcommand*{\@theorembodyfont}{#1}% + } + \newcommand*{\@theorembodyfont}{\normalfont\itshape}% + \newcommand*{\theoremheaderfont}[1]{% + \renewcommand*{\@theoremheaderfont}{#1}% + } + \newcommand*{\@theoremheaderfont}{\normalfont\bfseries }% + \newcommand*{\theoremsep}[1]{% + \renewcommand*{\@theoremsep}{#1}% + } + \newcommand*{\@theoremsep}{}% + \newcommand*{\theorempostheader}[1]{% + \renewcommand*{\@theorempostheader}{#1}% + } + \newcommand*{\@theorempostheader}{}% + \let\jmlr@org@newtheorem\newtheorem + \renewcommand*{\newtheorem}{\@ifstar\jmlr@snewtheorem\jmlr@newtheorem} + \newcommand*{\jmlr@snewtheorem}[2]{% + \cslet{jmlr@thm@#1@body@font}{\@theorembodyfont}% + \cslet{jmlr@thm@#1@header@font}{\@theoremheaderfont}% + \cslet{jmlr@thm@#1@sep}{\@theoremsep}% + \cslet{jmlr@thm@#1@postheader}{\@theorempostheader}% + \newenvironment{#1}% + {% + \trivlist + \item + [% + \hskip\labelsep{\csuse{jmlr@thm@#1@header@font}#2% + \csuse{jmlr@thm@#1@postheader}% + }% + ]% + \mbox{}\csuse{jmlr@thm@#1@sep}% + \csuse{jmlr@thm@#1@body@font}% + }% + {% + \endtrivlist + }% + } + \newcommand{\jmlr@newtheorem}[1]{% + \cslet{jmlr@thm@#1@body@font}{\@theorembodyfont}% + \cslet{jmlr@thm@#1@header@font}{\@theoremheaderfont}% + \cslet{jmlr@thm@#1@sep}{\@theoremsep}% + \cslet{jmlr@thm@#1@postheader}{\@theorempostheader}% + \jmlr@org@newtheorem{#1}% + } + \renewcommand*{\@xthm}[2]{% + \def\@jmlr@currentthm{#1}% + \@begintheorem{#2}{\csname the#1\endcsname}% + \ignorespaces + } + \def\@ythm#1#2[#3]{% + \def\@jmlr@currentthm{#1}% + \@opargbegintheorem{#2}{\csname the#1\endcsname}{#3}% + \ignorespaces + } + \renewcommand*{\@begintheorem}[2]{% + \ifdef{\@jmlr@currentthm}% + {% + \letcs{\jmlr@this@theoremheader}{jmlr@thm@\@jmlr@currentthm @header@font}% + \letcs{\jmlr@this@theorembody}{jmlr@thm@\@jmlr@currentthm @body@font}% + \letcs{\jmlr@this@theoremsep}{jmlr@thm@\@jmlr@currentthm @sep}% + \letcs{\jmlr@this@theorempostheader}% + {jmlr@thm@\@jmlr@currentthm @postheader}% + }% + {% + \let\jmlr@this@theorembody\@theorembodyfont + \let\jmlr@this@theoremheader\@theoremheaderfont + \let\jmlr@this@theoremsep\@theoremsep + \let\jmlr@this@theorempostheader\@theorempostheader + }% + \trivlist + \item + [% + \hskip\labelsep{\jmlr@this@theoremheader #1\ #2% + \jmlr@this@theorempostheader}% + ]% + \mbox{}\jmlr@this@theoremsep + \jmlr@this@theorembody + } + \renewcommand*{\@opargbegintheorem}[3]{% + \ifdef{\@jmlr@currentthm}% + {% + \letcs{\jmlr@this@theoremheader}{jmlr@thm@\@jmlr@currentthm @header@font}% + \letcs{\jmlr@this@theorembody}{jmlr@thm@\@jmlr@currentthm @body@font}% + \letcs{\jmlr@this@theoremsep}{jmlr@thm@\@jmlr@currentthm @sep}% + \letcs{\jmlr@this@theorempostheader}% + {jmlr@thm@\@jmlr@currentthm @postheader}% + }% + {% + \let\jmlr@this@theorembody\@theorembodyfont + \let\jmlr@this@theoremheader\@theoremheaderfont + \let\jmlr@this@theoremsep\@theoremsep + \let\jmlr@this@theorempostheader\@theorempostheader + }% + \trivlist + \item[\hskip\labelsep{\jmlr@this@theoremheader #1\ #2\ (#3)% + \jmlr@this@theorempostheader}]% + \mbox{}\jmlr@this@theoremsep + \jmlr@this@theorembody + } + \newtheorem{example}{Example} + \newtheorem{theorem}{Theorem} + \newtheorem{lemma}[theorem]{Lemma} + \newtheorem{proposition}[theorem]{Proposition} + \newtheorem{remark}[theorem]{Remark} + \newtheorem{corollary}[theorem]{Corollary} + \newtheorem{definition}[theorem]{Definition} + \newtheorem{conjecture}[theorem]{Conjecture} + \newtheorem{axiom}[theorem]{Axiom} +\fi +\endinput +%% +%% End of file `jmlrutils.sty'. -- cgit v1.2.3