From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/jmlr/CHANGES | 334 + macros/latex/contrib/jmlr/INSTALL | 62 + macros/latex/contrib/jmlr/README | 74 + macros/latex/contrib/jmlr/jmlr.dtx | 6784 ++++++++++++++++++++ macros/latex/contrib/jmlr/jmlr.ins | 35 + macros/latex/contrib/jmlr/jmlr.pdf | Bin 0 -> 615617 bytes macros/latex/contrib/jmlr/makejmlrbook | 1308 ++++ .../contrib/jmlr/sample-books/bookLogo-gray.png | Bin 0 -> 2456 bytes .../latex/contrib/jmlr/sample-books/bookLogo.png | Bin 0 -> 2241 bytes .../contrib/jmlr/sample-books/jmlrbook-sample.pdf | Bin 0 -> 319039 bytes .../contrib/jmlr/sample-books/jmlrbook-sample.tex | 247 + .../contrib/jmlr/sample-books/paper1/paper1.bib | 19 + .../contrib/jmlr/sample-books/paper1/paper1.tex | 98 + .../contrib/jmlr/sample-books/paper2/paper2.bib | 19 + .../contrib/jmlr/sample-books/paper2/paper2.tex | 65 + .../contrib/jmlr/sample-books/paper3/paper3.bib | 19 + .../contrib/jmlr/sample-books/paper3/paper3.tex | 56 + .../contrib/jmlr/sample-books/paper4/paper4.bib | 19 + .../contrib/jmlr/sample-books/paper4/paper4.tex | 53 + .../jmlr/sample-books/proceedings-sample.pdf | Bin 0 -> 419217 bytes .../jmlr/sample-books/proceedings-sample.tex | 79 + .../jmlr/sample-papers/images/circle-gray.png | Bin 0 -> 1416 bytes .../contrib/jmlr/sample-papers/images/circle.jpg | Bin 0 -> 6743 bytes .../jmlr/sample-papers/images/nodes-gray.png | Bin 0 -> 3902 bytes .../contrib/jmlr/sample-papers/images/nodes.png | Bin 0 -> 6295 bytes .../jmlr/sample-papers/images/square-gray.png | Bin 0 -> 157 bytes .../contrib/jmlr/sample-papers/images/square.png | Bin 0 -> 157 bytes .../contrib/jmlr/sample-papers/images/teximage.tex | 4 + .../contrib/jmlr/sample-papers/jmlr-sample.bib | 19 + .../contrib/jmlr/sample-papers/jmlr-sample.pdf | Bin 0 -> 308987 bytes .../contrib/jmlr/sample-papers/jmlr-sample.tex | 840 +++ .../contrib/jmlr/sample-papers/jmlrwcp-sample.pdf | Bin 0 -> 297750 bytes .../contrib/jmlr/sample-papers/jmlrwcp-sample.tex | 789 +++ 33 files changed, 10923 insertions(+) create mode 100644 macros/latex/contrib/jmlr/CHANGES create mode 100644 macros/latex/contrib/jmlr/INSTALL create mode 100644 macros/latex/contrib/jmlr/README create mode 100644 macros/latex/contrib/jmlr/jmlr.dtx create mode 100644 macros/latex/contrib/jmlr/jmlr.ins create mode 100644 macros/latex/contrib/jmlr/jmlr.pdf create mode 100755 macros/latex/contrib/jmlr/makejmlrbook create mode 100644 macros/latex/contrib/jmlr/sample-books/bookLogo-gray.png create mode 100644 macros/latex/contrib/jmlr/sample-books/bookLogo.png create mode 100644 macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.pdf create mode 100644 macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.tex create mode 100644 macros/latex/contrib/jmlr/sample-books/paper1/paper1.bib create mode 100644 macros/latex/contrib/jmlr/sample-books/paper1/paper1.tex create mode 100644 macros/latex/contrib/jmlr/sample-books/paper2/paper2.bib create mode 100644 macros/latex/contrib/jmlr/sample-books/paper2/paper2.tex create mode 100644 macros/latex/contrib/jmlr/sample-books/paper3/paper3.bib create mode 100644 macros/latex/contrib/jmlr/sample-books/paper3/paper3.tex create mode 100644 macros/latex/contrib/jmlr/sample-books/paper4/paper4.bib create mode 100644 macros/latex/contrib/jmlr/sample-books/paper4/paper4.tex create mode 100644 macros/latex/contrib/jmlr/sample-books/proceedings-sample.pdf create mode 100644 macros/latex/contrib/jmlr/sample-books/proceedings-sample.tex create mode 100644 macros/latex/contrib/jmlr/sample-papers/images/circle-gray.png create mode 100644 macros/latex/contrib/jmlr/sample-papers/images/circle.jpg create mode 100644 macros/latex/contrib/jmlr/sample-papers/images/nodes-gray.png create mode 100644 macros/latex/contrib/jmlr/sample-papers/images/nodes.png create mode 100644 macros/latex/contrib/jmlr/sample-papers/images/square-gray.png create mode 100644 macros/latex/contrib/jmlr/sample-papers/images/square.png create mode 100644 macros/latex/contrib/jmlr/sample-papers/images/teximage.tex create mode 100644 macros/latex/contrib/jmlr/sample-papers/jmlr-sample.bib create mode 100644 macros/latex/contrib/jmlr/sample-papers/jmlr-sample.pdf create mode 100644 macros/latex/contrib/jmlr/sample-papers/jmlr-sample.tex create mode 100644 macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.pdf create mode 100644 macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.tex (limited to 'macros/latex/contrib/jmlr') diff --git a/macros/latex/contrib/jmlr/CHANGES b/macros/latex/contrib/jmlr/CHANGES new file mode 100644 index 0000000000..27268561ab --- /dev/null +++ b/macros/latex/contrib/jmlr/CHANGES @@ -0,0 +1,334 @@ +v1.24: + + * moved non-class related code into new package jmlrutils.sty + + * fixed bug in \includeteximage + +v1.23: + + * added pmlr class option + +v1.22: + + * added oneside and twoside class options + +v1.21: + + * jmlr.cls + + - added check for jmlr2e and pseudocode + + - fixed bug in \thanks to fix footnote marker issue if there's + more than one \thanks + + * jmlrbook.cls + + - added \nopagebreak after \@editorialteam + +v1.20: + + * jmlrbook.cls + + - added \jmlrprefaceheader, \jmlrlocation + +v1.19: + + * jmlrbook.cls + + - changed \chapter* to \chapter in preface environment + +v1.18: + + * jmlrbook.cls + + - patched to work with auxhook + + - added draft and final options + + - add \booklinebreak + + * jmlr.cls + + - Added calc and etoolbox as required packages + + - Added draft and final options and removed \ds@draft + + - Added starred version of \newtheorem + + - Added \theorembodyfont, \theoremheaderfont, \theorempostheader + and \theoremsep + +v1.17: + + * jmlr.cls + + - added \titletag + + - added warnings if obsolete font commands (such as \bf) used + + * jmlrbook.cls + + - added 'articlet' page style + + - \importarticle sets title page style to articlet + + - \importpaper disables \jmlryear, \jmlrworkshop, \jmlrvolume + and \jmlrissue + + - html title page uses jmlrvolume instead of volume + + - added optional argument to \logo + +v1.16: + + * jmlr.cls + + - added \@post@hyperref hook + + * jmlrbook.cls + + - added code to deal with \c@lenddoca clash + +v1.15: + + * jmlrbook.cls + + - added 'algocf' and 'definition' counters to reset list in + \zeroextracounters + + - added \theHalgocf + + - removed dependence on \ps@headings in \ps@jmlrbook + + - added \markleft + +v1.14: + + * jmlrbook.cls + + - modified \jmlrwritepdfinfo to write book author and title + information to aux file + - fixed bug in fetching time zone information + +v1.13: + + * jmlrbook.cls + + - added pdfxa option + - added \jmlrwritepdfinfo + - changed preface environment to use \chapter* instead of \chapter + + * jmlr.cls + + - added \@pre@hyperref hook + +v1.12: + + * jmlr.cls + + - removed prehyperref package option. + + - renamed \jmlr@prehyperref to \jmlrprehyperref + + - added tabularx to list of problem packages. + + - provided default value of \@shortitle + + - added \titlebreak + + - added optional argument to \Name + (\jmlrauthors now redefines \@jmlr@authors instead of + \@jmlrauthors) + + - added chapter number to \theHsection to ensure unique + hyperlinks in book + + * jmlrbook.cls + + - Moved loading setspace and fink before jmlr.cls loaded + + - changed \thechapter to \theHchapter in definition of + \theHalgorithm etc + + - added \theHfootnote, \theHtable, \theHfigure + + - in \importpubpaper etc, changed \@shortitle to \@title in toc + + * makejmlrbook v0.31 + + - footnotes in abstract files changed to in-line parentheses. + + - --batchtex option now also passes "-interaction=batchmode" to + htlatex + + - added debugging option --noexecute + +v1.11: + + * jmlr.cls + + - fixed typo: WC\&P -> W\&CP + + - added \jmlrabbrnamelist (used by makejmlrbook) + + * jmlrbook.cls + + - now requires fink package + + - added preface environment and \prefacename + + - added algorithm2e old commands (in case some authors are using + an older version). + + * makejmlrbook (v0.3): + + - added changes made by Olivier Chapelle to add JMLR menu on the + left side of the page and use description environment for each + paper of the TOC. + + - added --extractpreface option + + - set hyperref draft mode for abstract only html pages. + + - abstract html source files now input original aux files to allow + for citations. + +v1.10: + + jmlr.cls + + * now loads xkeyval + + * now loads hyperref (instead of jmlrbook loading it) + + * added class option prehyperref={stuff to do before hyperref loaded} + + * added class option tablecaption= (where can + either be top or bottom). + + * fixed 10pt, 11pt and 12pt class options, which weren't having + any effect. + + * modified \thanks to ensure hyperlink works correctly. + + * added \mdseries to definition of \addr. + + * added \startpage (used by jmlrmakebook). + + * modified \artpart and \bookpart to correct bookmark level number + + jmlrbook.cls + + * code loading hyperref moved to jmlr.cls + + * added 10pt, 11pt and 12pt class options. + + * Removed redundant redefinition of \@bookpart + + makejmlrbook (v0.2): + + * Uses \startpage to set initial page number for stand-alone + articles. + + * Makes subdirectories in html directory for each article. + + * copies any image files generated by tex4ht into html directory. + + * added time stamp at the end of each of the generated html file. + +v1.09: + + jmlr.cls + + * now loads article.cls instead of scrartcl.cls + + * Fixed sub-captions so that they don't exceed the width of the + sub-figure/table to which they refer. + + * added \nametag, \reprint, \algocfconts, \theHsubfigure, + \booktocpreamble, \@partapp. + + * Made \objectref robust + + jmlrbook.cls + + * Reset start and end document hook to avoid problems caused by + defining duplicate commands. + + * Moved redefinition of \jmlrpremaketitlehook outside of import + macros. + + * Moved \refstepcounter from \jmlrmaketitlehook to + \jmlrpremaketitlehook + + * Added \jmlrimporthook + + * Added \label to \jmlrmaketitlehook + +v1.08: + + * Fixed \thanks so that the footnote symbol is raised and isn't + followed by a full stop. + +v1.07: + + * Added check for two column + +v1.06: + + jmlr.cls + + * Added tablecaptiontop and tablecaptionbottom class options + +v1.05: + + jmlrbook.cls + + * Added \productioneditors + +v1.04: + + * Added Perl script makejmlrbook + + jmlrbook.cls + + * Added patch to fix references in print mode + + * Added code to work with makejmlrbook + + jmlr.cls + + * Added code to work with makejmlrbook + +v1.03: + jmlrbook.cls + + * Added patch to combnat + + jmlr.cls + + * Added \editors, \editorname and \editorsname + +v1.02: + jmlrbook.cls: + + * Added \issue + + jmlr.cls + + * Added \jmlrissue + +v1.01 : + + jmlrbook.cls: + + * added \importpaper + + * added \titlebody, \SetTitleElement and \IfTitleElement to + make it easier to customise the front page of the book. + + jmlr.cls: + + * fixed the last page anchor. + +v1.0 : Initial release diff --git a/macros/latex/contrib/jmlr/INSTALL b/macros/latex/contrib/jmlr/INSTALL new file mode 100644 index 0000000000..0d207a9b8a --- /dev/null +++ b/macros/latex/contrib/jmlr/INSTALL @@ -0,0 +1,62 @@ +INSTALLATION + +If you have downloaded the jmlr bundle using the TeX Directory +Structure (TDS), that is you have downloaded the archive +jmlr.tds.zip containing doc, tex and source directories, you need to +follow the "Installing from TDS" instructions below. + +If you have downloaded the following files: + +jmlr.dtx +jmlr.ins + +You need to follow the "Installing from DTX and INS" instructions +below. + +For further information on installing LaTeX packages see: + +http://www.tex.ac.uk/cgi-bin/texfaq2html?label=installthings + +INSTALLING FROM TDS +=================== + +Files in tex and doc directories should go in the corresponding +TEXMF directories (for example, /usr/share/texmf-local/ or +C:\localtexmf\). + +*Remember to refresh TeX's database* + +Example (on UNIX like systems): + +unzip jmlr.tds.zip -d ~/texmf/ +texhash ~/texmf/ + +INSTALLING FROM DTX AND INS +=========================== + +Run LaTeX on jmlr.ins to generate jmlr.cls and jmlrbook.cls: + +latex jmlr.ins + +To create the documentation (jmlr.pdf): + +pdflatex jmlr.dtx +makeindex -s gind.ist jmlr.idx +makeindex -s gglo.ist -o jmlr.gls jmlr.glo +pdflatex jmlr.dtx +pdflatex jmlr.dtx + +If TEXMF denotes the base directory of your local TeX installation (e.g. +/usr/share/texmf-local/ or C:\localtexmf\) then create the following +directories (if they don't already exist): + +TEXMF/doc/latex/jmlr +TEXMF/tex/latex/jmlr + +Move the documentation to TEXMF/doc/latex/jmlr/ + +Move jmlrutils.sty, jmlr.cls and jmlrbook.cls to TEXMF/tex/latex/jmlr/ + +*Remember to refresh TeX's database* + + diff --git a/macros/latex/contrib/jmlr/README b/macros/latex/contrib/jmlr/README new file mode 100644 index 0000000000..92ce503fcf --- /dev/null +++ b/macros/latex/contrib/jmlr/README @@ -0,0 +1,74 @@ +LaTeX Class : jmlr bundle v1.24 + +Last Modified : 2017-08-01 + +Author : Nicola L. C. Talbot + +This bundle provides: + + * jmlr class + * jmlrbook class + * jmlrutils package + +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 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. The makejmlrbook Perl script is deprecated +and may be removed in future releases. + +INSTALLATION + +See INSTALL file for installation instructions. + +REQUIREMENTS + +jmlr class requirements: + + jmlrutils + xcolor + amsmath + amssymb + natbib + graphicx + url + algorithm2e + etoolbox + calc + hyperref + +jmlrbook class requirements: + + jmlr + combine + hyperref + xkeyval + combnat + setspace + fink + +LICENCE + +This material is subject to the LaTeX Project Public License. +See http://www.ctan.org/license/lppl1.3 +for the details of that license. + +RELATED SOFTWARE: + +http://www.dickimaw-books.com/software/makejmlrbookgui/ + +Author's home page: http://www.dickimaw-books.com/ + diff --git a/macros/latex/contrib/jmlr/jmlr.dtx b/macros/latex/contrib/jmlr/jmlr.dtx new file mode 100644 index 0000000000..57d9136911 --- /dev/null +++ b/macros/latex/contrib/jmlr/jmlr.dtx @@ -0,0 +1,6784 @@ +%\iffalse +% 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" +% -author "Nicola Talbot" +% -section "chapter" +% jmlr +% Created on 2017/8/1 16:57 +%\fi +%\iffalse +%<*package> +%% \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 \~} +% +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2017 Nicola Talbot, all rights reserved. +% \fi +% \iffalse +%<*driver> +\documentclass[report]{nlctdoc} + +\usepackage{amsmath} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{ifthen} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={jmlr: Classes for the Journal of Machine +Learning Research (JMLR) and Proceedings of Machine Learning +Research (PMLR)}, + pdfkeywords={LaTeX,jmlr}]{hyperref} + +\doxitem{Option}{option}{package options} + +\CheckSum{5030} + +\newcommand*{\appopt}[1]{\texttt{-{}-#1}} + +\begin{document} +\DocInput{jmlr.dtx} +\end{document} +% +%\fi +%\MakeShortVerb{"} +%\DeleteShortVerb{\|} +% +% \title{\LaTeXe\ Classes for the Journal of Machine +%Learning Research (JMLR) and +%Proceedings of Machine Learning Research (PMLR)} +% \author{Nicola L. C. Talbot\\[10pt] +%\url{http://www.dickimaw-books.com/}} +% +% \date{2017-08-01 (version 1.24)} +% \maketitle +%\tableofcontents +% +%\chapter{Introduction} +% +%The \clsfmt{jmlr} class is for articles that need to be formatted +%according to the Journal of Machine Learning Research style. This +%class is based on the \sty{jmlr2e} and \sty{jmlrwcp2e} packages +%but has been adapted to enable it to work better with the +%\cls{combine} class to collate the articles into a book. +%\sectionref{sec:jmlr} describes how to use the \clsfmt{jmlr} class. +%Note that JMLR W\&CP (JMLR: Workshop and Conference Proceedings) +%has been renamed PMLR (Proceedings of Machine Learning +%Research). Articles for new proceedings should use the \clsopt{pmlr} +%class option. +% +%The \clsfmt{jmlrbook} class is for combining articles that use the +%\clsfmt{jmlr} class into a +%book. The \clsfmt{jmlrbook} class uses \cls{combine} and \sty{hyperref}, which are +%troublesome enough on their own but together are quite fragile. The +%\clsfmt{jmlrbook} class redefines some internals to get +%\clsfmt{combine} and \clsfmt{hyperref} to work together but some +%packages (e.g.\ \sty{subfig} and \sty{pdfpages}) are likely to mess +%everything up and cause errors. This is why the guidelines to +%authors are fairly stringent and why the \clsfmt{jmlr} class will give an +%error message if certain packages are loaded.\footnote{Currently +%\clsfmt{jmlr} will check if \sty{subfig}, \sty{pdfpages}, +%\sty{geometry}, \sty{psfig}, \sty{epsfig}, \sty{theorem}, +%\sty{tabularx}, \sty{amsthm} and \sty{ntheorem} are loaded and will throw an error. +%If other packages are found to be a problem, they will be added to +%the list.} The \clsfmt{jmlrbook} class works best with PDF\LaTeX\ so +%authors should ensure that their articles can compile with +%PDF\LaTeX. \sectionref{sec:jmlrbook} describes how to use the +%\clsfmt{jmlrbook} class. +% +%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 +%before \sty{hyperref}. +%\end{important} +% +%Anything that needs to be done before \sty{hyperref} is loaded can be specified +%by defining the command +%\begin{definition}[\DescribeMacro{\jmlrprehyperref}] +%\cs{jmlrprehyperref} +%\end{definition} +%\emph{before} the class is loaded. For +%example, to load the packages \styfmt{foo} and \styfmt{bar} before +%\sty{hyperref}, you can do: +%\begin{verbatim} +%\newcommand{\jmlrprehyperref}{\usepackage{foo,bar}} +%\documentclass{jmlr} +%\end{verbatim} +% +%There is a Java application called \app{makejmlrbookgui} that can +%compile all the individual papers from the book and generate the +%bib file for the proceedings (according to the PMLR specifications). It can also +%create a grey nonhyperlinked PDF/X compliant print version of the +%book. The application can be downloaded from +%\url{http://www.dickimaw-books.com/software/makejmlrbookgui/} where +%there is also a +%\href{http://www.dickimaw-books.com/software/makejmlrbookgui/manual/troubleshooting.html}{troubleshooting +%section}. +% +%There is also a Perl script called \app{makejmlrbook}, which is +%distributed with the \clsfmt{jmlr} and \clsfmt{jmlrbook} 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{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, +%this class file does not load the obsolete \sty{epsfig} package. +% +%The \clsfmt{jmlrbook} class additionally loads the \cls{combine} class +%and the following packages: \sty{combnat}, \sty{setspace} and \sty{fink}. +% +%The \app{makejmlrbookgui} application requires Java and \TeX. +%(GhostScript is also required for the print-ready version of the +%book.) +% +%\chapter{Guidelines for Article Authors} +%\label{sec:jmlr} +% +%Article authors should use the \clsfmt{jmlr} class. This class +%comes with example files \texttt{jmlr-sample.tex} and +%\texttt{jmlrwcp-sample.tex}, which can be used as templates. +% +%The following class options are available: +%\begin{description} +%\item[\clsopt{nowcp}]The article is for the Journal of Machine +%Learning Research (default). +%\item[\clsopt{pmlr}] The article is for the Proceedings of Machine +%Learning Research (PMLR). +%\item[\clsopt{wcp}] The article is for JMLR Workshop and Conference +%Proceedings (JMLR W\&CP). +% +%\item[\clsopt{twocolumn}] Use two-column style. +% +%\item[\clsopt{onecolumn}] Use one-column style (default). +% +%\item[\clsopt{color}] Color version (see \sectionref{sec:color}). +% +%\item[\clsopt{gray}] Grayscale version (see \sectionref{sec:color}). +% +%\item[{\clsopt[top]{tablecaption}}] in a \env{table} environment, +%\ics{floatconts} puts the caption at the top. +% +%\item[{\clsopt[bottom]{tablecaption}}] in a \env{table} environment, +%\ics{floatconts} puts the caption at the bottom. +% +%\end{description} +% +%\section{Title Information} +% +%The \clsfmt{jmlr} class uses different syntax from \sty{jmlr2e} and +%\sty{jmlrwcp2e} to specify the title information. In particular, it +%doesn't define \cs{jmlrheading} and \cs{ShortHeading}. Instead, the +%following commands should be used: +% +%\begin{definition}[\DescribeMacro{\jmlrvolume}] +%\cs{jmlrvolume}\marg{number} +%\end{definition} +%This specifies the volume number. For example: +%\begin{verbatim} +%\jmlrvolume{2} +%\end{verbatim} +% +%\begin{definition}[\DescribeMacro{\jmlryear}] +%\cs{jmlryear}\marg{year} +%\end{definition} +%This specifies the year. For example: +%\begin{verbatim} +%\jmlryear{2010} +%\end{verbatim} +% +%\begin{definition}[\DescribeMacro{\jmlrsubmitted}] +%\cs{jmlrsubmitted}\marg{date} +%\end{definition} +%This specifies the submission date. +% +%\begin{definition}[\DescribeMacro{\jmlrpublished}] +%\cs{jmlrpublished}\marg{date} +%\end{definition} +%This specifies the publication date. +% +%\begin{definition}[\DescribeMacro{\jmlrworkshop}] +%\cs{jmlrworkshop}\marg{title} +%\end{definition} +%This specifies the workshop title (for use with the \clsopt{wcp} +%class option). +% +%The title information is specified using the commands described +%below. These commands should typically go in the preamble. As +%with most class files, The title itself is produced using +%\begin{definition}[\DescribeMacro{\maketitle}] +%\cs{maketitle} +%\end{definition} +%This command should go after \verb|\begin{document}|. For example: +%\begin{verbatim} +%\begin{document} +%\maketitle +%\end{verbatim} +%Before \cs{maketitle}, you must specify the title information +%using the following commands: +% +%\begin{definition}[\DescribeMacro{\title}] +%\cs{title}\oarg{short title}\marg{title} +%\end{definition} +%This specifies the article's title. A short title for the page +%header can be supplied via the optional argument \meta{short title}. +%If you want to force a line break in the title, use +%\begin{definition}[\DescribeMacro{\titlebreak}] +%\cs{titlebreak} +%\end{definition} +%instead of \cs{newline} or \verb|\\| as this will ensure that the +%line break doesn't also end up in the table of contents or bookmarks +%when the article is included in a book. If there is content within +%the title that should not appear in the page headings or table of +%contents (for example, a footnote) use +%\begin{definition}[\DescribeMacro{\titletag}] +%\cs{titletag}\marg{title only stuff} +%\end{definition} +%For example: +%\begin{verbatim} +%\title{An Interesting Paper\titlebreak +%With a Line Break\titletag{\thanks{and an +%acknowledgement}}} +%\end{verbatim} +% +% +%\begin{definition}[\DescribeMacro{\editor}] +%\cs{editor}\marg{name} +%\end{definition} +%This specifies the editor's name. If there is more than one +%editor, use: +%\begin{definition}[\DescribeMacro{\editors}] +%\cs{editors}\marg{names} +%\end{definition} +% +%\begin{definition}[\DescribeMacro{\author}] +%\cs{author}\marg{author specs} +%\end{definition} +%This specifies the author. The specifications \meta{author specs} +%are a bit different to \sty{jmlr2e} and \sty{jmlrwcp2e}. Use +%\begin{definition}[\DescribeMacro{\Name}] +%\cs{Name}\oarg{abbreviated name}\marg{author's name} +%\end{definition} +%to specify the author's name. Note that if the surname contains a +%space it must be grouped (enclosed in braces \{\}). Similarly if +%the initial letter of each forename is a diacritic it must be +%grouped. If the abbreviation of the name doesn't get parsed +%properly you can override the default using the optional argument. (See below for examples.) +% +%If there is any content within \meta{author's name} that shouldn't +%get copied to the header, footer or table of contents, it should be +%enclosed within the argument of +%\begin{definition}[\DescribeMacro{\nametag}] +%\cs{nametag}\marg{title only stuff} +%\end{definition} +%For example: +%\begin{verbatim} +%\Name{Ann Other\nametag{\thanks{formerly with some other +%institute}}} +%\end{verbatim} +% +%\begin{definition}[\DescribeMacro{\Email}] +%\cs{Email}\marg{author's email} +%\end{definition} +%This specifies the author's email address. It should only be used +%within the argument to \cs{author}. +% +%\begin{definition}[\DescribeMacro{\and}] +%\cs{and} +%\end{definition} +%This should be used to separate two authors with the same address. +% +%\begin{definition}[\DescribeMacro{\AND}] +%\cs{AND} +%\end{definition} +%This should be used to separate authors with different addresses. +% +%\begin{definition}[\DescribeMacro{\\}] +%\verb|\\| +%\end{definition} +%This should be used before an author's address or between authors +%with the same address where there are more that two authors. +% +%\begin{definition}[\DescribeMacro{\addr}] +%\cs{addr} +%\end{definition} +%This should be used at the start of the address. +% +%\begin{description} +%\item[Example 1] Two authors with the same address: +%\begin{verbatim} +%\author{\Name{Jane Doe} \Email{abc@sample.com}\and +% \Name{John {Basey Fisher}} \Email{xyz@sample.com}\\ +% \addr Address} +%\end{verbatim} +%In this example, the second author has a space in his surname +%so the surname needs to be grouped. +% +%\item[Example 2] Three authors with the same address: +%\begin{verbatim} +%\author{\Name{Fred Arnold {de la Cour}} \Email{an1@sample.com}\\ +% \Name{Jack Jones} \Email{an3@sample.com}\\ +% \Name{{\'E}louise {\'E}abhla Finchley} \Email{an2@sample.com}\\ +% \addr Address} +%\end{verbatim} +%In this example, the third author has an accent on her +%forename initials so grouping is required. +% +%\item[Example 3] Authors with a different address: +%\begin{verbatim} +%\author{\Name{John Smith} \Email{abc@sample.com}\\ +% \addr Address 1 +% \AND +% \Name{May Brown} \Email{xyz@sample.com}\\ +% \addr Address 2 +% } +%\end{verbatim} +% +%\item[Example 4] The author is actually a company so there's no +%first name and surname: +%\begin{verbatim} +%\author{\Name[Some Company, Ltd]{Some Company, Ltd}\Email{xyz:some.com}\\ +% \addr Address +%} +%\end{verbatim} +%\end{description} +% +%\section{Font Changing Commands} +% +%Use the \LaTeXe\ font changing commands, such as \cs{bfseries} or +%\cs{textbf}\marg{text}, rather than the obsolete \LaTeX2.09 +%commands, such as \cs{bf}. (The obsolete font changing commands +%will produce a warning if used.) +% +%\begin{definition}[\DescribeMacro{\url}] +%\cs{url}\marg{address} +%\end{definition} +%This will typeset \meta{address} in a typewriter font. Special +%characters, such as \verb|~|, are correctly displayed. Example: +%\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}. This command is provided by the +%supplementary package \sty{jmlrutils}. Other commands are described +%in \sectionref{sec:jmlrutils}. +% +%\section{Structure} +% +%\begin{definition}[\DescribeEnv{abstract}] +%\cs{begin}\{abstract\}\\ +%\meta{text}\\ +%\cs{end}\{abstract\} +%\end{definition} +%The abstract text should be displayed using the \envfmt{abstract} +%environment. +% +%\begin{definition}[\DescribeEnv{keywords}] +%\cs{begin}\{keywords\}\meta{keyword list}\cs{end}\{keywords\} +%\end{definition} +%The keywords should be displayed using the \envfmt{keywords} +%environment. +% +%\begin{definition}[\DescribeMacro{\acks}] +%\cs{acks}\marg{text} +%\end{definition} +%This displays the acknowledgements. +% +%\begin{definition}[\DescribeMacro{\section}] +%\cs{section}\marg{title} +%\end{definition} +%Section titles are created using \cs{section}. The heading is +%automatically numbered and can be cross-referenced using +%\cs{label} and \cs{ref}. Unnumbered sections can be produced +%using: +%\begin{definition}[\DescribeMacro{\section*}] +%\cs{section*}\marg{title} +%\end{definition} +% +%\begin{definition}[\DescribeMacro{\subsection}] +%\cs{subsection}\marg{title} +%\end{definition} +%Sub-section titles are created using \cs{subsection}. Unnumbered +%sub-sections can be produced using: +%\begin{definition}[\DescribeMacro{\subsection*}] +%\cs{subsection*}\marg{title} +%\end{definition} +% +%\begin{definition}[\DescribeMacro{\subsubsection}] +%\cs{subsubsection}\marg{title} +%\end{definition} +%Sub-sub-section titles are created using \cs{subsubsection}. +%Unnumbered sub-sub-sections can be produced using: +%\begin{definition}[\DescribeMacro{\subsubsection*}] +%\cs{subsubsection*}\marg{title} +%\end{definition} +% +%Further sectioning levels can be obtained using \cs{paragraph} +%and \cs{subparagraph}, but these are unnumbered with running heads. +% +%\begin{definition}[\DescribeMacro{\appendix}] +%\cs{appendix} +%\end{definition} +%Use \cs{appendix} to switch to the appendices. This changes +%\cs{section} to produce an appendix. Example: +%\begin{verbatim} +%\appendix +%\chapter{Proof of Theorems} +%\end{verbatim} +% +%\section{Citations and Bibliography} +% +%The \clsfmt{jmlr} class automatically loads \sty{natbib} and sets +%the bibliography style to \texttt{plainnat}. References should +%be stored in a \texttt{.bib} file. +% +%\begin{definition}[\DescribeMacro{\bibliography}] +%\cs{bibliography}\marg{bib file} +%\end{definition} +%This displays the bibliography. +% +%\begin{definition}[\DescribeMacro{\citep}] +%\cs{citep}\oarg{pre note}\oarg{post note}\marg{label} +%\end{definition} +%Use \cs{citep} for a parenthetical citation. +% +%\begin{definition}[\DescribeMacro{\citet}] +%\cs{citet}\oarg{note}\marg{label} +%\end{definition} +%Use \cs{citet} for a textual citation. +% +%See the \ctandoc{natbib} for further details. +% +%\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. +%Please don't force them to go in a particular place. In general +%it's best to use the \texttt{htbp} specifier and don't put +%the float in the middle of a paragraph (that is, make sure there's +%a paragraph break above and below the float). Floats are supposed +%to have a little extra space above and below them to make them +%stand out from the rest of the text. This extra space is put in +%automatically and shouldn't need modifying. +% +%To ensure consistency, please \emph{\bfseries don't} try changing the +%format of the caption by doing something like: +%\begin{verbatim} +%\caption{\textit{A Sample Caption.}} +%\end{verbatim} +%or +%\begin{verbatim} +%\caption{\em A Sample Caption.} +%\end{verbatim} +%You can, of course, change the font for individual words or +%phrases. For example: +%\begin{verbatim} +%\caption{A Sample Caption With Some \emph{Emphasized Words}.} +%\end{verbatim} +% +%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 centred. For example: +%\begin{verbatim} +%\begin{table}[htbp] +%\floatconts +% {tab:example}% label +% {\caption{An Example Table}}% caption command +% {% +% \begin{tabular}{ll} +% \bfseries Dataset & \bfseries Result\\ +% Data1 & 0.123456 +% \end{tabular} +% } +%\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: +%\begin{definition}[\DescribeMacro{\includegraphics}] +%\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}: +%\begin{verbatim} +%\begin{figure}[htbp] +%\floatconts +% {fig:example}% label +% {\caption{An Example Figure}}% caption command +% {\includegraphics[width=0.5\textwidth]{images/mypic}} +%\end{figure} +%\end{verbatim} +% +%Note that you shouldn't specify the file extension when including +%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} +%\end{definition} +%If your image file is made up of \LaTeX\ code (e.g.\ \sty{tikz} +%commands) the file can be included using \cs{includeteximage}. +%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}. Some +%of the keys specific to image files (such as the bounding box +%and type keys) do nothing with \cs{includeteximage}. +% +%\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. 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} +%\end{definition} +%This makes a sub-figure where \meta{contents} denotes the contents +%of the sub-figure. This should also include the \cs{label}. +%The first optional argument \meta{title} indicates a caption for +%the sub-figure. By default, the sub-figures are aligned at the +%base. This can be changed with the second optional argument +%\meta{valign}, which may be one of: \texttt{t} (top), \texttt{c} +%(centred) or \texttt{b} (base). +% +%For example, suppose there are two images files, \texttt{mypic1.png} +%and \texttt{mypic2.png}, in the subdirectory \texttt{images}. +%Then they can be included as sub-figures as follows: +%\begin{verbatim} +%\begin{figure}[htbp] +%\floatconts +% {fig:example2}% label for whole figure +% {\caption{An Example Figure.}}% caption for whole figure +% {% +% \subfigure{% +% \label{fig:pic1}% label for this sub-figure +% \includegraphics{images/mypic1} +% }\qquad % space out the images a bit +% \subfigure{% +% \label{fig:pic2}% label for this sub-figure +% \includegraphics{images/mypic2} +% } +% } +%\end{figure} +%\end{verbatim} +% +%\begin{definition}[\DescribeMacro{\subtable}] +%\cs{subtable}\oarg{title}\oarg{valign}\marg{contents} +%\end{definition} +%This is an analogous command for sub-tables. The default value +%for \meta{valign} is \texttt{t}. +% +%\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\}\oarg{placement}\\ +%\meta{contents}\\ +%\cs{end}\{algorithm\} +%\end{definition} +%Enumerated textual algorithms can be displayed using the +%\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}\\ +%\ldots\\ +%\cs{end}\{enumerate*\} +%\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 \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$ +% \begin{enumerate*} +% \item \label{step:locate}Locate all unlabelled vertices +% adjacent to a vertex labelled $i$ and label them $i+1$ +% \item If vertex $t$ has been labelled, +% \begin{enumerate*} +% \item[] the shortest path can be found by backtracking, and +% the length is given by the label of $t$. +% \end{enumerate*} +% otherwise +% \begin{enumerate*} +% \item[] increment $i$ and return to step~\ref{step:locate} +% \end{enumerate*} +% \end{enumerate*} +%\end{enumerate*} +%} +%\end{algorithm} +%\end{verbatim} +% +% +%\begin{definition}[\DescribeEnv{algorithm2e}] +%\cs{begin}\{algorithm2e\}\\ +%\meta{contents}\\ +%\cs{end}\{algorithm2e\} +%\end{definition} +%Pseudo code can be displayed using the \envfmt{algorithm2e} environment, +%provided by the \sty{algorithm2e} package, which is automatically +%loaded. For example: +%\begin{verbatim} +%\begin{algorithm2e} +%\caption{Computing Net Activation} +%\label{alg:net} +%\DontPrintSemicolon +%\LinesNumbered +%\KwIn{$x_1, \ldots, x_n, w_1, \ldots, w_n$} +%\KwOut{$y$, the net activation} +%$y\leftarrow 0$\; +%\For{$i\leftarrow 1$ \KwTo $n$}{ +% $y \leftarrow y + w_i*x_i$\; +%} +%\end{algorithm2e} +%\end{verbatim} +% +%See the \ctandoc{algorithm2e} for more details. +% +%\subsection{Description Lists} +% +%\begin{definition}[\DescribeEnv{altdescription}] +%\cs{begin}\{altdescription\}\marg{widest label}\\ +%\cs{item}\oarg{label} \meta{item text}\\ +%\cs{end}\{altdescription\} +%\end{definition} +%In addition to the standard \env{description} environment, the +%\clsfmt{jmlr} class also provides the \envfmt{altdescription} environment. +%This has an argument that should be the widest label used in the +%list. For example: +%\begin{verbatim} +%\begin{altdescription}{differentiate} +%\item[add] A method that adds two variables. +%\item[differentiate] A method that differentiates a function. +%\end{altdescription} +%\end{verbatim} +% +%\subsection{Theorems, Lemmas etc} +%\label{sec:theorems} +% +%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 +%environments, you can use the \env{proof} environment to display the +%proof if need be. The theorem-like environments all take an +%optional argument, which gives the environment a title. For example: +% +%\begin{verbatim} +%\begin{theorem}[An Example Theorem] +%\label{thm:example} +%This is the theorem. +%\begin{proof} +%This is the proof. +%\end{proof} +%\end{theorem} +%\end{verbatim} +% +%You can define your own numbered theorem-like environment using: +%\begin{definition}[\DescribeMacro{\newtheorem}] +%\cs{newtheorem}\marg{name}\oarg{counter}\marg{title}\oarg{outer +%counter} +%\end{definition} +%or you can define an unnumbered theorem-like environment using: +%\begin{definition}[\DescribeMacro{\newtheorem*}] +%\cs{newtheorem*}\marg{name}\marg{title} +%\end{definition} +%where \meta{name} is the name of the new environment and +%\meta{title} is the title tag at the start of the environment. In +%the case of the numbered theorems, \meta{counter} is a predefined +%counter to use with this theorem. If omitted, a new counter called +%\meta{name} will be defined. The final optional argument \meta{outer +%counter} is the name of a parent counter which, when incremented, should +%reset the theorem counter. +% +%Both \cs{newtheorem} and \cs{newtheorem*} set the new theorem's +%style to the current defined style. The current style is set using +%the following commands: +%\begin{definition}[\DescribeMacro{\theorembodyfont}] +%\cs{theorembodyfont}\marg{declarations} +%\end{definition} +%This sets the font declarations used in the body of the theorem. +%This defaults to \cs{itshape}. +%\begin{definition}[\DescribeMacro{\theoremheaderfont}] +%\cs{theoremheaderfont}\marg{declarations} +%\end{definition} +%This sets the font declarations used for the theorem title. +%This defaults to \cs{bfseries}. +%\begin{definition}[\DescribeMacro{\theorempostheader}] +%\cs{theorempostheader}\marg{text} +%\end{definition} +%This indicates what should occur at the end of the title. This +%defaults to nothing. +%\begin{definition}[\DescribeMacro{\theoremsep}] +%\cs{theoremsep}\marg{text} +%\end{definition} +%This indicates what to put between the header and the body of the +%environment. This defaults to nothing. +% +%For example, to define an unnumbered theorem-like environment called +%\qt{note} with the title \qt{Note} followed by a colon and a new +%line between the title and the body of the \texttt{note} +%environment: +%\begin{verbatim} +% \theorembodyfont{\upshape} +% \theoremheaderfont{\scshape} +% \theorempostheader{:} +% \theoremsep{\newline} +% \newtheorem*{note}{Note} +%\end{verbatim} +%Now it can be used in the document environment: +%\begin{verbatim} +%\begin{note} +%This is an numbered theorem-like environment. +%\end{note} +%\end{verbatim} +% +%\subsection{Cross-Referencing} +%\label{sec:crossref} +% +%Always use \ics{label} when cross-referencing, rather than writing +%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. +% +%\begin{definition}[\DescribeMacro{\sectionref}] +%\cs{sectionref}\marg{label list} +%\end{definition} +%Used to refer to a section or sections. For example, if you defined +%a section as follows: +%\begin{verbatim} +%\chapter{Results}\label{sec:results} +%\end{verbatim} +%you can refer to it as follows: +%\begin{verbatim} +%The results are detailed in \sectionref{sec:results}. +%\end{verbatim} +%This command may also be used for sub-sections and sub-sub-sections. +% +%\begin{definition}[\DescribeMacro{\appendixref}] +%\cs{appendixref}\marg{label list} +%\end{definition} +%Used to refer to an appendix or multiple appendices. +% +%\begin{definition}[\DescribeMacro{\equationref}] +%\cs{equationref}\marg{label list} +%\end{definition} +%Used to refer to an equation or multiple equations. +% +%\begin{definition}[\DescribeMacro{\tableref}] +%\cs{tableref}\marg{label list} +%\end{definition} +%Used to refer to a table or multiple tables. This can also be +%used for sub-tables where the main table number is also required. +% +%\begin{definition}[\DescribeMacro{\subtabref}] +%\cs{subtabref}\marg{label list} +%\end{definition} +%Used to refer to sub-tables without the main table number, e.g. +%(\emph{a}) or (\emph{b}). +% +%\begin{definition}[\DescribeMacro{\figureref}] +%\cs{figureref}\marg{label list} +%\end{definition} +%Used to refer to a figure or multiple figures. This can also +%be used for sub-figures where the main figure number is also +%required, e.g.\ 2(\emph{a}) or 4(\emph{b}). +% +%\begin{definition}[\DescribeMacro{\subfigref}] +%\cs{subfigref}\marg{label list} +%\end{definition} +%Used to refer to sub-figures without the main figure number, e.g. +%(\emph{a}) or (\emph{b}). +% +%\begin{definition}[\DescribeMacro{\algorithmref}] +%\cs{algorithmref}\marg{label list} +%\end{definition} +%Used to refer to an algorithm or multiple algorithms. +% +%\begin{definition}[\DescribeMacro{\theoremref}] +%\cs{theoremref}\marg{label list} +%\end{definition} +%Used to refer to a theorem or multiple theorems. +% +%\begin{definition}[\DescribeMacro{\lemmaref}] +%\cs{lemmaref}\marg{label list} +%\end{definition} +%Used to refer to a lemma or multiple lemmas. +% +%\begin{definition}[\DescribeMacro{\remarkref}] +%\cs{remarkref}\marg{label list} +%\end{definition} +%Used to refer to a remark or multiple remarks. +% +%\begin{definition}[\DescribeMacro{\corollaryref}] +%\cs{corollaryref}\marg{label list} +%\end{definition} +%Used to refer to a corollary or multiple corollaries. +% +%\begin{definition}[\DescribeMacro{\definitionref}] +%\cs{definitionref}\marg{label list} +%\end{definition} +%Used to refer to a definition or multiple definitions. +% +%\begin{definition}[\DescribeMacro{\conjectureref}] +%\cs{conjectureref}\marg{label list} +%\end{definition} +%Used to refer to a conjecture or multiple conjectures. +% +%\begin{definition}[\DescribeMacro{\axiomref}] +%\cs{axiomref}\marg{label list} +%\end{definition} +%Used to refer to an axiom or multiple axioms. +% +%\begin{definition}[\DescribeMacro{\exampleref}] +%\cs{exampleref}\marg{label list} +%\end{definition} +%Used to refer to an example or multiple examples. +% +%\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. +%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{maths} +%\end{definition} +%In addition to the commands provided by \sty{amsmath}, the +%\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: +%\begin{verbatim} +%\[E = m c^2\] +%\end{verbatim} +%Numbered single-line equations should be displayed using the +%\env{equation} environment. For example: +%\begin{verbatim} +%\begin{equation}\label{eq:trigrule} +%\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} +%\begin{align} +%f(x) &= x^2 + x\label{eq:f}\\ +%f'(x) &= 2x + 1\label{eq:df} +%\end{align} +%\end{verbatim} +%Unnumbered multi-lined equations should be displayed using the +%\env{align*} environment. For example: +%\begin{verbatim} +%\begin{align*} +%f(x) &= (x+1)(x-1)\\ +%&= x^2 - 1 +%\end{align*} +%\end{verbatim} +%If you want to mix numbered with unnumbered lines use the +%\env{align} environment and suppress unwanted line numbers with +%\cs{nonumber}. For example: +%\begin{verbatim} +%\begin{align} +%y &= x^2 + 3x - 2x + 1\nonumber\\ +%&= x^2 + x + 1\label{eq:y} +%\end{align} +%\end{verbatim} +%An equation that is too long to fit on a single line can be +%displayed using the \env{split} environment. +% +%Text can be embedded in an equation using \ics{text}\marg{text} or +%you can use \ics{intertext}\marg{text} to interupt a multi-line +%environment such as \env{align}. +% +%Predefined operator names are listed in \tableref{tab:operatornames}. +%For additional operators, either use +%\begin{definition}[\DescribeMacro{\operatorname}] +%\cs{operatorname}\marg{name} +%\end{definition} +%for example +%\begin{verbatim} +%If $X$ and $Y$ are independent, +%$\operatorname{var}(X+Y) = +%\operatorname{var}(X) + \operatorname{var}(Y)$ +%\end{verbatim} +%or declare it with +%\begin{definition}[\DescribeMacro{\DeclareMathOperator}] +%\cs{DeclareMathOperator}\marg{command}\marg{name} +%\end{definition} +%for example +%\begin{verbatim} +%\DeclareMathOperator{\var}{var} +%\end{verbatim} +%and then use this new command: +%\begin{verbatim} +%If $X$ and $Y$ are independent, +%$\var(X+Y) = \var(X)+\var(Y)$ +%\end{verbatim} +% +%If you want limits that go above and +%below the operator (like \ics{sum}) use the starred versions +%(\ics{operatorname*} or \ics{DeclareMathOperator*}). +% +%\begin{table}[htbp] +%\caption{Predefined Operator Names (taken from +% \sty{amsmath} documentation)} +%\label{tab:operatornames}% +%\vskip\baselineskip +%\centering +%\begin{tabular}{rlrlrlrl} +%\cs{arccos} & $\arccos$ & \cs{deg} & $\deg$ & \cs{lg} & $\lg$ & \cs{projlim} & $\projlim$ \\ +%\cs{arcsin} & $\arcsin$ & \cs{det} & $\det$ & \cs{lim} & $\lim$ & \cs{sec} & $\sec$ \\ +%\cs{arctan} & $\arctan$ & \cs{dim} & $\dim$ & \cs{liminf} & $\liminf$ & \cs{sin} & $\sin$ \\ +%\cs{arg} & $\arg$ & \cs{exp} & $\exp$ & \cs{limsup} & $\limsup$ & \cs{sinh} & $\sinh$ \\ +%\cs{cos} & $\cos$ & \cs{gcd} & $\gcd$ & \cs{ln} & $\ln$ & \cs{sup} & $\sup$ \\ +%\cs{cosh} & $\cosh$ & \cs{hom} & $\hom$ & \cs{log} & $\log$ & \cs{tan} & $\tan$ \\ +%\cs{cot} & $\cot$ & \cs{inf} & $\inf$ & \cs{max} & $\max$ & \cs{tanh} & $\tanh$ \\ +%\cs{coth} & $\coth$ & \cs{injlim} & $\injlim$ & \cs{min} & $\min$ \\ +%\cs{csc} & $\csc$ & \cs{ker} & $\ker$ & \cs{Pr} & $\Pr$ +%\end{tabular}\par +%\begin{tabular}{rlrl} +%\cs{varlimsup} & $\varlimsup$ +%& \cs{varinjlim} & $\varinjlim$\\ +%\cs{varliminf} & $\varliminf$ +%& \cs{varprojlim} & $\varprojlim$ +%\end{tabular} +% +%\end{table} +% +%\section{Color vs Grayscale} +%\label{sec:color} +% +%It's helpful if authors supply grayscale versions of their +%articles in the event that the article is to be incorporated into +%a black and white printed book. With external PDF, PNG or JPG +%graphic files, you just need to supply a grayscale version of the +%file. For example, if the file is called \texttt{myimage.png}, +%then the gray version should be \texttt{myimage-gray.png} or +%\texttt{myimage-gray.pdf} or \texttt{myimage-gray.jpg}. You don't +%need to modify your code. The \clsfmt{jmlr} class checks for +%the existence of the grayscale version if it is print mode +%(provided you have used \ics{includegraphics} and haven't +%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} +%\end{definition} +%You can use \cs{ifprint} to determine which mode you are in. +%For example: +%\begin{verbatim} +%in \figureref{fig:nodes}, the +%\ifprint{dark gray}{purple} +%ellipse represents an input and the +%\ifprint{light gray}{yellow} ellipse +%represents an output. +%\end{verbatim} +%Another example: +%\begin{verbatim} +%{\ifprint{\bfseries}{\color{red}}important text!} +%\end{verbatim} +% +%You can use the class option \clsopt{gray} to see how the +%document will appear in gray scale mode. +% +%The \sty{xcolor} class is loaded with the \pkgoptfmt{x11names} +%option, so you can use any of the x11 predefined colors (listed +%in the \ctandoc{xcolor}). +% +%\section{Where To Go For Help} +% +%If you have a general \LaTeX\ query, the first place to go to is the +%\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 +%\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/}), +%the \LaTeX\ Community (\url{http://www.latex-community.org/}), +%the \texttt{texhax} mailing list +%(\url{http://tug.org/mailman/listinfo/texhax}) and +%\texttt{comp.text.tex} (archives available at +%\url{http://groups.google.com/group/comp.text.tex/}). +% +%Documentation for packages or classes can be found using the +%\texttt{texdoc} application. For example: +%\begin{verbatim} +%texdoc natbib +%\end{verbatim} +%Alternatively, you can go to +%\texttt{http://www.ctan.org/pkg/}\meta{name} where +%\meta{name} is the name of the package. For example: +%\url{http://www.ctan.org/pkg/natbib} +% +%For a general guide to preparing papers (regardless of whether you +%are using \LaTeX\ or a word processor), see Kate L.~Turabian, \qt{A +%manual for writers of term papers, theses, and dissertations}, The +%University of Chicago Press, 1996. +% +%\chapter{Guidelines for Production Editors} +%\label{sec:jmlrbook} +% +%The \clsfmt{jmlrbook} class can be used to combine articles that use +%the \clsfmt{jmlr} document class into a book. The following sample +%files are provided: \texttt{paper1/paper1.tex}, +%\texttt{paper2/paper2.tex}, \texttt{paper3/paper3.tex}, +%\texttt{jmlr-sample.tex}, \texttt{jmlrwcp-sample.tex}, +%\texttt{jmlrbook-sample.tex} and \texttt{proceedings-sample.tex}. +%All but the last two are articles using the \clsfmt{jmlr} class. The +%last two (\texttt{jmlrbook-sample.tex} and +%\texttt{proceedings-sample.tex}) uses the \clsfmt{jmlrbook} class +%file to combine the articles into a book. Note that no modifications +%are needed to the files using the \clsfmt{jmlr} class when they are +%imported into the book. They can either be compiled as stand-alone +%articles or with the entire book. +% +%Before you compile the book, make sure that all the articles +%compile as stand-alone documents (and run Bib\TeX\ where +%necessary). You can use the \app{makejmlrbookgui} application to compile +%the book. See +%\url{http://www.dickimaw-books.com/software/makejmlrbookgui/} for details. +% +%\section{\clsfmt{jmlrbook} Class Options} +%\begin{description} +%\item[\clsopt{nowcp}]The imported pre-published articles were +%published in the Journal of Machine Learning Research (default). +%\item[\clsopt{pmlr}] The imported pre-published articles were +%published in the Proceedings of Machine Learning Research (PMLR). +%\item[\clsopt{wcp}] The imported pre-published articles were +%published in the JMLR Workshop and Conference Proceedings (JMLR +%W\&CP). +% +%If the book has a mixture of JMLR, JMLR W\&CP or PMLR articles, you +%can switch between them using +%\begin{definition}[\DescribeMacro{\jmlrnowcp}] +%\cs{jmlrnowcp} +%\end{definition} +%(for JMLR) or +%\begin{definition}[\DescribeMacro{\jmlrwcp}] +%\cs{jmlrwcp} +%\end{definition} +%(for JMLR W\&CP) or +%\begin{definition}[\DescribeMacro{\jmlrpmlr}] +%\cs{jmlrpmlr} +%\end{definition} +%(for PMLR). +%Alternatively, you can set the name of the journal or conference +%proceedings using: +%\begin{definition}[\DescribeMacro{\jmlrproceedings}] +%\cs{jmlrproceedings}\marg{short title}\marg{long title} +%\end{definition} +% +%\item[\clsopt{color}] Color version (see \sectionref{sec:color}). +%Use this option for the on-line version with hyperlinks enabled +%(default). +% +%\item[\clsopt{gray}] Grayscale version (see \sectionref{sec:color}). +%Use this option for the print version without hyperlinks. +% +%\item[{\clsopt[top]{tablecaption}}] in a \env{table} environment, +%\ics{floatconts} puts the caption at the top. +% +%\item[{\clsopt[bottom]{tablecaption}}] in a \env{table} environment, +%\ics{floatconts} puts the caption at the bottom. +% +%\item[\clsopt{letterpaper}] Set the paper size to letter (default). +% +%\item[\clsopt{7x10}] Set the paper size to $7\times10$ inches. +% +%\item[\clsopt{10pt}] Use 10pt as the normal text size. +%\item[\clsopt{11pt}] Use 11pt as the normal text size (default). +%\item[\clsopt{12pt}] Use 12pt as the normal text size. +% +%\end{description} +% +%\section{The Preamble} +% +%Any packages that the imported articles load (which aren't +%automatically loaded by \clsfmt{jmlr}) must be loaded in the book's +%preamble. For example, if one or more of the articles load the +%\sty{siunitx} package, this package must be loaded in the book. +% +%Commands that are defined in the imported articles will be local +%to that article unless they have been globally defined using +%\ics{gdef} or \ics{global}. Since most authors use \ics{newcommand} +%and \ics{newenvironment} (or \ics{renewcommand} and +%\ics{renewenvironment}) this shouldn't cause a conflict if more +%that one article has defined the same command or environment. +%For example, in the sample files supplied, both +%\texttt{paper1/paper1.tex} and \texttt{paper2/paper2.tex} have +%defined the command \cs{samplecommand} using \cs{newcommand}. As +%long as this command isn't also defined in the book, there won't +%be a conflict. +% +%\begin{definition}[\DescribeMacro{\title}] +%\cs{title}\oarg{PDF title}\marg{book title} +%\end{definition} +%In the book preamble, \cs{title} sets the book title and the optional +%argument is used for the PDF title, which will be displayed +%when the reader views the PDF file's properties in their PDF viewer. +%(Note that in the imported articles, \cs{title} sets the article's +%title and the optional argument sets the short title for the +%page header and table of contents.) +% +%\begin{definition}[\DescribeMacro{\author}] +%\cs{author}\oarg{PDF author(s)}\marg{book author(s)} +%\end{definition} +%In the book preamble, \cs{author} sets the book's author (or editor) +%and the optional argument is used for the PDF author, which will be +%displayed when the reader views the PDF file's properties in their +%PDF viewer. (Note that in the imported articles, \cs{author} sets +%the article's author and the optional argument sets the short author +%list for the page header.) +% +%\begin{definition}[\DescribeMacro{\volume}] +%\cs{volume}\marg{number} +%\end{definition} +%This command sets the book's volume number. Omit if the book has no +%volume number. +% +%\begin{definition}[\DescribeMacro{\subtitle}] +%\cs{subtitle}\marg{sub-title} +%\end{definition} +%This command sets the book's subtitle. Omit if the book has no +%sub-title. +% +%\begin{definition}[\DescribeMacro{\logo}] +%\cs{logo}\oarg{url}\marg{image command} +%\end{definition} +%This sets the book's title image. Use \ics{includegraphics} and +%omit the file extension. If you provide a grayscale version as +%well as a color version, the grayscale version will be used for +%the print version of the book. (See \sectionref{sec:color} +%for further details.) The optional argument, if present, was +%formerly used by \app{makejmlrbookgui} to make the logo a link to +%\meta{url} on the index HTML page. (The HTML pages are no longer +%generated by the application as PMLR now generate the HTML from +%the .bib file for the proceedings.) +% +%\begin{definition}[\DescribeMacro{\team}] +%\cs{team}\marg{team title} +%\end{definition} +%This can be used to set the name of the editorial team. This +%command may be omitted if not required. +% +%\begin{definition}[\DescribeMacro{\productioneditor}] +%\cs{productioneditor}\marg{name} +%\end{definition} +%This command may be used to name the production editor. The command +%may be omitted if not required. +% +%\begin{definition}[\DescribeMacro{\jmlrlocation}] +%\cs{jmlrlocation}\marg{location} +%\end{definition} +%This specifies the workshop location. By default this doesn't appear +%on the title page. See \sectionref{sec:modifytitle} for details on +%how to modify the layout of the title page. +% +%\section{Main Book Commands} +% +%All commands that are provided by the \clsfmt{jmlr} class are +%also available with the \clsfmt{jmlrbook} class, but some commands +%might behave differently depending on whether they are in the +%main part of the book or within the imported articles. +% +%In the main part of the book you can use the following commands: +%\begin{definition}[\DescribeMacro{\maketitle}] +%\cs{maketitle} +%\end{definition} +%This displays the book's title page. Note that \cs{maketitle} has +%a different effect when used in imported articles. +% +%\begin{definition}[\DescribeMacro{\frontmatter}] +%\cs{frontmatter} +%\end{definition} +%Use this command at the start of the front matter (e.g.\ before the +%foreword or preface). This will make chapters unnumbered even if you +%use \cs{chapter} instead of \cs{chapter*}. It also sets the page +%style and sets the page numbering to lower case Roman numerals. +% +%\begin{definition}[\DescribeEnv{authorsignoff}] +%\cs{begin}\{authorsignoff\}\\ +%\meta{author list}\\ +%\cs{end}\{authorsignoff\} +%\end{definition} +%This environment may be used by the author signing off at the end of a chapter such as the +%foreword. Within the environment use: +%\begin{definition}[\DescribeMacro{\Author}] +%\cs{Author}\marg{details} +%\end{definition} +%for the author's details. More than one \cs{Author} should be used +%if there is more than one author. Example: +%\begin{verbatim} +%\begin{authorsignoff} +%\Author{Nicola Talbot\\ +%University of East Anglia} +%\Author{Anne Author\\ +%University of No Where} +%\end{authorsignoff} +%\end{verbatim} +% +%\begin{definition}[\DescribeEnv{preface}] +%\cs{begin}\{preface\}\oarg{filename} +%\end{definition} +%This environment may be used to typeset the preface. This starts a +%new chapter using +%\begin{verbatim} +%\chapter{\prefacename} +%\end{verbatim} +%\DescribeMacro{\prefacename}where \cs{prefacename} defaults to +%``Preface''. This environment should typically go in the front +%matter and is provided to allow \app{makejmlrbookgui} create a +%standalone document for the preface. The optional argument is the +%filename (without any extension or path) that will be used by +%\app{makejmlrbookgui}. This defaults to \texttt{preface} but, to +%conform with PMLR guidelines, should be changed to the surname of +%the first author (editor) followed by the final two digits of the +%year. See the PMLR website for further details of the guidelines. +% +%\begin{definition}[\DescribeEnv{signoff}] +%\cs{begin}\{signoff\}\oarg{team name}\marg{date}\\ +%\meta{editor list}\\ +%\cs{end}\{signoff\} +%\end{definition} +%This environment may be used by the editorial team when signing off +%a chapter such as the preface. If the optional argument is omitted, +%\qt{The Editorial Team} is used. If you are using the \env{preface} +%environment described above, the \env{signoff} environment must go +%inside the \env{preface} environment. +% +%Within the \env{signoff} environment use: +%\begin{definition}[\DescribeMacro{\Editor}] +%\cs{Editor}\marg{details} +%\end{definition} +%for each editor. Example: +%\begin{verbatim} +%\begin{signoff}{March 2010} +%% First editor: +%\Editor{Nicola Talbot\\ +%University of East Anglia\\ +%\mailto{N.Talbot@uea.ac.uk}} +%% Second editor: +%\Editor{Anne Editor\\ +%University of Nowhere\\ +%\mailto{ae@sample.com}} +%\end{signoff} +%\end{verbatim} +% +%\begin{definition}[\DescribeMacro{\tableofcontents}] +%\cs{tableofcontents} +%\end{definition} +%This command displays the book's table of contents. Note that it +%has a different effect if used in an imported article. +% +%\begin{definition}[\DescribeMacro{\mainmatter}] +%\cs{mainmatter} +%\end{definition} +%Use this command to switch to the book's main matter. This will +%switch the chapter numbering back on, reset the page numbering to +%Arabic and set up the main page style. +% +%\begin{definition}[\DescribeMacro{\part}] +%\cs{part}\oarg{short title}\marg{title} +%\end{definition} +%If used in the main part of the book, this command will start a +%new part and issue a clear double page. Note that this command +%has a different effect if used in an imported article (or inside the +%\env{jmlrpapers} environment). +% +%\begin{definition}[\DescribeMacro{\addtocpart}] +%\cs{addtocpart}\marg{title} +%\end{definition} +%This adds \meta{title} to the table of contents, issues a clear +%double page, but doesn't display any text or affect the part +%numbering. +% +%\begin{definition}[\DescribeMacro{\chapter}] +%\cs{chapter}\oarg{short title}\marg{title} +%\end{definition} +%This command may be used in the main body of the book but will +%cause an error if used within an imported article (or inside the +%\env{jmlrpapers} environment). +% +%\begin{definition}[\DescribeMacro{\section}] +%\cs{section}\oarg{short title}\marg{title} +%\end{definition} +%\begin{definition}[\DescribeMacro{\subsection}] +%\cs{subsection}\oarg{short title}\marg{title} +%\end{definition} +%\begin{definition}[\DescribeMacro{\subsubsection}] +%\cs{subsubsection}\oarg{short title}\marg{title} +%\end{definition} +%\begin{definition}[\DescribeMacro{\paragraph}] +%\cs{paragraph}\oarg{short title}\marg{title} +%\end{definition} +%\begin{definition}[\DescribeMacro{\subparagraph}] +%\cs{subparagraph}\oarg{short title}\marg{title} +%\end{definition} +%These commands may be used in the main body of the book or within +%imported articles. In the main body of the book (outside of the +%\env{jmlrpapers} environment) they need to be +%within a chapter and will be numbered according to the chapter. +% +%\begin{definition}[\DescribeMacro{\appendix}] +%\cs{appendix} +%\end{definition} +%If used in the main body of the book (\emph{outside} of the +%\env{jmlrpapers} environment) this will switch to the book +%appendices. Subsequent \cs{chapter} commands will produce the +%appendices. (Any imported articles in the appendix will be +%identified by \app{makejmlrbookgui} as supplemental material.) If +%used within an imported article (or within the \env{jmlrpapers} +%environment) \cs{appendix} will switch to the +%article appendices and won't affect the main part of the book. +% +%\begin{definition}[\DescribeEnv{jmlrpapers}] +%\cs{begin}\{jmlrpapers\}\\ +%\meta{imported papers}\\ +%\cs{end}\{jmlrpapers\} +%\end{definition} +%This environment must be used when importing articles and may be +%used as often as required. Take care not to include book sectioning +%commands, such as \ics{chapter}, in this environment. Within the +%\envfmt{jmlrpapers} environment, use the following commands to +%import articles: +%\begin{definition}[\DescribeMacro{\importpubpaper}] +%\cs{importpubpaper}\oarg{label}\marg{directory}\marg{file}\marg{pages} +%\end{definition} +%This imports an article that has already been published elsewhere. +%The \meta{pages} argument should be the page range from the +%\emph{previously published} version of this article. This may not +%necessarily be the same as the page range of the article in the +%book. The directory the imported file is contained in is given by +%\meta{directory}. If the file is in the same directory as the book, +%use a dot. The file name is given by \meta{file}. The article is +%also given a label, specified by the optional argument. This is +%\meta{directory}/\meta{file} by default. The label is used as a +%prefix to labels in the imported articles which ensures that +%cross-references are unique. You can also use this label to +%reference the article elsewhere in the book (see +%\sectionref{sec:bkcrossref}). +% +%\begin{definition}[\DescribeMacro{\importpaper}] +%\cs{importpaper}\oarg{label}\marg{directory}\marg{file} +%\end{definition} +%Imports an article that is being published in the book. The +%arguments are the same as above except that there is no page +%range (the page range is computed automatically). +% +%\begin{definition}[\DescribeMacro{\importarticle}] +%\cs{importarticle}\oarg{label}\marg{directory}\marg{file} +%\end{definition} +%This imports an article that hasn't been published elsewhere. There +%is no page range, but the other arguments are the same as +%those describe above for \cs{importpubpaper}. +% +%Example: to import a previously published paper +%\texttt{paper1/paper1.tex} and an unpublished paper +%\texttt{paper2/paper2.tex}: +%\begin{verbatim} +%\begin{jmlrpapers} +%\importpubpaper{paper1}{paper1}{23--45} +%\importarticle{paper2}{paper2} +%\end{jmlrpapers} +%\end{verbatim} +% +%\subsection{Two Column Articles in a One Column Book} +% +%The \clsfmt{jmlrbook} class column style will override the column style +%of the imported articles. You can use the \clsopt{twocolumn} class +%option to \clsfmt{jmlrbook}, but this will make the whole book with +%two columns. If you only want the imported articles to be in two +%columns, then put \ics{twocolumn} in the \env{jmlrpapers} +%environment to switch on two column formatting. The effect will be +%localised to the end of the environment. +% +%\subsection{Cross-Referencing} +%\label{sec:bkcrossref} +% +%You can cross-reference other parts of the book using the +%standard \cs{label}/\cs{ref} mechanism, but if you want to +%reference something within an imported article, you must prefix +%the label with the label given when importing the article (that +%is, the optional argument to \ics{importpubpaper}, +%\ics{importpaper} or \cs{importarticle}). For example, if you +%want to reference a section labelled \texttt{sec:results} in the +%imported paper \texttt{paper1/paper1.tex}, you would need to do: +%\begin{verbatim} +%see Section~\ref{paper1/paper1sec:results} +%\end{verbatim} +%or +%\begin{verbatim} +%see \sectionref{paper1/paper1sec:results} +%\end{verbatim} +% +%In addition to the commands described in \sectionref{sec:crossref}, +%the \clsfmt{jmlrbook} class also provides the following +%cross-referencing commands: +% +%\begin{definition}[\DescribeMacro{\chapterref}] +%\cs{chapterref}\marg{label list} +%\end{definition} +%Reference a chapter or chapters. The argument is a comma-separated +%list of labels. +% +%\begin{definition}[\DescribeMacro{\articlepageref}] +%\cs{articlepageref}\marg{label} +%\end{definition} +%This displays the starting page number of the article whose label +%is given by \meta{label}. Note that this must a single label, not +%a list. For example: +%\begin{verbatim} +%An interesting article starts on page~\articlepageref{paper1/paper1} +%\end{verbatim} +% +%\begin{definition}[\DescribeMacro{\articlepagesref}] +%\cs{articlepagesref}\marg{label} +%\end{definition} +%This displays the page range of the article whose label is +%given by \meta{label}. Again, this must be a single label, not a +%list. This page range is unrelated to the \meta{pages} argument of +%\ics{importpubarticle}. +% +%\begin{definition}[\DescribeMacro{\articletitleref}] +%\cs{articletitleref}\marg{label} +%\end{definition} +%This displays the short title for the article whose label is +%given by \meta{label}. Again, this must be a single label, not a +%list. +% +%\begin{definition}[\DescribeMacro{\articleauthorref}] +%\cs{articleauthorref}\marg{label} +%\end{definition} +%This displays the author list for the article whose label is +%given by \meta{label}. Again, this must be a single label, not a +%list. +% +%\section{Altering the Layout of the Main Title Page} +%\label{sec:modifytitle} +% +%\begin{definition}[\DescribeMacro{\titlebody}] +%\cs{titlebody} +%\end{definition} +%The main body of the book's title page is given by the command +%\cs{titlebody}. Within the definition of this command, you can +%use: +%\begin{definition}[\DescribeMacro{\SetTitleElement}] +%\cs{SetTitleElement}\marg{element}\marg{pre}\marg{post} +%\end{definition} +%where \meta{element} can be: \texttt{title}, \texttt{volume}, +%\texttt{issue}\footnote{The default title page layout doesn't use +%\texttt{issue}, but if required it can be set with \ics{issue}\marg{number}}, +%\texttt{subtitle}, \texttt{logo}, \texttt{team}, \texttt{author}, +%\texttt{date}, \texttt{productioneditor}. The \meta{pre} and +%\meta{post} arguments specify what to do before and after the +%element. Note that \cs{SetTitleElement} does nothing if that +%element hasn't been set. For example, if \cs{volume} has been +%omitted or \verb|\volume{}| is used, then +%\begin{verbatim} +%\SetTitleElement{volume}{\mainvolumefont}{\postmainvolume} +%\end{verbatim} +%will do nothing (so you don't end up with \textbf{Volume :}). +% +%\begin{definition}[\DescribeMacro{\IfTitleElement}] +%\cs{IfTitleElement}\marg{element}\marg{true part}\marg{false part} +%\end{definition} +%This does \meta{true part} if \meta{element} has been set +%otherwise it does \meta{false part}. For example, +%\cs{postmainvolume} is defined as: +%\begin{verbatim} +%\newcommand{\postmainvolume}{% +% \IfTitleElement{subtitle}{}{:}\par\relax +%} +%\end{verbatim} +%This means that it will only print a colon after the volume +%number if the subtitle has been set. +% +%The default definition of \cs{titlebody} is: +%\begin{verbatim} +%\newcommand{\titlebody}{% +% \SetTitleElement{title}{\maintitlefont}{\postmaintitle}% +% \SetTitleElement{volume}{\mainvolumefont}{\postmainvolume}% +% \SetTitleElement{subtitle}{\mainsubtitlefont}{\postmainsubtitle}% +% \SetTitleElement{logo}{\mainlogofont}{\postmainlogo}% +% \SetTitleElement{team}{\mainteamfont}{\postmainteam}% +% \SetTitleElement{author}{\mainauthorfont}{\postmainauthor}% +% \SetTitleElement{productioneditor}{\mainproductioneditorfont}% +% {\postmainproductioneditor}% +%} +%\end{verbatim} +% +%\section{Potential Pitfalls} +% +%The \cls{combine} class and \sty{hyperref} package are +%individually both easily broken by packages that change certain +%internals and they don't ordinarily work together. The +%\clsfmt{jmlrbook} class applies patches to the internal referencing +%mechanism to make them work together, but it's a fairly fragile +%alliance. Some packages are known to break it, for example +%\sty{subfig}, \sty{pdfpages} and \sty{geometry}. This is why the +%\clsfmt{jmlr} class checks for known problem packages and generates an +%error message to dissuade authors from using them. It's likely that +%there are other packages that may cause a problem and, as they are +%found, they will be added to the check list. Also, it's possible for +%an author to disable the package checking mechanism if they are +%determined to use a particular package. +% +%In the event that an article has loaded a problem package, the +%editors will have to decide whether to ask the author to change +%the article so that it doesn't cause a problem or to make the changes +%themselves or to find a way of fudging things to get it to work. It +%depends on the level of \LaTeX\ expertise amongst the editors and +%the time available. +% +%Another problem that can arise is when different articles use +%packages that conflict. For example, one article uses package +%\styfmt{foo} and another uses package \styfmt{bar}. Each article compiles +%okay as a stand-alone article, but when combined \styfmt{foo} and +%\styfmt{bar} conflict. Another problem may occur when articles load the +%same package but with conflicting package options. To reduce the +%chance of this occurring, the \clsfmt{jmlr} class loads some commonly +%used packages. For example, it loads the \sty{algorithm2e} +%package with the \pkgoptfmt{algo2e} and \pkgoptfmt{ruled} options and +%provides the \env{algorithm} environment in addition to +%\sty{algorithm2e}'s \env{algorithm2e} environment. Different +%versions of the same package can also be a problem. To help +%counteract the problem caused by different papers using different +%versions of the \sty{algorithm2e} package, \sty{jmlrbook} defines +%most of the old style commands if they don't exist. +% +%Articles that use different input encodings can also cause a +%problem. For example, if one article uses \texttt{utf8} and another +%uses \texttt{latin1}. If the authors have directly entered a +%diacritic or ligature, such as \'e or \ae, instead of using a +%\LaTeX\ command, such as \cs{'e} or \cs{ae}, then this will cause an +%error on compiling the book.\footnote{and may also cause a problem +%for the editor's text editor.} The choice then is to either change +%all non-keyboard characters with the appropriate \LaTeX\ commands or +%to use the \cs{inputencoding} command, supplied by the +%\sty{inputenc} package, to switch the encoding at the start of each +%article. One thing to watch out for are bib files that contain a +%mixture of encodings caused by copying and pasting from different +%sources. Version~0.4.2b of \app{makejmlrbookgui} provides a function +%to search for characters outside the range 0x20 (space) and 0x7E +%(tilde). +% +%Authors who use \cs{nonumber} within an \env{equation} environment +%can mess up the hyperlinks. Remove \cs{nonumber} and change the +%equation environment to \cs{[} \ldots\ \cs{]} (or just make it a +%numbered equation). +% +%If the article changes the graphics path using \cs{graphicspath}, +%\clsfmt{jmlrbook} won't find the graphics if the imported articles +%aren't in the same directory as the book. +% +%The \app{makejmlrbookgui} application provides some diagnostic +%tools, which can help detect some common problems. It's manual also +%has a +%\href{http://www.dickimaw-books.com/software/makejmlrbookgui/manual/troubleshooting.html}{troubleshooting +%section}. +% +%\StopEventually{\clearpage\phantomsection +% \PrintIndex +%} +% +% +% +%\chapter{The Code} +%\iffalse +% \begin{macrocode} +%<*jmlrutils.sty> +% \end{macrocode} +%\fi +%\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} +\ProvidesPackage{jmlrutils}[2017/08/01] +% \end{macrocode} +% Package options: +%\begin{macro}{\ifjmlrutilsmaths} +%Determine if the maths commands should be provided. +% \begin{macrocode} +\newif\ifjmlrutilsmaths +\jmlrutilsmathstrue +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\DeclareOption{maths}{\jmlrutilsmathstrue} +\DeclareOption{nomaths}{\jmlrutilsmathsfalse} +% \end{macrocode} +% +%\begin{macro}{\ifjmlrutilstheorems} +%Determine if the theorem environments should be provided. +% \begin{macrocode} +\newif\ifjmlrutilstheorems +\jmlrutilstheoremstrue +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\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} +% \begin{macrocode} +\DeclareOption{subfloats}{\jmlrutilssubfloatstrue} +\DeclareOption{nosubfloats}{\jmlrutilssubfloatsfalse} +% \end{macrocode} +% +% \begin{macrocode} +\ProcessOptions +% \end{macrocode} +% Requires \sty{etoolbox}: +% \begin{macrocode} +\RequirePackage{etoolbox} +% \end{macrocode} +%If the maths commands are needed, load \sty{amsmath}. +% \begin{macrocode} +\ifjmlrutilsmaths + \RequirePackage{amsmath} +\fi +% \end{macrocode} +% The conditional \cs{iftablecaptiontop} will already have been +% defined by the \cls{jmlr} class, so only needs to be defined +% if not already done. +%\begin{macro}{\iftablecaptiontop} +% \begin{macrocode} +\@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}{\sectionref} +% \begin{macrocode} +\newcommand*{\sectionref}[1]{% + \objectref{#1}{\sectionrefname}{\sectionsrefname}{}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\equationref} +% \begin{macrocode} +\newcommand*{\equationref}[1]{% + \objectref{#1}{\equationrefname}{\equationsrefname}()} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\tableref} +% \begin{macrocode} +\newcommand*{\tableref}[1]{% + \objectref{#1}{\tablerefname}{\tablesrefname}{}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\figureref} +% \begin{macrocode} +\newcommand*{\figureref}[1]{% + \objectref{#1}{\figurerefname}{\figuresrefname}{}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\algorithmref} +% \begin{macrocode} +\newcommand*{\algorithmref}[1]{% + \objectref{#1}{\algorithmrefname}{\algorithmsrefname}{}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\theoremmref} +% \begin{macrocode} +\newcommand*{\theoremref}[1]{% + \objectref{#1}{\theoremrefname}{\theoremsrefname}{}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\lemmaref} +% \begin{macrocode} +\newcommand*{\lemmaref}[1]{% + \objectref{#1}{\lemmarefname}{\lemmasrefname}{}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\remarkref} +% \begin{macrocode} +\newcommand*{\remarkref}[1]{% + \objectref{#1}{\remarkrefname}{\remarksrefname}{}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\corollaryref} +% \begin{macrocode} +\newcommand*{\corollaryref}[1]{% + \objectref{#1}{\corollaryrefname}{\corollarysrefname}{}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\definitionref} +% \begin{macrocode} +\newcommand*{\definitionref}[1]{% + \objectref{#1}{\definitionrefname}{\definitionsrefname}{}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\conjectureref} +% \begin{macrocode} +\newcommand*{\conjectureref}[1]{% + \objectref{#1}{\conjecturerefname}{\conjecturesrefname}{}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\axiomref} +% \begin{macrocode} +\newcommand*{\axiomref}[1]{% + \objectref{#1}{\axiomrefname}{\axiomsrefname}{}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\exampleref} +% \begin{macrocode} +\newcommand*{\exampleref}[1]{% + \objectref{#1}{\examplerefname}{\examplesrefname}{}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\appendixref} +% \begin{macrocode} +\newcommand*{\appendixref}[1]{% + \objectref{#1}{\appendixrefname}{\appendixsrefname}{}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\partref} +% \begin{macrocode} +\newcommand*{\partref}[1]{% + \objectref{#1}{\partrefname}{\partsrefname}{}{}} +% \end{macrocode} +%\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} +\newcommand{\floatconts}[3]{% + \@ifundefined{\@captype conts}{\tableconts{#1}{#2}{#3}}% + {\csname\@captype conts\endcsname{#1}{#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\tableconts} +%This will already have been defined if the \clsfmt{jmlr} class was +%loaded. +% \begin{macrocode} +\providecommand{\tableconts}[3]{% + #2\label{#1}\vskip\baselineskip + {\centering #3\par}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\figureconts} +% \begin{macrocode} +\newcommand{\figureconts}[3]{% + {\centering #3\par}% + \vskip\baselineskip + #2\label{#1}% +} +% \end{macrocode} +%\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} +\newcommand{\algocfconts}[3]{% + \@algocf@pre@ruled + #2\label{#1}\kern2pt\hrule height.8pt depth0pt\kern2pt% + #3\@algocf@pre@ruled +} +% \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{macrocode} +\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} +% +%\begin{macro}{\@jmlr@ifgraphicxloaded} +% \begin{macrocode} +\AtBeginDocument{% + \@ifpackageloaded{graphicx}% + {\let\@jmlr@ifgraphicxloaded\@firstoftwo}% + {\let\@jmlr@ifgraphicxloaded\@secondoftwo}% +} +% \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{macrocode} +\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} +%\end{macro} +% +%Sub floats. +% \begin{macrocode} +\ifjmlrutilssubfloats +% \end{macrocode} +% 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} + \newcounter{subfigure} + \@addtoreset{subfigure}{figure} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\thesubfigure} +% \begin{macrocode} + \renewcommand*{\thesubfigure}{\alph{subfigure}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\p@subfigure} +% \begin{macrocode} + \renewcommand*{\p@subfigure}{\expandafter\@p@subfigure} + \newcommand*{\@p@subfigure}[1]{% + \protect\@subfigurelabel{\thefigure}{\thesubfigure}% + } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@subfigurelabel} +% Define how label appears. +% \begin{macrocode} + \newcommand*\@subfigurelabel[2]{#1\subfigurelabel{#2}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\subfigref} +% Reference the sub-figure without including the figure number. +% \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 + } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\subfigurelabel} +% \begin{macrocode} + \newcommand*{\subfigurelabel}[1]{(\emph{#1})} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@subfloatcapbox} +% Box to store subfloat caption. +% \begin{macrocode} + \newsavebox\@subfloatcapbox +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@subfloatcontsbox} +% Box to store subfloat contents. +% \begin{macrocode} + \newsavebox\@subfloatcontsbox +% \end{macrocode} +%\end{macro} +%\begin{macro}{\subfigure} +% \begin{macrocode} + \newcommand*{\subfigure}[1][]{% + \bgroup + \def\@subfigcap{#1}% + \@subfigure + } +% \end{macrocode} +%\changes{1.09}{2010/12/01}{Added check to determine whether the +%subfigure caption is wider than the subfigure} +% \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 + } +% \end{macrocode} +%\end{macro} +% +% Sub-tables: +%\begin{macro}{\c@subtable} +% Define subtable counter: +% \begin{macrocode} + \newcounter{subtable} + \@addtoreset{subtable}{table} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\thesubtable} +% \begin{macrocode} + \renewcommand*{\thesubtable}{\alph{subtable}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\p@subtable} +% \begin{macrocode} + \renewcommand*{\p@subtable}{\expandafter\@p@subtable} + \newcommand*{\@p@subtable}[1]{% + \protect\@subtablelabel{\thetable}{\thesubtable}% + } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@subtablelabel} +% Define how label appears. +% \begin{macrocode} + \newcommand*\@subtablelabel[2]{#1\subtablelabel{#2}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\subtabref} +% Reference the sub-table without including the table number. +% \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 + \else + \let\@objectname\relax + \let\@prevsep\@jmlr@reflistsep + \fi + }% + \ifx\@objectname\relax + \let\@prevsep\@jmlr@reflistlastsep + \fi + \@objectref + } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\subtablelabel} +% \begin{macrocode} + \newcommand*{\subtablelabel}[1]{(\emph{#1})} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\subtable} +% \begin{macrocode} + \newcommand*{\subtable}[1][]{% + \def\@subtabcap{#1}% + \@subtable + } +% \end{macrocode} +%\changes{1.09}{2010/12/01}{Added check to determine whether the +%subtable caption is wider than the subtable} +% \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} + } +% \end{macrocode} +%\end{macro} +%End of sub-floats. +% \begin{macrocode} +\fi +% \end{macrocode} +% +%\subsection{General Markup} +%Provide maths command if required. +% \begin{macrocode} +\ifjmlrutilsmaths +% \end{macrocode} +%\begin{macro}{\set} +% \begin{macrocode} + \newcommand*{\set}[1]{\ensuremath{\mathcal{#1}}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\orgvec} +%\changes{1.21}{2015-02-24}{new} +%Keep a copy of original \cs{vec} in case it's wanted. +% \begin{macrocode} + \let\orgvec\vec +% \end{macrocode} +%\end{macro} +%\begin{macro}{\vec} +% Redefine \cs{vec} to produce a bold symbol. The \sty{amsmath} +%package is required for this. +% \begin{macrocode} + \renewcommand*{\vec}[1]{\boldsymbol{#1}} +% \end{macrocode} +%\end{macro} +%End of maths commands. +% \begin{macrocode} +\fi +% \end{macrocode} +% +%\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} +% \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. +% \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} +% \end{macrocode} +%\end{environment} +% +%\begin{macro}{\mailto} +% Syntax: \cs{mailto}\marg{address} +% \begin{macrocode} +\newcommand*{\mailto}[1]{\texttt{#1}} +% \end{macrocode} +%\end{macro} +% +%\subsection{Proofs and Theorems} +% \begin{macrocode} +\ifjmlrutilstheorems +% \end{macrocode} +% 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{\jmlrBlackBox}{\rule{1.5ex}{1.5ex}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\BlackBox} +% Backward compatibility in case it was used explicitly. +% \begin{macrocode} + \providecommand{\BlackBox}{\jmlrBlackBox} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrQED} +%\changes{1.21}{2015-02-24}{new} +%\changes{1.24}{2017-08-01}{changed to use \cs{par}} +% \begin{macrocode} + \newcommand{\jmlrQED}{\hfill\jmlrBlackBox\par\bigskip} +% \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 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*{\theorembodyfont}[1]{% + \renewcommand*{\@theorembodyfont}{#1}% + } + \newcommand*{\@theorembodyfont}{\normalfont\itshape}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\theoremheaderfont} +%\changes{1.18}{2013-10-17}{new} +%\begin{definition} +%\cs{theoremheaderfont}\marg{font declarations} +%\end{definition} +% \begin{macrocode} + \newcommand*{\theoremheaderfont}[1]{% + \renewcommand*{\@theoremheaderfont}{#1}% + } + \newcommand*{\@theoremheaderfont}{\normalfont\bfseries }% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\theoremsep} +%\changes{1.18}{2013-10-17}{new} +%\begin{definition} +%\cs{theoremsep}\marg{separation code} +%\end{definition} +% \begin{macrocode} + \newcommand*{\theoremsep}[1]{% + \renewcommand*{\@theoremsep}{#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{macrocode} + \newcommand*{\theorempostheader}[1]{% + \renewcommand*{\@theorempostheader}{#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} +% \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 + }% + } +% \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{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}% + } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@xthm} +%\changes{1.18}{2013-10-17}{new} +% \begin{macrocode} + \renewcommand*{\@xthm}[2]{% + \def\@jmlr@currentthm{#1}% + \@begintheorem{#2}{\csname the#1\endcsname}% + \ignorespaces + } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@ythm} +%\changes{1.18}{2013-10-17}{new} +% \begin{macrocode} + \def\@ythm#1#2[#3]{% + \def\@jmlr@currentthm{#1}% + \@opargbegintheorem{#2}{\csname the#1\endcsname}{#3}% + \ignorespaces + } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@begintheorem} +%\changes{1.18}{2013-10-17}{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 + } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@opargbegintheorem} +%\changes{1.18}{2013-10-17}{new} +% \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 + }% + \trivlist + \item[\hskip\labelsep{\jmlr@this@theoremheader #1\ #2\ (#3)% + \jmlr@this@theorempostheader}]% + \mbox{}\jmlr@this@theoremsep + \jmlr@this@theorembody + } +% \end{macrocode} +%\end{macro} +% +%\begin{environment}{example} +% \begin{macrocode} + \newtheorem{example}{Example} +% \end{macrocode} +%\end{environment} +%\begin{environment}{theorem} +% \begin{macrocode} + \newtheorem{theorem}{Theorem} +% \end{macrocode} +%\end{environment} +%\begin{environment}{lemma} +% \begin{macrocode} + \newtheorem{lemma}[theorem]{Lemma} +% \end{macrocode} +%\end{environment} +%\begin{environment}{proposition} +% \begin{macrocode} + \newtheorem{proposition}[theorem]{Proposition} +% \end{macrocode} +%\end{environment} +%\begin{environment}{remark} +% \begin{macrocode} + \newtheorem{remark}[theorem]{Remark} +% \end{macrocode} +%\end{environment} +%\begin{environment}{corollary} +% \begin{macrocode} + \newtheorem{corollary}[theorem]{Corollary} +% \end{macrocode} +%\end{environment} +%\begin{environment}{definition} +% \begin{macrocode} + \newtheorem{definition}[theorem]{Definition} +% \end{macrocode} +%\end{environment} +%\begin{environment}{conjecture} +% \begin{macrocode} + \newtheorem{conjecture}[theorem]{Conjecture} +% \end{macrocode} +%\end{environment} +%\begin{environment}{axiom} +% \begin{macrocode} + \newtheorem{axiom}[theorem]{Axiom} +% \end{macrocode} +%\end{environment} +% End of theorem definitions. +% \begin{macrocode} +\fi +% \end{macrocode} +%\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}. +% +% Declare class and required TeX format: +% \begin{macrocode} +\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} +%\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 +% \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}} +% \end{macrocode} +%\end{macro} +%\begin{option}{draft} +%\changes{1.18}{2013-10-17}{new} +% \begin{macrocode} +\DeclareOptionX{draft}{\setlength\overfullrule{5pt}} +% \end{macrocode} +%\end{option} +%\begin{option}{final} +%\changes{1.18}{2013-10-17}{new} +% \begin{macrocode} +\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} +% Provide table contents command that uses this conditional. +% (The \sty{jmlrutils} package doesn't use it.) +%\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 +} +% \end{macrocode} +%\end{macro} +% Determine if the table captions should go at the top. +%\begin{option}{tablecaptiontop} +% \begin{macrocode} +\DeclareOptionX{tablecaptiontop}{\tablecaptiontoptrue} +% \end{macrocode} +%\end{option} +%\begin{option}{tablecaptiontop} +% \begin{macrocode} +\DeclareOptionX{tablecaptionbottom}{\tablecaptiontopfalse} +% \end{macrocode} +%\end{option} +%\begin{option}{tablecaption} +%Key=value interface. +% \begin{macrocode} +\define@choicekey{jmlr.cls}{tablecaption}[\val\nr]{top,bottom}{% + \ifcase\nr\relax + \tablecaptiontoptrue + \or + \tablecaptiontopfalse + \fi +} +% \end{macrocode} +%\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} +\newif\ifjmlrhtml +\jmlrhtmlfalse +\DeclareOptionX{html}{% + \ClassWarning{jmlr}{html option is now deprecated}% + \jmlrhtmltrue} +\DeclareOptionX{nohtml}{\jmlrhtmlfalse} +% \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{macrocode} +\def\pt@size{11pt} +\DeclareOptionX{10pt}{\renewcommand{\pt@size}{10pt}} +\DeclareOptionX{11pt}{\renewcommand{\pt@size}{11pt}} +\DeclareOptionX{12pt}{\renewcommand{\pt@size}{12pt}} +% \end{macrocode} +%\begin{macro}{\@jmlrproceedings} +% The name of the proceedings. +% \begin{macrocode} +\newcommand*{\@jmlrproceedings}{Journal of Machine Learning Research} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@jmlrabbrvproceedings} +% The abbreviated name of the proceedings. +% \begin{macrocode} +\newcommand*{\@jmlrabbrvproceedings}{JMLR} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrproceedings} +% Sets the title and abbreviation of the proceedings +% \begin{macrocode} +\newcommand*{\jmlrproceedings}[2]{% + \renewcommand*{\@jmlrabbrvproceedings}{#1}% + \renewcommand*{\@jmlrproceedings}{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\jmlrnowcp} +% \begin{macrocode} +\newcommand*{\jmlrnowcp}{% + \jmlrproceedings{JMLR}{Journal of Machine Learning Research}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrwcp} +%\changes{1.11}{2011-03-24}{Fixed typo} +% \begin{macrocode} +\newcommand*{\jmlrwcp}{% + \jmlrproceedings{JMLR W\&CP}{JMLR: Workshop and Conference Proceedings}% +} +% \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{macrocode} +\newcommand*{\jmlrpmlr}{% + \jmlrproceedings{PMLR}{Proceedings of Machine Learning Research}% +} +% \end{macrocode} +%\end{macro} +% This is a journal (non JMLR W\&CP\slash PMLR) article: +% \begin{macrocode} +\DeclareOptionX{nowcp}{\jmlrnowcp} +% \end{macrocode} +% This is an article for JMLR W\&CP +% \begin{macrocode} +\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} +% +% \begin{macrocode} +\ifgrayscale +% \end{macrocode} +% If this is the print version, need to disable the hyperlinks: +% \begin{macrocode} + \hypersetup{draft} +\fi +% \end{macrocode} +% +% 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{macrocode} +\widowpenalty=10000\relax +\clubpenalty=10000\relax +% \end{macrocode} +% 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} +\bibliographystyle{plainnat} +\bibpunct{(}{)}{;}{a}{,}{,} +% \end{macrocode} +%\subsection{Sections} +%\begin{macro}{\section} +% \begin{macrocode} +\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}{\subsection} +% \begin{macrocode} +\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}{\subsubsection} +% \begin{macrocode} +\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}{\paragraph} +% \begin{macrocode} +\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% + {1.5ex plus 0.5ex minus .2ex}% + {-1em}% + {\normalfont\normalsize\rmfamily\bfseries}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\subparagraph} +% \begin{macrocode} +\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}{\@seccntformat} +% Redefine the way the section number appears in the section +% heading. +% \begin{macrocode} +\renewcommand*\@seccntformat[1]{% + \csname pre#1num\endcsname + \csname the#1\endcsname.\enskip +} +% \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{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% +} +% \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{macrocode} +\newcommand*{\footnoteseptext}{. } +% \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}. +% \begin{macrocode} +\renewcommand*{\thanks}[1]{% + \footnotemark + \protected@xdef\@thanks{\@thanks + \protect\footnotetext[\arabic{footnote}]{#1}}% +} +% \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} +% \begin{macrocode} +\ifjmlrhtml + \renewenvironment{abstract}{\HCode{

}Abstract\HCode{

}}{}% +\else + \renewenvironment{abstract} +% \end{macrocode} +%\changes{1.09}{2010/12/01}{changed \cs{centerline} to +%\cs{centering}\ldots\cs{par}} +% \begin{macrocode} + {{\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{environment} +%\subsection{Keywords} +% This code has been taken from jmlr2e.sty but with \cs{bf} updated +% to \cs{bfseries}. +%\begin{environment}{keywords} +% \begin{macrocode} +\newenvironment{keywords} +{\bgroup\leftskip 20pt\rightskip 20pt \small\noindent{\bfseries +Keywords:} \ignorespaces}% +{\par\egroup\vskip 0.25ex} +% \end{macrocode} +%\end{environment} +%\subsection{Title Page Information} +% This code has been taken from jmlr2e.sty. +% +% Title stuff, borrowed in part from aaai92.sty +% \begin{macrocode} +\newlength\aftertitskip \newlength\beforetitskip +\newlength\interauthorskip \newlength\aftermaketitskip +% \end{macrocode} +%% Changeable parameters. +% \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} +% \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. +% \begin{macrocode} +\newcommand*{\titlebreak}{\newline} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\titletag} +%\changes{1.17}{2012/05/30}{new} +% \begin{macrocode} +\newcommand*{\titletag}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\title} +% Override definition of \cs{title} to allow for an optional +% argument (short title) +% \begin{macrocode} +\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}{\@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*{\@shorttitle}{\jobname} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\jmlrtitlehook} +% \begin{macrocode} +\newcommand*{\jmlrtitlehook}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlr@title} +%\changes{1.20}{2014/10/15}{new} +% AUX command provided for MakeJmlrBookGUI +% \begin{macrocode} +\newcommand*{\jmlr@title}[2]{} +% \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{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}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrauthorhook} +% \begin{macrocode} +\newcommand*{\jmlrauthorhook}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlr@author} +%\changes{1.20}{2014/10/15}{new} +% AUX command provided for MakeJmlrBookGUI +% \begin{macrocode} +\newcommand*{\jmlr@author}[2]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@shortauthor} +% \begin{macrocode} +\newcommand*{\@shortauthor}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@firstauthor} +% \begin{macrocode} +\newcommand*{\@firstauthor}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@firstsurname} +% \begin{macrocode} +\newcommand*{\@firstsurname}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\jmlrlength} +% \begin{macrocode} +\newlength\jmlrlength +% \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{macrocode} + \def\footnoteseptext{ }% + \def\thempfn{\textsuperscript{\thefootnote}}% + \def\thefootnote{\fnsymbol{footnote}}% +% \end{macrocode} +%\changes{1.07}{2010-06-30}{added check for two column mode} +% \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{ \& }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\jmlrmaketitlehook} +% \begin{macrocode} +\newcommand*{\jmlrmaketitlehook}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrpremaketitlehook} +% \begin{macrocode} +\newcommand*{\jmlrpremaketitlehook}{} +% \end{macrocode} +%\end{macro} +% +% Provide a different title layout for HTML +%\begin{macro}{\jmlrhtmlmaketitle} +% \begin{macrocode} +\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}{\jmlrbox} +% Define a save box +% \begin{macrocode} +\newsavebox\jmlrbox +% \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{macrocode} +\ifjmlrhtml + \let\maketitle\jmlrhtmlmaketitle +\else + \let\maketitle\jmlrmaketitle +\fi +% \end{macrocode} +%\end{macro} +% +% Author and editor information. +% \begin{macrocode} +\def\@startauthor{\noindent \normalsize\bfseries} +\def\@endauthor{} +\def\@starteditor{\noindent \small {\bfseries \@edname:~}} +\def\@endeditor{\normalsize} +% \end{macrocode} +% Provide hooks to make it easier to adapted with \cls{combine} +% class. +%\begin{macro}{\jmlrpretitle} +% \begin{macrocode} +\def\jmlrpretitle{\vskip\beforetitskip\begin{center}\Large\bfseries} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrposttitle} +% \begin{macrocode} +\def\jmlrposttitle{\par\end{center}\vskip\aftertitskip} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\nametag} +%\changes{1.09}{2010/12/01}{new} +% \begin{macrocode} +\newcommand*{\nametag}[1]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrpreauthor} +%\changes{1.09}{2010/12/01}{added \cs{nametag}} +% \begin{macrocode} +\def\jmlrpreauthor{% +\bgroup + \def\nametag##1{##1}% + \def\and{\unskip\enspace{\normalfont and}\enspace}% +% \end{macrocode} +%\changes{1.10}{2011-01-05}{added \cs{mdseries} to \cs{addr}} +% \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 +} +% \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} +% \begin{macrocode} +\newcommand{\addr}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@email} +% \begin{macrocode} +\def\@email{\hfill\small\mdseries\scshape}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@name} +% \begin{macrocode} +\def\@name{\normalsize\upshape\bfseries}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@parsename} +% Parse a name. Appends forename to \cs{@forenames} and stores +% surname in \cs{@surname}. +% \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{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@getinitial} +% \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 +} +% \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} +% \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% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\jmlrabbrnamelist} +%\changes{1.11}{2011-03-24}{new} +% Display list of names in abbreviated form. (Mainly designed for use with +% makejmlrbook for the preface authors.) The author should be +% grouped if the name contains a comma. +% \begin{macrocode} +\newcommand*{\jmlrabbrnamelist}[1]{% + \def\nametag##1{}% + \def\@jmlr@authors@sep{, }% + \def\@jmlr@namelist{}% + \@for\@thisname:=#1\do{% + \expandafter\@jmlrabbrname\expandafter{\@thisname}% + \ifx\@jmlr@namelist\@empty + \protected@edef\@jmlr@namelist{% + \@initials\space\@surname + }% + \else + \protected@edef\@jmlr@namelist{% + \@jmlr@namelist + \noexpand\@jmlr@authors@sep + \@initials\space\@surname + }% + \fi + }% + \def\@jmlr@authors@sep{ \& }% + \@jmlr@namelist +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@jmlrabbrname} +% \begin{macrocode} +\newcommand*{\@jmlrabbrname}[1]{% + \def\@initials{}% + \def\@surname{}% + \def\@forenames{}% + \@parsename#1 \@nil\end@parsename +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Email} +% \begin{macrocode} +\newcommand*{\Email}[1]{{\@email #1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrpostauthor} +% \begin{macrocode} +\def\jmlrpostauthor{\@endauthor\egroup + \par + \vskip \aftermaketitskip + \noindent + \ifx\@editor\@empty + \else + \@starteditor \@editor \@endeditor + \fi + \vskip \aftermaketitskip +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@jmlrmaketitle} +% \begin{macrocode} +\def\@jmlrmaketitle{\vbox{\hsize\textwidth + \linewidth\hsize + \jmlrpretitle + {% + \def\titletag##1{##1}% + \@title + }% + \jmlrposttitle + \jmlrpreauthor \@author \jmlrpostauthor +}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\kernelmachines} +% Convenience command +% \begin{macrocode} +\newcommand*\kernelmachines{(for + {\textsc{http://www.kernel-machines.org}})} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\editorname} +% Label for the editor +% \begin{macrocode} +\newcommand*{\editorname}{Editor} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\editorsname} +% Label for the editor +% \begin{macrocode} +\newcommand*{\editorsname}{Editors} +% \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} +% \begin{macrocode} +\let\@edname\editorname +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@editor} +% The editor or editors are stored in \cs{@editor} +% \begin{macrocode} +\def\@editor{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\editor} +% A single editor +% \begin{macrocode} +\def\editor#1{% + \global\let\@edname\editorname + \gdef\@editor{#1}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\editors} +% Multiple editors +% \begin{macrocode} +\def\editors#1{% + \global\let\@edname\editorsname + \gdef\@editor{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\subsection{Pagestyles} +% This is taken from jmlr2e.sty +% +%\begin{macro}{\firstpageno} +% Set the page counter. +% \begin{macrocode} +\def\firstpageno#1{\setcounter{page}{#1}} +% \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{macrocode} +\@ifundefined{startpage}{}{\firstpageno{\startpage}} +% \end{macrocode} +%\end{macro} +% +% Label end page. +%\begin{macro}{\@jmlrenddoc} +% Label end page +% \begin{macrocode} +\newcommand*{\@jmlrenddoc}{% + \phantomsection + \protected@edef\@currentlabelname{end of \@shorttitle}% + \label{jmlrend}\null + \global\let\@reprint\@empty +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@titlefoot} +%\changes{1.09}{2010/12/01}{added \cs{@reprint}} +% \begin{macrocode} +\newcommand*{\@titlefoot}{\scriptsize\copyright\space\@jmlryear + \space\@jmlr@authors.\hfill + \@reprint +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\reprint} +%\changes{1.09}{2010/12/01}{new} +% \begin{macrocode} +\let\@reprint\@empty +\newcommand{\reprint}[1]{% + \gdef\@reprint{Reprinted with permission for JMLR#1}} +% \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 +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ps@jmlrps} +% Page style for subsequent pages +% \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}% +}% +% \end{macrocode} +% Set the page style: +% \begin{macrocode} +\pagestyle{jmlrps} +% \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}} +% \begin{macrocode} +\providecommand*{\@jmlrvolume}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrvolume} +% \begin{macrocode} +\newcommand*{\jmlrvolume}[1]{\renewcommand*{\@jmlrvolume}{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@jmlrissue} +% The issue number: +% \begin{macrocode} +\providecommand*{\@jmlrissue}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrissue} +% \begin{macrocode} +\newcommand*{\jmlrissue}[1]{\renewcommand*{\@jmlrissue}{#1}} +% \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{macrocode} +\providecommand*{\@jmlryear}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlryear} +% \begin{macrocode} +\newcommand*{\jmlryear}[1]{\renewcommand*{\@jmlryear}{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@jmlrpages} +% The page range: +%\changes{1.17}{2012/05/30}{changed initial definition to use +%\cs{providecommand}} +% \begin{macrocode} +\providecommand*\@jmlrpages{\pageref{jmlrstart}--\pageref{jmlrend}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrpages} +% \begin{macrocode} +\newcommand*{\jmlrpages}[1]{\renewcommand*{\@jmlrpages}{#1}} +% \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}} +% \begin{macrocode} +\providecommand*\@jmlrsubmitted{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrsubmitted} +% \begin{macrocode} +\newcommand*{\jmlrsubmitted}[1]{\renewcommand*{\@jmlrsubmitted}{#1}} +% \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{macrocode} +\providecommand*\@jmlrpublished{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrpublished} +% \begin{macrocode} +\newcommand*{\jmlrpublished}[1]{\renewcommand*{\@jmlrpublished}{#1}} +% \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}} +% \begin{macrocode} +\providecommand*\@jmlrworkshop{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrworkshop} +% \begin{macrocode} +\newcommand*{\jmlrworkshop}[1]{% + \renewcommand*{\@jmlrworkshop}{#1}% + \protected@write\@auxout{}{\string\jmlr@workshop{#1}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlr@workshop} +%\changes{1.20}{2014/10/15}{new} +% \begin{macrocode} +\newcommand*{\jmlr@workshop}[1]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\date} +% \begin{macrocode} +\renewcommand*{\date}[1]{% + \renewcommand*{\@date}{#1}% + \protected@write\@auxout{}{\string\jmlr@date{#1}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlr@date} +%\changes{1.20}{2014/10/15}{new} +% \begin{macrocode} +\newcommand*{\jmlr@date}[1]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@jmlrauthors} +% \begin{macrocode} +\newcommand*{\@jmlrauthors}{} +% \end{macrocode} +%\end{macro} +%\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} +\newcommand*{\jmlrauthors}[1]{\global\def\@jmlr@authors{#1}} +% \end{macrocode} +%\end{macro} +% +% +%\subsection{Miscellany} +% This code was taken from jmlr2e.sty. + +% Define macros for figure captions and table titles +% \begin{macrocode} +\def\figurecaption#1#2{\noindent\hangindent 40pt + \hbox to 36pt {\small\slshape #1 \hfil} + \ignorespaces {\small #2}} +% \end{macrocode} +% Figurecenter prints the caption title centered. +% \begin{macrocode} +\def\figurecenter#1#2{\centerline{{\slshape #1} #2}} +\def\figurecenter#1#2{\centerline{{\small\slshape #1} {\small #2}}} +% \end{macrocode} +% +% Allow ``hanging indents'' in long captions +% +%\begin{macro}{\@makecaption} +% \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} +% \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} +% Acknowledgements +% \begin{macrocode} +\newcommand{\acks}[1]{\section*{Acknowledgments}#1} +% \end{macrocode} +%\end{macro} +% Research Note +%\begin{macro}{\researchnote} +% \begin{macrocode} +\newcommand{\researchnote}[1]{\noindent {\LARGE\itshape Research Note} #1} +% \end{macrocode} +%\end{macro} +% +%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} +\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 + \@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 + \endgroup} +\fi +% \end{macrocode} +% +%\begin{macro}{\artappendix} +% Switch to appendices in an article +% \begin{macrocode} +\newcommand{\artappendix}{\par + \setcounter{section}{0} + \setcounter{subsection}{0} + \def\thesection{\Alph{section}} +% \end{macrocode} +%\changes{1.12}{2012/01/05}{added chapter to \cs{theHsection} to ensure unique +%hyperlink names in book} +% \begin{macrocode} + \def\theHsection{\theHchapter.\Alph{section}} + \def\presectionnum{Appendix~}% +} +% \end{macrocode} +%\end{macro} +% The default assumes a stand-alone article. +%\begin{macro}{\appendix} +% \begin{macrocode} +\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} +% +%\subsection{Compatibility with combine.cls} +% +% Define chapters to make this class play nicely with \cls{combine}. +% These definitions are just copied from book.cls +% \begin{macrocode} +\newcounter{chapter} +\renewcommand\thechapter{\@arabic\c@chapter} +\newcommand\@chapapp{\chaptername} +% \end{macrocode} +% Add sections to the chapter reset. +% \begin{macrocode} +\@addtoreset{section}{chapter} +% \end{macrocode} +%\begin{macro}{\chaptermark} +% \begin{macrocode} +\newcommand*\chaptermark[1]{} +% \end{macrocode} +%\end{macro} +% Chapters should only be defined when we're combining documents +% into a book. +%\begin{macro}{\bookchapter} +% \begin{macrocode} +\newcommand\bookchapter{% + \if@openright\cleardoublepage\else\clearpage\fi + \thispagestyle{plain}% + \global\@topnum\z@ + \@afterindentfalse + \secdef\@chapter\@schapter} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\artchapter} +% Disable chapters for articles. +% \begin{macrocode} +\newcommand\artchapter{% + \ClassError{jmlr}{Chapters not permitted in articles}{}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\chapter} +% The default assumes a stand-alone document. +% \begin{macrocode} +\let\chapter\artchapter +% \end{macrocode} +%\end{macro} +% Label for the chapter entries in the toc. +% \begin{macrocode} +\def\@chaptoclabel{chapter} +% \end{macrocode} +%\begin{macro}{\@chapter} +% Numbered chapters +% \begin{macrocode} +\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \if@mainmatter + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{\@chaptoclabel}% + {\protect\numberline{\thechapter}#1}% + \else + \addcontentsline{toc}{\@chaptoclabel}{#1}% + \fi + \else + \addcontentsline{toc}{\@chaptoclabel}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\chaptertitleformat} +% Formats the chapter title +% \begin{macrocode} +\newcommand{\chaptertitleformat}[1]{% + \Huge\bfseries#1% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\chapternumberformat} +% Formats the chapter number +% \begin{macrocode} +\newcommand{\chapternumberformat}[1]{% + \huge\bfseries \@chapapp\space#1\par\nobreak + \vskip 20\p@ +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\chapterformat} +% Overall format for chapter headings +% \begin{macrocode} +\newcommand*{\chapterformat}{\raggedright} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\postchapterskip} +% Vertical gap after chapter heading +% \begin{macrocode} +\newlength\postchapterskip +\setlength\postchapterskip{40pt} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\prechapterskip} +% Vertical gap before chapter heading +% \begin{macrocode} +\newlength\prechapterskip +\setlength\prechapterskip{50pt} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@makechapterhead} +% Chapter heading for numbered chapters +% \begin{macrocode} +\def\@makechapterhead#1{% + \null\vskip\prechapterskip + {\parindent \z@ \normalfont\chapterformat + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \chapternumberformat{\thechapter}% + \fi + \fi + \interlinepenalty\@M + \chaptertitleformat{#1}\par\nobreak + \vskip \postchapterskip + }} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@schapter} +% Unnumbered chapters. +% \begin{macrocode} +\def\@schapter#1{\if@twocolumn + \@topnewpage[\@makeschapterhead{#1}]% + \else + \@makeschapterhead{#1}% + \@afterheading + \fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@makeschapterhead} +% Layout for unnumbered chapter headings +% \begin{macrocode} +\def\@makeschapterhead#1{% + \vspace*{\prechapterskip}% + {\parindent \z@ + \normalfont\chapterformat + \interlinepenalty\@M + \chaptertitleformat{#1}\par\nobreak + \vskip \postchapterskip + }} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\l@chapter} +% Format for chapter entry in toc +% \begin{macrocode} +\newcommand*\l@chapter[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + \setlength\@tempdima{1.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \large\bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \penalty\@highpenalty + \endgroup + \fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\l@appendix} +% Make appendix entries in the toc the same as that for chapters +% by default +% \begin{macrocode} +\let\l@appendix\l@chapter +% \end{macrocode} +%\end{macro} +%\begin{macro}{\chaptername} +% \begin{macrocode} +\newcommand\chaptername{Chapter} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\frontmatter} +% Start the front matter (in book) +% \begin{macrocode} +\newcommand\frontmatter{% + \cleardoublepage + \@mainmatterfalse + \renewcommand*{\theHchapter}{front-\thechapter}% + \pagenumbering{roman}% + \morefrontmatter +} +\newcommand\morefrontmatter{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\mainmatter} +% Start the main matter (in book) +% \begin{macrocode} +\newcommand\mainmatter{% + \cleardoublepage + \@mainmattertrue + \setcounter{chapter}{0}% + \renewcommand*{\theHchapter}{\thechapter}% + \pagenumbering{arabic}% + \moremainmatter +} +\newcommand\moremainmatter{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\backmatter} +% Start the back matter (in book) +% \begin{macrocode} +\newcommand\backmatter{% + \if@openright + \cleardoublepage + \else + \clearpage + \fi + \@mainmatterfalse} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\booktocpreamble} +%\changes{1.09}{2010/12/01}{new} +% \begin{macrocode} +\newcommand*{\booktocpreamble}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\booktocpostamble} +%\changes{1.14}{2012-04-24}{new} +% \begin{macrocode} +\newcommand*{\booktocpostamble}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\booktableofcontents} +% This is for the main table of contents when using +% the combine class file, and is not for use in individual +% articles. +%\changes{1.14}{2012-04-24}{reset page headers at end of toc} +% \begin{macrocode} +\newcommand\booktableofcontents{% + \if@twocolumn + \@restonecoltrue\onecolumn + \else + \@restonecolfalse + \fi + \chapter*{\contentsname + \@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% + \booktocpreamble + \@starttoc{toc}% + \booktocpostamble + \if@restonecol + \twocolumn + \else + \clearpage + \fi + \@mkboth{}{}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\arttableofcontents} +% Table of contents for individual articles. +% \begin{macrocode} +\let\arttableofcontents\tableofcontents +% \end{macrocode} +%\end{macro} +%\begin{macro}{\artpart} +% A part in an article +% \begin{macrocode} +\newcommand{\artpart}{% +% \end{macrocode} +%\changes{1.10}{2011-01-05}{set \cs{toclevel@part}} +% \begin{macrocode} + \def\toclevel@part{0}% + \if@noskipsec \leavevmode\fi + \par + \addvspace{4ex}% + \@afterindentfalse + \secdef\@artpart\@sartpart +} +\let\@artpart\@part +\let\@sartpart\@spart +% \end{macrocode} +%\end{macro} +%\begin{macro}{\bookpart} +% A part in a book forming a collection of articles +% \begin{macrocode} +\newcommand\bookpart{% +% \end{macrocode} +%\changes{1.10}{2011-01-05}{set \cs{toclevel@part}} +% \begin{macrocode} + \def\toclevel@part{-1}% + \if@openright + \cleardoublepage + \else + \clearpage + \fi + \thispagestyle{plain}% + \if@twocolumn + \onecolumn + \@tempswatrue + \else + \@tempswafalse + \fi + \preparthook + \secdef\@bookpart\@sbookpart} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\parttitleformat} +% Format of the title for a part (in a book) +% \begin{macrocode} +\newcommand{\parttitleformat}[1]{% + \Huge\bfseries#1% +} +% \end{macrocode} +%\end{macro} +% +% Part labels +% \begin{macrocode} +\newcommand*{\@parttoclabel}{part} +% \end{macrocode} +% +%\begin{macro}{\@partapp} +%\changes{1.09}{2010/12/01}{new} +% \begin{macrocode} +\def\@partapp{\partname} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\partnumberformat} +% Format of the part number (in a book) +% \begin{macrocode} +\newcommand{\partnumberformat}[1]{% + \Huge\bfseries \@partapp\nobreakspace#1\par\nobreak + \vskip 20\p@ +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\preparthook} +% Hook at the start of a part (in a book) +% \begin{macrocode} +\newcommand{\preparthook}{\null\vfil} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\partformat} +% Overall format of part +% \begin{macrocode} +\newcommand*{\partformat}{\centering} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@bookpart} +% Numbered book part format +% \begin{macrocode} +\def\@bookpart[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{\@parttoclabel}{\protect\numberline{\thepart}#1}% + \else + \addcontentsline{toc}{\@parttoclabel}{#1}% + \fi + \markboth{}{}% + {\interlinepenalty \@M + \normalfont\partformat + \ifnum \c@secnumdepth >-2\relax + \partnumberformat{\thepart}% + \fi + \parttitleformat{#2}\par}% + \postparthook} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@sbookpart} +% Unnumbered book part format +% \begin{macrocode} +\def\@sbookpart#1{% + {\interlinepenalty \@M + \normalfont\partformat + \parttitleformat{#1}\par}% + \postparthook} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\postparthook} +% Hook after part heading +% \begin{macrocode} +\def\postparthook{\vfil\newpage + \if@twoside + \if@openright + \null + \thispagestyle{empty}% + \newpage + \fi + \fi + \if@tempswa + \twocolumn + \fi} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\bookappendix} +% Switch to appendices in book +%\changes{1.17}{2012/05/30}{added def \cs{@write@jmlr@import}} +% \begin{macrocode} +\newcommand\bookappendix{\par + \setcounter{table}{0}% + \setcounter{figure}{0}% + \zeroextracounters + \par + \gdef\theHchapter{\Alph {chapter}}% + \xdef\Hy@chapapp{\Hy@appendixstring}% + \setcounter{chapter}{0}% + \setcounter{section}{0}% + \gdef\@chapapp{\appendixname}% + \gdef\thechapter{\@Alph\c@chapter}% + \def\@write@jmlr@import{\@@write@jmlr@apdimport}% + \csname appendixmore\endcsname +} +% \end{macrocode} +%\end{macro} +% Define commands to switch between book/article modes +%\begin{macro}{\jmlrbookcommands} +% Switch to book commands +% \begin{macrocode} +\newcommand*{\jmlrbookcommands}{% + \let\part\bookpart + \let\chapter\bookchapter + \let\appendix\bookappendix + \let\tableofcontents\booktableofcontents + \def\thesection{\thechapter.\arabic{section}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlarticlecommands} +% Switch to article commands +% \begin{macrocode} +\newcommand*{\jmlrarticlecommands}{% + \let\part\artpart + \let\chapter\artchapter + \let\appendix\artappendix + \let\tableofcontents\arttableofcontents + \def\thesection{\arabic{section}}% +} +% \end{macrocode} +%\end{macro} +% Check for packages that are known to cause problems when +% combining articles into a book. +%\begin{macro}{\@jmlr@check@packages} +% \begin{macrocode} +\newcommand*{\@jmlr@check@packages}{% + \@ifpackageloaded{epsfig}{% + \ClassError{jmlr}{Obsolete package `epsfig' detected. + \MessageBreak + Please use \string\includegraphics\space to include images + instead}{}}{}% + \@ifpackageloaded{psfig}{% + \ClassError{jmlr}{Obsolete package `psfig' detected. + \MessageBreak + Please use \string\includegraphics\space to include images + instead}{}}{}% + \@ifpackageloaded{subfig}{% + \ClassError{jmlr}{Package `subfig' detected.\MessageBreak + This will cause a conflict if the article is incorporated + \MessageBreak + into a book using jmlbook.cls. + \MessageBreak + Please use \string\subfigure\space and + \string\subtable\space instead}{}}{}% + \@ifpackageloaded{theorem}{% + \ClassError{jmlr}{Package `theorem' detected.\MessageBreak + This can cause a conflict with other packages used by jmlr}{}}{}% + \@ifpackageloaded{ntheorem}{% + \ClassError{jmlr}{Package `ntheorem' detected.\MessageBreak + This can cause a conflict with other packages used by jmlr}{}}{}% + \@ifpackageloaded{amsthm}{% + \ClassError{jmlr}{Package `amsthm' detected.\MessageBreak + This package conflicts with the jmlr class}{}}{}% + \@ifpackageloaded{pdfpages}{Package `pdfpages' detected.\MessageBreak + This can cause a problem for jmlrbook}{}% + \@ifpackageloaded{geometry}{Package `geometry' detected.\MessageBreak + This can cause a problem for jmlrbook}{}% + \@ifpackageloaded{tabularx}{% + \ClassError{jmlr}{Package `tabularx' detected.\MessageBreak + This will break footnote links}{}}{}% +% \end{macrocode} +%\changes{1.21}{2015-02-24}{Added check for jmlr2e package} +% \begin{macrocode} + \@ifpackageloaded{jmlr2e}{% + \ClassError{jmlr}{Package `jmlr2e' detected.\MessageBreak + This can't be used with the jmlr class}{}}{}% +} +\AtBeginDocument{% +\@jmlr@check@packages +\let\@jmlr@check@packages\relax +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrSuppressPackageChecks} +% Don't check for potentially problematic packages. +% (If I find this in any paper sent to me for inclusion in a book, +% it will annoy me.) +% \begin{macrocode} +\newcommand*{\jmlrSuppressPackageChecks}{% + \let\@jmlr@check@packages\relax +} +% \end{macrocode} +%\end{macro} +% Discourage authors from using obsolete commands: +%\begin{macro}{\obsoletefontcs} +% \begin{macrocode} +\DeclareRobustCommand*{\obsoletefontcs}[1]{% + \ClassWarning{jmlr}{Obsolete command + \expandafter\string\csname#1\endcsname\space detected}% + \csname #1 \endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\bf} +%\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning} +% \begin{macrocode} +\renewcommand*{\bf}{% + \obsoletefontcs{bf}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\it} +%\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning} +% \begin{macrocode} +\renewcommand*{\it}{% + \obsoletefontcs{it}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\sc} +%\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning} +% \begin{macrocode} +\renewcommand*{\sc}{% + \obsoletefontcs{sc}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\rm} +%\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning} +% \begin{macrocode} +\renewcommand*{\rm}{% + \obsoletefontcs{rm}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\sf} +%\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning} +% \begin{macrocode} +\renewcommand*{\sf}{% + \obsoletefontcs{sf}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\tt} +%\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning} +% \begin{macrocode} +\renewcommand*{\tt}{% + \obsoletefontcs{tt}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\jmlrcheckforpseudocode} +%\changes{1.21}{2015-02-24}{Added check for pseudocode package} +% Check for \sty{pseudocode} package since it conflicts with +% the \sty{algorithm} package and quite often both packages +% are used in the same book or proceedings. +% \begin{macrocode} +\providecommand*{\jmlrcheckforpseudocode}{% + \@ifpackageloaded{pseudocode}% + {% + \let\pseudoRETURN\RETURN + \let\pseudoTRUE\TRUE + \let\pseudoFALSE\FALSE + \let\pseudoAND\AND + \let\pseudoOR\OR + \let\pseudoNOT\NOT + \let\pseudoTO\TO + \let\pseudoCOMMENT\COMMENT + \let\pseudoIF\IF + \let\pseudoELSE\ELSE + \let\pseudoFOR\FOR + \let\pseudoFORALL\FORALL + \let\pseudoWHILE\WHILE + \let\pseudoREPEAT\REPEAT + \let\pseudoUNTIL\UNTIL + \let\pseudoENDFOR\ENDFOR + \let\RETURN\undefined + \let\TRUE\undefined + \let\FALSE\undefined + \let\AND\undefined + \let\OR\undefined + \let\NOT\undefined + \let\TO\undefined + \let\COMMENT\undefined + \let\IF\undefined + \let\ELSE\undefined + \let\FOR\undefined + \let\FORALL\undefined + \let\WHILE\undefined + \let\REPEAT\undefined + \let\UNTIL\undefined + \let\ENDFOR\undefined + \preto\pseudocode{% + \let\RETURN\pseudoRETURN + \let\TRUE\pseudoTRUE + \let\FALSE\pseudoFALSE + \let\AND\pseudoAND + \let\OR\pseudoOR + \let\NOT\pseudoNOT + \let\TO\pseudoTO + \let\COMMENT\pseudoCOMMENT + \let\IF\pseudoIF + \let\ELSE\pseudoELSE + \let\FOR\pseudoFOR + \let\FORALL\pseudoFORALL + \let\WHILE\pseudoWHILE + \let\REPEAT\pseudoREPEAT + \let\UNTIL\pseudoUNTIL + \let\ENDFOR\pseudoENDFOR + }% + }% + {}% +} +\jmlrcheckforpseudocode +% \end{macrocode} +%\end{macro} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*jmlrbook.cls> +% \end{macrocode} +%\fi +%\section{jmlrbook.cls Code} +% Class file for books composed of articles using the \clsfmt{jmlr} class. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +% \end{macrocode} +% Declare class: +% \begin{macrocode} +\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} +\RequirePackage{xkeyval} +% \end{macrocode} +% Requires double spacing for the title page +% \begin{macrocode} +\RequirePackage{setspace} +% \end{macrocode} +% +% Path used to determine if the preface is in the main +% document or in a separate file. +%\begin{macro}{\jmlrprefacefile} +%\changes{1.20}{2014/10/15}{new} +% \begin{macrocode} +\newcommand*\jmlrprefacepath{} +% \end{macrocode} +%\end{macro} +% The \sty{fink} package is now deprecated, so only use it if +% \sty{currfile} isn't installed. +% \begin{macrocode} +\IfFileExists{currfile.sty}% +{ + \RequirePackage{currfile} + \renewcommand*\jmlrprefacepath{\currfilepath} +}% +{% +% \end{macrocode} +%\changes{1.11}{2011-03-24}{fink package now required} +% \begin{macrocode} + \RequirePackage{fink} + \ifdef\finkpath + {% + \renewcommand*\jmlrprefacepath{\finkpath}% + } + {% +% \end{macrocode} +% \sty{fink} version too old. +% \begin{macrocode} + \ClassWarning{jmlrbook}{Install `currfile' package or update + `fink' package} + } +} +% \end{macrocode} +% Some packages need to be loaded before \sty{hyperref} so provide a +% hook to do this: +%\changes{1.12}{2012/01/05}{changed \cs{newcommand} to \cs{providecommand}} +% \begin{macrocode} +\providecommand*{\jmlrprehyperref}{} +% \end{macrocode} +%\begin{macro}{\ifgrayscale} +% Determine whether to select color or grayscale +% \begin{macrocode} +\newif\ifgrayscale +\grayscalefalse +% \end{macrocode} +%\end{macro} +%\begin{option}{draft} +%\changes{1.18}{2013-10-17}{new} +% \begin{macrocode} +\DeclareOptionX{draft}{\setlength\overfullrule{5pt}} +% \end{macrocode} +%\end{option} +%\begin{option}{final} +%\changes{1.18}{2013-10-17}{new} +% \begin{macrocode} +\DeclareOptionX{final}{\setlength\overfullrule{0pt}} +% \end{macrocode} +%\end{option} +%\begin{option}{color} +% \begin{macrocode} +\DeclareOptionX{color}{\grayscalefalse} +% \end{macrocode} +%\end{option} +%\begin{option}{gray} +% \begin{macrocode} +\DeclareOptionX{gray}{\grayscaletrue} +% \end{macrocode} +%\end{option} +% Pass \clsopt{letterpaper} and \clsopt{7x10} to \clsfmt{jmlr}. +%\begin{option}{letterpaper} +% \begin{macrocode} +\DeclareOptionX{letterpaper}{\PassOptionsToClass{\CurrentOption}{jmlr}} +% \end{macrocode} +%\end{option} +%\begin{option}{7x10} +% \begin{macrocode} +\DeclareOptionX{7x10}{\PassOptionsToClass{\CurrentOption}{jmlr}} +% \end{macrocode} +%\end{option} +% Pass \clsopt{html} and \clsopt{nohtml} to \clsfmt{jmlr}. +% (Used by \app{makejmlrbookgui}) +%\begin{option}{html} +% \begin{macrocode} +\DeclareOptionX{html}{\PassOptionsToClass{\CurrentOption}{jmlr}} +% \end{macrocode} +%\end{option} +%\begin{option}{nohtml} +% \begin{macrocode} +\DeclareOptionX{nohtml}{\PassOptionsToClass{\CurrentOption}{jmlr}} +% \end{macrocode} +%\end{option} +%\begin{macro}{\jmlrprefaceheader} +%\changes{1.20}{2014/10/15}{new} +% \begin{macrocode} +\newcommand*{\jmlrprefaceheader}{% + \phantomsection + \chapter*{\prefacename}% + \addcontentsline{toc}{chapter}{\prefacename}% + \markboth{\prefacename}{\prefacename}% +} +% \end{macrocode} +%\end{macro} +% Pass \clsopt{wcp}, \clsopt{pmlr} and \clsopt{nowcp} options to \clsfmt{jmlr} and +% set preface header. +%\begin{option}{wcp} +%\changes{1.21}{2015-02-24}{No longer changes preface header} +% \begin{macrocode} +\DeclareOptionX{wcp}{% + \PassOptionsToClass{\CurrentOption}{jmlr}% +} +% \end{macrocode} +%\end{option} +%\begin{option}{pmlr} +%\changes{1.23}{2017-03-09}{new} +% \begin{macrocode} +\DeclareOptionX{pmlr}{% + \PassOptionsToClass{\CurrentOption}{jmlr}% +} +% \end{macrocode} +%\end{option} +%\begin{option}{nowcp} +%\changes{1.21}{2015-02-24}{No longer changes preface header} +% \begin{macrocode} +\DeclareOptionX{nowcp}{% + \PassOptionsToClass{\CurrentOption}{jmlr}% +} +% \end{macrocode} +%\end{option} +% Pass \clsopt{tablecaptiontop} and \clsopt{tablecaptionbottom} options +% to \clsfmt{jmlr}. +%\begin{option}{tablecaptiontop} +% \begin{macrocode} +\DeclareOptionX{tablecaptiontop}{\PassOptionsToClass{\CurrentOption}{jmlr}} +% \end{macrocode} +%\end{option} +%\begin{option}{tablecaptionbottom} +% \begin{macrocode} +\DeclareOptionX{tablecaptionbottom}{\PassOptionsToClass{\CurrentOption}{jmlr}} +% \end{macrocode} +%\end{option} +% +% Pass font size commands to \clsfmt{jmlr} +%\changes{1.10}{2011-01-05}{Added 10pt, 11pt and 12pt options to +%jmlrbook} +%\begin{option}{10pt} +% \begin{macrocode} +\DeclareOptionX{10pt}{\PassOptionsToClass{\CurrentOption}{jmlr}} +% \end{macrocode} +%\end{option} +%\begin{option}{11pt} +% \begin{macrocode} +\DeclareOptionX{11pt}{\PassOptionsToClass{\CurrentOption}{jmlr}} +% \end{macrocode} +%\end{option} +%\begin{option}{12pt} +% \begin{macrocode} +\DeclareOptionX{12pt}{\PassOptionsToClass{\CurrentOption}{jmlr}} +% \end{macrocode} +%\end{option} +% +% Switch on two-side mode by default +% \begin{macrocode} +\@twosidetrue +% \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} +% +%\begin{option}{pdfxa} +%\changes{1.13}{2012/02/25}{new} +% \begin{macrocode} +\define@boolkey{jmlrbook.cls}[jmlr]{pdfxa}[true]{} +\jmlrpdfxafalse +% \end{macrocode} +%\end{option} +% Process options +% \begin{macrocode} +\ProcessOptionsX +% \end{macrocode} +% If \ics{jmlrgrayscale} has been defined, let it override the +% class options. If it is defined, it should be set to 0 for the +% online version and any other number for the grayscale print +% version. +% \begin{macrocode} +\@ifundefined{jmlrgrayscale}{}% +{% + \ifnum\jmlrgrayscale=0\relax + \grayscalefalse + \else + \grayscaletrue + \fi +} +% \end{macrocode} +% +% This next bit is a modification of \sty{pdfx}. It's only used for +% the print version when the \clsopt{pdfxa} option is used. +%\changes{1.13}{2012/02/25}{added support for pdfx-1a} +% \begin{macrocode} +\ifgrayscale + \newcommand*{\jmlrwritepdfinfo}{% + \protected@write\@auxout{}{\string\jmlrbook@info{\xmpAuthor}{\xmpTitle}}% + } + \ifjmlrpdfxa + \def\convertDate{\getYear} + {\catcode`\D=12 + \gdef\getYear D:#1#2#3#4{\edef\xYear{#1#2#3#4}\getMonth} + } + \def\getMonth#1#2{\edef\xMonth{#1#2}\getDay} + \def\getDay#1#2{\edef\xDay{#1#2}\getHour} + \def\getHour#1#2{\edef\xHour{#1#2}\getMin} + \def\getMin#1#2{\edef\xMin{#1#2}\getSec} + \def\getSec#1#2{\edef\xSec{#1#2}\getTZh} + {% + \catcode`\Z=12 + \gdef\tmpz{Z} + } + \def\hash{\expandafter\@gobble\string\#}% + \def\amp{\expandafter\@gobble\string\&}% + \def\xmpAmp{\amp\hash x0026;}% + \def\sep{} + \def\TextCopyright{\amp\hash x00A9;} + \def\Title#1{\gdef\xmpTitle{#1}} + \def\Author#1{\gdef\xmpAuthor{#1}} + \def\Keywords#1{\gdef\xmpKeywords{#1}} + \let\xmpKeywords\@empty + \let\xmpSubject\xmpKeywords + \def\Creator#1{\gdef\xmpCreator{#1}} + \def\xmpCreator{\@pdfcreator} + \def\Producer#1{\gdef\xmpProducer{#1}} + \def\xmpProducer{pdfTeX} + \def\Volume#1{\gdef\xmpVolume{#1}} + \let\xmpVolume\@empty + \def\Issue#1{\gdef\xmpIssue{#1}} + \let\xmpIssue\@empty + \def\CoverDisplayDate#1{\gdef\xmpCoverDisplayDate{#1}} + \let\xmpCoverDisplayDate\@empty + \def\CoverDate#1{\gdef\xmpCoverDate{#1}} + \let\xmpCoverDate\@empty + \def\Copyright#1{\gdef\xmpCopyright{#1}} + \let\xmpCopyright\@empty + \def\Doi#1{\gdef\xmpDoi{#1}} + \let\xmpDoi\@empty + \def\Lastpage#1{\gdef\xmpLastpage{#1}} + \let\xmpLastpage\@empty + \def\Firstpage#1{\gdef\xmpFirstpage{#1}} + \let\xmpFirstpage\@empty + \def\Journaltitle#1{\gdef\xmpJournaltitle{#1}} + \let\xmpJournaltitle\@empty + \def\Journalnumber#1{\gdef\xmpJournalnumber{#1}} + \let\xmpJournalnumber\@empty + \def\Org#1{\gdef\xmpOrg{#1}} + \let\xmpOrg\@empty + \def\CreatorTool#1{\gdef\xmpCreatorTool{#1}} + \def\xmpCreatorTool{\xmpProducer} + \def\AuthoritativeDomain#1{\gdef\xmpAuthoritativeDomain{#1}} + \let\xmpAuthoritativeDomain\@empty + \def\findUUID#1{\edef\tmpstring{\pdfmdfivesum{#1}} + \expandafter\eightofnine\tmpstring\end} + \def\eightofnine#1#2#3#4#5#6#7#8#9\end{% + \xdef\eightchars{#1#2#3#4#5#6#7#8} + \fouroffive#9\end} + \def\fouroffive#1#2#3#4#5\end{\xdef\ffourchars{#1#2#3#4} + \sfouroffive#5\end} + \def\sfouroffive#1#2#3#4#5\end{\xdef\sfourchars{#1#2#3#4} + \tfouroffive#5\end} + \def\tfouroffive#1#2#3#4#5\end{\xdef\tfourchars{#1#2#3#4} + \xdef\laststring{#5}} + \def\uuid{\eightchars-% + \ffourchars-% + \sfourchars-% + \tfourchars-% + \laststring} +% \end{macrocode} +% +%\begin{macro}{\getTZh} +%\changes{1.14}{2012-04-24}{fixed for times zones other than Z} +% This is a modification of the command from \sty{pdfx} that also +% works for zero and negative hours. +% \begin{macrocode} + \def\getTZh#1{% + \def\TZprefix{#1}% + \ifx\TZprefix\tmpz + \def\xTZsign{+}% + \def\xTZh{00}% + \def\xTZm{00}% + \let\getTZnext\doConvDate + \else + \let\xTZsign\TZprefix + \let\getTZnext\getTZhm + \fi + \getTZnext + } +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\getTZm} +% This is a modified version of the command from \sty{pdfx}. +% \begin{macrocode} + \def\getTZhm#1#2'#3#4'{% + \edef\xTZh{#1#2}% + \edef\xTZm{#3#4}% + \doConvDate + } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\doConvDate} +% Defines the date using information derived from parsing +% \ics{pdfcreationdate} +% \begin{macrocode} + \def\doConvDate{% + \edef\convDate{\xYear-\xMonth-\xDay + T\xHour:\xMin:\xSec\xTZsign\xTZh:\xTZm}% + } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@pre@hyperref} +% This macro contains a trimmed down version of \sty{pdfx}. +% \begin{macrocode} + \newcommand{\@pre@hyperref}{% + \IfFileExists{FOGRA39L.icc}% + {% + \pdfminorversion=3 + \pdfpageattr{/MediaBox[0 0 595 793] + /BleedBox[0 0 595 793] + /TrimBox[25 20 570 773]}% + \findUUID{\jobname.pdf}% + \edef\xmpdocid{\uuid}% + \findUUID{\pdfcreationdate}% + \edef\xmpinstid{\uuid}% + \InputIfFileExists{\jobname.xmpdata}{}{}% + \RequirePackage{xmpincl}% + \expandafter\convertDate\pdfcreationdate + \def\@pctchar{\expandafter\@gobble\string\%} + \def\@bchar{\expandafter\@gobble\string\\} + \immediate\pdfobj stream attr{/N 4} file{FOGRA39L.icc} + \edef\OBJ@CVR{\the\pdflastobj} + \pdfcatalog{/OutputIntents [ << + /Type/OutputIntent + /S/GTS_PDFX + /OutputCondition (FOGRA39) + /OutputConditionIdentifier (FOGRA39 \@bchar(ISO Coated v2 + 300\@pctchar\space \@bchar(ECI\@bchar)\@bchar)) + /DestOutputProfile \OBJ@CVR\space 0 R + /RegistryName(http://www.color.org) + >> ]} + \input glyphtounicode.tex + \input glyphtounicode-cmr.tex + \pdfgentounicode=1 + \RequirePackage[draft,pdftex,pdfpagemode=UseNone,bookmarks=false]{hyperref}% + }% + {% + \ClassError{jmlrbook}{Can't find `FOGRA39L.icc'}% + {Download ISOcoated\string_v2\string_330\string_bas.icc from + http://www.colormanagement.org/en/isoprofile.html + Rename it FOGRA39L.icc and put it in the pdfx folder}% + }% + } + \renewcommand*{\jmlrwritepdfinfo}{% + \begingroup + \let\&=\xmpAmp + \IfFileExists{pdfx-1a.xmp}{% + \pdfcompresslevel=0 + \immediate\pdfobj stream attr {/Type /Metadata /Subtype /XML} + file{pdfx-1a.xmpi} + \pdfcatalog{/Metadata \the\pdflastobj\space 0 R} + }% + {}% + \endgroup + \protected@write\@auxout{}{\string\jmlrbook@info{\xmpAuthor}{\xmpTitle}}% + \pdfinfo{ + /Author(\xmpAuthor)% + /Title(\xmpTitle)% + /Creator(\xmpProducer)% + /CreationDate(\convDate)% + /ModDate(\convDate)% + /Producer(\xmpProducer)% + /Trapped /False + /GTS_PDFXVersion (PDF/X-1:2001)% + /GTS_PDFXConformance (PDF/X-1a:2001)% + }% + } +% \end{macrocode} +%\end{macro} +% \begin{macrocode} + \fi +\else + \newcommand*{\jmlrwritepdfinfo}{} +\fi +% \end{macrocode} +% +%\begin{macro}{\jmlrbook@info} +%\changes{1.14}{2012-04-24}{new} +% Not needed (information provided for MakeJmlrBookGUI) +% \begin{macrocode} +\newcommand*{\jmlrbook@info}[2]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrbook@location} +%\changes{1.20}{2014/10/15}{new} +% Not needed (information provided for MakeJmlrBookGUI) +% \begin{macrocode} +\newcommand*{\jmlrbook@location}[1]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@post@hyperref} +%\changes{1.16}{2012/05/15}{new} +% \begin{macrocode} +\newcommand*{\@post@hyperref}{% + \let\@org@c@lenddoca\c@lenddoca + \let\c@lenddoca\undefined +} +% \end{macrocode} +%\end{macro} +% +% Load \cls{combine} class. This requires a little bit of trickery. +% \begin{macrocode} +\let\@org@LoadClass\LoadClass +\def\LoadClass#1{\let\LoadClass\@org@LoadClass\@org@LoadClass{jmlr}} +\@org@LoadClass{combine} +\let\c@lenddoca\@org@c@lenddoca +% \end{macrocode} +% Requires \sty{combnat} to work with \sty{natbib}: +% \begin{macrocode} +\RequirePackage{combnat} +% \end{macrocode} +% Need to apply a patch to \sty{combnat} (this has now been fixed +% in \sty{combnat}, but user might be using an old version): +% \begin{macrocode} +\renewcommand\c@laNAT@parse[1]{{% + \let\protect=\@unexpandable@protect\let~\relax + \let\active@prefix=\@gobble + \xdef\NAT@temp{\csname b@#1\@extra@b@citeb\endcsname}}% + \expandafter\NAT@split\NAT@temp?????@@% + \expandafter\NAT@parse@date\NAT@date??????@@% + \ifciteindex\NAT@index\fi} + +\renewcommand\c@lbNAT@parse[1]{{% + \let\protect=\@unexpandable@protect\let~\relax + \let\active@prefix=\@gobble + \xdef\NAT@temp{\csname B?\jobname?@#1\@extra@b@citeb\endcsname}}% + \expandafter\NAT@split\NAT@temp?????@@% + \expandafter\NAT@parse@date\NAT@date??????@@% + \ifciteindex\NAT@index\fi} +% \end{macrocode} +% Start new chapters on the right hand page: +% \begin{macrocode} +\newif\if@openright +\@openrighttrue +\newif\if@mainmatter +% \end{macrocode} +% Define commands that affect the formatting: +%\begin{macro}{\pagerule} +% Draw line across the text block. +% \begin{macrocode} +\newcommand*{\pagerule}[1][0pt]{\par\noindent + \rule[#1]{\linewidth}{2pt}\par} +% \end{macrocode} +%\end{macro} +% +%\begin{environment}{preface} +% The preface environment starts a new chapter but also writes +% information to the main aux file for \app{makejmlrbook}. The +% optional argument is the file name for the extracted preface. +%\changes{1.11}{2011-03-24}{new} +%\changes{1.13}{2012/02/25}{changed the chapter to an unnumbered one} +% \begin{macrocode} +\ifjmlrhtml + \newenvironment{preface}[1][preface]% + {% + \noindent\HCode{

\prefacename

}% + }% + {% + } +\else + \newenvironment{preface}[1][preface]% + {% +% \end{macrocode} +%\changes{1.19}{2014/09/29}{changed to unstarred chapter} +% \begin{macrocode} + \jmlrprefaceheader + \protected@write\@mainauxout + {}{\string\@prefacestart{\thepage}{\arabic{page}}}% + \protected@write\@mainauxout{}{\string\@prefacefile{\jmlrprefacepath}{#1}}% + }% + {% + \protected@write\@mainauxout{}{\string\@prefaceend{\thepage}}% + } +\fi +% \end{macrocode} +%\end{environment} +%\begin{macro}{\prefacename} +%\changes{1.11}{2011-03-24}{new} +% \begin{macrocode} +\newcommand*{\prefacename}{Preface} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@prefacefile} +% \begin{macrocode} +\newcommand*{\@prefacefile}[2]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@prefacestart} +% \begin{macrocode} +\newcommand*{\@prefacestart}[2]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@prefaceend} +% \begin{macrocode} +\newcommand*{\@prefaceend}[1]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@prefaceeditor} +% \begin{macrocode} +\newcommand*{\@prefaceeditor}[1]{} +% \end{macrocode} +%\end{macro} +% +% Cross-reference chapters: +% \begin{macrocode} +\newcommand*{\chapterrefname}{Chapter} +\newcommand*{\chaptersrefname}{Chapters} +% \end{macrocode} +%\begin{macro}{\chapterref} +% \begin{macrocode} +\newcommand*{\chapterref}[1]{% + \objectref{#1}{\chapterrefname}{\chaptersrefname}{}{}} +% \end{macrocode} +%\end{macro} +% +% Cross-referencing imported articles: +%\begin{macro}{\articlepageref} +% Page number of start of article +% \begin{macrocode} +\newcommand*{\articlepageref}[1]{% + \pageref{#1jmlrstart}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\articlepagesref} +% Page range of article +% \begin{macrocode} +\newcommand*{\articlepagesref}[1]{% + \pageref{#1jmlrstart}--\pageref{#1jmlrend}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@articlepagesref} +% Page range of article for use within the article +% \begin{macrocode} +\newcommand*{\@articlepagesref}{% + \pageref{jmlrstart}--\pageref{jmlrend}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\articletitleref} +% Reference the short title of an imported article +% \begin{macrocode} +\newcommand*{\articletitleref}[1]{\nameref{#1jmlrstart}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\articleauthorref} +% Reference the authors of an imported article +% \begin{macrocode} +\newcommand*{\articleauthorref}[1]{% + \@ifundefined{@jmlr@author@#1}% + {% + \ClassWarning{jmlrbook}{Label `#1' undefined}% + }% + {% + \@nameuse{@jmlr@author@#1}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\jmlrtitlehook} +%\changes{1.20}{2014/10/15}{changed \cs{let} to \cs{def}} +% Extra title information +% \begin{macrocode} +\renewcommand*\jmlrtitlehook{% + \hypersetup{pdftitle={\@shorttitle}}% + \def\xmpTitle{\@shorttitle}% + \let\jmlrtitlehook\relax +} +\providecommand*{\xmpTitle}{\@title}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\jmlrauthorhook} +%\changes{1.20}{2014/10/15}{changed \cs{let} to \cs{def}} +% \begin{macrocode} +\renewcommand*\jmlrauthorhook{% + \ifx\@sauthor\@empty + \hypersetup{pdfauthor={\@author}}% + \else + \hypersetup{pdfauthor={\@sauthor}}% + \fi + \def\xmpAuthor{\@sauthor}% + \let\jmlrauthorhook\relax + \let\@shortauthor\@empty +} +\providecommand*\xmpAuthor{\@author}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\subtitle} +% \begin{macrocode} +\newcommand*{\@subtitle}{} +\newcommand*{\subtitle}[1]{\renewcommand*{\@subtitle}{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\volume} +% \begin{macrocode} +\newcommand*{\@volume}{\@jmlrvolume} +\newcommand*{\volume}[1]{% + \renewcommand*{\@volume}{#1}% + \ifjmlrpdfxa + \let\xmpVolume\@volume + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrissue} +% \begin{macrocode} +\newcommand*{\@issue}{\@jmlrissue} +\newcommand*{\issue}[1]{% + \renewcommand*{\@issue}{#1}% + \ifjmlrpdfxa + \let\xmpIssue\@issue + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\thejmlrworkshop} +% Provided in the event that it's required for the title page. +% \begin{macrocode} +\newcommand*{\thejmlrworkshop}{\@jmlrworkshop} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\team} +% \begin{macrocode} +\newcommand*{\@team}{} +\newcommand*{\team}[1]{\renewcommand*{\@team}{#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrlocation} +%\changes{1.20}{2014/10/15}{new} +% \begin{macrocode} +\newcommand*{\@jmlrlocation}{} +\newcommand*{\jmlrlocation}[1]{% + \renewcommand*{\@jmlrlocation}{#1}% + \protected@write\@auxout{}{\string\jmlrbook@location{#1}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@productioneditorname} +% \begin{macrocode} +\newcommand*{\@productioneditorname}{Production Editor} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\productioneditor} +% \begin{macrocode} +\newcommand*{\@productioneditor}{} +\newcommand*{\productioneditor}[1]{% + \renewcommand*{\@productioneditor}{#1}% + \renewcommand*{\@productioneditorname}{Production Editor}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\productioneditors} +% \begin{macrocode} +\newcommand*{\productioneditors}[1]{% + \renewcommand*{\@productioneditor}{#1}% + \renewcommand*{\@productioneditorname}{Production Editors}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\logo} +% Title page image +%\changes{1.17}{2012/05/30}{added optional argument} +% \begin{macrocode} +\newcommand*{\@logo}{} +\newcommand*{\logo}[2][]{% +\ifjmlrhtml + \def\@logo@tmp{#1}% + \ifx\@logo@tmp\@empty + \renewcommand*{\@logo}{#2}% + \else + \renewcommand*{\@logo}{\HCode{}#2\HCode{}}% + \fi +\else + \renewcommand*{\@logo}{#2}% +\fi +} +% \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. +% \begin{macrocode} +\renewcommand*{\booklinebreak}[1][4]{\linebreak[#1]} +% \end{macrocode} +%\end{macro} +% +% Set article title +% \begin{macrocode} +\def\c@lbmaketitle{\jmlrmaketitle} +% \end{macrocode} +% The book's title: +%\begin{macro}{\maintitle} +% \begin{macrocode} +\newcommand*{\maintitle}{} +% \end{macrocode} +%\end{macro} +% +% Make it easier to modify the book's title page: +%\begin{macro}{\SetTitleElement} +% \begin{macrocode} +\newcommand*{\SetTitleElement}[3]{% + {% + \expandafter\ifx\csname @#1\endcsname\@empty + \else + #2\csname @#1\endcsname#3% + \fi + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\IfTitleElement} +% Determine if the given element has been set: +% \begin{macrocode} +\newcommand{\IfTitleElement}[3]{% + \expandafter\ifx\csname @#1\endcsname\@empty + #2% + \else + #3% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\titlebody} +% \begin{macrocode} +\newcommand{\titlebody}{% + \SetTitleElement{title}{\maintitlefont}{\postmaintitle}% + \SetTitleElement{volume}{\mainvolumefont}{\postmainvolume}% + \SetTitleElement{subtitle}{\mainsubtitlefont}{\postmainsubtitle}% + \SetTitleElement{logo}{\mainlogofont}{\postmainlogo}% + \SetTitleElement{team}{\mainteamfont}{\postmainteam}% + \SetTitleElement{author}{\mainauthorfont}{\postmainauthor}% + \SetTitleElement{productioneditor}{\mainproductioneditorfont}% + {\postmainproductioneditor}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\c@lamaketitle} +% \begin{macrocode} +\ifjmlrhtml + \renewcommand{\c@lamaketitle}{% + \HCode{}% + \HCode{
}% + \HCode{

}% + \@title\newline + \ifx\@jmlrvolume\@empty + \ifx\@volume\@empty + \else + Volume \@volume + \ifx\@subtitle\@empty\else: \fi + \fi + \else + Volume \@jmlrvolume + \ifx\@subtitle\@empty\else: \fi + \fi + \@subtitle + \HCode{

}% + \newline + \textbf{Editors: \@author} + \HCode{
}% + \@logo + \HCode{
}% + \let\maintitle\@title + } +\else + \renewcommand{\c@lamaketitle}{% + \pagenumbering{alph}% + \pagestyle{empty}% + \begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax + \let\footnote\thanks + \titlebody + \par + \@thanks + \end{titlepage}% + \setcounter{footnote}{0}% + \let\maintitle\@title + \c@lmtitlempty + } +\fi +% \end{macrocode} +%\end{macro} +%\begin{macro}{\maintitlefont} +% \begin{macrocode} +\renewcommand{\maintitlefont}{% + \null\vskip15pt\relax\par + \flushleft\Huge\bfseries\noindent} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\postmaintitle} +% \begin{macrocode} +\renewcommand{\postmaintitle}{% + \par\relax +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\mainvolumefont} +% \begin{macrocode} +\newcommand{\mainvolumefont}{% + \flushleft\noindent\LARGE\bfseries Volume +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\postmainvolume} +% \begin{macrocode} +\newcommand{\postmainvolume}{% + \IfTitleElement{subtitle}{}{:}\par\relax +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\mainissuefont} +% \begin{macrocode} +\newcommand{\mainissuefont}{% + \flushleft\noindent\LARGE\bfseries Issue +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\postmainissue} +% \begin{macrocode} +\newcommand{\postmainissue}{% + \par\relax +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\mainsubtitlefont} +% \begin{macrocode} +\newcommand{\mainsubtitlefont}{% + \flushleft\LARGE\bfseries\noindent} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\postmainsubtitle} +% \begin{macrocode} +\newcommand{\postmainsubtitle}{\par} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\mainlogofont} +% \begin{macrocode} +\newcommand{\mainlogofont}{% + \vfill + \begin{center}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\postmainlogo} +% \begin{macrocode} +\newcommand{\postmainlogo}{\end{center}\vfill\par} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\mainteamfont} +% \begin{macrocode} +\newcommand{\mainteamfont}{\flushleft\bfseries\Large\noindent} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\postmainteam} +% \begin{macrocode} +\newcommand{\postmainteam}{\par} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\mainauthorfont} +% \begin{macrocode} +\renewcommand{\mainauthorfont}{% + \flushleft\Large\itshape\doublespacing\noindent} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\postmainauthor} +% \begin{macrocode} +\renewcommand{\postmainauthor}{% +\par} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\mainproductioneditorfont} +% \begin{macrocode} +\newcommand{\mainproductioneditorfont}{% + \flushleft\Large\noindent \@productioneditorname: \itshape} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\postmainproductioneditor} +% \begin{macrocode} +\newcommand{\postmainproductioneditor}{\par} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\maindatefont} +% \begin{macrocode} +\renewcommand{\maindatefont}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\postmaindate} +% \begin{macrocode} +\renewcommand{\postmaindate}{} +% \end{macrocode} +%\end{macro} +% +%\begin{environment}{signoff} +% Editorial team listed at the end of a preface etc. The mandatory +% argument is the date, the optional argument is the team title. +% Each editor should be separated with \ics{Editor}. +%\changes{1.19}{2014/09/29}{added \cs{nopagebreak}} +% \begin{macrocode} +\ifjmlrhtml + \newenvironment{signoff}[2][The Editorial Team]{% + \def\Editor##1{##1\par\vskip\baselineskip\noindent\ignorespaces}% + \def\@editorialteam{#1}% + \def\@signoffdate{#2}% + \par\vskip\baselineskip\noindent + \ifx\@signoffdate\@empty + \else + \emph{\@signoffdate}\nopagebreak\par + \nopagebreak\vskip\baselineskip\noindent + \fi + \ifx\@editorialteam\@empty + \else + \@editorialteam:\nopagebreak\par\nopagebreak\vskip\baselineskip + \fi + \nopagebreak\noindent\ignorespaces + }% + {% + }% +\else + \newenvironment{signoff}[2][The Editorial Team]{% + \def\Editor##1{% + \protected@write\@mainauxout{}{\string\@prefaceeditor{##1}}% + \begin{tabular}{@{}l@{}}% + ##1% + \end{tabular}% + \par\vskip\baselineskip\noindent\ignorespaces + }% + \def\@editorialteam{#1}% + \def\@signoffdate{#2}% + \par\vskip\baselineskip\noindent + \ifx\@signoffdate\@empty + \else + \emph{\@signoffdate}\par + \vskip\baselineskip\noindent + \fi + \ifx\@editorialteam\@empty + \else +% \end{macrocode} +%\changes{1.21}{2015-02-24}{added \cs{nopagebreak}} +% \begin{macrocode} + \@editorialteam:\nopagebreak\par\vskip\baselineskip + \fi + \nopagebreak\noindent\ignorespaces + }% + {% + } +\fi +% \end{macrocode} +%\end{environment} +%\begin{environment}{authorsignoff} +% An author can sign off at the end of a chapter (such as a +% foreword). +% Each author should be separated with \ics{Author}. +% \begin{macrocode} +\newenvironment{authorsignoff}{% + \def\Author##1{\begin{tabular}{@{}p{\linewidth}@{}}% + ##1% + \end{tabular}% + \par\vskip\baselineskip\noindent\ignorespaces + }% + \par\vskip\baselineskip\noindent\ignorespaces +}{% +} +% \end{macrocode} +%\end{environment} +% +%\begin{macro}{\zeroextracounters} +% Reset counters at the start of each imported article +%\changes{1.15}{2012/05/12}{added algocf and definition to reset} +% \begin{macrocode} +\renewcommand{\zeroextracounters}{% + \@ifundefined{c@theorem}{}{\setcounter{theorem}{0}}% + \@ifundefined{c@algorithm}{}{\setcounter{algorithm}{0}}% + \@ifundefined{c@algocf}{}{\setcounter{algocf}{0}}% + \@ifundefined{c@example}{}{\setcounter{example}{0}}% + \@ifundefined{c@definition}{}{\setcounter{definition}{0}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\contentsname} +% Redcfine title of the table of contents +% \begin{macrocode} +\renewcommand*{\contentsname}{Table of Contents} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\theHalgorithm} +%\changes{1.12}{2012/01/05}{in definition, changed \cs{thechapter} +%to \cs{theHchapter}} +% \begin{macrocode} +\def\theHalgorithm{\theHchapter.\thealgorithm} +% \end{macrocode} +%\end{macro} +\def\theHexample{\theHchapter.\theexample} +\def\theHtheorem{\theHchapter.\thetheorem} +%\begin{macro}{\theHsection} +% \begin{macrocode} +\def\theHsection{\theHchapter.\thesection} +\def\theHsubsection{\theHchapter.\thesubsection} +\def\theHsubsubsection{\theHchapter.\thesubsubsection} +\def\theHparagraph{\theHchapter.\theparagraph} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\theHsubfigure} +% \begin{macrocode} +\def\theHsubfigure{\theHfigure.\arabic{subfigure}} +\def\theHsubtable{\theHtable.\arabic{subtable}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\theHfootnote} +%\changes{1.12}{2012/01/05}{new} +% \begin{macrocode} +\def\theHfootnote{\theHchapter.\alpha{footnote}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\theHtable} +%\changes{1.12}{2012/01/05}{new} +% \begin{macrocode} +\def\theHtable{\theHchapter.\arabic{table}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\theHfigure} +%\changes{1.12}{2012/01/05}{new} +% \begin{macrocode} +\def\theHfigure{\theHchapter.\arabic{figure}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\theHalgocf} +%\changes{1.15}{2012/05/12}{new} +% \begin{macrocode} +\def\theHalgocf{\theHchapter.\thealgocf} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\mailto} +% \begin{macrocode} +\renewcommand*{\mailto}[1]{% + \href{mailto:#1}{\nolinkurl{#1}}% +} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\c@lhaschapterfalse +\let\c@lthesec\thesection +% \end{macrocode} +% Make sure the hyperlinks work +%\begin{macro}{\doimportchapterHref} +% \begin{macrocode} +\newcommand\doimportchapterHref{% + \edef\@currentHref{chapter.\thechapter}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\toclevel@appendix} +% Set the toc level for the main appendices +% \begin{macrocode} +\def\toclevel@appendix{-1} +% \end{macrocode} +%\end{macro} +% +% \sty{hyperref} and \cls{combine} don't play nicely +% need to fudge the cross-referencing a bit. +%\begin{macro}{\Xprefix} +% \begin{macrocode} +\def\Xprefix{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Xref} +% \begin{macrocode} +\DeclareRobustCommand\Xref{\@ifstar\@Xrefstar\T@Xref}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Xpageref} +% \begin{macrocode} +\DeclareRobustCommand\Xpageref{% + \@ifstar\@Xpagerefstar\T@Xpageref +}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\HyRef@StarSetXRef} +% \begin{macrocode} +\def\HyRef@StarSetXRef#1{% + \begingroup + \Hy@safe@activestrue + \edef\x{#1}% + \@onelevel@sanitize\x + \edef\x{\endgroup + \noexpand\HyRef@@StarSetRef + \expandafter\noexpand\csname r@\Xprefix\x\endcsname{\x}% + }% + \x +} +% \end{macocode} +%\end{macro} +% +%\begin{macro}{\@Xrefstar} +% \begin{macrocode} +\def\@Xrefstar#1{% + \HyRef@StarSetXRef{#1}\@firstoffive +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@Xpagerefstar} +% \begin{macrocode} +\def\@Xpagerefstar#1{% + \HyRef@StarSetXRef{#1}\@secondoffive +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\T@Xref} +% \begin{macrocode} +\def\T@Xref#1{% + \Hy@safe@activestrue + \expandafter\@setXref\csname r@\Xprefix#1\endcsname\@firstoffive{#1}% + \Hy@safe@activesfalse +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\T@Xpageref} +% \begin{macrocode} +\def\T@Xpageref#1{% + \Hy@safe@activestrue + \expandafter\@setXref\csname r@\Xprefix#1\endcsname\@secondoffive{#1}% + \Hy@safe@activesfalse +}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\Xlabel} +% \begin{macrocode} +\def\Xlabel#1{% + \@bsphack + \begingroup + \@onelevel@sanitize\@currentlabelname + \edef\@currentlabelname{% + \expandafter\strip@period\@currentlabelname\relax.\relax\@@@ + }% + \protected@write\@mainauxout{}{% + \string\newlabel{\Xprefix#1}{{\@currentlabel}{\thepage}% + {\@currentlabelname}{\@currentHref}{}}% + }% + \endgroup + \@esphack +} +\let\ltx@label\Xlabel +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@setXref} +% \begin{macrocode} +\def\@setXref#1#2#3{% csname, extract group, refname + \ifx#1\relax + \protect\G@refundefinedtrue + \nfss@text{\reset@font\bfseries ??}% + \@latex@warning{% + Reference `#3' on page \thepage \space undefined% + }% + \else + \expandafter\Hy@setref@link#1\@empty\@empty\@nil{#2}% + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@secondoffive} +% Something's redefining \cs{@secondoffive} incorrectly at the +% start of the document when hyperref's draft mode is on. Need +% to fix it. +% \begin{macrocode} +\AtBeginDocument{% + \renewcommand\@secondoffive[5]{#2}% + \jmlrwritepdfinfo + \let\jmlrwritepdfinfo\relax +} +% \end{macrocode} +%\end{macro} +% +% Need to write imported chapter label to main auxfile. +%\begin{macro}{\@setimportlabel} +% \begin{macrocode} +\def\@setimportlabel{% + \let\@mainauxout\@auxout + \let\HRlabel\label +} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\AtBeginDocument{\@jmlrbegindoc} +% \end{macrocode} +%\begin{macro}{\@jmlrbegindoc} +% \begin{macrocode} +\newcommand*\@jmlrbegindoc{ + \@setimportlabel + \gdef\@setimportlabel{\let\ref\Xref \let\pageref\Xpageref}% + \let\ReadBookmarks\relax +% \end{macrocode} +% Patch to work with \sty{auxhook} if loaded +%\changes{1.18}{2013-10-17}{patched to work with auxhook} +% \begin{macrocode} + \@ifundefined{@beginmainauxhook}{}{\@beginmainauxhook}% +} +% \end{macrocode} +%\end{macro} +% Imported papers modify \ics{InputIfFileExists} so save original +% definition. +% \begin{macrocode} +\let\@org@InputIfFileExists\InputIfFileExists +% \end{macrocode} +% +%\begin{environment}{jmlrpapers} +% \begin{macrocode} +\newenvironment{jmlrpapers}{% +% \end{macrocode} +%\changes{1.09}{2010/12/01}{reset start and end document hook to avoid +%problems caused by packages defining duplicate commands etc} +% \begin{macrocode} +\def\@begindocumenthook{% + \@jmlrbegindoc + \let\bibcite\c@lbNATbibcite +} +\def\@enddocumenthook{% + \@jmlrenddoc + \let\bibcite\c@lbNAT@testdef +} + \begin{papers}[] +% \end{macrocode} +%\changes{1.07}{2010-07-30}{Added check for two column style} +% \begin{macrocode} + \if@twocolumn + \def\@jmlr@restore{\twocolumn}% + \else + \def\@jmlr@restore{\onecolumn}% + \fi + \jmlrarticlecommands + \let\importpubpaper\@importpubpaper + \let\importpaper\@importpaper + \let\importarticle\@importarticle + \let\label\Xlabel + \let\ref\Xref + \pagestyle{article}% +}{% + \@jmlr@restore + \end{papers} +} +% \end{macrocode} +%\end{environment} +% +%\begin{macro}{\addtomaincontents} +% \begin{macrocode} +\newcommand{\addtomaincontents}[2]{% + \protected@write\@mainauxout{\let\label\@gobble\let\index\@gobble + \let\glossary\@gobble}{\string\@writefile{#1}{#2}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@write@author} +% \begin{macrocode} +\newcommand*{\@write@author}[2]{% + \def\@jmlr@authors@sep{ and }% + \protected@write\@mainauxout{}{% + \string\@new@articleauthor{#1}{#2}% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@new@articleauthor} +% \begin{macrocode} +\newcommand*{\@new@articleauthor}[2]{% + \expandafter\gdef\csname @jmlr@author@#1\endcsname{% + \hyperref[#1jmlrstart]{#2}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@@write@jmlr@import} +% The accompanying \app{makejmlrbook} Perl script scans the aux file +% for information. Any articles imported using \ics{importpubpaper}, +% \ics{importpaper} or \ics{importarticle} need to write the +% relevant information to the aux file. +% \begin{macrocode} +\newcommand*{\@@write@jmlr@import}[3]{% + \protected@write\@mainauxout{}{\string\@jmlr@import{#1}{#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@jmlr@import} +% \LaTeX\ should ignore \cs{@jmlr@import} as it's only needed for +% \app{makejmlrbook}: +% \begin{macrocode} +\newcommand*{\@jmlr@import}[3]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@@write@jmlr@apdimport} +%\changes{1.17}{2012/05/30}{new} +% As above but for files imported in the appendix. +% \begin{macrocode} +\newcommand*{\@@write@jmlr@apdimport}[3]{% + \protected@write\@mainauxout{}{\string\@jmlr@apdimport{#1}{#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@jmlr@apdimport} +%\changes{1.17}{2012/05/30}{new} +% As above but for files imported in the appendix. +% \LaTeX\ should ignore \cs{@jmlr@apdimport} as it's only needed for +% \app{makejmlrbookgui}: +% \begin{macrocode} +\newcommand*{\@jmlr@apdimport}[3]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@write@jmlr@import} +% Initialise to \cs{@@write@jmlr@import} and switch to +% \cs{@@write@jmlr@apdimport} in the appendices. +% \begin{macrocode} +\def\@write@jmlr@import{\@@write@jmlr@import} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\jmlrpremaketitlehook} +%\changes{1.09}{2010/12/01}{Moved redefinition outside of import +%macros} +% Redefine \cs{jmlrpremaketitlehook} +% \begin{macrocode} +\def\jmlrpremaketitlehook{% + \cleardoublepage + \phantomsection + \let\@currentlabelname\@shorttitle +% \end{macrocode} +%\changes{1.09}{2010/12/01}{Moved \cs{refstepcounter} from +%\cs{jmlrmaketitlehook} to \cs{jmlrpremaketitlehook}} +% \begin{macrocode} + \refstepcounter{chapter}% +}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\jmlrimporthook} +% Hook just before document is imported. +%\changes{1.09}{2010/12/01}{new} +% \begin{macrocode} +\newcommand*{\jmlrimporthook}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\importpubpaper} +% Import a document that has already been published. +% Syntax: \cs{importpubpaper}\oarg{label}\marg{dir}\marg{file}\marg{pages} +% where \meta{dir} is the directory in which the paper is located, +% \meta{file} is the name of the file and \meta{pages} indicates +% the page range \emph{for the original version}. The optional +% argument is a label. This is used to prefix the labels and +% citations in the document so they don't clash with other imported +% articles. If omitted, \meta{dir}/\meta{file} is used instead. +% \begin{macrocode} +\newcommand*{\@importpubpaper}[4][\@importdir\@importfile]{% + \bgroup + \def\@importdir{#2/}% + \def\@importfile{#3}% + \@write@jmlr@import{#1}{#2}{#3}% + \def\@extra@b@citeb{#1}% + \def\@extra@binfo{#1}% + \jmlrpages{#4}% + \graphicspath{{\@importdir}}% + \def\jmlrmaketitlehook{% +% \end{macrocode} +%\changes{1.09}{2010/12/01}{Added \cs{label} to \cs{jmlrmaketitlehook}} +% \begin{macrocode} + \label{}% + \def\titlebreak{ }% + \addtomaincontents{toc}% +% \end{macrocode} +%\changes{1.12}{2012/01/05}{changed \cs{@shorttitle} to \cs{@title}} +% \begin{macrocode} + {% + \protect\contentsline{papertitle}{\@title}{\thepage}% + {page.\thepage}}% + \pdfbookmark{\@shorttitle}{chapter.\theHchapter}% + \def\@jmlr@authors@sep{ \& }% +% \end{macrocode} +%\changes{1.12}{2012/01/05}{changed \cs{@jmlrauthors} to \cs{@jmlr@authors}} +% \begin{macrocode} + \tocchapterpubauthor{\@jmlr@authors}% + {% + \@jmlrabbrvproceedings + \ifx\@jmlrvolume\@empty + \ifx\@jmlrpages\@empty\else\space\fi + \else + \space\@jmlrvolume + \ifx\@jmlrissue\@empty + \else + (\@jmlrissue)% + \fi + \ifx\@jmlrpages\@empty\else:\fi + \fi + \ifx\@jmlrpages\@empty + \else + \@jmlrpages + \ifx\@jmlryear\@empty\else,\fi + \fi + \space\@jmlryear + }% +% \end{macrocode} +%\changes{1.12}{2012/01/05}{changed \cs{@jmlrauthors} to \cs{@jmlr@authors}} +% \begin{macrocode} + \@write@author{#1}{\@jmlr@authors}% + }% + \def\InputIfFileExists##1##2##3{% + \IfFileExists{##1}{% + \@org@InputIfFileExists{##1}{##2}{##3}% + }% + {% + \@org@InputIfFileExists{\@importdir##1}{##2}{##3}% + }% + }% + \def\Xprefix{#1}% + \jmlrimporthook + \import{\@importdir\@importfile}% + \def\Xprefix{}% + \egroup + \gdef\@shortauthor{}% + \gdef\@shorttitle{}% + \gdef\@firstauthor{}% + \gdef\@jmlr@authors{\@jmlrauthors}% + \gdef\@jmlrauthors{}% + \gdef\@firstsurname{}% +} +\newcommand{\importpubpaper}[4][]{% + \ClassError{jmlrbook}{\string\importpubpaper\space +not permitted outside `jmlrpapers' environment}{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\importpaper} +% Like \cs{importpubpaper} but sets the pages to the page-range for +% this book. +% \begin{macrocode} +\newcommand{\@importpaper}[3][\@importdir\@importfile]{% + \bgroup + \def\@importdir{#2/}% + \def\@importfile{#3}% + \@write@jmlr@import{#1}{#2}{#3}% + \def\@extra@b@citeb{#1}% + \def\@extra@binfo{#1}% + \jmlrpages{\protect\@articlepagesref}% + \graphicspath{{\@importdir}}% + \def\jmlrmaketitlehook{% +% \end{macrocode} +%\changes{1.09}{2010/12/01}{Added \cs{label} to \cs{jmlrmaketitlehook}} +% \begin{macrocode} + \label{}% + \def\titlebreak{ }% + \addtomaincontents{toc}% +% \end{macrocode} +%\changes{1.12}{2012/01/05}{changed \cs{@shorttitle} to \cs{@title}} +% \begin{macrocode} + {% + \protect\contentsline{papertitle}{\@title}{\thepage}% + {page.\thepage}}% + \pdfbookmark{\@shorttitle}{chapter.\theHchapter}% + \def\@jmlr@authors@sep{ \& }% +% \end{macrocode} +%\changes{1.12}{2012/01/05}{changed \cs{@jmlrauthors} to \cs{@jmlr@authors}} +% \begin{macrocode} + \tocchapterpubauthor{\@jmlr@authors}% + {% + \@jmlrabbrvproceedings + \ifx\@jmlrvolume\@empty + \space + \else + \space\@jmlrvolume + \ifx\@jmlrissue\@empty + \else + (\@jmlrissue)% + \fi + :% + \fi + \protect\articlepagesref{#1}% + \ifx\@jmlryear\@empty\else,\fi + \space\@jmlryear + }% +% \end{macrocode} +%\changes{1.12}{2012/01/05}{changed \cs{@jmlrauthors} to \cs{@jmlr@authors}} +% \begin{macrocode} + \@write@author{#1}{\@jmlr@authors}% + }% + \def\InputIfFileExists##1##2##3{% + \IfFileExists{##1}{% + \@org@InputIfFileExists{##1}{##2}{##3}% + }% + {% + \@org@InputIfFileExists{\@importdir##1}{##2}{##3}% + }% + }% + \def\Xprefix{#1}% +% \end{macrocode} +% Disable \ics{jmlrvolume}, \ics{jmlryear}, \ics{jmlrworkshop} etc +% (since the imported papers belong to the same volume as the +% book---use \ics{importpubpaper} for papers pre-published in +%\changes{1.17}{2012/05/30}{disable \cs{jmlrvolume}, \cs{jmlryear} +%and \cs{jmlrworkshop} in imported papers} +% another volume). +% \begin{macrocode} + \let\jmlrvolume\@gobble + \let\jmlryear\@gobble + \let\jmlrworkshop\@gobble + \let\jmlrissue\@gobble + \let\jmlrpages\@gobble + \jmlrimporthook + \import{\@importdir\@importfile}% + \def\Xprefix{}% + \egroup + \gdef\@shortauthor{}% + \gdef\@shorttitle{}% + \gdef\@firstauthor{}% + \gdef\@jmlr@authors{\@jmlrauthors}% + \gdef\@jmlrauthors{}% + \gdef\@firstsurname{}% +} + +\newcommand{\importpaper}[3][]{% + \ClassError{jmlrbook}{\string\importpaper\space +not permitted outside `jmlrpapers' environment}{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\importarticle} +% Import a document that hasn't been published. +% Syntax: \cs{importarticle}\oarg{label}\marg{dir}\marg{file} +% where \meta{dir} is the directory in which the paper is located and +% \meta{file} is the name of the file. The optional +% argument is a label. This is used to prefix the labels and +% citations in the document so they don't clash with other imported +% articles. If omitted, \meta{file} is used instead. +% \begin{macrocode} +\newcommand{\@importarticle}[3][\@importdir\@importfile]{% + \bgroup + \def\@importdir{#2/}% + \def\@importfile{#3}% + \@write@jmlr@import{#1}{#2}{#3}% + \def\@extra@b@citeb{#1}% + \def\@extra@binfo{#1}% + \def\jmlrmaketitlehook{% + \def\titlebreak{ }% + \addtomaincontents{toc}% +% \end{macrocode} +%\changes{1.12}{2012/01/05}{changed \cs{@shorttitle} to \cs{@title}} +% \begin{macrocode} + {% + \protect\contentsline{papertitle}{\@title}{\thepage}% + {page.\thepage}}% +% \end{macrocode} +%\changes{1.09}{2010/12/01}{Added \cs{label} to \cs{jmlrmaketitlehook}} +% \begin{macrocode} + \label{}% + \pdfbookmark{\@shorttitle}{chapter.\theHchapter}% + \def\@jmlr@authors@sep{ \& }% +% \end{macrocode} +%\changes{1.12}{2012/01/05}{changed \cs{@jmlrauthors} to \cs{@jmlr@authors}} +% \begin{macrocode} + \tocchapterauthor{\@jmlr@authors}% + \@write@author{#1}{\@jmlr@authors}% + \jmlrpages{}% + \jmlrvolume{}% + \jmlryear{}% + \jmlrsubmitted{}% + \jmlrpublished{}% + \jmlrproceedings{}{}% + }% + \graphicspath{{\@importdir}}% + \def\InputIfFileExists##1##2##3{% + \IfFileExists{##1}{% + \@org@InputIfFileExists{##1}{##2}{##3}% + }% + {% + \@org@InputIfFileExists{\@importdir##1}{##2}{##3}% + }% + }% + \def\Xprefix{#1}% + \jmlrimporthook +% \end{macrocode} +%\changes{1.17}{2012/15/28}{set title page style for imported +%articles to articlet style} +% \begin{macrocode} + \let\ps@jmlrtps\ps@articlet + \import{\@importdir\@importfile}% + \def\Xprefix{}% + \egroup + \gdef\@shortauthor{}% + \gdef\@shorttitle{}% + \gdef\@firstauthor{}% + \gdef\@jmlr@authors{\@jmlrauthors}% + \gdef\@jmlrauthors{}% + \gdef\@firstsurname{}% +} +\newcommand{\importarticle}[3][]{% + \ClassError{jmlrbook}{\string\importarticle\space +not permitted outside `jmlrpapers' environment}{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\addtocpart} +% Add a part to the TOC without printing anything in the text +% (but does a \cs{cleardoublepage}). +% \begin{macrocode} +\newcommand{\addtocpart}[1]{% + \cleardoublepage + \refstepcounter{tocpart}% + \addtocontents{toc}{\protect\tocpart{#1}}% + \pdfbookmark[-1]{#1}{part.\thetocpart}% +} +\newcounter{tocpart} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\tocpart} +% Define the appearance of a part in the TOC. +% \begin{macrocode} +\newcommand{\tocpart}[1]{% + \addpenalty{-\@highpenalty}% + \vskip 1.0ex \@plus\p@ + \setlength\@tempdima{2.25em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \large\bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss \null}\par + \penalty\@highpenalty + \endgroup +} +% \end{macrocode} +%\end{macro} +% +% Set up the layout of the chapter headings +% \begin{macrocode} +\setlength{\prechapterskip}{3em} +\setlength{\postchapterskip}{20pt} +% \end{macrocode} +% +%\begin{macro}{\chapternumberformat} +% \begin{macrocode} +\renewcommand{\chapternumberformat}[1]{% + \Large\bfseries \@chapapp\space#1\par +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\chaptertitleformat} +% \begin{macrocode} +\renewcommand{\chaptertitleformat}[1]{% + \Large\bfseries #1} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\chapterformat} +% \begin{macrocode} +\renewcommand*{\chapterformat}{% + \raggedright +} +% \end{macrocode} +%\end{macro} +% Set up the format of a part in the book (not a part in an +% article). +%\begin{macro}{\preparthook} +% \begin{macrocode} +\renewcommand{\preparthook}{\cleardoublepage\null\vfil} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\partnumberformat} +% \begin{macrocode} +\renewcommand{\partnumberformat}[1]{% + \Huge\bfseries \@partapp\nobreakspace#1\par\nobreak + \vskip 20\p@ +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\postparthook} +% \begin{macrocode} +\def\postparthook{% + \thispagestyle{empty}% + \vfil\newpage + \null + \thispagestyle{empty}% + \newpage +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@curparthead} +% The heading of the current part +% \begin{macrocode} +\newcommand{\@curparthead}{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\parttitleformat} +% \begin{macrocode} +\renewcommand{\parttitleformat}[1]{#1% + \gdef\@curparthead{\@partapp\space \thepart. #1}% + \@mkboth{\@curparthead}{\@curparthead}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\firstpageno} +% Change \cs{firstpageno} to do nothing as the page number will +% be determined by the book. +% \begin{macrocode} +\renewcommand{\firstpageno}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\tocchapterauthor} +% Add the author of the current chapter to the table of contents. +% \begin{macrocode} +\newcommand{\tocchapterauthor}[1]{% + \addtomaincontents{toc}{\protect\contentsline{chapterauthor}{% + #1}{}{}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\tocchapterpubauthor} +% Add the author of an imported prepublished paper to the +% table of contents. The first argument is the author (or list +% of authors). The second argument is the reference to the +% published article. +% \begin{macrocode} +\newcommand{\tocchapterpubauthor}[2]{% + \addtomaincontents{toc}{\protect\contentsline{chapterauthor}{% + #1; #2.}{}{}}% +} +% \end{macrocode} +%\end{macro} +% +% Set up the formatting in the TOC +% \begin{macrocode} +\renewcommand*\@pnumwidth{2em} +% \end{macrocode} +% +%\begin{macro}{\l@part} +% Format for book parts +% \begin{macrocode} +\renewcommand*\l@part[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + %\setlength\@tempdima{5em}% + \settowidth\@tempdima{\large\bfseries \@partapp\space MM}% + \vbox{% + \pagerule + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \large\bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + \renewcommand*\numberline[1]{\hb@xt@ \@tempdima + {\@partapp\space ##1\hfil }}% + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss + \normalfont\normalsize #2}\par + \penalty\@highpenalty + \endgroup + \pagerule + }% + \fi} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\l@chapter} +% \begin{macrocode} +\renewcommand{\l@chapter}[2]{% + \ifnum\c@tocdepth>\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus \p@ + \setlength\@tempdima{2em}% + \begingroup + \parindent \z@ + \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \large \bfseries + \advance \leftskip \@tempdima + \hskip -\leftskip + \renewcommand*\numberline[1]{\hb@xt@ \@tempdima + {##1\hfil }}% + #1\nobreak \hfil \nobreak \hb@xt@ \@pnumwidth {\hss + \normalfont\normalsize #2}\par + \penalty \@highpenalty + \endgroup + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\l@papertitle} +% \begin{macrocode} +\newcommand*{\l@papertitle}[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + \setlength\@tempdima{3em}% + \begingroup + \leavevmode \raggedright\itshape + #1\nobreak\hfill \nobreak\hb@xt@\@pnumwidth{\hss + \normalfont#2}% + \par + \penalty\@highpenalty + \endgroup + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\l@chapterauthor} +% \begin{macrocode} +\newcommand*\l@chapterauthor[2]{% + \ifnum \c@tocdepth >\m@ne +% \end{macrocode} +%\changes{1.11}{2011/01/06}{removed penalty} +% \begin{macrocode} + \begingroup + \parindent \z@ + \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \raggedright + \parbox{\linewidth-\@pnumwidth}{\raggedright#1\par}% + \par + \endgroup + \fi} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\l@section} +% \begin{macrocode} +\renewcommand*\l@section[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + \setlength\@tempdima{3em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \normalsize\mdseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \penalty\@highpenalty + \endgroup + \fi} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\l@subsection} +% \begin{macrocode} +\renewcommand*\l@subsection[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + \setlength\@tempdima{3.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \normalsize\mdseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \penalty\@highpenalty + \endgroup + \fi} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\chaptermark} +% \begin{macrocode} +\renewcommand*{\chaptermark}[1]{% + \@mkboth{\@curparthead}{\protect\thechapter. #1}% +} +% \end{macrocode} +%\end{macro} +% +% Set up page styles +%\begin{macro}{\firstpagehead} +% \begin{macrocode} +\newcommand{\firstpagehead}{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\firstpagefoot} +%\changes{1.09}{2010/12/01}{added \cs{@reprint}} +% \begin{macrocode} +\newcommand{\firstpagefoot}{% + \@reprint\hfill\thepage +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\headfont} +% Set the header font +% \begin{macrocode} +\newcommand*{\headfont}{\reset@font\small\scshape}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\footfont} +% Set the footer font +% \begin{macrocode} +\newcommand*{\footfont}{\reset@font\small\itshape}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\ps@chplain} +% Page style for first page of a chapter +% \begin{macrocode} +\newcommand*{\ps@chplain}{% + \let\@mkboth\@gobbletwo + \renewcommand*{\@oddhead}{\headfont\firstpagehead}% + \renewcommand*{\@evenhead}{}% + \renewcommand*{\@oddfoot}{\footfont\firstpagefoot}% + \renewcommand*{\@evenfoot}{\footfont\thepage\hfill + }% +} +\let\ps@plain\ps@chplain +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ps@article} +% Page style for the imported articles. +% \begin{macrocode} +\newcommand*{\ps@article}{% + \let\@mkboth\@gobbletwo + \renewcommand*{\@oddhead}{\headfont\hfill\@shorttitle}% + \renewcommand*{\@evenhead}{\headfont\@shortauthor\hfill}% + \renewcommand*{\@oddfoot}{\footfont\hfill\thepage} + \renewcommand*{\@evenfoot}{\footfont\thepage\hfill} +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ps@articlet} +% Title page style for imported articles (imported using +% \cs{importarticle}) +% \begin{macrocode} +\newcommand*{\ps@articlet}{% + \let\@mkboth\@gobbletwo + \renewcommand*{\@oddhead}{}% + \renewcommand*{\@evenhead}{}% + \renewcommand*{\@oddfoot}{\footfont\hfill\thepage} + \renewcommand*{\@evenfoot}{\footfont\thepage\hfill} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\ps@jmlrbook} +% Page style for book +%\changes{1.15}{2012/05/12}{removed dependence on \cs{ps@headings} +%(made consistent with article page style)} +% \begin{macrocode} +\newcommand*{\ps@jmlrbook}{% + \renewcommand*{\@oddfoot}{\footfont\hfill\thepage} + \renewcommand*{\@evenfoot}{\footfont\thepage\hfill} + \def\@evenhead{\headfont\leftmark\hfill}% + \def\@oddhead{\hfill\headfont\rightmark}% + \let\@mkboth\markboth + \renewcommand*{\sectionmark}[1]{}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\markleft} +%\changes{1.15}{2012/05/12}{new} +% Provide a command to set just the left header mark. +% \begin{macrocode} +\newcommand*{\markleft}[1]{% + \begingroup + \let\label\relax + \let\index\relax + \let\glossary\relax + \expandafter\@markleft\@themark{#1}% + \@temptokena + \expandafter{\@themark}% + \mark{\the\@temptokena} + \endgroup + \if@nobreak + \ifvmode + \nobreak + \fi + \fi +} +\newcommand*{\@markleft}[3]{% + \@temptokena{#2}% + \unrestored@protected@xdef\@themark{{#3}{\the\@temptokena}} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\morefrontmatter} +% \begin{macrocode} +\renewcommand*{\morefrontmatter}{\pagestyle{jmlrbook}% + \def\chaptermark##1{% + \@mkboth{##1\hfill}{\hfill##1}}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\moremainmatter} +% \begin{macrocode} +\renewcommand*{\moremainmatter}{\pagestyle{jmlrbook}% + \def\chaptermark##1{% + \@mkboth{\@curparthead}{\protect\thechapter. ##1}% + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\bibsection} +% Set the bibliography headings in the articles +% \begin{macrocode} +\renewcommand*\bibsection{\section*{\refname}} +% \end{macrocode} +%\end{macro} +%\changes{1.10}{2011-01-05}{Removed redundant redefinition of +%\cs{@bookpart}} +% +% Set up the book commands: +% \begin{macrocode} +\jmlrbookcommands +% \end{macrocode} +% +% In the event that authors have used different versions of +% \sty{algorithm2e}, define old command names. +%\changes{1.11}{2011-03-24}{added old algorithm2e commands} +% \begin{macrocode} +\providecommand*{\SetNoLine}{\SetAlgoNoLine} +\providecommand*{\SetVline}{\SetAlgoVlined} +\providecommand*{\Setvlineskip}{\SetVlineSkip} +\providecommand*{\SetLine}{\SetAlgoLined} +\providecommand*{\dontprintsemicolon}{\DontPrintSemicolon} +\providecommand*{\printsemicolon}{\PrintSemicolon} +\providecommand*{\incmargin}{\IncMargin} +\providecommand*{\decmargin}[1]{\DecMargin{-#1}} +\providecommand*{\setnlskip}{\SetNlSkip} +\providecommand*{\Setnlskip}{\SetNlSkip} +\providecommand*{\setalcapskip}{\SetAlCapSkip} +\providecommand*{\setalcaphskip}{\SetAlCapHSkip} +\providecommand*{\nlSty}{\NlSty} +\providecommand*{\Setnlsty}{\SetNlSty} +\providecommand*{\linesnumbered}{\LinesNumbered} +\providecommand*{\linesnotnumbered}{\LinesNotNumbered} +\providecommand*{\linesnumberedhidden}{\LinesNumberedHidden} +\providecommand*{\showln}{\ShowLn} +\providecommand*{\showlnlabel}{\ShowLnLabel} +\providecommand*{\nocaptionofalgo}{\NoCaptionOfAlgo} +\providecommand*{\restorecaptionofalgo}{\RestoreCaptionOfAlgo} +\providecommand*{\restylealgo}{\RestyleAlgo} +\providecommand*{\Titleofalgo}{\TitleOfAlgo} +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/macros/latex/contrib/jmlr/jmlr.ins b/macros/latex/contrib/jmlr/jmlr.ins new file mode 100644 index 0000000000..0fff82ddfd --- /dev/null +++ b/macros/latex/contrib/jmlr/jmlr.ins @@ -0,0 +1,35 @@ +% jmlr.ins generated using makedtx version 1.2 2017/8/1 16:57 +\input docstrip + +\preamble + + 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. + +\endpreamble + +\askforoverwritefalse + +\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}} +} + +\endbatchfile diff --git a/macros/latex/contrib/jmlr/jmlr.pdf b/macros/latex/contrib/jmlr/jmlr.pdf new file mode 100644 index 0000000000..6a75b8d526 Binary files /dev/null and b/macros/latex/contrib/jmlr/jmlr.pdf differ diff --git a/macros/latex/contrib/jmlr/makejmlrbook b/macros/latex/contrib/jmlr/makejmlrbook new file mode 100755 index 0000000000..252ce3e549 --- /dev/null +++ b/macros/latex/contrib/jmlr/makejmlrbook @@ -0,0 +1,1308 @@ +#!/usr/bin/env perl +# File : makejmlrbook +# Author : Nicola L C Talbot +# Date : 22nd March 2010 +# Last Modified : 30 May 2012 +# Version : 0.32 +# Description : Given the name of a document using the +# jmlrbook class file, this script runs +# pdflatex (and possibly bibtex) on the +# imported articles and the main document. +# http://theoval.cmp.uea.ac.uk/~nlct/ +# +# This file is distributed as part of the jmlr LaTeX bundle. +# +# Copyright (c) 2006 Nicola L.C. 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 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. + +use Getopt::Long; +use File::Basename; +use File::Copy; +use Cwd; +use strict; + +my $version = "0.32 (2012-05-28)"; + +my $eol = "\n"; +my $dd = '/'; + +if ($^O eq 'MSWin32') +{ + $eol = "\r\n"; + $dd = "\\"; +} + +my $showversion = 0; +my $showhelp = 0; +my $quiet = 0; +my $batchtex = 0; +my $online = 1; +my $print = 1; +my $html = 1; +my $latexapp = 'pdflatex'; +my $bibtexapp = 'bibtex'; +my $latexopts = ''; +my $bibtexopts = ''; +my $format = 'pdf'; +my $logourl = ''; +my $extractpreface = 0; # v0.3 added +# execute system calls (--noexecute will just list the system calls +# without executing them) +my $execute = 1; # v0.31 added + +unless(&GetOptions( + "online!" => \$online, + "print!" => \$print, + "html!" => \$html, + "extractpreface!" => \$extractpreface, + "logourl=s" => \$logourl, + "format=s" => \$format, + "latexapp=s" => \$latexapp, + "bibtexapp=s" => \$bibtexapp, + "latexopts=s" => \$latexopts, + "bibtexopts=s" => \$bibtexopts, + "quieter!" => \$quiet, + "batchtex!" => \$batchtex, + "execute!" => \$execute, + "version" => \$showversion, + "help" => \$showhelp)) +{ + die "Use --help for help\n"; +} + +my $appname = basename($0); + +if ($showhelp) +{ + die "$appname version $version Copyright (c) 2010 Nicola L C Talbot\n", + "Distributed under the LaTeX Project Public License.\n\n", + "Syntax: $appname [options] \n\n", + " should be the name of the master document for a LaTeX \n", + "file that uses the jmlrbook class. The .tex extension may be\n", + "omitted.\n\n", + "Basic options:\n", + "--online\t\tGenerate the color on-line version (default)\n", + "--noonline\t\tDon't generate the color on-line version\n", + "--print\t\t\tGenerate the grayscale print version (default)\n", + "--noprint\t\tDon't generate the grayscale print version\n", + "--html\t\t\tGenerate the HTML version (default)\n", + "--nohtml\t\tDon't generate the HTML version\n", + "--extractpreface\tParse document for preface environment\n", + "--noextractpreface\tDon't parse document for preface environment\n", + "--logourl \tMake the logo on the HTML index page link to \n", + "--batchtex\t\tRun TeX in batch mode\n", + "--nobatchtex\t\tDon't run TeX in batch mode\n", + "--quieter\t\tReduce messages to stdout and run TeX in batch mode\n", + "--noquieter\t\tDon't reduce messages to stdout\n", + "--execute\t\tExecute system calls (default)\n", + "--noexecute\t\tDon't execute system calls, just list the\n", + "\t\t\tcommands.\n", + "--version\t\tDisplay version number and exit\n", + "--help\t\t\tDisplay help message and exit\n", + "\nAdvanced options:\n", + "--latexapp \tApplication used to call LaTeX\n", + "\t\t\t(Defaults to 'pdflatex')\n", + "--format \tOutput format (default: 'pdf')\n", + "--bibtexapp \tApplication used to call BibTeX\n", + "\t\t\t(Defaults to 'bibtex')\n", + "--latexopt \tOptions to pass to LaTeX\n", + "--bibtexopt \tOptions to pass to BibTeX\n"; +} + +if ($showversion) +{ + die "$appname version $version copyright (c) 2010 Nicola L C Talbot\n", + "Distributed under the LaTeX Project Public License.\n"; +} + +unless ($#ARGV == 0) +{ + die "$appname: missing filename\n", + "use --help for help\n"; +} + +if ($quiet or $batchtex) +{ + $latexopts = '-interaction=batchmode '.$latexopts; +} + +if ($quiet) +{ + $bibtexopts = '-terse '.$bibtexopts; +} + +my ($main_name, $main_path, $main_suffix) + = fileparse($ARGV[0], '\.(tex|ltx)'); + +$main_suffix = '.tex' unless $main_suffix; + +my $org_dir = cwd(); + +&chdirordie($main_path); + +my $mainaux = "$main_name.aux"; + +# If the aux file doesn't exist or the aux file is older than +# the main file, run latex + +if (not -e $mainaux or (-M $mainaux > -M "$main_name$main_suffix")) +{ + &latex($main_name); +} + +my $main_bibdata = 0; +my @imports = (); +my %pagerefs = (); +my $preface_data; # v0.3 new +my @preface_editors = (); + +# Parse aux file + +&parsemainaux($mainaux); + +# Replace any instances of \articlepagesref + +foreach my $import (@imports) +{ + my $label = $import->{'label'}; + + my $pages = $pagerefs{$label}->{'start'}.'--' + . $pagerefs{$label}->{'end'}; + + $import->{'author'}=~s/\\articlepagesref\s*{$label}/$pages/; +} + +if ($html) +{ + # If the html files need to be created, make the directory + # html-src, if it doesn't already exist + + unless (-d 'html-src') + { + &mkdirordie('html-src'); + } + + unless (-d 'html') + { + &mkdirordie('html'); + } + + if ($extractpreface) # v0.3 new + { + # If the preface needs to be extract, make a directory for it if + # it doesn't already exist + + my $prefdir = &fname("html-src", $preface_data->{'OutFile'}); + + unless (-d $prefdir) + { + &mkdirordie($prefdir); + } + + my $prefbase = &fname($prefdir, $preface_data->{'OutFile'}); + + &createprefacefile($prefdir, $prefbase); + + # Create the cfg file + + &createjmlrcfg("html-src", $preface_data->{'OutFile'}); + + &chdirordie($prefdir); + + &latex($preface_data->{'OutFile'}); + &htlatex($preface_data->{'OutFile'}, 'jmlr'); + + &chdirordie($org_dir, $main_path); + + # Check the appropriate subdirectory is in html directory + + my $outname = &fname('html', $preface_data->{'OutFile'}); + + unless (-d $outname) + { + &mkdirordie($outname); + } + + # Copy pdf file + + ©ordie("$prefbase.$format", + &fname($outname, "$preface_data->{OutFile}.$format")); + + # Copy html file + + ©html($preface_data->{'OutFile'}, $preface_data->{'OutFile'}); + } +} + +# Iterate through each imported article + +foreach my $import (@imports) +{ + my $label = $import->{'label'}; + my $importbase = &fname($import->{'path'}, $import->{'name'}); + + # Check the aux file of this article + + my $aux = "$importbase.aux"; + + # The aux file should exist because running LaTeX on the + # main file will create the aux file. + + my $bibdata = 0; + + if (open AUX, $aux) + { + &message("Reading '$aux'...\n"); + + while () + { + if (/\\bibdata\b/) + { + $bibdata = 1; + } + } + + close AUX; + } + elsif (not $execute) + { + warn "Can't open '$aux' - skipping\n"; + } + else + { + die "$appname: Can't open '$aux' $!\n"; + } + + # Do we need a bibtex run? + + if ($bibdata) + { + my $log = "$importbase.log"; + + # If the log file doesn't exist, run LaTeX + + unless (-e $log) + { + &chdirordie($import->{'path'}); + + &latex($import->{'name'}); + + &chdirordie($org_dir, $main_path); + } + + open LOGFD, $log or die "$appname: Can't open '$log' $!\n"; + + &message("Reading '$log'...\n"); + + my $runbibtex = 0; + + while () + { + if (/There were undefined citations\./) + { + # Run bibtex and latex + $runbibtex = 1; + + last; + } + } + + close LOGFD; + + if ($runbibtex) + { + &chdirordie($import->{'path'}); + + &bibtex($import->{'name'}); + &latex($import->{'name'}); + + &chdirordie($org_dir, $main_path); + } + } + + if ($html) + { + # If html is required, we also need pdf versions of the + # individual articles. + + # v0.2 run latex even if pdf file exists to ensure start page + # number is correct. + + &chdirordie($import->{'path'}); + + &latexstartpage($import->{'name'}, $pagerefs{$label}->{'start'}); + + &chdirordie($org_dir, $main_path); + + # Do we need a rerun? + + if (&needs_rerun($importbase)) + { + &chdirordie($import->{'path'}); + + &latexstartpage($import->{'name'}, $pagerefs{$label}->{'start'}); + + &chdirordie($org_dir,$main_path); + } + + my $importdir = $import->{'path'}; + + if ($importdir = '.') + { + $importdir = $import->{'name'}; + } + + # Check the appropriate subdirectory is in html-src + + my $name = &fname('html-src', $importdir); + + unless (-d $name) + { + &mkdirordie($name); + } + + my $text = ''; + + # Read the LaTeX file and store everything up to + # the end of the abstract + + my $tex = "$importbase.tex"; + + my $absfile = &fname("html-src", $importdir, + $import->{'name'}.'.tex'); + + if ($execute) + { + open TEX, $tex or die "$appname: Can't open '$tex': $!\n"; + + while () + { + # This doesn't handle complicated cases, such as + # the author using \abstract ... \endabstract + # or commenting out the abstract with conditionals + if (/^([^%]*)\\end{abstract}/) + { + $text .= $&; + last; + } + + $text .= $_; + } + + close TEX; + + # Add the 'html' class option: + unless ($text=~ + s/^([^%]*)\\documentclass\s*\[(.*)\]/$1\\documentclass[$2,html]/m) + { + $text=~s/^([^%]*)\\documentclass\s*/$1\\documentclass[html]/m; + } + + my $aux = "$importbase.aux"; + + $aux=~s/\\/\//g if ($dd eq '\\'); + + my $prebegindoc = '\\hypersetup{draft}' . $eol + . '\\makeatletter' . $eol + . "\\input{../../$aux}" . $eol + . '\\makeatother' + . $eol; + + my $begindoc = ''; + + # Set the authors + if (defined($import->{'author'})) + { + my $author = $import->{'author'}; + + $author=~s/^([^;]*);/\\textbf{\\emph{$1};}/; + + $begindoc .= "\\jmlrauthors{$author}"; + } + + # Add content div + + # v0.31 modified \footnote to set the footnote text as in-line + # parenthesis. + + $text=~s/^([^%\n\r\f]*)\\begin{document}/ + $prebegindoc$&$begindoc + \\HCode{
} + \\renewcommand{\\footnote}[2][]{ (\#2)}%$eol + /mx; + + # Create file containing the abstract + + open ABSFD,">$absfile" + or die "$appname: Can't create '$absfile': $!\n"; + + print ABSFD "\\batchmode", $eol if ($batchtex or $quiet); + + my $texpath = $import->{path}; + + $texpath=~s/\\/\//g if ($dd eq '\\'); + + print ABSFD + "\\makeatletter",$eol, + "\\def\\input\@path{{../../$texpath/}}$eol", + "\\makeatother",$eol, + $text, $eol, + "\\HCode{", &htmltimestamp, "}", $eol, + "\\HCode{
}", $eol, + &htmlmenu, # v0.3 added by Olivier Chapelle + "\\end{document}",$eol; + + close ABSFD; + } + else + { + &messagecall("Skipping creation of '$absfile'\n"); + } + + # Create the cfg file + + &createjmlrcfg("html-src", $importdir); + + # Run htlatex + + # Change directory + &chdirordie("html-src", $importdir); + + &htlatex($import->{'name'}, 'jmlr'); + + # Go back to main directory + + &chdirordie($org_dir, $main_path); + + # Copy the html file to the html directory, but rename + # the css file to jmlr.css + + ©html($importdir, $import->{'name'}); + + # Check the appropriate subdirectory is in html directory + + my $outname = &fname('html', $importdir); + + unless (-d $outname) + { + &mkdirordie($outname); + } + + # Copy pdf file + + ©ordie("$importbase.$format", + &fname($outname, "$import->{name}.$format")); + } +} + +# do we need to run bibtex on the main document? + +if ($main_bibdata) +{ + &bibtex($main_name); +} + +if ($online) +{ + &latexonline($main_name); + + # do we need a rerun? + + if (&needs_rerun($main_name)) + { + &message("Rerun required\n"); + &latexonline($main_name); + + # check again + + if (&needs_rerun($main_name)) + { + &message("Rerun required\n"); + &latexonline($main_name); + } + } +} + +if ($print) +{ + &latexprint($main_name); + + # do we need a rerun? + + if (&needs_rerun($main_name)) + { + &message("Rerun required\n"); + &latexprint($main_name); + + # check again + + if (&needs_rerun($main_name)) + { + &message("Rerun required\n"); + &latexprint($main_name); + } + } +} + +if ($html and $execute) +{ + # Make the index file + + my $indexfile = &fname('html-src', "index"); + + my $preamble = ''; + + open OUTFD, ">$indexfile.tex" + or die "Can't open '$indexfile.tex': $!\n"; + + open INFD, "$main_name.tex" + or die "Can't open '$main_name.tex': $!\n"; + + print OUTFD "\\batchmode", $eol if ($batchtex or $quiet); + + print OUTFD + "\\makeatletter",$eol, + "\\def\\input\@path{{../}}$eol", + "\\makeatother",$eol, + "\\def\\jmlrgrayscale{0}",$eol; + + while () + { + unless + (s/^([^%]*)\\documentclass\s*\[([^\]]*)\]/ + $1\\documentclass[$2,html]/x) + { + s/^([^%]*)\\documentclass\s*/$&\[html\]/; + } + + s/^([^%]*)\\begin{document}/ + \\hypersetup{draft}$eol$&\\HCode{
}/x; + + if (/^([^%]*)\\maketitle/) + { + $preamble .= join('', $1, "\\maketitle", $eol); + last; + } + + $preamble .= $_; + } + + close INFD; + + # Find the book logo + if ($preamble + =~/\\logo\s*(?:\[[^\]]*\])?\s*{(%\s*\n)?\\includegraphics\s*(\[[^\]]*\])?{([^}]*)}}/m) + { + my $texpath = $3; + my $orgtexpath = $texpath; + $texpath=~s/\//\\/g if ($dd eq "\\"); + + my $ext = ''; + + if (-e $texpath) + { + ©ordie($texpath, 'html'); + + ©ordie($texpath, 'html-src'); + } + elsif (-e "$texpath.png") + { + ©ordie("$texpath.png", 'html'); + + ©ordie("$texpath.png", 'html-src'); + + $ext = '.png'; + } + elsif (-e "$texpath.jpg") + { + ©ordie("$texpath.jpg", 'html'); + ©ordie("$texpath.jpg", 'html-src'); + + $ext = '.jpg'; + } + elsif (-e "$texpath.gif") + { + ©ordie("$texpath.gif", 'html'); + + ©ordie("$texpath.gif", 'html-src'); + + $ext = '.gif'; + } + + my $img = basename($texpath); + + if ($logourl) + { + $preamble=~s/ + \\includegraphics(\[[^\]]*\])?{$orgtexpath}/ + \\href{$logourl}{\\includegraphics${1}{$img$ext}}/mgx; + } + else + { + $preamble=~s/ + \\includegraphics(\[[^\]]*\])?{$orgtexpath}/ + \\includegraphics${1}{$img$ext}/mgx; + } + } + + print OUTFD $preamble, $eol; + + # Parse TOC + + my $toc = "$main_name.toc"; + + # Add link to preface if required + + if ($extractpreface) + { + print OUTFD + "\\begin{description}\\item[\\normalfont \\prefacename]", $eol; + + print OUTFD "\\textbf{\\emph{\\jmlrabbrnamelist{{", + join('},{', @preface_editors), + "}}};} ", + '\\csname @jmlrabbrvproceedings\\endcsname\\space', + '\\csname @jmlrvolume\\endcsname:', + $preface_data->{'Start'}; + + unless ($preface_data->{'Start'} eq $preface_data->{'End'}) + { + print OUTFD '--', $preface_data->{'End'}; + } + + print OUTFD ', \\csname @jmlryear\\endcsname\\newline', $eol; + + my $name = $preface_data->{'OutFile'}; + + print OUTFD "[\\HCode{html}] ", + "[\\HCode{pdf}]", + $eol; + + print OUTFD "\\end{description}$eol"; + } + + open TOC, $toc or die "Can't open '$toc': $!\n"; + + my $idx = 0; + + while () + { + if (/^\\tocpart\s*{(.*)}\s*$/) + { + print OUTFD "\\begin{center}\\bfseries $1\\end{center}$eol"; + } + elsif (/\\contentsline\s*{papertitle}{(.*)}{[^{}]*}{[^{}]*}\s*$/) + { + # v0.3 Changed by Olivier Chapelle to use description + # environment instead of paragraph break + print OUTFD "\\begin{description}\\item[\\normalfont $1]$eol"; + } + elsif (/\\contentsline\s*{chapterauthor}{(.*)}{[^{}]*}{[^{}]*}\s*$/) + { + my $details = $1; + $details=~s/([^;]*);/\\textbf{\\emph{$1};}/; + + my $label = $imports[$idx]->{'label'}; + my $pages = $pagerefs{$label}->{'start'}.'--' + . $pagerefs{$label}->{'end'}; + + $details=~s/\\articlepagesref\s*{$label}/$pages/; + + # v0.3 Changed by Olivier Chapelle to use newline instead of par + print OUTFD "$details\\newline$eol"; + + my $name = $imports[$idx]->{'name'}; + + print OUTFD "[\\HCode{abs}] ", + "[\\HCode{pdf}]", + $eol; + + # v0.3 Changed by Olivier Chapelle to end description + print OUTFD "\\end{description}$eol"; + + $idx++; + } + } + + close TOC; + + # version 0.2 added time stamp + + print OUTFD "\\HCode{", &htmltimestamp, "}$eol"; + + print OUTFD &htmlmenu; # v0.3 Added by Olivier Chapelle + + print OUTFD "\\HCode{
}\\end{document}$eol"; + + close OUTFD; + + # Go into html-src directory and run htlatex + + &chdirordie('html-src'); + + &htlatex("index", 'xhtml'); + + &chdirordie('..'); + + # Copy to html directory + + my $inname = &fname('html-src', 'index.html'); + my $outname = &fname('html', 'index.html'); + + open INFD, $inname or die "Can't open '$inname': $!\n"; + + open OUTFD, ">$outname" or die "Can't open '$outname': $!\n"; + + while () + { + s/href="index.css"/href="jmlr.css"/; + + print OUTFD; + } + + close OUTFD; + + close INFD; + + # v0.2 new: + # Copy any images generated by htlatex to html/ + + my @imagefiles = glob(&fname('html-src', "index*.png")); + + foreach my $imagefile (@imagefiles) + { + copy($imagefile, 'html'); + } +} +elsif ($html) +{ + &messagecall("chdir 'html-src'\n"); + &htlatex("index", 'xhtml'); +} + +# Return to original directory +chdir $org_dir; + +# Subroutines + +sub message{ print @_ unless ($quiet) } + +sub messagecall{ print @_ if (not $quiet or not $execute) } + +sub systemcall{ + my $cmd = shift; + + &messagecall($cmd, "\n"); + + my $code = 0; + + $code = system($cmd) if ($execute); + + $code; +} + +sub latex{ + my $file = shift; + + my $code = &systemcall(join(' ', $latexapp, $latexopts, "\"$file\"")); + + if ($code) + { + die "**LaTeX run failed with exit code $code.**\n", + "Check '$file.log' for details\n"; + } +} + +# v0.2 new +sub latexstartpage{ + my $file = shift; + my $page = shift; + + my $code = &systemcall(join(' ', $latexapp, $latexopts, + "\"\\def\\startpage{$page}\\input{$file}\"")); + + if ($code) + { + die "**LaTeX run failed with exit code $code.**\n", + "Check '$file.log' for details\n"; + } +} + +sub copyordie{ + my ($org, $dest) = @_; + + &messagecall("copy '$org' to '$dest'\n"); + + if ($execute) + { + copy($org, $dest) or die "Can't copy '$org' to '$dest': $!\n"; + } +} + +sub latexonline{ + my $file = shift; + + my $code = &systemcall(join(' ', $latexapp, $latexopts, + "\"\\def\\jmlrgrayscale{0}\\input{$file}\"")); + + if ($code) + { + die "**LaTeX run failed with exit code $code.**\n", + "Check '$file.log' for details\n"; + } + + ©ordie("$file.$format", "$file-online.$format"); +} + +sub latexprint{ + my $file = shift; + + my $code = &systemcall(join(' ', $latexapp, $latexopts, + "\"\\def\\jmlrgrayscale{1}\\input{$file}\"")); + + if ($code) + { + die "**LaTeX run failed with exit code $code.**\n", + "Check '$file.log' for details\n"; + } + + ©ordie("$file.$format", "$file-print.$format"); +} + +sub bibtex{ + my $file = shift; + + my $code = &systemcall( + join(' ', $bibtexapp, $bibtexopts, "\"$file\"")); + + if ($code) + { + die "**BibTeX run failed with exit code $code.**\n", + "Check '$file.blg' for details\n"; + } +} + +sub needs_rerun{ + my $file = shift; + my $rerun = 0; + + unless ($execute) + { + &messagecall("Skipping rerun check for '$file'\n"); + return 0; + } + + # Scan log file for rerun message + + my $log = "$file.log"; + + # If there's no log file a run is needed + open LOGFD, $log or return 1; + + while () + { + if (/Rerun to get cross-references right\./) + { + $rerun = 1; + last; + } + } + + close LOGFD; + + return $rerun; +} + +sub fname{ join($dd, @_) } + +# v0.3 new +sub chdirordie{ + my $dirname = &fname(@_); + + &messagecall("chdir '$dirname'\n"); + + unless (chdir $dirname) + { + if ($execute) + { + die "$appname: Can't change directory to $dirname: $!\n"; + } + else + { + warn "(Can't change directory to '$dirname')\n"; + } + } +} + +# v0.31 new +sub mkdirordie{ + my $dirname = &fname(@_); + + &messagecall("mkdir '$dirname'\n"); + + unless (mkdir $dirname) + { + if ($execute) + { + die "$appname: Can't create directory '$dirname': $!\n"; + } + else + { + warn "(Can't create directory '$dirname')\n"; + } + } +} + +# v0.2 new +sub htmltimestamp{ + my $timestamp = localtime; + + return "
Page last modified on $timestamp.
"; +} + +# v0.3 Added by Olivier Chapelle +sub htmlmenu{ + return ' +\\HCode{

} +\\HCode{} +\\HCode{



} +\\HCode{

Home Page } +\\HCode{

Papers } +\\HCode{

Submissions } +\\HCode{

News } +\\HCode{

Scope } +\\HCode{

Editorial Board } +\\HCode{

Announcements } +\\HCode{

Proceedings } +\\HCode{

Open Source Software} +\\HCode{

Search } +\\HCode{

Login

} +\\HCode{

} +\\HCode{

} +\\HCode{RSS Feed} +\\HCode{} +\\HCode{

} +' +} + +# v0.3 new +sub htlatex{ + my ($filename, $cfg) = @_; + + # unicode-related options suggested by Olivier Chapelle + + # v0.31 added latex options in 5th parameter + + my $code = &systemcall(join(' ', 'htlatex', + "\"$filename\"", + "\"$cfg,uni-html4\"", + "\" -cunihtf -utf8\"", + '""', + "\" $latexopts\"" + )); + + if ($code) + { + die "$appname: htlatex failed with exit code $code.\n"; + } +} + +#v0.3 new +sub createjmlrcfg{ + my $cfg = &fname(@_, "jmlr.cfg"); + + unless ($execute) + { + &messagecall("Skipping creation of '$cfg'\n"); + return; + } + + open CFG, ">$cfg" or die "$appname: Can't create '$cfg': $!\n"; + +print CFG <$outfile" or die "Can't open '$outfile': $!\n"; + + while () + { + s/href="$name\.css"/href="jmlr.css"/; + + print OUTFD; + } + + close OUTFD; + + close INFD; + + # Copy css file + + ©ordie("html-src/$dir/$name.css", "html/jmlr.css"); +} + +sub parsemainaux{ + my $mainaux = shift; + + &message("Reading '$mainaux'...\n"); + + unless (open AUX, "$mainaux") + { + if ($execute) + { + die "$appname: Can't open '$mainaux' $!\n"; + } + else + { + warn "(Can't open '$mainaux' - skipping)\n"; + return; + } + } + + while () + { + if (/\\bibdata\b/) + { + $main_bibdata = 1; + } + elsif (/\\\@jmlr\@import{(.*)}{(.*)}{(.*)}/) + { + my $import = + { + label => $1, + path => $2, + name => $3 + }; + + $import->{'name'} =~s/\.(tex|ltx)\Z//; + + push @imports, $import; + } + elsif (/\\contentsline\s*{chapterauthor}{(.*)}{}{}}\s*$/ + and $#imports > -1) + { + $imports[$#imports]->{'author'} = $1; + } + elsif (/^\\newlabel\s*{([^}]*)jmlrstart}{{([^}]*)}{([^}]*)}/) + { + my $label = $1; + + $pagerefs{$label}->{'start'} = $3; + } + elsif (/^\\newlabel\s*{([^}]*)jmlrend}{{([^}]*)}{([^}]*)}/) + { + my $label = $1; + + $pagerefs{$label}->{'end'} = $3; + } + elsif ($extractpreface) # v0.3 new + { + if (/^\\\@prefacestart{([^}]*)}{(\d*)}/) + { + $preface_data->{'Start'} = $1; + $preface_data->{'StartArabic'} = $2; + } + elsif (/^\\\@prefaceend{([^}]*)}/) + { + $preface_data->{'End'} = $1; + } + elsif (/^\\\@prefacefile{([^}]*)}{([^}]*)}/) + { + $preface_data->{'File'} = $1; + $preface_data->{'OutFile'} = $2; + } + elsif (/^\\\@prefaceeditor{(.*)}/) + { + my $name = $1; + $name=~s/\\\\.*//; + push @preface_editors, $name; + } + } + } + + # if preface is to be extracted, has the require data been found? + + if ($extractpreface) + { + unless ($preface_data->{'File'}) + { + warn "$appname: Can't find preface information in aux file.\n", + "Have you used the preface environment?\n"; + + $extractpreface = 0; + } + } + + close AUX; +} + +sub createprefacefile{ + my ($prefdir, $prefbase) = @_; + + my $prefout = "$prefbase.tex"; + + &messagecall("Create preface file '$prefout'\n"); + + return unless ($execute); + + # Open preface output file + + open PREFOUT, ">$prefout" + or die "$appname: Can't open '$prefout': $!\n"; + + print PREFOUT "\\batchmode", $eol if ($batchtex or $quiet); + print PREFOUT "\\makeatletter", $eol; + print PREFOUT "\\def\\input\@path{{../../}}", $eol; + print PREFOUT "\\makeatother", $eol; + + # Get the book's preamble + + my $filename = "$main_name$main_suffix"; + + open BOOK, $filename + or die "$appname: Can't open '$filename': $!\n"; + + while () + { + if (/\\documentclass/) + { + unless (s/^([^%]*)\\documentclass\s*\[(.*)\]/$1\\documentclass[$2,html]/m) + { + s/^([^%]*)\\documentclass\s*/$1\\documentclass[html]/m; + } + + print PREFOUT; + } + elsif (/^\\begin{document}/) + { + if ($preface_data->{'Start'}=~/^[clxvi]+$/) + { + print PREFOUT "\\pagenumbering{roman}%", $eol; + } + elsif ($preface_data->{'Start'}=~/^[CLXVI]+$/) + { + print PREFOUT "\\pagenumbering{Roman}%", $eol; + } + + print PREFOUT + "\\setcounter{page}{", + $preface_data->{'StartArabic'}, + "}%", $eol; + + # \hypersetup{draft} is used to suppress links. + # (Only a partial document so internal links may be + # dead. Also prevents unwanted tag before the DOCTYPE + # line in the HTML file.) + + print PREFOUT + "\\hypersetup{draft}", $eol, + '\\makeatletter', + "\\\@openrightfalse\\input{../../$main_name.aux}", + '\\makeatother', $eol; + + print PREFOUT + "\\providecommand{\\HCode}[1]{}", $eol, + "\\title{\\prefacename}", $eol, + "\\begin{document}", $eol, + "\\HCode{
}", $eol; + + last; + } + else + { + print PREFOUT; + } + } + + close BOOK; + + # Preface file name will have '/' as directory divider + + my $preffile = $preface_data->{'File'}; + + if ($dd eq "\\") + { + $preffile=~s/\//\\/g; + } + + open PREFIN, $preffile + or die "$appname: Can't open '$preffile': $!\n"; + + my $scanning = 0; + + while () + { + # This is fairly primitive and works best when the begin + # and end of the environment are on their own line. + + if (/\\begin{preface}/) + { + print PREFOUT; + $scanning = 1; + } + elsif ($scanning) + { + print PREFOUT; + + last if /\\end{preface}/; + } + } + + close PREFIN; + + print PREFOUT + "\\HCode{", &htmltimestamp, "}", $eol, + "\\HCode{
}", $eol, + &htmlmenu, + "\\end{document}", $eol; + + close PREFOUT; + +} + +1; diff --git a/macros/latex/contrib/jmlr/sample-books/bookLogo-gray.png b/macros/latex/contrib/jmlr/sample-books/bookLogo-gray.png new file mode 100644 index 0000000000..3baf8157e9 Binary files /dev/null and b/macros/latex/contrib/jmlr/sample-books/bookLogo-gray.png differ diff --git a/macros/latex/contrib/jmlr/sample-books/bookLogo.png b/macros/latex/contrib/jmlr/sample-books/bookLogo.png new file mode 100644 index 0000000000..e9ae63dacf Binary files /dev/null and b/macros/latex/contrib/jmlr/sample-books/bookLogo.png differ diff --git a/macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.pdf b/macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.pdf new file mode 100644 index 0000000000..4d2cabbda9 Binary files /dev/null and b/macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.pdf differ diff --git a/macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.tex b/macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.tex new file mode 100644 index 0000000000..465bca51f7 --- /dev/null +++ b/macros/latex/contrib/jmlr/sample-books/jmlrbook-sample.tex @@ -0,0 +1,247 @@ + % Define \jmlrprehyperref to load packages before hyperref is + % loaded +\def\jmlrprehyperref{% + % Packages used by imported articles: + \usepackage{lipsum} + \usepackage{booktabs} + \usepackage{siunitx} +} +\documentclass[wcp,7x10]{jmlrbook}% on-line color version, 7inx10in + %\documentclass[wcp,gray,7x10]{jmlrbook}% print version, 7inx10in + + % Load last + \ifprint{}{\usepackage{bookmark}} + + % Title is added to the PDF properties. Optional argument + % is used instead, if present. + %\title[Short Title]{Big Long Title} +\title{A Sample Book} + +\author[Anne Editor et al.]{Anne Editor, Anne Other Editor and Nicola Talbot} + + % change the arguments, as appropriate, in the following: +\volume{1} +\subtitle{Making a Book from JMLR Articles} +\logo{\includegraphics{bookLogo}} +\team{The Sample Book Team} + +\productioneditor{Nicola Talbot} + +\begin{document} +\maketitle + +\frontmatter + +\chapter{Foreword} + +This is an example book that combines multiple articles. Each +article uses the \textsf{jmlr} class file. \emph{The articles +should not need to be edited in order to combine them using this +class file.}\footnote{Unless the authors have done something +weird or have used problematic packages.} In particular, you +don't need to delete \verb|\documentclass|, +\verb|\begin{document}| and \verb|\end{document}|. The articles +should be able to compile on their own or as part of this book. + +In the preamble of the book, you need to include the packages +that the articles include, but you don't need to include +any packages that are automatically loaded by the \textsf{jmlr} +class (\textsf{amsmath}, \textsf{amssymb}, \textsf{natbib}, +\textsf{graphicx}, \textsf{url}, \textsf{xcolor} and +\textsf{algorithm2e}). You also don't need to include the +\textsf{hyperref} and \textsf{combnat} packages as they are +automatically loaded by \textsf{jmlrbook}. For example, some of the +articles imported in this book use the \textsf{lipsum} package, +so that package needs to be included in the preamble of the +book. + +Commands defined in the imported articles will be local to that +article unless \verb|\gdef| or \verb|\global| has been used. This +means that if more than one article has defined the same command, +there shouldn't be a conflict unless the command has been defined +globally. For example, \texttt{paper1/paper1.tex} and +\texttt{paper2/paper2.tex} both define \verb|\samplecommand|, but +since \verb|\newcommand| has been used, rather than \verb|\gdef|, +there's no conflict. However, a problem will occur if the same +command is also defined in this document before either of those +files are imported. + +Many packages must be loaded before \textsf{hyperref}. If these +packages haven't been loaded by \textsf{jmlr}, you will need +to specify them using \textsf{jmlrbook}'s \verb|\jmlrprehyperref| +hook. For example, to load the packages ``foo'' and ``bar'': +\begin{verbatim} +\def\jmlrprehyperref{\usepackage{foo}\usepackage{bar}} +\documentclass{jmlrbook} +\end{verbatim} +or: +\begin{verbatim} +\def\jmlrprehyperref{\usepackage{foo,bar}} +\documentclass{jmlrbook} +\end{verbatim} + + +The imported papers need to be placed inside the +\texttt{jmlrpapers} environment. Papers that have already +been published should be included using \verb|\importpubpaper| +and papers that haven't been published elsewhere should be +imported using \verb|\importarticle|. Both commands have an +optional argument that specifies the prefix to use in the labels +within the imported article. If omitted, the article's file +name is used. + +Both articles and the book may have appendices and parts created. +Parts are created using \verb|\part|\{\emph{title}\}. Switch +to appendices using \verb|\appendix| and then use \verb|\chapter| +(for the book) or \verb|\section| (in imported articles). + +Cross-referencing other parts of the book is done using the +usual \verb|\label| and \verb|\ref| mechanism. The \textsf{jmlr} +class additional provides convenience commands such as +\verb|\sectionref| and \verb|\figureref|. Unlike \verb|\ref|, +these commands may take a comma-separated list of labels as the +argument. + +The \textsf{jmlrbook} additionally provides \verb|\chapterref| +(which can take a comma-separated list of labels) and commands +to reference imported articles (which take a single label +as the argument): \verb|\articlepageref| (the starting page of +the article), \verb|\articlepagesref| (the page range for the +article), \verb|\articletitleref| (the short title for the +article) and \verb|\articleauthorref| (the article's author). + +You may also cross-reference parts of the imported articles, +but you need to prefix the label with the label supplied +in the optional argument of \verb|\importpubpaper| or +\verb|\importarticle|. (If omitted, this is given by +directory/file name.) + +For example, the first appendix in this book is +\appendixref{apd:first}, but the first appendix in +``\articletitleref{paper1/paper1}'' by +\articleauthorref{paper1/paper1} +(pp.~\articlepagesref{paper1/paper1}) is +\appendixref{paper1/paper1apd:first}. +Here's a reference to a couple of tables in +\articletitleref{paper1/paper1}: +\tableref{paper1/paper1tab:sample,paper1/paper1tab:sample2}. + +The author of a foreword (or other chapter) can sign off using +the \texttt{authorsignoff} environment. Each author should be +specified using \verb|\Author|. + +\begin{authorsignoff} +\Author{Nicola Talbot\\ +University of East Anglia} +\end{authorsignoff} + +\begin{preface} +The preface environment should be used for the preface if you want +makejmlrbook to extract the preface and turn it into a standalone +document. + +The editorial team can sign off at the end of the preface using +the \texttt{signoff} environment. This has two arguments: the +optional argument is a name for the editorial team (defaults to +``The Editorial Team'') and the mandatory argument is the date. +Within the environment, use \verb|\Editor| for each editor. + +\begin{signoff}{March 2010} +% First editor: +\Editor{Nicola Talbot\\ +University of East Anglia\\ +\mailto{N.Talbot@uea.ac.uk}} +% Second editor: +\Editor{Anne Editor\\ +University of Nowhere\\ +\mailto{ae@sample.com}} +\end{signoff} + +\end{preface} + +\tableofcontents + +\mainmatter + +\part{First Part of the Book} + +\chapter{Introduction} + +This is an introduction to the book. + +\section{Sample Section} + +This is a section in the introduction. + +\subsection{Sample Sub-Section} + +This is a sub-section. + +\subsubsection{Sample Sub-Sub-Section} + +This is a sub-sub-section. + +\paragraph{Sample Sub-Sub-Sub-Section} + +This is a sub-sub-sub-section. + +\subparagraph{Sample Sub-Sub-Sub-Sub-Section} + +This is a sub-sub-sub-sub-section. + +% Add a part to the TOC but don't print anything +\addtocpart{Papers Published in JMLR W\&CP} + +\begin{jmlrpapers} + % Prepublished papers are imported using: + % \importpubpaper[label]{dir}{file}{pages} + % pages refers to the page range in the original publication + % which doesn't necessarily correspond to the page numbers in + % this book. + \importpubpaper{paper1}{paper1}{23--45} + + \importpubpaper{paper2}{paper2}{63--70} + +\end{jmlrpapers} + +% Add a part to the TOC but don't print anything +\addtocpart{Unpublished Papers} + +\begin{jmlrpapers} + % Unpublished papers are imported using: + % \importarticle[label]{dir}{file} + \importarticle{paper3}{paper3} + + \importarticle{paper4}{paper4} +\end{jmlrpapers} + +\appendix + +\part{First Part of Appendices}\label{pt:apd1} + +\chapter*{Introduction} + +This is an introduction to \partref{pt:apd1}. + +\chapter{First Appendix} +\label{apd:first} + +This is an appendix. + +\chapter{Second Appendix} +\label{apd:second} + +This is another appendix. + +\lipsum + +\part{Second Part of Appendices} + +\chapter{An Appendix} +\label{apd:third} + +This is an appendix in another part. + +\lipsum + +\end{document} diff --git a/macros/latex/contrib/jmlr/sample-books/paper1/paper1.bib b/macros/latex/contrib/jmlr/sample-books/paper1/paper1.bib new file mode 100644 index 0000000000..ddc24c6662 --- /dev/null +++ b/macros/latex/contrib/jmlr/sample-books/paper1/paper1.bib @@ -0,0 +1,19 @@ +@article{guyon-elisseeff-03, + title = "An Introduction to Variable and Feature Selection", + author = "I. Guyon and A. Elisseeff", + journal = "JMLR", + volume = "3", + month = MAR, + pages = "1157-1182", + year = 2003 +} + +@techreport{guyon2007causalreport, + author = {I. Guyon and C. Aliferis and A. Elisseeff}, + title = {Causal Feature Selection}, + institution = {Clopinet}, + year = 2007, + type = {Technical Report }, + source = {\url{http://clopinet.com/isabelle/Papers/causalFS.pdf}} +} + diff --git a/macros/latex/contrib/jmlr/sample-books/paper1/paper1.tex b/macros/latex/contrib/jmlr/sample-books/paper1/paper1.tex new file mode 100644 index 0000000000..bab6242527 --- /dev/null +++ b/macros/latex/contrib/jmlr/sample-books/paper1/paper1.tex @@ -0,0 +1,98 @@ +% This file is public domain + +\documentclass[wcp]{jmlr} + +\usepackage{lipsum}% Provides dummy text for this example + +\newcommand{\samplecommand}{\emph{A sample command}} + +\jmlrvolume{42} +\jmlryear{2010} +\jmlrworkshop{Workshop on Causality} + +\title[Article 1]{First Sample Article} + +\author{\Name{Jane Doe}\Email{jd@sample.com}\and +\Name{John {Smith Jones}}\Email{jsj@sample.com}\\ +\addr{University of No Where}} + +\editor{Anne Editor} + +\begin{document} +\maketitle + +\begin{abstract} +This abstract has a citation \citep{guyon-elisseeff-03}. +\lipsum[1] +\end{abstract} +\begin{keywords} +Sample +\end{keywords} + +\section{Introduction} + +This is a sample article. \sectionref{sec:method} discusses +the method used. \equationref{eq:emc2} is an interesting +equation. The results are discussed in \sectionref{sec:results} +and some other stuff is in \appendixref{apd:first}.\footnote{Here's +a footnote.} +\samplecommand. + +\lipsum + +\section{Method}\label{sec:method} + +\lipsum + +\begin{equation}\label{eq:emc2} +E = mc^2 +\end{equation} + +A network is shown in Figure~\ref{fig:network}. + +\begin{figure}[htbp] + \floatconts + {fig:network}% + {\caption{A Network}}% + {\includegraphics{images/network}}% +\end{figure} + +\section{Results}\label{sec:results} + +\begin{table}[htbp] +\floatconts + {tab:sample} + {\caption{A Sample Table}} + {% + \begin{tabular}{cc} + A & B\\ + 1 & 2 + \end{tabular} + }% +\end{table} + +\begin{table}[htbp] +\floatconts + {tab:sample2} + {\caption{Another Sample Table}} + {% + \begin{tabular}{cc} + A & B\\ + 1 & 2 + \end{tabular} + }% +\end{table} + +\lipsum + +Here are some citations: +\citet{guyon-elisseeff-03,guyon2007causalreport}.\footnote{And +here's another footnote.} + +\bibliography{paper1} + +\appendix +\section{First Appendix}\label{apd:first} + +\lipsum +\end{document} diff --git a/macros/latex/contrib/jmlr/sample-books/paper2/paper2.bib b/macros/latex/contrib/jmlr/sample-books/paper2/paper2.bib new file mode 100644 index 0000000000..ddc24c6662 --- /dev/null +++ b/macros/latex/contrib/jmlr/sample-books/paper2/paper2.bib @@ -0,0 +1,19 @@ +@article{guyon-elisseeff-03, + title = "An Introduction to Variable and Feature Selection", + author = "I. Guyon and A. Elisseeff", + journal = "JMLR", + volume = "3", + month = MAR, + pages = "1157-1182", + year = 2003 +} + +@techreport{guyon2007causalreport, + author = {I. Guyon and C. Aliferis and A. Elisseeff}, + title = {Causal Feature Selection}, + institution = {Clopinet}, + year = 2007, + type = {Technical Report }, + source = {\url{http://clopinet.com/isabelle/Papers/causalFS.pdf}} +} + diff --git a/macros/latex/contrib/jmlr/sample-books/paper2/paper2.tex b/macros/latex/contrib/jmlr/sample-books/paper2/paper2.tex new file mode 100644 index 0000000000..9a03081eb3 --- /dev/null +++ b/macros/latex/contrib/jmlr/sample-books/paper2/paper2.tex @@ -0,0 +1,65 @@ +% This file is public domain + +\documentclass[wcp]{jmlr} + +\usepackage{lipsum}% Provides dummy text for this example + +\newcommand{\samplecommand}{\textbf{A sample command}} + +\jmlrvolume{42} +\jmlryear{2010} +\jmlrworkshop{Workshop on Causality} + +\title[Article 2]{Second Sample Article} + +\author{\Name{Bob {de Winter}}\Email{bdw@sample.com}\\ +\Name{{\'E}louise Mary Finchley}\Email{emf@sample.com}\\ +\Name{Jack Mark Jones}\Email{jmj@sample.com}\\ +\addr{University of No Where}} + +\editor{Anne Other Editor} + +\begin{document} +\maketitle + +\begin{abstract} +\lipsum[1] +\end{abstract} +\begin{keywords} +Sample +\end{keywords} + +\section{Introduction} + +This is a sample article. \sectionref{sec:method} discusses +the method used. \equationref{eq:emc2} is an interesting +equation. The results are discussed in \sectionref{sec:results} +and some other stuff is in \appendixref{apd:first}.\footnote{Here's +a footnote.} +\samplecommand. + +\lipsum + +\section{Method}\label{sec:method} + +\lipsum + +\begin{equation}\label{eq:emc2} +E = mc^2 +\end{equation} + +\section{Results}\label{sec:results} + +\lipsum + +Here are some citations: +\citet{guyon-elisseeff-03,guyon2007causalreport}.\footnote{Here's +another footnote.} + +\bibliography{paper2} + +\appendix +\section{First Appendix}\label{apd:first} + +\lipsum +\end{document} diff --git a/macros/latex/contrib/jmlr/sample-books/paper3/paper3.bib b/macros/latex/contrib/jmlr/sample-books/paper3/paper3.bib new file mode 100644 index 0000000000..ddc24c6662 --- /dev/null +++ b/macros/latex/contrib/jmlr/sample-books/paper3/paper3.bib @@ -0,0 +1,19 @@ +@article{guyon-elisseeff-03, + title = "An Introduction to Variable and Feature Selection", + author = "I. Guyon and A. Elisseeff", + journal = "JMLR", + volume = "3", + month = MAR, + pages = "1157-1182", + year = 2003 +} + +@techreport{guyon2007causalreport, + author = {I. Guyon and C. Aliferis and A. Elisseeff}, + title = {Causal Feature Selection}, + institution = {Clopinet}, + year = 2007, + type = {Technical Report }, + source = {\url{http://clopinet.com/isabelle/Papers/causalFS.pdf}} +} + diff --git a/macros/latex/contrib/jmlr/sample-books/paper3/paper3.tex b/macros/latex/contrib/jmlr/sample-books/paper3/paper3.tex new file mode 100644 index 0000000000..7b4680ef2d --- /dev/null +++ b/macros/latex/contrib/jmlr/sample-books/paper3/paper3.tex @@ -0,0 +1,56 @@ +% This file is public domain + +\documentclass[wcp]{jmlr} + +\usepackage{lipsum}% Provides dummy text for this example + +\title[Article 3]{Third Sample Article} + +\author{\Name{John Smith}\Email{js@sample.com}\\ +\addr{University of No Where}} + +\editor{Anne Editor} + +\begin{document} +\maketitle + +\begin{abstract} +\lipsum[1] +\end{abstract} +\begin{keywords} +Sample +\end{keywords} + +\section{Introduction} + +This is a sample article. \sectionref{sec:method} discusses +the method used. \equationref{eq:emc2} is an interesting +equation. The results are discussed in \sectionref{sec:results} +and some other stuff is in \appendixref{apd:first}.\footnote{Here's +a footnote.} + +\lipsum + +\section{Method}\label{sec:method} + +\lipsum + +\begin{equation}\label{eq:emc2} +E = mc^2 +\end{equation} + +\section{Results}\label{sec:results} + +\lipsum + +Here are some citations: +\citet{guyon-elisseeff-03,guyon2007causalreport}.\footnote{Here's +another footnote.} + +\bibliography{paper3} + +\appendix +\section{First Appendix}\label{apd:first} + +\lipsum +\end{document} diff --git a/macros/latex/contrib/jmlr/sample-books/paper4/paper4.bib b/macros/latex/contrib/jmlr/sample-books/paper4/paper4.bib new file mode 100644 index 0000000000..ddc24c6662 --- /dev/null +++ b/macros/latex/contrib/jmlr/sample-books/paper4/paper4.bib @@ -0,0 +1,19 @@ +@article{guyon-elisseeff-03, + title = "An Introduction to Variable and Feature Selection", + author = "I. Guyon and A. Elisseeff", + journal = "JMLR", + volume = "3", + month = MAR, + pages = "1157-1182", + year = 2003 +} + +@techreport{guyon2007causalreport, + author = {I. Guyon and C. Aliferis and A. Elisseeff}, + title = {Causal Feature Selection}, + institution = {Clopinet}, + year = 2007, + type = {Technical Report }, + source = {\url{http://clopinet.com/isabelle/Papers/causalFS.pdf}} +} + diff --git a/macros/latex/contrib/jmlr/sample-books/paper4/paper4.tex b/macros/latex/contrib/jmlr/sample-books/paper4/paper4.tex new file mode 100644 index 0000000000..f37498c6c5 --- /dev/null +++ b/macros/latex/contrib/jmlr/sample-books/paper4/paper4.tex @@ -0,0 +1,53 @@ +% This file is public domain + +\documentclass[wcp]{jmlr} + +\usepackage{lipsum}% Provides dummy text for this example + +\title[Article 4]{Fourth Sample Article} + +\author{\Name{Mary-Jane {de Beer}}\Email{mjdb@sample.com}\\ +\addr{University of No Where}} + +\editor{Anne Editor} + +\begin{document} +\maketitle + +\begin{abstract} +\lipsum[1] +\end{abstract} +\begin{keywords} +Sample +\end{keywords} + +\section{Introduction} + +This is a sample article. \sectionref{sec:method} discusses +the method used. \equationref{eq:emc2} is an interesting +equation. The results are discussed in \sectionref{sec:results} +and some other stuff is in \appendixref{apd:first}. + +\lipsum + +\section{Method}\label{sec:method} + +\lipsum + +\begin{equation}\label{eq:emc2} +E = mc^2 +\end{equation} + +\section{Results}\label{sec:results} + +\lipsum + +Here are some citations: \citet{guyon-elisseeff-03,guyon2007causalreport}. + +\bibliography{paper4} + +\appendix +\section{First Appendix}\label{apd:first} + +\lipsum +\end{document} diff --git a/macros/latex/contrib/jmlr/sample-books/proceedings-sample.pdf b/macros/latex/contrib/jmlr/sample-books/proceedings-sample.pdf new file mode 100644 index 0000000000..e71265841b Binary files /dev/null and b/macros/latex/contrib/jmlr/sample-books/proceedings-sample.pdf differ diff --git a/macros/latex/contrib/jmlr/sample-books/proceedings-sample.tex b/macros/latex/contrib/jmlr/sample-books/proceedings-sample.tex new file mode 100644 index 0000000000..86655f09e8 --- /dev/null +++ b/macros/latex/contrib/jmlr/sample-books/proceedings-sample.tex @@ -0,0 +1,79 @@ + % Most packages need to be loaded before hyperref + % so put them in the definition of \jmlrprehyperref + +\def\jmlrprehyperref{% + % Packages used by imported articles: + \usepackage{lipsum} +} + +%\documentclass[wcp,gray]{jmlrbook} +\documentclass[wcp]{jmlrbook} + +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} + +\ifprint{}{\usepackage{bookmark}}% load last + + % Title is added to the PDF properties. Optional argument + % is used instead, if present. + %\title[Short Title]{Big Long Title} +\title{Sample Proceedings} + +\author[Anne Editor et al.]{Anne Editor, Anne Other Editor and Nicola Talbot} + +\subtitle{\thejmlrworkshop} + +\jmlrvolume{42} +\jmlryear{2010} +\jmlrworkshop{Workshop on Causality} +\jmlrlocation{Somewhere} + +\logo{\includegraphics{bookLogo}} + +\begin{document} +\maketitle + +\frontmatter + +\chapter{Foreword} + +This is the foreword. + +\begin{authorsignoff} +\Author{Nicola Talbot\\ +University of East Anglia} +\end{authorsignoff} + +\begin{preface} + +This is the preface. + +\begin{signoff}{March 2010} + % First editor: +\Editor{Anne Editor\\ +University of Nowhere\\ +\mailto{ae@sample.com}} + % Second editor: +\Editor{Anne Other Editor\\ +University of Nowhere\\ +\mailto{aoe@sample.com}} +\end{signoff} + +\end{preface} + +\tableofcontents + +\mainmatter + +\begin{jmlrpapers} + \addtocpart{Introduction} + % syntax: \importpaper[label]{directory}{filename} + \importpaper{paper1}{paper1} + \addtocpart{First Topic} + \importpaper{paper2}{paper2} + \importpaper{paper3}{paper3} + \addtocpart{Second Topic} + \importpaper{paper4}{paper4} +\end{jmlrpapers} + +\end{document} diff --git a/macros/latex/contrib/jmlr/sample-papers/images/circle-gray.png b/macros/latex/contrib/jmlr/sample-papers/images/circle-gray.png new file mode 100644 index 0000000000..e636646538 Binary files /dev/null and b/macros/latex/contrib/jmlr/sample-papers/images/circle-gray.png differ diff --git a/macros/latex/contrib/jmlr/sample-papers/images/circle.jpg b/macros/latex/contrib/jmlr/sample-papers/images/circle.jpg new file mode 100644 index 0000000000..365deb2e1f Binary files /dev/null and b/macros/latex/contrib/jmlr/sample-papers/images/circle.jpg differ diff --git a/macros/latex/contrib/jmlr/sample-papers/images/nodes-gray.png b/macros/latex/contrib/jmlr/sample-papers/images/nodes-gray.png new file mode 100644 index 0000000000..e4af05acda Binary files /dev/null and b/macros/latex/contrib/jmlr/sample-papers/images/nodes-gray.png differ diff --git a/macros/latex/contrib/jmlr/sample-papers/images/nodes.png b/macros/latex/contrib/jmlr/sample-papers/images/nodes.png new file mode 100644 index 0000000000..a4e79c2506 Binary files /dev/null and b/macros/latex/contrib/jmlr/sample-papers/images/nodes.png differ diff --git a/macros/latex/contrib/jmlr/sample-papers/images/square-gray.png b/macros/latex/contrib/jmlr/sample-papers/images/square-gray.png new file mode 100644 index 0000000000..b150e66354 Binary files /dev/null and b/macros/latex/contrib/jmlr/sample-papers/images/square-gray.png differ diff --git a/macros/latex/contrib/jmlr/sample-papers/images/square.png b/macros/latex/contrib/jmlr/sample-papers/images/square.png new file mode 100644 index 0000000000..8844e85816 Binary files /dev/null and b/macros/latex/contrib/jmlr/sample-papers/images/square.png differ diff --git a/macros/latex/contrib/jmlr/sample-papers/images/teximage.tex b/macros/latex/contrib/jmlr/sample-papers/images/teximage.tex new file mode 100644 index 0000000000..9fdc0d1382 --- /dev/null +++ b/macros/latex/contrib/jmlr/sample-papers/images/teximage.tex @@ -0,0 +1,4 @@ +\frame{\begin{picture}(100,100) +\put(25,50){\dashbox{.5}(10,10){$A$}} +\put(50,50){\dashbox{.5}(10,10){$B$}} +\end{picture}} diff --git a/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.bib b/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.bib new file mode 100644 index 0000000000..ddc24c6662 --- /dev/null +++ b/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.bib @@ -0,0 +1,19 @@ +@article{guyon-elisseeff-03, + title = "An Introduction to Variable and Feature Selection", + author = "I. Guyon and A. Elisseeff", + journal = "JMLR", + volume = "3", + month = MAR, + pages = "1157-1182", + year = 2003 +} + +@techreport{guyon2007causalreport, + author = {I. Guyon and C. Aliferis and A. Elisseeff}, + title = {Causal Feature Selection}, + institution = {Clopinet}, + year = 2007, + type = {Technical Report }, + source = {\url{http://clopinet.com/isabelle/Papers/causalFS.pdf}} +} + diff --git a/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.pdf b/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.pdf new file mode 100644 index 0000000000..4b6c39852f Binary files /dev/null and b/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.pdf differ diff --git a/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.tex b/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.tex new file mode 100644 index 0000000000..ac147209d6 --- /dev/null +++ b/macros/latex/contrib/jmlr/sample-papers/jmlr-sample.tex @@ -0,0 +1,840 @@ + % use the "wcp" class option for workshop and conference + % proceedings + %\documentclass[gray]{jmlr} % test grayscale version + %\documentclass[tablecaption=bottom]{jmlr}% journal article + \documentclass[tablecaption=bottom,wcp]{jmlr} % W&CP article + + % The following packages will be automatically loaded: + % amsmath, amssymb, natbib, graphicx, url, algorithm2e + + %\usepackage{rotating}% for sideways figures and tables + %\usepackage{longtable}% for long tables + + % The booktabs package is used by this sample document + % (it provides \toprule, \midrule and \bottomrule). + % Remove the next line if you don't require it. +\usepackage{booktabs} + % The siunitx package is used by this sample document + % to align numbers in a column by their decimal point. + % Remove the next line if you don't require it. +\usepackage[load-configurations=version-1]{siunitx} % newer version + %\usepackage{siunitx} + + % The following command is just for this sample document: +\newcommand{\cs}[1]{\texttt{\char`\\#1}}% remove this in your real article + + % Define an unnumbered theorem just for this sample document for + % illustrative purposes: +\theorembodyfont{\upshape} +\theoremheaderfont{\scshape} +\theorempostheader{:} +\theoremsep{\newline} +\newtheorem*{note}{Note} + + % change the arguments, as appropriate, in the following: +\jmlrvolume{1} +\jmlryear{2010} +\jmlrsubmitted{submission date} +\jmlrpublished{publication date} +\jmlrworkshop{workshop title} % W&CP title + + % The optional argument of \title is used in the header +\title[Short Title]{Full Title of Article\titlebreak This Title Has +A Line Break} + + % Anything in the title that should appear in the main title but + % not in the article's header or the volume's table of + % contents should be placed inside \titletag{} + + %\title{Title of the Article\titletag{\thanks{Some footnote}}} + + + % Use \Name{Author Name} to specify the name. + % If the surname contains spaces, enclose the surname + % in braces, e.g. \Name{John {Smith Jones}} similarly + % if the name has a "von" part, e.g \Name{Jane {de Winter}}. + % If the first letter in the forenames is a diacritic + % enclose the diacritic in braces, e.g. \Name{{\'E}louise Smith} + + % \thanks must come after \Name{...} not inside the argument for + % example \Name{John Smith}\nametag{\thanks{A note}} NOT \Name{John + % Smith\thanks{A note}} + + % Anything in the name that should appear in the title but not in the + % article's header or footer or in the volume's + % table of contents should be placed inside \nametag{} + + % Two authors with the same address + \author{\Name{Author Name1\nametag{\thanks{A note}}} \Email{abc@sample.com}\and + \Name{Author Name2} \Email{xyz@sample.com}\\ + \addr Address} + + % Three or more authors with the same address: + % \author{\Name{Author Name1} \Email{an1@sample.com}\\ + % \Name{Author Name2} \Email{an2@sample.com}\\ + % \Name{Author Name3} \Email{an3@sample.com}\\ + % \Name{Author Name4} \Email{an4@sample.com}\\ + % \Name{Author Name5} \Email{an5@sample.com}\\ + % \Name{Author Name6} \Email{an6@sample.com}\\ + % \Name{Author Name7} \Email{an7@sample.com}\\ + % \Name{Author Name8} \Email{an8@sample.com}\\ + % \Name{Author Name9} \Email{an9@sample.com}\\ + % \Name{Author Name10} \Email{an10@sample.com}\\ + % \Name{Author Name11} \Email{an11@sample.com}\\ + % \Name{Author Name12} \Email{an12@sample.com}\\ + % \Name{Author Name13} \Email{an13@sample.com}\\ + % \Name{Author Name14} \Email{an14@sample.com}\\ + % \addr Address} + + + % Authors with different addresses: + % \author{\Name{Author Name1} \Email{abc@sample.com}\\ + % \addr Address 1 + % \AND + % \Name{Author Name2} \Email{xyz@sample.com}\\ + % \addr Address 2 + %} + +\editor{Editor's name} + %\editors{Editor One and Editor Two}% for multiple editors + +\begin{document} + +\maketitle + +\begin{abstract} +This is the abstract for this article. +\end{abstract} +\begin{keywords} +List of keywords +\end{keywords} + +\section{Introduction} +\label{sec:intro} + +This is a sample article that uses the \textsf{jmlr} class with +the \texttt{wcp} class option. Please follow the guidelines in +this sample document as it can help to reduce complications when +combining the articles into a book. Please avoid using obsolete +commands, such as \verb|\rm|, and obsolete packages, such as +\textsf{epsfig}.\footnote{See +\url{http://www.ctan.org/pkg/l2tabu}} Some packages that are known +to cause problems for the production editing process are checked for +by the \textsf{jmlr} class and will generate an error. (If you want +to know more about the production editing process, have a look at +the video tutorials for the production editors at +\url{http://www.dickimaw-books.com/software/makejmlrbookgui/videos/}.) + +Please also ensure that your document will compile with PDF\LaTeX. +If you have an error message that's puzzling you, first check for it +at the UK TUG FAQ +\url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=man-latex}. If +that doesn't help, create a minimal working example (see +\url{http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/}) and post +to somewhere like \TeX\ on StackExchange +(\url{http://tex.stackexchange.com/}) or the \LaTeX\ Community Forum +(\url{http://www.latex-community.org/forum/}). + +\begin{note} +This is an numbered theorem-like environment that was defined in +this document's preamble. +\end{note} + +\subsection{Sub-sections} + +Sub-sections are produced using \verb|\subsection|. + +\subsubsection{Sub-sub-sections} + +Sub-sub-sections are produced using \verb|\subsubsection|. + +\paragraph{Sub-sub-sub-sections} + +Sub-sub-sub-sections are produced using \verb|\paragraph|. +These are unnumbered with a running head. + +\subparagraph{Sub-sub-sub-sub-sections} + +Sub-sub-sub-sub-sections are produced using \verb|\subparagraph|. +These are unnumbered with a running head. + +\section{Cross-Referencing} + +Always use \verb|\label| and \verb|\ref| (or one of the commands +described below) when cross-referencing. For example, the next +section is Section~\ref{sec:math} but you can also refer to it using +\sectionref{sec:math}. The \textsf{jmlr} class +provides some convenient cross-referencing commands: +\verb|\sectionref|, \verb|\equationref|, \verb|\tableref|, +\verb|\figureref|, \verb|\algorithmref|, \verb|\theoremref|, +\verb|\lemmaref|, \verb|\remarkref|, \verb|\corollaryref|, +\verb|\definitionref|, \verb|\conjectureref|, \verb|\axiomref|, +\verb|\exampleref| and \verb|\appendixref|. The argument of these +commands may either be a single label or a comma-separated list +of labels. Examples: + +Referencing sections: \sectionref{sec:math} or +\sectionref{sec:intro,sec:math} or +\sectionref{sec:intro,sec:math,sec:tables,sec:figures}. + +Referencing equations: \equationref{eq:trigrule} or +\equationref{eq:trigrule,eq:df} or +\equationref{eq:trigrule,eq:f,eq:df,eq:y}. + +Referencing tables: \tableref{tab:operatornames} or +\tableref{tab:operatornames,tab:example} or +\tableref{tab:operatornames,tab:example,tab:example-booktabs}. + +Referencing figures: \figureref{fig:nodes} or +\figureref{fig:nodes,fig:teximage} or +\figureref{fig:nodes,fig:teximage,fig:subfigex} or +\figureref{fig:circle,fig:square}. + +Referencing algorithms: \algorithmref{alg:gauss} or +\algorithmref{alg:gauss,alg:moore} or +\algorithmref{alg:gauss,alg:moore,alg:net}. + +Referencing theorem-like environments: \theoremref{thm:eigenpow}, +\lemmaref{lem:sample}, \remarkref{rem:sample}, +\corollaryref{cor:sample}, \definitionref{def:sample}, +\conjectureref{con:sample}, \axiomref{ax:sample} and +\exampleref{ex:sample}. + +Referencing appendices: \appendixref{apd:first} or +\appendixref{apd:first,apd:second}. + +\section{Equations} +\label{sec:math} + +The \textsf{jmlr} class loads the \textsf{amsmath} package, so +you can use any of the commands and environments defined there. +(See the \textsf{amsmath} documentation for further +details.\footnote{Either \texttt{texdoc amsmath} or +\url{http://www.ctan.org/pkg/amsmath}}) + +Unnumbered single-lined equations should be displayed using +\verb|\[| and \verb|\]|. For example: +\[E = m c^2\] +or you can use the \texttt{displaymath} environment: +\begin{displaymath} +E = m c^2 +\end{displaymath} +Numbered single-line equations should be displayed using the +\texttt{equation} environment. For example: +\begin{equation}\label{eq:trigrule} +\cos^2\theta + \sin^2\theta \equiv 1 +\end{equation} +This can be referenced using \verb|\label| and \verb|\equationref|. +For example, \equationref{eq:trigrule}. + +Multi-lined numbered equations should be displayed using the +\texttt{align} environment.\footnote{For reasons why you +shouldn't use the obsolete \texttt{eqnarray} environment, see +Lars Madsen, \emph{Avoid eqnarray!} TUGboat 33(1):21--25, 2012.} For example: +\begin{align} +f(x) &= x^2 + x\label{eq:f}\\ +f'(x) &= 2x + 1\label{eq:df} +\end{align} +Unnumbered multi-lined equations can be displayed using the +\texttt{align*} environment. For example: +\begin{align*} +f(x) &= (x+1)(x-1)\\ +&= x^2 - 1 +\end{align*} +If you want to mix numbered with unnumbered lines use the +\texttt{align} environment and suppress unwanted line numbers with +\verb|\nonumber|. For example: +\begin{align} +y &= x^2 + 3x - 2x + 1\nonumber\\ +&= x^2 + x + 1\label{eq:y} +\end{align} +An equation that is too long to fit on a single line can be +displayed using the \texttt{split} environment. +Text can be embedded in an equation using \verb|\text| or +\verb|\intertext| (as used in \theoremref{thm:eigenpow}). +See the \textsf{amsmath} documentation for further details. + +\subsection{Operator Names} +\label{sec:op} + +Predefined operator names are listed in \tableref{tab:operatornames}. +For additional operators, either use \verb|\operatorname|, +for example $\operatorname{var}(X)$ or declare it with +\verb|\DeclareMathOperator|, for example +\begin{verbatim} +\DeclareMathOperator{\var}{var} +\end{verbatim} +and then use this new command. If you want limits that go above and +below the operator (like \verb|\sum|) use the starred versions +(\verb|\operatorname*| or \verb|\DeclareMathOperator*|). + +\begin{table*}[htbp] +\floatconts + {tab:operatornames}% + {\caption{Predefined Operator Names (taken from + \textsf{amsmath} documentation)}}% + {% +\begin{tabular}{rlrlrlrl} +\cs{arccos} & $\arccos$ & \cs{deg} & $\deg$ & \cs{lg} & $\lg$ & \cs{projlim} & $\projlim$ \\ +\cs{arcsin} & $\arcsin$ & \cs{det} & $\det$ & \cs{lim} & $\lim$ & \cs{sec} & $\sec$ \\ +\cs{arctan} & $\arctan$ & \cs{dim} & $\dim$ & \cs{liminf} & $\liminf$ & \cs{sin} & $\sin$ \\ +\cs{arg} & $\arg$ & \cs{exp} & $\exp$ & \cs{limsup} & $\limsup$ & \cs{sinh} & $\sinh$ \\ +\cs{cos} & $\cos$ & \cs{gcd} & $\gcd$ & \cs{ln} & $\ln$ & \cs{sup} & $\sup$ \\ +\cs{cosh} & $\cosh$ & \cs{hom} & $\hom$ & \cs{log} & $\log$ & \cs{tan} & $\tan$ \\ +\cs{cot} & $\cot$ & \cs{inf} & $\inf$ & \cs{max} & $\max$ & \cs{tanh} & $\tanh$ \\ +\cs{coth} & $\coth$ & \cs{injlim} & $\injlim$ & \cs{min} & $\min$ \\ +\cs{csc} & $\csc$ & \cs{ker} & $\ker$ & \cs{Pr} & $\Pr$ +\end{tabular}\par +\begin{tabular}{rlrl} +\cs{varlimsup} & $\varlimsup$ +& \cs{varinjlim} & $\varinjlim$\\ +\cs{varliminf} & $\varliminf$ +& \cs{varprojlim} & $\varprojlim$ +\end{tabular} +} +\end{table*} + +\section{Vectors and Sets} +\label{sec:vec} + +Vectors should be typeset using \cs{vec}. For example $\vec{x}$. +(The original version of \cs{vec} can also be accessed using +\cs{orgvec}, for example $\orgvec{x}$.) +The \textsf{jmlr} class also provides \cs{set} to typeset a +set. For example $\set{S}$. + +\section{Floats} +\label{sec:floats} + +Floats, such as figures, tables and algorithms, are moving +objects and are supposed to float to the nearest convenient +location. Please don't force them to go in a particular place. In +general it's best to use the \texttt{htbp} specifier and don't +put the figure or table in the middle of a paragraph (that is +make sure there's a paragraph break above and below the float). +Floats are supposed to have a little extra space above and below +them to make them stand out from the rest of the text. This extra +spacing is put in automatically and shouldn't need modifying. + +If your article will later be reprinted in the Challenges for +Machine Learning, please be aware that the CiML books use a +different paper size, so if you want to resize any images use a +scale relative to the line width (\verb|\linewidth|), text width +(\verb|\textwidth|) or text height (\verb|\textheight|). + +To ensure consistency, please \emph{don't} try changing the format of the caption by doing +something like: +\begin{verbatim} +\caption{\textit{A Sample Caption.}} +\end{verbatim} +or +\begin{verbatim} +\caption{\em A Sample Caption.} +\end{verbatim} +You can, of course, change the font for individual words or +phrases, for example: +\begin{verbatim} +\caption{A Sample Caption With Some \emph{Emphasized Words}.} +\end{verbatim} + +\subsection{Tables} +\label{sec:tables} + +Tables should go in the \texttt{table} environment. Within this +environment use \verb|\floatconts| (defined by \textsf{jmlr}) +to set the caption correctly and center the table contents. +The location of the caption depends on the \verb|tablecaption| +setting in the document class options. + +\begin{table}[htbp] + % The first argument is the label. + % The caption goes in the second argument, and the table contents + % go in the third argument. +\floatconts + {tab:example}% + {\caption{An Example Table}}% + {\begin{tabular}{ll} + \bfseries Dataset & \bfseries Result\\ + Data1 & 0.12345\\ + Data2 & 0.67890\\ + Data3 & 0.54321\\ + Data4 & 0.09876 + \end{tabular}} +\end{table} + +If you want horizontal rules you can use the \textsf{booktabs} +package which provides the commands \verb|\toprule|, +\verb|\midrule| and \verb|\bottomrule|. For example, see +\tableref{tab:example-booktabs}. + +\begin{table}[hbtp] +\floatconts + {tab:example-booktabs} + {\caption{A Table With Horizontal Lines}} + {\begin{tabular}{ll} + \toprule + \bfseries Dataset & \bfseries Result\\ + \midrule + Data1 & 0.12345\\ + Data2 & 0.67890\\ + Data3 & 0.54321\\ + Data4 & 0.09876\\ + \bottomrule + \end{tabular}} +\end{table} + +If you really want vertical lines as well, you can't use the +\textsf{booktabs} commands as there'll be some unwanted gaps. +Instead you can use \LaTeX's \verb|\hline|, but the rows may +appear a bit cramped. You can add extra space above or below a +row using \verb|\abovestrut| and \verb|\belowstrut|. For example, +see \tableref{tab:example-hline}. However, you might want to read +the \textsf{booktabs} documentation regarding the use of vertical +lines. + +\begin{table}[htbp] +\floatconts + {tab:example-hline} + {\caption{A Table With Horizontal and Vertical Lines}}% + {% + \begin{tabular}{|l|l|} + \hline + \abovestrut{2.2ex}\bfseries Dataset & \bfseries Result\\\hline + \abovestrut{2.2ex}Data1 & 0.12345\\ + Data2 & 0.67890\\ + Data3 & 0.54321\\ + \belowstrut{0.2ex}Data4 & 0.09876\\\hline + \end{tabular} + } +\end{table} + +If you want to align numbers on their decimal point, you can +use the \textsf{siunitx} package. For example, see +\tableref{tab:example-siunitx}. For further details see the +\textsf{siunitx} documentation\footnote{Either \texttt{texdoc +siunitx} or \url{http://www.ctan.org/pkg/siunitx}}. + +\begin{table}[htbp] +\floatconts + {tab:example-siunitx} + {\caption{A Table With Numbers Aligned on the Decimal Point}} + {\begin{tabular}{lS[tabformat=3.5]} + \bfseries Dataset & {\bfseries Result}\\ + Data1 & 0.12345\\ + Data2 & 10.6789\\ + Data3 & 50.543\\ + Data4 & 200.09876 + \end{tabular}} +\end{table} + +If the table is too wide, you can adjust the inter-column +spacing by changing the value of \verb|\tabcolsep|. For +example: +\begin{verbatim} +\setlength{\tabcolsep}{3pt} +\end{verbatim} +If the table is very wide but not very long, you can use the +\texttt{sidewaystable} environment defined in the +\textsf{rotating} package (so use \verb|\usepackage{rotating}|). +If the table is too long to fit on a page, you can use the +\texttt{longtable} environment defined in the \textsf{longtable} +package (so use \verb|\usepackage{longtable}|). + +\subsection{Figures} +\label{sec:figures} + +Figures should go in the \texttt{figure} environment. Within this +environment, use \verb|\floatconts| to correctly position the +caption and center the image. Use \verb|\includegraphics| +for external graphics files but omit the file extension. Do not +use \verb|\epsfig| or \verb|\psfig|. If you want to scale the +image, it's better to use a fraction of the line width rather +than an explicit length. For example, see \figureref{fig:nodes}. + +\begin{figure}[htbp] + % Caption and label go in the first argument and the figure contents + % go in the second argument +\floatconts + {fig:nodes} + {\caption{Example Image}} + {\includegraphics[width=0.5\linewidth]{images/nodes}} +\end{figure} + +If your image is made up of \LaTeX\ code (for example, commands +provided by the \textsf{pgf} package) you can include it using +\cs{includeteximage} (defined by the \textsf{jmlr} class). This +can be scaled and rotated in the same way as \cs{includegraphics}. +For example, see \figureref{fig:teximage}. + +\begin{figure}[htbp] +\floatconts + {fig:teximage} + {\caption{Image Created Using \LaTeX\ Code}} + {\includeteximage[angle=45]{images/teximage}} +\end{figure} + +If the figure is too wide to fit on the page, you can use the +\texttt{sidewaysfigure} environment defined in the +\textsf{rotating} package. + +Don't use \verb|\graphicspath|.\footnote{This is specific to the +\textsf{jmlr} class, not a general recommendation. The main file +that generates the proceedings or the CiML book is typically in a +different directory to the imported articles, so it modifies the +graphics path when it imports an article.} If the images +are contained in a subdirectory, specify this when you include the image, for +example \verb|\includegraphics{figures/mypic}|. + +\subsubsection{Sub-Figures} +\label{sec:subfigures} + +Sub-figures can be created using \verb|\subfigure|, which is +defined by the \textsf{jmlr} class. The optional argument allows +you to provide a subcaption. The label should be placed in the +mandatory argument of \verb|\subfigure|. You can reference the +entire figure, for example \figureref{fig:subfigex}, or you can +reference part of the figure using \verb|\figureref|, for example +\figureref{fig:circle}. Alternatively you can reference the +subfigure using \verb|\subfigref|, for example +\subfigref{fig:circle,fig:square} in \figureref{fig:subfigex}. + +\begin{figure}[htbp] +\floatconts + {fig:subfigex} + {\caption{An Example With Sub-Figures.}} + {% + \subfigure[A Circle]{\label{fig:circle}% + \includegraphics[width=0.2\linewidth]{images/circle}}% + \qquad + \subfigure[A Square]{\label{fig:square}% + \includegraphics[width=0.2\linewidth]{images/square}} + } +\end{figure} + +By default, the sub-figures are aligned on the baseline. +This can be changed using the second optional argument +of \verb|\subfigure|. This may be \texttt{t} (top), \texttt{c} +(centered) or \texttt{b} (bottom). For example, the subfigures +\subfigref{fig:circle2,fig:square2} in \figureref{fig:subfigex2} +both have \verb|[c]| as the second optional argument. + +\begin{figure}[htbp] +\floatconts + {fig:subfigex2} + {\caption{Another Example With Sub-Figures.}} + {% + \subfigure[A Small Circle][c]{\label{fig:circle2}% + \includegraphics[width=0.1\linewidth]{images/circle}}% + \qquad + \subfigure[A Square][c]{\label{fig:square2}% + \includegraphics[width=0.2\linewidth]{images/square}} + } +\end{figure} + +\subsection{Sub-Tables} +\label{sec:subtables} +There is an analogous command \verb|\subtable| for sub-tables. +It has the same syntax as \verb|\subfigure| described above. +You can reference the table using \verb|\tableref|, for example +\tableref{tab:subtabex} or you can reference part of the table, +for example \tableref{tab:ab}. Alternatively you can reference the +subtable using \verb|\subtabref|, for example +\subtabref{tab:ab,tab:cd} in \tableref{tab:subtabex}. + +\begin{table}[htbp] +\floatconts + {tab:subtabex} + {\caption{An Example With Sub-Tables}} + {% + \subtable{% + \label{tab:ab}% + \begin{tabular}{cc} + \bfseries A & \bfseries B\\ + 1 & 2 + \end{tabular} + }\qquad + \subtable{% + \label{tab:cd}% + \begin{tabular}{cc} + \bfseries C & \bfseries D\\ + 3 & 4\\ + 5 & 6 + \end{tabular} + } + } +\end{table} + +By default, the sub-tables are aligned on the top. +This can be changed using the second optional argument +of \verb|\subtable|. This may be \texttt{t} (top), \texttt{c} +(centered) or \texttt{b} (bottom). For example, the sub-tables +\subtabref{tab:ab2,tab:cd2} in \tableref{tab:subtabex2} +both have \verb|[c]| as the second optional argument. + +\begin{table}[htbp] +\floatconts + {tab:subtabex2} + {\caption{Another Example With Sub-Tables}} + {% + \subtable[][c]{% + \label{tab:ab2}% + \begin{tabular}{cc} + \bfseries A & \bfseries B\\ + 1 & 2 + \end{tabular} + }\qquad + \subtable[][c]{% + \label{tab:cd2}% + \begin{tabular}{cc} + \bfseries C & \bfseries D\\ + 3 & 4\\ + 5 & 6 + \end{tabular} + } + } +\end{table} + +\subsection{Algorithms} +\label{sec:algorithms} + +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. +For example, see \algorithmref{alg:gauss}. Note that algorithms +float like figures and tables. + +\begin{algorithm}[htbp] +\floatconts + {alg:gauss}% + {\caption{The Gauss-Seidel Algorithm}}% +{% +\begin{enumerate} + \item For $k=1$ to maximum number of iterations + \begin{enumerate} + \item For $i=1$ to $n$ + \begin{enumerate} + \item $x_i^{(k)} = + \frac{b_i - \sum_{j=1}^{i-1}a_{ij}x_j^{(k)} + - \sum_{j=i+1}^{n}a_{ij}x_j^{(k-1)}}{a_{ii}}$ + \item If $\|\vec{x}^{(k)}-\vec{x}^{(k-1)} < \epsilon\|$, + where $\epsilon$ is a specified stopping criteria, stop. + \end{enumerate} + \end{enumerate} +\end{enumerate} +}% +\end{algorithm} + +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 +\texttt{enumerate*} environment provided by the \textsf{jmlr} +class. For example, see \algorithmref{alg:moore}. + +\begin{algorithm} +\floatconts + {alg:moore}% + {\caption{Moore's Shortest Path}}% +{% +Given a connected graph $G$, where the length of each edge is 1: +\begin{enumerate*} + \item Set the label of vertex $s$ to 0 + \item Set $i=0$ + \begin{enumerate*} + \item \label{step:locate}Locate all unlabelled vertices + adjacent to a vertex labelled $i$ and label them $i+1$ + \item If vertex $t$ has been labelled, + \begin{enumerate*} + \item[] the shortest path can be found by backtracking, and + the length is given by the label of $t$. + \end{enumerate*} + otherwise + \begin{enumerate*} + \item[] increment $i$ and return to step~\ref{step:locate} + \end{enumerate*} + \end{enumerate*} +\end{enumerate*} +}% +\end{algorithm} + +Pseudo code can be displayed using the \texttt{algorithm2e} +environment. This is defined by the \textsf{algorithm2e} package +(which is automatically loaded) so check the \textsf{algorithm2e} +documentation for further details.\footnote{Either \texttt{texdoc +algorithm2e} or \url{http://www.ctan.org/pkg/algorithm2e}} +For an example, see \algorithmref{alg:net}. + +\begin{algorithm2e} +\caption{Computing Net Activation} +\label{alg:net} + % older versions of algorithm2e have \dontprintsemicolon instead + % of the following: + %\DontPrintSemicolon + % older versions of algorithm2e have \linesnumbered instead of the + % following: + %\LinesNumbered +\KwIn{$x_1, \ldots, x_n, w_1, \ldots, w_n$} +\KwOut{$y$, the net activation} +$y\leftarrow 0$\; +\For{$i\leftarrow 1$ \KwTo $n$}{ + $y \leftarrow y + w_i*x_i$\; +} +\end{algorithm2e} + +\section{Description Lists} + +The \textsf{jmlr} class also provides a description-like +environment called \texttt{altdescription}. This has an +argument that should be the widest label in the list. Compare: +\begin{description} +\item[add] A method that adds two variables. +\item[differentiate] A method that differentiates a function. +\end{description} +with +\begin{altdescription}{differentiate} +\item[add] A method that adds two variables. +\item[differentiate] A method that differentiates a function. +\end{altdescription} + +\section{Theorems, Lemmas etc} +\label{sec:theorems} + +The following theorem-like environments are predefined by +the \textsf{jmlr} class: \texttt{theorem}, \texttt{example}, +\texttt{lemma}, \texttt{proposition}, \texttt{remark}, +\texttt{corollary}, \texttt{definition}, \texttt{conjecture} +and \texttt{axiom}. You can use the \texttt{proof} environment +to display the proof if need be, as in \theoremref{thm:eigenpow}. + +\begin{theorem}[Eigenvalue Powers]\label{thm:eigenpow} +If $\lambda$ is an eigenvalue of $\vec{B}$ with eigenvector +$\vec{\xi}$, then $\lambda^n$ is an eigenvalue of $\vec{B}^n$ +with eigenvector $\vec{\xi}$. +\begin{proof} +Let $\lambda$ be an eigenvalue of $\vec{B}$ with eigenvector +$\xi$, then +\begin{align*} +\vec{B}\vec{\xi} &= \lambda\vec{\xi} +\intertext{premultiply by $\vec{B}$:} +\vec{B}\vec{B}\vec{\xi} &= \vec{B}\lambda\vec{\xi}\\ +\Rightarrow \vec{B}^2\vec{\xi} &= \lambda\vec{B}\vec{\xi}\\ +&= \lambda\lambda\vec{\xi}\qquad +\text{since }\vec{B}\vec{\xi}=\lambda\vec{\xi}\\ +&= \lambda^2\vec{\xi} +\end{align*} +Therefore true for $n=2$. Now assume true for $n=k$: +\begin{align*} +\vec{B}^k\vec{\xi} &= \lambda^k\vec{\xi} +\intertext{premultiply by $\vec{B}$:} +\vec{B}\vec{B}^k\vec{\xi} &= \vec{B}\lambda^k\vec{\xi}\\ +\Rightarrow \vec{B}^{k+1}\vec{\xi} &= \lambda^k\vec{B}\vec{\xi}\\ +&= \lambda^k\lambda\vec{\xi}\qquad +\text{since }\vec{B}\vec{\xi}=\lambda\vec{\xi}\\ +&= \lambda^{k+1}\vec{\xi} +\end{align*} +Therefore true for $n=k+1$. Therefore, by induction, true for all +$n$. +\end{proof} +\end{theorem} + +\begin{lemma}[A Sample Lemma]\label{lem:sample} +This is a lemma. +\end{lemma} + +\begin{remark}[A Sample Remark]\label{rem:sample} +This is a remark. +\end{remark} + +\begin{corollary}[A Sample Corollary]\label{cor:sample} +This is a corollary. +\end{corollary} + +\begin{definition}[A Sample Definition]\label{def:sample} +This is a definition. +\end{definition} + +\begin{conjecture}[A Sample Conjecture]\label{con:sample} +This is a conjecture. +\end{conjecture} + +\begin{axiom}[A Sample Axiom]\label{ax:sample} +This is an axiom. +\end{axiom} + +\begin{example}[An Example]\label{ex:sample} +This is an example. +\end{example} + +\section{Color vs Grayscale} +\label{sec:color} + +It's helpful if authors supply grayscale versions of their +images in the event that the article is to be incorporated into +a black and white printed book. With external PDF, PNG or JPG +graphic files, you just need to supply a grayscale version of the +file. For example, if the file is called \texttt{myimage.png}, +then the gray version should be \texttt{myimage-gray.png} or +\texttt{myimage-gray.pdf} or \texttt{myimage-gray.jpg}. You don't +need to modify your code. The \textsf{jmlr} class checks for +the existence of the grayscale version if it is print mode +(provided you have used \verb|\includegraphics| and haven't +specified the file extension). + +You can use \verb|\ifprint| to determine which mode you are in. +For example, in \figureref{fig:nodes}, the +\ifprint{dark gray}{purple} ellipse represents an input and the +\ifprint{light gray}{yellow} ellipse represents an output. +Another example: {\ifprint{\bfseries}{\color{red}}important text!} + +You can use the class option \texttt{gray} to see how the +document will appear in gray scale mode. \textcolor{blue}{Colored +text} will automatically be converted to gray scale in print mode. + +The \textsf{jmlr} class loads the \textsf{xcolor} +package, so you can also define your own colors. For example: +\ifprint + {\definecolor{myred}{gray}{0.5}}% + {\definecolor{myred}{rgb}{0.5,0,0}}% +\textcolor{myred}{XYZ}. + +The \textsf{xcolor} class is loaded with the \texttt{x11names} +option, so you can use any of the x11 predefined colors (listed +in the \textsf{xcolor} documentation\footnote{either +\texttt{texdoc xcolor} or \url{http://www.ctan.org/pkg/xcolor}}). + +\section{Citations and Bibliography} +\label{sec:cite} + +The \textsf{jmlr} class automatically loads \textsf{natbib} +and automatically sets the bibliography style, so you don't need to +use \verb|\bibliographystyle|. +This sample file has the citations defined in the accompanying +BibTeX file \texttt{jmlr-sample.bib}. For a parenthetical +citation use \verb|\citep|. For example +\citep{guyon-elisseeff-03}. For a textual citation use +\verb|\citet|. For example \citet{guyon2007causalreport}. +Both commands may take a comma-separated list, for example +\citet{guyon-elisseeff-03,guyon2007causalreport}. + +These commands have optional arguments and have a starred +version. See the \textsf{natbib} documentation for further +details.\footnote{Either \texttt{texdoc natbib} or +\url{http://www.ctan.org/pkg/natbib}} + +The bibliography is displayed using \verb|\bibliography|. + +\acks{Acknowledgements go here.} + +\bibliography{jmlr-sample} + +\appendix + +\section{First Appendix}\label{apd:first} + +This is the first appendix. + +\section{Second Appendix}\label{apd:second} + +This is the second appendix. + +\end{document} diff --git a/macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.pdf b/macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.pdf new file mode 100644 index 0000000000..6115f7cbf2 Binary files /dev/null and b/macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.pdf differ diff --git a/macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.tex b/macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.tex new file mode 100644 index 0000000000..1e19ddd436 --- /dev/null +++ b/macros/latex/contrib/jmlr/sample-papers/jmlrwcp-sample.tex @@ -0,0 +1,789 @@ + %\documentclass[wcp,gray]{jmlr} % test grayscale version + %\documentclass[wcp]{jmlr}% former name JMLR W\&CP +\documentclass[pmlr]{jmlr}% new name PMLR (Proceedings of Machine Learning) + + % The following packages will be automatically loaded: + % amsmath, amssymb, natbib, graphicx, url, algorithm2e + + %\usepackage{rotating}% for sideways figures and tables +\usepackage{longtable}% for long tables + + % The booktabs package is used by this sample document + % (it provides \toprule, \midrule and \bottomrule). + % Remove the next line if you don't require it. +\usepackage{booktabs} + % The siunitx package is used by this sample document + % to align numbers in a column by their decimal point. + % Remove the next line if you don't require it. +\usepackage[load-configurations=version-1]{siunitx} % newer version + %\usepackage{siunitx} + + % The following command is just for this sample document: +\newcommand{\cs}[1]{\texttt{\char`\\#1}} + + % Define an unnumbered theorem just for this sample document: +\theorembodyfont{\upshape} +\theoremheaderfont{\scshape} +\theorempostheader{:} +\theoremsep{\newline} +\newtheorem*{note}{Note} + + % change the arguments, as appropriate, in the following: +\jmlrvolume{1} +\jmlryear{2010} +\jmlrworkshop{Workshop Title} + +\title[Short Title]{Full Title of Article\titlebreak This Title Has +A Line Break\titletag{\thanks{sample footnote}}} + + % Use \Name{Author Name} to specify the name. + % If the surname contains spaces, enclose the surname + % in braces, e.g. \Name{John {Smith Jones}} similarly + % if the name has a "von" part, e.g \Name{Jane {de Winter}}. + % If the first letter in the forenames is a diacritic + % enclose the diacritic in braces, e.g. \Name{{\'E}louise Smith} + + % Two authors with the same address + \author{\Name{Author Name1\nametag{\thanks{with a note}}} \Email{abc@sample.com}\and + \Name{Author Name2} \Email{xyz@sample.com}\\ + \addr Address} + + % Three or more authors with the same address: + % \author{\Name{Author Name1} \Email{an1@sample.com}\\ + % \Name{Author Name2} \Email{an2@sample.com}\\ + % \Name{Author Name3} \Email{an3@sample.com}\\ + % \Name{Author Name4} \Email{an4@sample.com}\\ + % \Name{Author Name5} \Email{an5@sample.com}\\ + % \Name{Author Name6} \Email{an6@sample.com}\\ + % \Name{Author Name7} \Email{an7@sample.com}\\ + % \Name{Author Name8} \Email{an8@sample.com}\\ + % \Name{Author Name9} \Email{an9@sample.com}\\ + % \Name{Author Name10} \Email{an10@sample.com}\\ + % \Name{Author Name11} \Email{an11@sample.com}\\ + % \Name{Author Name12} \Email{an12@sample.com}\\ + % \Name{Author Name13} \Email{an13@sample.com}\\ + % \Name{Author Name14} \Email{an14@sample.com}\\ + % \addr Address} + + + % Authors with different addresses: + % \author{\Name{Author Name1} \Email{abc@sample.com}\\ + % \addr Address 1 + % \AND + % \Name{Author Name2} \Email{xyz@sample.com}\\ + % \addr Address 2 + %} + +\editor{Editor's name} + % \editors{List of editors' names} + +\begin{document} + +\maketitle + +\begin{abstract} +This is the abstract for this article. +\end{abstract} +\begin{keywords} +List of keywords +\end{keywords} + +\section{Introduction} +\label{sec:intro} + +This is a sample article that uses the \textsf{jmlr} class with +the \texttt{wcp} class option. Please follow the guidelines in +this sample document as it can help to reduce complications when +combining the articles into a book. Please avoid using obsolete +commands, such as \verb|\rm|, and obsolete packages, such as +\textsf{epsfig}.\footnote{See +\url{http://www.ctan.org/pkg/l2tabu}} + +Please also ensure that your document will compile with PDF\LaTeX. +If you have an error message that's puzzling you, first check for it +at the UK TUG FAQ +\url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=man-latex}. If +that doesn't help, create a minimal working example (see +\url{http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/}) and post +to somewhere like TeX on StackExchange +(\url{http://tex.stackexchange.com/}) or the LaTeX Community Forum +(\url{http://www.latex-community.org/forum/}). + +\begin{note} +This is an numbered theorem-like environment that was defined in +this document's preamble. +\end{note} + +\subsection{Sub-sections} + +Sub-sections are produced using \verb|\subsection|. + +\subsubsection{Sub-sub-sections} + +Sub-sub-sections are produced using \verb|\subsubsection|. + +\paragraph{Sub-sub-sub-sections} + +Sub-sub-sub-sections are produced using \verb|\paragraph|. +These are unnumbered with a running head. + +\subparagraph{Sub-sub-sub-sub-sections} + +Sub-sub-sub-sub-sections are produced using \verb|\subparagraph|. +These are unnumbered with a running head. + +\section{Cross-Referencing} + +Always use \verb|\label| and \verb|\ref| (or one of the commands +described below) when cross-referencing. For example, the next +section is Section~\ref{sec:math}. The \textsf{jmlr} class +provides some convenient cross-referencing commands: +\verb|\sectionref|, \verb|\equationref|, \verb|\tableref|, +\verb|\figureref|, \verb|\algorithmref|, \verb|\theoremref|, +\verb|\lemmaref|, \verb|\remarkref|, \verb|\corollaryref|, +\verb|\definitionref|, \verb|\conjectureref|, \verb|\axiomref|, +\verb|\exampleref| and \verb|\appendixref|. The argument of these +commands may either be a single label or a comma-separated list +of labels. Examples: + +Referencing sections: \sectionref{sec:math} or +\sectionref{sec:intro,sec:math} or +\sectionref{sec:intro,sec:math,sec:tables,sec:figures}. + +Referencing equations: \equationref{eq:trigrule} or +\equationref{eq:trigrule,eq:df} or +\equationref{eq:trigrule,eq:f,eq:df,eq:y}. + +Referencing tables: \tableref{tab:operatornames} or +\tableref{tab:operatornames,tab:example} or +\tableref{tab:operatornames,tab:example,tab:example-booktabs}. + +Referencing figures: \figureref{fig:nodes} or +\figureref{fig:nodes,fig:teximage} or +\figureref{fig:nodes,fig:teximage,fig:subfigex} or +\figureref{fig:circle,fig:square}. + +Referencing algorithms: \algorithmref{alg:gauss} or +\algorithmref{alg:gauss,alg:moore} or +\algorithmref{alg:gauss,alg:moore,alg:net}. + +Referencing theorem-like environments: \theoremref{thm:eigenpow}, +\lemmaref{lem:sample}, \remarkref{rem:sample}, +\corollaryref{cor:sample}, \definitionref{def:sample}, +\conjectureref{con:sample}, \axiomref{ax:sample} and +\exampleref{ex:sample}. + +Referencing appendices: \appendixref{apd:first} or +\appendixref{apd:first,apd:second}. + +\section{Equations} +\label{sec:math} + +The \textsf{jmlr} class loads the \textsf{amsmath} package, so +you can use any of the commands and environments defined there. +(See the \textsf{amsmath} documentation for further +details.\footnote{Either \texttt{texdoc amsmath} or +\url{http://www.ctan.org/pkg/amsmath}}) + +Unnumbered single-lined equations should be displayed using +\verb|\[| and \verb|\]|. For example: +\[E = m c^2\] +Numbered single-line equations should be displayed using the +\texttt{equation} environment. For example: +\begin{equation}\label{eq:trigrule} +\cos^2\theta + \sin^2\theta \equiv 1 +\end{equation} +This can be referenced using \verb|\label| and \verb|\equationref|. +For example, \equationref{eq:trigrule}. + +Multi-lined numbered equations should be displayed using the +\texttt{align} environment.\footnote{For reasons why you +shouldn't use the obsolete \texttt{eqnarray} environment, see +Lars Madsen, \emph{Avoid eqnarray!} TUGboat 33(1):21--25, 2012.} For example: +\begin{align} +f(x) &= x^2 + x\label{eq:f}\\ +f'(x) &= 2x + 1\label{eq:df} +\end{align} +Unnumbered multi-lined equations should be displayed using the +\texttt{align*} environment. For example: +\begin{align*} +f(x) &= (x+1)(x-1)\\ +&= x^2 - 1 +\end{align*} +If you want to mix numbered with unnumbered lines use the +align environment and suppress unwanted line numbers with +\verb|\nonumber|. For example: +\begin{align} +y &= x^2 + 3x - 2x + 1\nonumber\\ +&= x^2 + x + 1\label{eq:y} +\end{align} +An equation that is too long to fit on a single line can be +displayed using the \texttt{split} environment. +Text can be embedded in an equation using \verb|\text| or +\verb|\intertext| (as used in \theoremref{thm:eigenpow}). +See the \textsf{amsmath} documentation for further details. + +\subsection{Operator Names} +\label{sec:op} + +Predefined operator names are listed in \tableref{tab:operatornames}. +For additional operators, either use \verb|\operatorname|, +for example $\operatorname{var}(X)$ or declare it with +\verb|\DeclareMathOperator|, for example +\begin{verbatim} +\DeclareMathOperator{\var}{var} +\end{verbatim} +and then use this new command. If you want limits that go above and +below the operator (like \verb|\sum|) use the starred versions +(\verb|\operatorname*| or \verb|\DeclareMathOperator*|). + +\begin{table}[htbp] +\floatconts + {tab:operatornames}% + {\caption{Predefined Operator Names (taken from + \textsf{amsmath} documentation)}}% + {% +\begin{tabular}{rlrlrlrl} +\cs{arccos} & $\arccos$ & \cs{deg} & $\deg$ & \cs{lg} & $\lg$ & \cs{projlim} & $\projlim$ \\ +\cs{arcsin} & $\arcsin$ & \cs{det} & $\det$ & \cs{lim} & $\lim$ & \cs{sec} & $\sec$ \\ +\cs{arctan} & $\arctan$ & \cs{dim} & $\dim$ & \cs{liminf} & $\liminf$ & \cs{sin} & $\sin$ \\ +\cs{arg} & $\arg$ & \cs{exp} & $\exp$ & \cs{limsup} & $\limsup$ & \cs{sinh} & $\sinh$ \\ +\cs{cos} & $\cos$ & \cs{gcd} & $\gcd$ & \cs{ln} & $\ln$ & \cs{sup} & $\sup$ \\ +\cs{cosh} & $\cosh$ & \cs{hom} & $\hom$ & \cs{log} & $\log$ & \cs{tan} & $\tan$ \\ +\cs{cot} & $\cot$ & \cs{inf} & $\inf$ & \cs{max} & $\max$ & \cs{tanh} & $\tanh$ \\ +\cs{coth} & $\coth$ & \cs{injlim} & $\injlim$ & \cs{min} & $\min$ \\ +\cs{csc} & $\csc$ & \cs{ker} & $\ker$ & \cs{Pr} & $\Pr$ +\end{tabular}\par +\begin{tabular}{rlrl} +\cs{varlimsup} & $\varlimsup$ +& \cs{varinjlim} & $\varinjlim$\\ +\cs{varliminf} & $\varliminf$ +& \cs{varprojlim} & $\varprojlim$ +\end{tabular} +} +\end{table} + +\section{Vectors and Sets} +\label{sec:vec} + +Vectors should be typeset using \cs{vec}. For example $\vec{x}$. +The \textsf{jmlr} class also provides \cs{set} to typeset a +set. For example $\set{S}$. + +\section{Floats} +\label{sec:floats} + +Floats, such as figures, tables and algorithms, are moving +objects and are supposed to float to the nearest convenient +location. Please don't force them to go in a particular place. In +general it's best to use the \texttt{htbp} specifier and don't +put the figure or table in the middle of a paragraph (that is +make sure there's a paragraph break above and below the float). +Floats are supposed to have a little extra space above and below +them to make them stand out from the rest of the text. This extra +spacing is put in automatically and shouldn't need modifying. + +To ensure consistency, please \emph{don't} try changing the format of the caption by doing +something like: +\begin{verbatim} +\caption{\textit{A Sample Caption.}} +\end{verbatim} +or +\begin{verbatim} +\caption{\em A Sample Caption.} +\end{verbatim} +You can, of course, change the font for individual words or +phrases, for example: +\begin{verbatim} +\caption{A Sample Caption With Some \emph{Emphasized Words}.} +\end{verbatim} + +\subsection{Tables} +\label{sec:tables} + +Tables should go in the \texttt{table} environment. Within this +environment use \verb|\floatconts| (defined by \textsf{jmlr}) +to set the caption correctly and center the table contents. + +\begin{table}[htbp] + % The first argument is the label. + % The caption goes in the second argument, and the table contents + % go in the third argument. +\floatconts + {tab:example}% + {\caption{An Example Table}}% + {\begin{tabular}{ll} + \bfseries Dataset & \bfseries Result\\ + Data1 & 0.12345\\ + Data2 & 0.67890\\ + Data3 & 0.54321\\ + Data4 & 0.09876 + \end{tabular}} +\end{table} + +If you want horizontal rules you can use the \textsf{booktabs} +package which provides the commands \verb|\toprule|, +\verb|\midrule| and \verb|\bottomrule|. For example, see +\tableref{tab:example-booktabs}. + +\begin{table}[hbtp] +\floatconts + {tab:example-booktabs} + {\caption{A Table With Horizontal Lines}} + {\begin{tabular}{ll} + \toprule + \bfseries Dataset & \bfseries Result\\ + \midrule + Data1 & 0.12345\\ + Data2 & 0.67890\\ + Data3 & 0.54321\\ + Data4 & 0.09876\\ + \bottomrule + \end{tabular}} +\end{table} + +If you want vertical lines as well, you can't use the +\textsf{booktabs} commands as there'll be some unwanted gaps. +Instead you can use \LaTeX's \verb|\hline|, but the rows may +appear a bit cramped. You can add extra space above or below a +row using \verb|\abovestrut| and \verb|\belowstrut|. For example, +see \tableref{tab:example-hline}. + +\begin{table}[htbp] +\floatconts + {tab:example-hline} + {\caption{A Table With Horizontal and Vertical Lines}}% + {% + \begin{tabular}{|l|l|} + \hline + \abovestrut{2.2ex}\bfseries Dataset & \bfseries Result\\\hline + \abovestrut{2.2ex}Data1 & 0.12345\\ + Data2 & 0.67890\\ + Data3 & 0.54321\\ + \belowstrut{0.2ex}Data4 & 0.09876\\\hline + \end{tabular} + } +\end{table} + +If you want to align numbers on their decimal point, you can +use the \textsf{siunitx} package. For example, see +\tableref{tab:example-siunitx}. For further details see the +\textsf{siunitx} documentation\footnote{Either \texttt{texdoc +siunitx} or \url{http://www.ctan.org/pkg/siunitx}}. + +\begin{table}[htbp] +\floatconts + {tab:example-siunitx} + {\caption{A Table With Numbers Aligned on the Decimal Point}} + {\begin{tabular}{lS[tabformat=3.5]} + \bfseries Dataset & {\bfseries Result}\\ + Data1 & 0.12345\\ + Data2 & 10.6789\\ + Data3 & 50.543\\ + Data4 & 200.09876 + \end{tabular}} +\end{table} + +If the table is too wide, you can adjust the inter-column +spacing by changing the value of \verb|\tabcolsep|. For +example: +\begin{verbatim} +\setlength{\tabcolsep}{3pt} +\end{verbatim} +If the table is very wide but not very long, you can use the +\texttt{sidewaystable} environment defined in the +\textsf{rotating} package (so use \verb|\usepackage{rotating}|). +If the table is too long to fit on a page, you should use the +\texttt{longtable} environment defined in the \textsf{longtable} +package (so use \verb|\usepackage{longtable}|). + +\subsection{Figures} +\label{sec:figures} + +Figures should go in the \texttt{figure} environment. Within this +environment, use \verb|\floatconts| to correctly position the +caption and center the image. Use \verb|\includegraphics| +for external graphics files but omit the file extension. Do not +use \verb|\epsfig| or \verb|\psfig|. If you want to scale the +image, it's better to use a fraction of the line width rather +than an explicit length. For example, see \figureref{fig:nodes}. + +\begin{figure}[htbp] + % Caption and label go in the first argument and the figure contents + % go in the second argument +\floatconts + {fig:nodes} + {\caption{Example Image}} + {\includegraphics[width=0.5\linewidth]{images/nodes}} +\end{figure} + +If your image is made up of \LaTeX\ code (for example, commands +provided by the \textsf{pgf} package) you can include it using +\cs{includeteximage} (defined by the \textsf{jmlr} class). This +can be scaled and rotated in the same way as \cs{includegraphics}. +For example, see \figureref{fig:teximage}. + +\begin{figure}[htbp] +\floatconts + {fig:teximage} + {\caption{Image Created Using \LaTeX\ Code}} + {\includeteximage[angle=45]{images/teximage}} +\end{figure} + +If the figure is too wide to fit on the page, you can use the +\texttt{sidewaysfigure} environment defined in the +\textsf{rotating} package. + +Don't use \verb|\graphicspath|. If the images are contained in +a subdirectory, specify this when you include the image, for +example \verb|\includegraphics{figures/mypic}|. + +\subsubsection{Sub-Figures} +\label{sec:subfigures} + +Sub-figures can be created using \verb|\subfigure|, which is +defined by the \textsf{jmlr} class. The optional argument allows +you to provide a subcaption. The label should be placed in the +mandatory argument of \verb|\subfigure|. You can reference the +entire figure, for example \figureref{fig:subfigex}, or you can +reference part of the figure using \verb|\figureref|, for example +\figureref{fig:circle}. Alternatively you can reference the +subfigure using \verb|\subfigref|, for example +\subfigref{fig:circle,fig:square} in \figureref{fig:subfigex}. + +\begin{figure}[htbp] +\floatconts + {fig:subfigex} + {\caption{An Example With Sub-Figures.}} + {% + \subfigure[A Circle]{\label{fig:circle}% + \includegraphics[width=0.2\linewidth]{images/circle}}% + \qquad + \subfigure[A Square]{\label{fig:square}% + \includegraphics[width=0.2\linewidth]{images/square}} + } +\end{figure} + +By default, the sub-figures are aligned on the baseline. +This can be changed using the second optional argument +of \verb|\subfigure|. This may be \texttt{t} (top), \texttt{c} +(centered) or \texttt{b} (bottom). For example, the subfigures +\subfigref{fig:circle2,fig:square2} in \figureref{fig:subfigex2} +both have \verb|[c]| as the second optional argument. + +\begin{figure}[htbp] +\floatconts + {fig:subfigex2} + {\caption{Another Example With Sub-Figures.}} + {% + \subfigure[A Small Circle][c]{\label{fig:circle2}% + \includegraphics[width=0.1\linewidth]{images/circle}}% + \qquad + \subfigure[A Square][c]{\label{fig:square2}% + \includegraphics[width=0.2\linewidth]{images/square}} + } +\end{figure} + +\subsection{Sub-Tables} +\label{sec:subtables} +There is an analogous command \verb|\subtable| for sub-tables. +It has the same syntax as \verb|\subfigure| described above. +You can reference the table using \verb|\tableref|, for example +\tableref{tab:subtabex} or you can reference part of the table, +for example \tableref{tab:ab}. Alternatively you can reference the +subtable using \verb|\subtabref|, for example +\subtabref{tab:ab,tab:cd} in \tableref{tab:subtabex}. + +\begin{table}[htbp] +\floatconts + {tab:subtabex} + {\caption{An Example With Sub-Tables}} + {% + \subtable{% + \label{tab:ab}% + \begin{tabular}{cc} + \bfseries A & \bfseries B\\ + 1 & 2 + \end{tabular} + }\qquad + \subtable{% + \label{tab:cd}% + \begin{tabular}{cc} + \bfseries C & \bfseries D\\ + 3 & 4\\ + 5 & 6 + \end{tabular} + } + } +\end{table} + +By default, the sub-tables are aligned on the top. +This can be changed using the second optional argument +of \verb|\subtable|. This may be \texttt{t} (top), \texttt{c} +(centered) or \texttt{b} (bottom). For example, the sub-tables +\subtabref{tab:ab2,tab:cd2} in \tableref{tab:subtabex2} +both have \verb|[c]| as the second optional argument. + +\begin{table}[htbp] +\floatconts + {tab:subtabex2} + {\caption{Another Example With Sub-Tables}} + {% + \subtable[][c]{% + \label{tab:ab2}% + \begin{tabular}{cc} + \bfseries A & \bfseries B\\ + 1 & 2 + \end{tabular} + }\qquad + \subtable[][c]{% + \label{tab:cd2}% + \begin{tabular}{cc} + \bfseries C & \bfseries D\\ + 3 & 4\\ + 5 & 6 + \end{tabular} + } + } +\end{table} + +\subsection{Algorithms} +\label{sec:algorithms} + +Enumerated textual algorithms can be displayed using the +\texttt{algorithm} environment. Within this environment, use +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] +\floatconts +{alg:gauss}% label +{\caption{The Gauss-Seidel Algorithm}} +{% contents +\begin{enumerate} + \item For $k=1$ to maximum number of iterations + \begin{enumerate} + \item For $i=1$ to $n$ + \begin{enumerate} + \item $x_i^{(k)} = + \frac{b_i - \sum_{j=1}^{i-1}a_{ij}x_j^{(k)} + - \sum_{j=i+1}^{n}a_{ij}x_j^{(k-1)}}{a_{ii}}$ + \item If $\|\vec{x}^{(k)}-\vec{x}^{(k-1)} < \epsilon\|$, + where $\epsilon$ is a specified stopping criteria, stop. + \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 +\texttt{enumerate*} environment provided by the \textsf{jmlr} +class. For example, see \algorithmref{alg:moore}. + +\begin{algorithm} +\caption{Moore's Shortest Path}\label{alg:moore} +Given a connected graph $G$, where the length of each edge is 1: +\begin{enumerate*} + \item Set the label of vertex $s$ to 0 + \item Set $i=0$ + \begin{enumerate*} + \item \label{step:locate}Locate all unlabelled vertices + adjacent to a vertex labelled $i$ and label them $i+1$ + \item If vertex $t$ has been labelled, + \begin{enumerate*} + \item[] the shortest path can be found by backtracking, and + the length is given by the label of $t$. + \end{enumerate*} + otherwise + \begin{enumerate*} + \item[] increment $i$ and return to step~\ref{step:locate} + \end{enumerate*} + \end{enumerate*} +\end{enumerate*} +\end{algorithm} + +Pseudo code can be displayed using the \texttt{algorithm2e} +environment. This is defined by the \textsf{algorithm2e} package +(which is automatically loaded) so check the \textsf{algorithm2e} +documentation for further details.\footnote{Either \texttt{texdoc +algorithm2e} or \url{http://www.ctan.org/pkg/algorithm2e}} +For an example, see \algorithmref{alg:net}. + +\begin{algorithm2e} +\caption{Computing Net Activation} +\label{alg:net} + % older versions of algorithm2e have \dontprintsemicolon instead + % of the following: + %\DontPrintSemicolon + % older versions of algorithm2e have \linesnumbered instead of the + % following: + %\LinesNumbered +\KwIn{$x_1, \ldots, x_n, w_1, \ldots, w_n$} +\KwOut{$y$, the net activation} +$y\leftarrow 0$\; +\For{$i\leftarrow 1$ \KwTo $n$}{ + $y \leftarrow y + w_i*x_i$\; +} +\end{algorithm2e} + +\section{Description Lists} + +The \textsf{jmlr} class also provides a description-like +environment called \texttt{altdescription}. This has an +argument that should be the widest label in the list. Compare: +\begin{description} +\item[add] A method that adds two variables. +\item[differentiate] A method that differentiates a function. +\end{description} +with +\begin{altdescription}{differentiate} +\item[add] A method that adds two variables. +\item[differentiate] A method that differentiates a function. +\end{altdescription} + +\section{Theorems, Lemmas etc} +\label{sec:theorems} + +The following theorem-like environments are predefined by +the \textsf{jmlr} class: \texttt{theorem}, \texttt{example}, +\texttt{lemma}, \texttt{proposition}, \texttt{remark}, +\texttt{corollary}, \texttt{definition}, \texttt{conjecture} +and \texttt{axiom}. You can use the \texttt{proof} environment +to display the proof if need be, as in \theoremref{thm:eigenpow}. + +\begin{theorem}[Eigenvalue Powers]\label{thm:eigenpow} +If $\lambda$ is an eigenvalue of $\vec{B}$ with eigenvector +$\vec{\xi}$, then $\lambda^n$ is an eigenvalue of $\vec{B}^n$ +with eigenvector $\vec{\xi}$. +\begin{proof} +Let $\lambda$ be an eigenvalue of $\vec{B}$ with eigenvector +$\xi$, then +\begin{align*} +\vec{B}\vec{\xi} &= \lambda\vec{\xi} +\intertext{premultiply by $\vec{B}$:} +\vec{B}\vec{B}\vec{\xi} &= \vec{B}\lambda\vec{\xi}\\ +\Rightarrow \vec{B}^2\vec{\xi} &= \lambda\vec{B}\vec{\xi}\\ +&= \lambda\lambda\vec{\xi}\qquad +\text{since }\vec{B}\vec{\xi}=\lambda\vec{\xi}\\ +&= \lambda^2\vec{\xi} +\end{align*} +Therefore true for $n=2$. Now assume true for $n=k$: +\begin{align*} +\vec{B}^k\vec{\xi} &= \lambda^k\vec{\xi} +\intertext{premultiply by $\vec{B}$:} +\vec{B}\vec{B}^k\vec{\xi} &= \vec{B}\lambda^k\vec{\xi}\\ +\Rightarrow \vec{B}^{k+1}\vec{\xi} &= \lambda^k\vec{B}\vec{\xi}\\ +&= \lambda^k\lambda\vec{\xi}\qquad +\text{since }\vec{B}\vec{\xi}=\lambda\vec{\xi}\\ +&= \lambda^{k+1}\vec{\xi} +\end{align*} +Therefore true for $n=k+1$. Therefore, by induction, true for all +$n$. +\end{proof} +\end{theorem} + +\begin{lemma}[A Sample Lemma]\label{lem:sample} +This is a lemma. +\end{lemma} + +\begin{remark}[A Sample Remark]\label{rem:sample} +This is a remark. +\end{remark} + +\begin{corollary}[A Sample Corollary]\label{cor:sample} +This is a corollary. +\end{corollary} + +\begin{definition}[A Sample Definition]\label{def:sample} +This is a definition. +\end{definition} + +\begin{conjecture}[A Sample Conjecture]\label{con:sample} +This is a conjecture. +\end{conjecture} + +\begin{axiom}[A Sample Axiom]\label{ax:sample} +This is an axiom. +\end{axiom} + +\begin{example}[An Example]\label{ex:sample} +This is an example. +\end{example} + +\section{Color vs Grayscale} +\label{sec:color} + +It's helpful if authors supply grayscale versions of their +images in the event that the article is to be incorporated into +a black and white printed book. With external PDF, PNG or JPG +graphic files, you just need to supply a grayscale version of the +file. For example, if the file is called \texttt{myimage.png}, +then the gray version should be \texttt{myimage-gray.png} or +\texttt{myimage-gray.pdf} or \texttt{myimage-gray.jpg}. You don't +need to modify your code. The \textsf{jmlr} class checks for +the existence of the grayscale version if it is print mode +(provided you have used \verb|\includegraphics| and haven't +specified the file extension). + +You can use \verb|\ifprint| to determine which mode you are in. +For example, in \figureref{fig:nodes}, the +\ifprint{dark gray}{purple} ellipse represents an input and the +\ifprint{light gray}{yellow} ellipse represents an output. +Another example: {\ifprint{\bfseries}{\color{red}}important text!} + +You can use the class option \texttt{gray} to see how the +document will appear in gray scale mode. \textcolor{blue}{Colored +text} will automatically be converted to gray scale. + +The \textsf{jmlr} class loads the \textsf{xcolor} +package, so you can also define your own colors. For example: +\ifprint + {\definecolor{myred}{gray}{0.5}}% + {\definecolor{myred}{rgb}{0.5,0,0}}% +\textcolor{myred}{XYZ}. + +The \textsf{xcolor} class is loaded with the \texttt{x11names} +option, so you can use any of the x11 predefined colors (listed +in the \textsf{xcolor} documentation\footnote{either +\texttt{texdoc xcolor} or \url{http://www.ctan.org/pkg/xcolor}}). + +\section{Citations and Bibliography} +\label{sec:cite} + +The \textsf{jmlr} class automatically loads \textsf{natbib}. +This sample file has the citations defined in the accompanying +BibTeX file \texttt{jmlr-sample.bib}. For a parenthetical +citation use \verb|\citep|. For example +\citep{guyon-elisseeff-03}. For a textual citation use +\verb|\citet|. For example \citet{guyon2007causalreport}. +Both commands may take a comma-separated list, for example +\citet{guyon-elisseeff-03,guyon2007causalreport}. + +These commands have optional arguments and have a starred +version. See the \textsf{natbib} documentation for further +details.\footnote{Either \texttt{texdoc natbib} or +\url{http://www.ctan.org/pkg/natbib}} + +The bibliography is displayed using \verb|\bibliography|. + +\acks{Acknowledgements go here.} + +\bibliography{jmlr-sample} + +\appendix + +\section{First Appendix}\label{apd:first} + +This is the first appendix. + +\section{Second Appendix}\label{apd:second} + +This is the second appendix. + +\end{document} -- cgit v1.2.3