Articles I've written for customers on IT issues.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6784 lines
203 KiB

4 years ago
  1. %\iffalse
  2. % jmlr.dtx generated using makedtx version 1.2 (c) Nicola Talbot
  3. % Command line args:
  4. % -doc "jmlr-manual.tex"
  5. % -src "jmlrutils.sty\Z=>jmlrutils.sty"
  6. % -src "jmlr.cls\Z=>jmlr.cls"
  7. % -src "jmlrbook.cls\Z=>jmlrbook.cls"
  8. % -author "Nicola Talbot"
  9. % -section "chapter"
  10. % jmlr
  11. % Created on 2017/8/1 16:57
  12. %\fi
  13. %\iffalse
  14. %<*package>
  15. %% \CharacterTable
  16. %% {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
  17. %% 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
  18. %% Digits \0\1\2\3\4\5\6\7\8\9
  19. %% Exclamation \! Double quote \" Hash (number) \#
  20. %% Dollar \$ Percent \% Ampersand \&
  21. %% Acute accent \' Left paren \( Right paren \)
  22. %% Asterisk \* Plus \+ Comma \,
  23. %% Minus \- Point \. Solidus \/
  24. %% Colon \: Semicolon \; Less than \<
  25. %% Equals \= Greater than \> Question mark \?
  26. %% Commercial at \@ Left bracket \[ Backslash \\
  27. %% Right bracket \] Circumflex \^ Underscore \_
  28. %% Grave accent \` Left brace \{ Vertical bar \|
  29. %% Right brace \} Tilde \~}
  30. %</package>
  31. %\fi
  32. % \iffalse
  33. % Doc-Source file to use with LaTeX2e
  34. % Copyright (C) 2017 Nicola Talbot, all rights reserved.
  35. % \fi
  36. % \iffalse
  37. %<*driver>
  38. \documentclass[report]{nlctdoc}
  39. \usepackage{amsmath}
  40. \usepackage[utf8]{inputenc}
  41. \usepackage[T1]{fontenc}
  42. \usepackage{ifthen}
  43. \usepackage[colorlinks,
  44. bookmarks,
  45. hyperindex=false,
  46. pdfauthor={Nicola L.C. Talbot},
  47. pdftitle={jmlr: Classes for the Journal of Machine
  48. Learning Research (JMLR) and Proceedings of Machine Learning
  49. Research (PMLR)},
  50. pdfkeywords={LaTeX,jmlr}]{hyperref}
  51. \doxitem{Option}{option}{package options}
  52. \CheckSum{5030}
  53. \newcommand*{\appopt}[1]{\texttt{-{}-#1}}
  54. \begin{document}
  55. \DocInput{jmlr.dtx}
  56. \end{document}
  57. %</driver>
  58. %\fi
  59. %\MakeShortVerb{"}
  60. %\DeleteShortVerb{\|}
  61. %
  62. % \title{\LaTeXe\ Classes for the Journal of Machine
  63. %Learning Research (JMLR) and
  64. %Proceedings of Machine Learning Research (PMLR)}
  65. % \author{Nicola L. C. Talbot\\[10pt]
  66. %\url{http://www.dickimaw-books.com/}}
  67. %
  68. % \date{2017-08-01 (version 1.24)}
  69. % \maketitle
  70. %\tableofcontents
  71. %
  72. %\chapter{Introduction}
  73. %
  74. %The \clsfmt{jmlr} class is for articles that need to be formatted
  75. %according to the Journal of Machine Learning Research style. This
  76. %class is based on the \sty{jmlr2e} and \sty{jmlrwcp2e} packages
  77. %but has been adapted to enable it to work better with the
  78. %\cls{combine} class to collate the articles into a book.
  79. %\sectionref{sec:jmlr} describes how to use the \clsfmt{jmlr} class.
  80. %Note that JMLR W\&CP (JMLR: Workshop and Conference Proceedings)
  81. %has been renamed PMLR (Proceedings of Machine Learning
  82. %Research). Articles for new proceedings should use the \clsopt{pmlr}
  83. %class option.
  84. %
  85. %The \clsfmt{jmlrbook} class is for combining articles that use the
  86. %\clsfmt{jmlr} class into a
  87. %book. The \clsfmt{jmlrbook} class uses \cls{combine} and \sty{hyperref}, which are
  88. %troublesome enough on their own but together are quite fragile. The
  89. %\clsfmt{jmlrbook} class redefines some internals to get
  90. %\clsfmt{combine} and \clsfmt{hyperref} to work together but some
  91. %packages (e.g.\ \sty{subfig} and \sty{pdfpages}) are likely to mess
  92. %everything up and cause errors. This is why the guidelines to
  93. %authors are fairly stringent and why the \clsfmt{jmlr} class will give an
  94. %error message if certain packages are loaded.\footnote{Currently
  95. %\clsfmt{jmlr} will check if \sty{subfig}, \sty{pdfpages},
  96. %\sty{geometry}, \sty{psfig}, \sty{epsfig}, \sty{theorem},
  97. %\sty{tabularx}, \sty{amsthm} and \sty{ntheorem} are loaded and will throw an error.
  98. %If other packages are found to be a problem, they will be added to
  99. %the list.} The \clsfmt{jmlrbook} class works best with PDF\LaTeX\ so
  100. %authors should ensure that their articles can compile with
  101. %PDF\LaTeX. \sectionref{sec:jmlrbook} describes how to use the
  102. %\clsfmt{jmlrbook} class.
  103. %
  104. %As from v1.24, some non-class dependent commands and environments
  105. %have been moved to a new package \sty{jmlrutils} (see
  106. %\sectionref{sec:jmlrutils}). This package is automatically loaded by
  107. %\clsfmt{jmlr}, but may be used with other classes. (Note that you
  108. %will need to explicitly load \sty{algorithm2e} if you want to use
  109. %the \env{algorithm} environment.)
  110. %
  111. %\begin{important}
  112. %Note that the \clsfmt{jmlr} (and therefore \clsfmt{jmlrbook}) class automatically loads
  113. %the \sty{hyperref} package, but some packages need to be loaded
  114. %before \sty{hyperref}.
  115. %\end{important}
  116. %
  117. %Anything that needs to be done before \sty{hyperref} is loaded can be specified
  118. %by defining the command
  119. %\begin{definition}[\DescribeMacro{\jmlrprehyperref}]
  120. %\cs{jmlrprehyperref}
  121. %\end{definition}
  122. %\emph{before} the class is loaded. For
  123. %example, to load the packages \styfmt{foo} and \styfmt{bar} before
  124. %\sty{hyperref}, you can do:
  125. %\begin{verbatim}
  126. %\newcommand{\jmlrprehyperref}{\usepackage{foo,bar}}
  127. %\documentclass{jmlr}
  128. %\end{verbatim}
  129. %
  130. %There is a Java application called \app{makejmlrbookgui} that can
  131. %compile all the individual papers from the book and generate the
  132. %bib file for the proceedings (according to the PMLR specifications). It can also
  133. %create a grey nonhyperlinked PDF/X compliant print version of the
  134. %book. The application can be downloaded from
  135. %\url{http://www.dickimaw-books.com/software/makejmlrbookgui/} where
  136. %there is also a
  137. %\href{http://www.dickimaw-books.com/software/makejmlrbookgui/manual/troubleshooting.html}{troubleshooting
  138. %section}.
  139. %
  140. %There is also a Perl script called \app{makejmlrbook}, which is
  141. %distributed with the \clsfmt{jmlr} and \clsfmt{jmlrbook} bundle,
  142. %however it is now deprecated and has been superseded by
  143. %\app{makejmlrbookgui}. Note that PMLR (formerly JMLR W\&CP) has new
  144. %format guidelines that are followed by new versions of
  145. %\app{makejmlrbookgui} but not by the Perl script \app{makejmlrbook},
  146. %so that script is no longer documented or supported and may be
  147. %dropped from future versions of this bundle.
  148. %
  149. %\section{Required Packages}
  150. %
  151. %The \clsfmt{jmlr} class is based on the \cls{article} class and loads
  152. %the following packages: \sty{jmlrutils} (see \sectionref{sec:jmlrutils}),
  153. %\sty{amsmath}, \sty{amssymb},
  154. %\sty{natbib}, \sty{url}, \sty{graphicx} and \sty{algorithm2e},
  155. %\sty{hyperref}, \sty{nameref}, \sty{xcolor} and \sty{xkeyval}.
  156. %Note that unlike the \sty{jmlr2e} and \sty{jmlrwcp2e} packages,
  157. %this class file does not load the obsolete \sty{epsfig} package.
  158. %
  159. %The \clsfmt{jmlrbook} class additionally loads the \cls{combine} class
  160. %and the following packages: \sty{combnat}, \sty{setspace} and \sty{fink}.
  161. %
  162. %The \app{makejmlrbookgui} application requires Java and \TeX.
  163. %(GhostScript is also required for the print-ready version of the
  164. %book.)
  165. %
  166. %\chapter{Guidelines for Article Authors}
  167. %\label{sec:jmlr}
  168. %
  169. %Article authors should use the \clsfmt{jmlr} class. This class
  170. %comes with example files \texttt{jmlr-sample.tex} and
  171. %\texttt{jmlrwcp-sample.tex}, which can be used as templates.
  172. %
  173. %The following class options are available:
  174. %\begin{description}
  175. %\item[\clsopt{nowcp}]The article is for the Journal of Machine
  176. %Learning Research (default).
  177. %\item[\clsopt{pmlr}] The article is for the Proceedings of Machine
  178. %Learning Research (PMLR).
  179. %\item[\clsopt{wcp}] The article is for JMLR Workshop and Conference
  180. %Proceedings (JMLR W\&CP).
  181. %
  182. %\item[\clsopt{twocolumn}] Use two-column style.
  183. %
  184. %\item[\clsopt{onecolumn}] Use one-column style (default).
  185. %
  186. %\item[\clsopt{color}] Color version (see \sectionref{sec:color}).
  187. %
  188. %\item[\clsopt{gray}] Grayscale version (see \sectionref{sec:color}).
  189. %
  190. %\item[{\clsopt[top]{tablecaption}}] in a \env{table} environment,
  191. %\ics{floatconts} puts the caption at the top.
  192. %
  193. %\item[{\clsopt[bottom]{tablecaption}}] in a \env{table} environment,
  194. %\ics{floatconts} puts the caption at the bottom.
  195. %
  196. %\end{description}
  197. %
  198. %\section{Title Information}
  199. %
  200. %The \clsfmt{jmlr} class uses different syntax from \sty{jmlr2e} and
  201. %\sty{jmlrwcp2e} to specify the title information. In particular, it
  202. %doesn't define \cs{jmlrheading} and \cs{ShortHeading}. Instead, the
  203. %following commands should be used:
  204. %
  205. %\begin{definition}[\DescribeMacro{\jmlrvolume}]
  206. %\cs{jmlrvolume}\marg{number}
  207. %\end{definition}
  208. %This specifies the volume number. For example:
  209. %\begin{verbatim}
  210. %\jmlrvolume{2}
  211. %\end{verbatim}
  212. %
  213. %\begin{definition}[\DescribeMacro{\jmlryear}]
  214. %\cs{jmlryear}\marg{year}
  215. %\end{definition}
  216. %This specifies the year. For example:
  217. %\begin{verbatim}
  218. %\jmlryear{2010}
  219. %\end{verbatim}
  220. %
  221. %\begin{definition}[\DescribeMacro{\jmlrsubmitted}]
  222. %\cs{jmlrsubmitted}\marg{date}
  223. %\end{definition}
  224. %This specifies the submission date.
  225. %
  226. %\begin{definition}[\DescribeMacro{\jmlrpublished}]
  227. %\cs{jmlrpublished}\marg{date}
  228. %\end{definition}
  229. %This specifies the publication date.
  230. %
  231. %\begin{definition}[\DescribeMacro{\jmlrworkshop}]
  232. %\cs{jmlrworkshop}\marg{title}
  233. %\end{definition}
  234. %This specifies the workshop title (for use with the \clsopt{wcp}
  235. %class option).
  236. %
  237. %The title information is specified using the commands described
  238. %below. These commands should typically go in the preamble. As
  239. %with most class files, The title itself is produced using
  240. %\begin{definition}[\DescribeMacro{\maketitle}]
  241. %\cs{maketitle}
  242. %\end{definition}
  243. %This command should go after \verb|\begin{document}|. For example:
  244. %\begin{verbatim}
  245. %\begin{document}
  246. %\maketitle
  247. %\end{verbatim}
  248. %Before \cs{maketitle}, you must specify the title information
  249. %using the following commands:
  250. %
  251. %\begin{definition}[\DescribeMacro{\title}]
  252. %\cs{title}\oarg{short title}\marg{title}
  253. %\end{definition}
  254. %This specifies the article's title. A short title for the page
  255. %header can be supplied via the optional argument \meta{short title}.
  256. %If you want to force a line break in the title, use
  257. %\begin{definition}[\DescribeMacro{\titlebreak}]
  258. %\cs{titlebreak}
  259. %\end{definition}
  260. %instead of \cs{newline} or \verb|\\| as this will ensure that the
  261. %line break doesn't also end up in the table of contents or bookmarks
  262. %when the article is included in a book. If there is content within
  263. %the title that should not appear in the page headings or table of
  264. %contents (for example, a footnote) use
  265. %\begin{definition}[\DescribeMacro{\titletag}]
  266. %\cs{titletag}\marg{title only stuff}
  267. %\end{definition}
  268. %For example:
  269. %\begin{verbatim}
  270. %\title{An Interesting Paper\titlebreak
  271. %With a Line Break\titletag{\thanks{and an
  272. %acknowledgement}}}
  273. %\end{verbatim}
  274. %
  275. %
  276. %\begin{definition}[\DescribeMacro{\editor}]
  277. %\cs{editor}\marg{name}
  278. %\end{definition}
  279. %This specifies the editor's name. If there is more than one
  280. %editor, use:
  281. %\begin{definition}[\DescribeMacro{\editors}]
  282. %\cs{editors}\marg{names}
  283. %\end{definition}
  284. %
  285. %\begin{definition}[\DescribeMacro{\author}]
  286. %\cs{author}\marg{author specs}
  287. %\end{definition}
  288. %This specifies the author. The specifications \meta{author specs}
  289. %are a bit different to \sty{jmlr2e} and \sty{jmlrwcp2e}. Use
  290. %\begin{definition}[\DescribeMacro{\Name}]
  291. %\cs{Name}\oarg{abbreviated name}\marg{author's name}
  292. %\end{definition}
  293. %to specify the author's name. Note that if the surname contains a
  294. %space it must be grouped (enclosed in braces \{\}). Similarly if
  295. %the initial letter of each forename is a diacritic it must be
  296. %grouped. If the abbreviation of the name doesn't get parsed
  297. %properly you can override the default using the optional argument. (See below for examples.)
  298. %
  299. %If there is any content within \meta{author's name} that shouldn't
  300. %get copied to the header, footer or table of contents, it should be
  301. %enclosed within the argument of
  302. %\begin{definition}[\DescribeMacro{\nametag}]
  303. %\cs{nametag}\marg{title only stuff}
  304. %\end{definition}
  305. %For example:
  306. %\begin{verbatim}
  307. %\Name{Ann Other\nametag{\thanks{formerly with some other
  308. %institute}}}
  309. %\end{verbatim}
  310. %
  311. %\begin{definition}[\DescribeMacro{\Email}]
  312. %\cs{Email}\marg{author's email}
  313. %\end{definition}
  314. %This specifies the author's email address. It should only be used
  315. %within the argument to \cs{author}.
  316. %
  317. %\begin{definition}[\DescribeMacro{\and}]
  318. %\cs{and}
  319. %\end{definition}
  320. %This should be used to separate two authors with the same address.
  321. %
  322. %\begin{definition}[\DescribeMacro{\AND}]
  323. %\cs{AND}
  324. %\end{definition}
  325. %This should be used to separate authors with different addresses.
  326. %
  327. %\begin{definition}[\DescribeMacro{\\}]
  328. %\verb|\\|
  329. %\end{definition}
  330. %This should be used before an author's address or between authors
  331. %with the same address where there are more that two authors.
  332. %
  333. %\begin{definition}[\DescribeMacro{\addr}]
  334. %\cs{addr}
  335. %\end{definition}
  336. %This should be used at the start of the address.
  337. %
  338. %\begin{description}
  339. %\item[Example 1] Two authors with the same address:
  340. %\begin{verbatim}
  341. %\author{\Name{Jane Doe} \Email{abc@sample.com}\and
  342. % \Name{John {Basey Fisher}} \Email{xyz@sample.com}\\
  343. % \addr Address}
  344. %\end{verbatim}
  345. %In this example, the second author has a space in his surname
  346. %so the surname needs to be grouped.
  347. %
  348. %\item[Example 2] Three authors with the same address:
  349. %\begin{verbatim}
  350. %\author{\Name{Fred Arnold {de la Cour}} \Email{an1@sample.com}\\
  351. % \Name{Jack Jones} \Email{an3@sample.com}\\
  352. % \Name{{\'E}louise {\'E}abhla Finchley} \Email{an2@sample.com}\\
  353. % \addr Address}
  354. %\end{verbatim}
  355. %In this example, the third author has an accent on her
  356. %forename initials so grouping is required.
  357. %
  358. %\item[Example 3] Authors with a different address:
  359. %\begin{verbatim}
  360. %\author{\Name{John Smith} \Email{abc@sample.com}\\
  361. % \addr Address 1
  362. % \AND
  363. % \Name{May Brown} \Email{xyz@sample.com}\\
  364. % \addr Address 2
  365. % }
  366. %\end{verbatim}
  367. %
  368. %\item[Example 4] The author is actually a company so there's no
  369. %first name and surname:
  370. %\begin{verbatim}
  371. %\author{\Name[Some Company, Ltd]{Some Company, Ltd}\Email{xyz:some.com}\\
  372. % \addr Address
  373. %}
  374. %\end{verbatim}
  375. %\end{description}
  376. %
  377. %\section{Font Changing Commands}
  378. %
  379. %Use the \LaTeXe\ font changing commands, such as \cs{bfseries} or
  380. %\cs{textbf}\marg{text}, rather than the obsolete \LaTeX2.09
  381. %commands, such as \cs{bf}. (The obsolete font changing commands
  382. %will produce a warning if used.)
  383. %
  384. %\begin{definition}[\DescribeMacro{\url}]
  385. %\cs{url}\marg{address}
  386. %\end{definition}
  387. %This will typeset \meta{address} in a typewriter font. Special
  388. %characters, such as \verb|~|, are correctly displayed. Example:
  389. %\begin{verbatim}
  390. %\url{http://theoval.cmp.uea.ac.uk/~nlct/}
  391. %\end{verbatim}
  392. %This command is provided by the \sty{url} package which is
  393. %automatically loaded.
  394. %
  395. %\begin{definition}[\DescribeMacro{\mailto}]
  396. %\cs{mailto}\marg{email address}
  397. %\end{definition}
  398. %This will typeset the given email address in a typewriter font.
  399. %Note that this is not the same as \cs{Email}, which should only be
  400. %used in the argument of \cs{author}. This command is provided by the
  401. %supplementary package \sty{jmlrutils}. Other commands are described
  402. %in \sectionref{sec:jmlrutils}.
  403. %
  404. %\section{Structure}
  405. %
  406. %\begin{definition}[\DescribeEnv{abstract}]
  407. %\cs{begin}\{abstract\}\\
  408. %\meta{text}\\
  409. %\cs{end}\{abstract\}
  410. %\end{definition}
  411. %The abstract text should be displayed using the \envfmt{abstract}
  412. %environment.
  413. %
  414. %\begin{definition}[\DescribeEnv{keywords}]
  415. %\cs{begin}\{keywords\}\meta{keyword list}\cs{end}\{keywords\}
  416. %\end{definition}
  417. %The keywords should be displayed using the \envfmt{keywords}
  418. %environment.
  419. %
  420. %\begin{definition}[\DescribeMacro{\acks}]
  421. %\cs{acks}\marg{text}
  422. %\end{definition}
  423. %This displays the acknowledgements.
  424. %
  425. %\begin{definition}[\DescribeMacro{\section}]
  426. %\cs{section}\marg{title}
  427. %\end{definition}
  428. %Section titles are created using \cs{section}. The heading is
  429. %automatically numbered and can be cross-referenced using
  430. %\cs{label} and \cs{ref}. Unnumbered sections can be produced
  431. %using:
  432. %\begin{definition}[\DescribeMacro{\section*}]
  433. %\cs{section*}\marg{title}
  434. %\end{definition}
  435. %
  436. %\begin{definition}[\DescribeMacro{\subsection}]
  437. %\cs{subsection}\marg{title}
  438. %\end{definition}
  439. %Sub-section titles are created using \cs{subsection}. Unnumbered
  440. %sub-sections can be produced using:
  441. %\begin{definition}[\DescribeMacro{\subsection*}]
  442. %\cs{subsection*}\marg{title}
  443. %\end{definition}
  444. %
  445. %\begin{definition}[\DescribeMacro{\subsubsection}]
  446. %\cs{subsubsection}\marg{title}
  447. %\end{definition}
  448. %Sub-sub-section titles are created using \cs{subsubsection}.
  449. %Unnumbered sub-sub-sections can be produced using:
  450. %\begin{definition}[\DescribeMacro{\subsubsection*}]
  451. %\cs{subsubsection*}\marg{title}
  452. %\end{definition}
  453. %
  454. %Further sectioning levels can be obtained using \cs{paragraph}
  455. %and \cs{subparagraph}, but these are unnumbered with running heads.
  456. %
  457. %\begin{definition}[\DescribeMacro{\appendix}]
  458. %\cs{appendix}
  459. %\end{definition}
  460. %Use \cs{appendix} to switch to the appendices. This changes
  461. %\cs{section} to produce an appendix. Example:
  462. %\begin{verbatim}
  463. %\appendix
  464. %\chapter{Proof of Theorems}
  465. %\end{verbatim}
  466. %
  467. %\section{Citations and Bibliography}
  468. %
  469. %The \clsfmt{jmlr} class automatically loads \sty{natbib} and sets
  470. %the bibliography style to \texttt{plainnat}. References should
  471. %be stored in a \texttt{.bib} file.
  472. %
  473. %\begin{definition}[\DescribeMacro{\bibliography}]
  474. %\cs{bibliography}\marg{bib file}
  475. %\end{definition}
  476. %This displays the bibliography.
  477. %
  478. %\begin{definition}[\DescribeMacro{\citep}]
  479. %\cs{citep}\oarg{pre note}\oarg{post note}\marg{label}
  480. %\end{definition}
  481. %Use \cs{citep} for a parenthetical citation.
  482. %
  483. %\begin{definition}[\DescribeMacro{\citet}]
  484. %\cs{citet}\oarg{note}\marg{label}
  485. %\end{definition}
  486. %Use \cs{citet} for a textual citation.
  487. %
  488. %See the \ctandoc{natbib} for further details.
  489. %
  490. %\section{\styfmt{jmlrutils} supplementary package}
  491. %\label{sec:jmlrutils}
  492. %
  493. %The \sty{jmlrutils} package is automatically loaded by the
  494. %\clsfmt{jmlr} class but may be used with other classes.
  495. %
  496. %\subsection{Package Options}
  497. %
  498. %The following options may be passed to the \styfmt{jmlrutils}
  499. %package if it is to be used without the \clsfmt{jmlr} class.
  500. %\begin{description}
  501. %\item[\pkgopt{maths}] Define the commands \cs{set} and \cs{oldvec}
  502. %and redefine \cs{vec}. This will also automatically load the
  503. %\sty{amsmath} package. (Default.)
  504. %\item[\pkgopt{nomaths}] Don't define \cs{set} and \cs{oldvec}
  505. %and don't redefine \cs{vec}.
  506. %\item[\pkgopt{theorems}] Define the theorem commands and
  507. %environments listed in \sectionref{sec:theorems}. (Default.)
  508. %\item[\pkgopt{notheorems}] Don't define the theorem commands and
  509. %environments.
  510. %\item[\pkgopt{subfloats}] Define the sub-figure and sub-table
  511. %commands listed in \sectionref{sec:subfloats}. (Default.)
  512. %\item[\pkgopt{nosubfloats}] Don't define the sub-figure and
  513. %sub-table commands.
  514. %\end{description}
  515. %The non-default options are provided when \styfmt{jmlrutils} is
  516. %loaded without the \clsfmt{jmlr} class.
  517. %Don't try passing the non-default options to \styfmt{jmlrutils} if
  518. %you are using the \clsfmt{jmlr} class as this could interfere with
  519. %the build process for the proceedings or book.
  520. %
  521. %The \styfmt{jmlrutils} package doesn't recognise any of the
  522. %\clsfmt{jmlr} class options (such as \pkgopt{tablecaption}).
  523. %
  524. %\subsection{Figures and Tables}
  525. %\label{sec:floats}
  526. %
  527. %Floats, such as figures, tables and algorithms, are moving objects
  528. %and are supposed to float to the nearest convenient location.
  529. %Please don't force them to go in a particular place. In general
  530. %it's best to use the \texttt{htbp} specifier and don't put
  531. %the float in the middle of a paragraph (that is, make sure there's
  532. %a paragraph break above and below the float). Floats are supposed
  533. %to have a little extra space above and below them to make them
  534. %stand out from the rest of the text. This extra space is put in
  535. %automatically and shouldn't need modifying.
  536. %
  537. %To ensure consistency, please \emph{\bfseries don't} try changing the
  538. %format of the caption by doing something like:
  539. %\begin{verbatim}
  540. %\caption{\textit{A Sample Caption.}}
  541. %\end{verbatim}
  542. %or
  543. %\begin{verbatim}
  544. %\caption{\em A Sample Caption.}
  545. %\end{verbatim}
  546. %You can, of course, change the font for individual words or
  547. %phrases. For example:
  548. %\begin{verbatim}
  549. %\caption{A Sample Caption With Some \emph{Emphasized Words}.}
  550. %\end{verbatim}
  551. %
  552. %The \styfmt{jmlrutils} package provides the following command for displaying
  553. %the contents of a figure or table:
  554. %\begin{definition}[\DescribeMacro{\floatconts}]
  555. %\cs{floatconts}\marg{label}\marg{caption command}\marg{contents}
  556. %\end{definition}
  557. %This ensures that the caption is correctly positioned and that
  558. %the contents are centred. For example:
  559. %\begin{verbatim}
  560. %\begin{table}[htbp]
  561. %\floatconts
  562. % {tab:example}% label
  563. % {\caption{An Example Table}}% caption command
  564. % {%
  565. % \begin{tabular}{ll}
  566. % \bfseries Dataset & \bfseries Result\\
  567. % Data1 & 0.123456
  568. % \end{tabular}
  569. % }
  570. %\end{table}
  571. %\end{verbatim}
  572. %If the \clsfmt{jmlr} class is used, the table caption (when used
  573. %with \cs{floatconts}) will obey the \clsopt{tablecaption} class option,
  574. %otherwise it will be placed above the table contents. Within the
  575. %\env{figure} environment, \cs{floatconts} will put the caption below
  576. %the contents. This command may be used within other floats.
  577. %
  578. %The \clsfmt{jmlr} class automatically loads \sty{graphicx} which
  579. %defines:
  580. %\begin{definition}[\DescribeMacro{\includegraphics}]
  581. %\cs{includegraphics}\oarg{options}\marg{file name}
  582. %\end{definition}
  583. %where \meta{options} is a comma-separated list of options.
  584. %If you are using \styfmt{jmlrutils} with another class you need to load
  585. %\sty{graphicx} in order to use this command. See the documentation
  586. %for the \sty{graphicx} package for further details of this command
  587. %and other provided commands.
  588. %
  589. %For example, suppose you have an image called
  590. %\texttt{mypic.png} in a subdirectory called \texttt{images}:
  591. %\begin{verbatim}
  592. %\begin{figure}[htbp]
  593. %\floatconts
  594. % {fig:example}% label
  595. % {\caption{An Example Figure}}% caption command
  596. % {\includegraphics[width=0.5\textwidth]{images/mypic}}
  597. %\end{figure}
  598. %\end{verbatim}
  599. %
  600. %Note that you shouldn't specify the file extension when including
  601. %the image when using the \clsfmt{jmlr} class. It's helpful if you
  602. %can also provide a grayscale version of colour images. This should be
  603. %labelled as the colour image but with \texttt{-gray} immediately
  604. %before the extension. (The extension need not be the same as that
  605. %of the colour image.) For example, if you have an image called
  606. %\texttt{mypic.pdf}, the grayscale can be called
  607. %\texttt{mypic-gray.pdf}, \texttt{mypic-gray.png} or
  608. %\texttt{mypic-gray.jpg}. See \sectionref{sec:color} for further
  609. %details.
  610. %
  611. %\begin{definition}[\DescribeMacro{\includeteximage}]
  612. %\cs{includeteximage}\oarg{options}\marg{file name}
  613. %\end{definition}
  614. %If your image file is made up of \LaTeX\ code (e.g.\ \sty{tikz}
  615. %commands) the file can be included using \cs{includeteximage}.
  616. %The optional argument is a key=value comma-separated list
  617. %where the keys are a subset of those provided by
  618. %\linebreak\cs{includegraphics}. The main keys are: \texttt{width},
  619. %\texttt{height}, \texttt{scale} and \texttt{angle}. Some
  620. %of the keys specific to image files (such as the bounding box
  621. %and type keys) do nothing with \cs{includeteximage}.
  622. %
  623. %\subsubsection{Sub-Figures and Sub-Tables}
  624. %\label{sec:subfloats}
  625. %
  626. %The \sty{subfig} package causes a problem for \clsfmt{jmlrbook} so
  627. %the \clsfmt{jmlr} class will give an error if it is used. Therefore
  628. %the \clsfmt{jmlr} class provides its own commands for including
  629. %sub-figures and sub-tables. If you aren't using the \clsfmt{jmlr}
  630. %class, you can prevent \styfmt{jmlrutils} from defining these
  631. %commands with the \pkgopt{nosubfloats} package option.
  632. %
  633. %\begin{definition}[\DescribeMacro{\subfigure}]
  634. %\cs{subfigure}\oarg{title}\oarg{valign}\marg{contents}
  635. %\end{definition}
  636. %This makes a sub-figure where \meta{contents} denotes the contents
  637. %of the sub-figure. This should also include the \cs{label}.
  638. %The first optional argument \meta{title} indicates a caption for
  639. %the sub-figure. By default, the sub-figures are aligned at the
  640. %base. This can be changed with the second optional argument
  641. %\meta{valign}, which may be one of: \texttt{t} (top), \texttt{c}
  642. %(centred) or \texttt{b} (base).
  643. %
  644. %For example, suppose there are two images files, \texttt{mypic1.png}
  645. %and \texttt{mypic2.png}, in the subdirectory \texttt{images}.
  646. %Then they can be included as sub-figures as follows:
  647. %\begin{verbatim}
  648. %\begin{figure}[htbp]
  649. %\floatconts
  650. % {fig:example2}% label for whole figure
  651. % {\caption{An Example Figure.}}% caption for whole figure
  652. % {%
  653. % \subfigure{%
  654. % \label{fig:pic1}% label for this sub-figure
  655. % \includegraphics{images/mypic1}
  656. % }\qquad % space out the images a bit
  657. % \subfigure{%
  658. % \label{fig:pic2}% label for this sub-figure
  659. % \includegraphics{images/mypic2}
  660. % }
  661. % }
  662. %\end{figure}
  663. %\end{verbatim}
  664. %
  665. %\begin{definition}[\DescribeMacro{\subtable}]
  666. %\cs{subtable}\oarg{title}\oarg{valign}\marg{contents}
  667. %\end{definition}
  668. %This is an analogous command for sub-tables. The default value
  669. %for \meta{valign} is \texttt{t}.
  670. %
  671. %\subsection{Algorithms}
  672. %The \clsfmt{jmlr} class automatically loads the \sty{algorithm2e}
  673. %package. If you are using \styfmt{jmlrutils} with another class, you
  674. %will need to load \sty{algorithm2e} if you want to use the
  675. %\env{algorithm} and \env{algorithm2e} environments described below.
  676. %
  677. %\begin{definition}[\DescribeEnv{algorithm}]
  678. %\cs{begin}\{algorithm\}\oarg{placement}\\
  679. %\meta{contents}\\
  680. %\cs{end}\{algorithm\}
  681. %\end{definition}
  682. %Enumerated textual algorithms can be displayed using the
  683. %\envfmt{algorithm} environment.
  684. %The optional argument is as for \env{figure} and \env{table}.
  685. %
  686. %Within the body of the
  687. %environment you can use the \env{enumerate} environment.
  688. %\begin{definition}[\DescribeEnv{enumerate*}]
  689. %\cs{begin}\{enumerate*\}\\
  690. %\cs{item} \meta{text}\\
  691. %\ldots\\
  692. %\cs{end}\{enumerate*\}
  693. %\end{definition}
  694. %If you want to have nested \env{enumerate} environments but you want
  695. %to keep the same numbering throughout the algorithm, you can use the
  696. %\envfmt{enumerate*} environment, provided by the \styfmt{jmlrutils}
  697. %package. For example:
  698. %\begin{verbatim}
  699. %\begin{algorithm}
  700. %\floatconts{alg:path}%label
  701. %{\caption{Shortest Path}}% caption
  702. %{% contents
  703. %\begin{enumerate*}
  704. % \item Set the label of vertex $s$ to 0
  705. % \item Set $i=0$
  706. % \begin{enumerate*}
  707. % \item \label{step:locate}Locate all unlabelled vertices
  708. % adjacent to a vertex labelled $i$ and label them $i+1$
  709. % \item If vertex $t$ has been labelled,
  710. % \begin{enumerate*}
  711. % \item[] the shortest path can be found by backtracking, and
  712. % the length is given by the label of $t$.
  713. % \end{enumerate*}
  714. % otherwise
  715. % \begin{enumerate*}
  716. % \item[] increment $i$ and return to step~\ref{step:locate}
  717. % \end{enumerate*}
  718. % \end{enumerate*}
  719. %\end{enumerate*}
  720. %}
  721. %\end{algorithm}
  722. %\end{verbatim}
  723. %
  724. %
  725. %\begin{definition}[\DescribeEnv{algorithm2e}]
  726. %\cs{begin}\{algorithm2e\}\\
  727. %\meta{contents}\\
  728. %\cs{end}\{algorithm2e\}
  729. %\end{definition}
  730. %Pseudo code can be displayed using the \envfmt{algorithm2e} environment,
  731. %provided by the \sty{algorithm2e} package, which is automatically
  732. %loaded. For example:
  733. %\begin{verbatim}
  734. %\begin{algorithm2e}
  735. %\caption{Computing Net Activation}
  736. %\label{alg:net}
  737. %\DontPrintSemicolon
  738. %\LinesNumbered
  739. %\KwIn{$x_1, \ldots, x_n, w_1, \ldots, w_n$}
  740. %\KwOut{$y$, the net activation}
  741. %$y\leftarrow 0$\;
  742. %\For{$i\leftarrow 1$ \KwTo $n$}{
  743. % $y \leftarrow y + w_i*x_i$\;
  744. %}
  745. %\end{algorithm2e}
  746. %\end{verbatim}
  747. %
  748. %See the \ctandoc{algorithm2e} for more details.
  749. %
  750. %\subsection{Description Lists}
  751. %
  752. %\begin{definition}[\DescribeEnv{altdescription}]
  753. %\cs{begin}\{altdescription\}\marg{widest label}\\
  754. %\cs{item}\oarg{label} \meta{item text}\\
  755. %\cs{end}\{altdescription\}
  756. %\end{definition}
  757. %In addition to the standard \env{description} environment, the
  758. %\clsfmt{jmlr} class also provides the \envfmt{altdescription} environment.
  759. %This has an argument that should be the widest label used in the
  760. %list. For example:
  761. %\begin{verbatim}
  762. %\begin{altdescription}{differentiate}
  763. %\item[add] A method that adds two variables.
  764. %\item[differentiate] A method that differentiates a function.
  765. %\end{altdescription}
  766. %\end{verbatim}
  767. %
  768. %\subsection{Theorems, Lemmas etc}
  769. %\label{sec:theorems}
  770. %
  771. %The \clsfmt{jmlrbook} class doesn't work well with common theorem
  772. %packages, so \styfmt{jmlrutils} provides theorem code that won't
  773. %conflict with \clsfmt{jmlrbook}. If you're using \styfmt{jmlrutils}
  774. %without the \clsfmt{jmlr} class, you can prevent the definition of
  775. %these commands with the \pkgopt{notheorems} package option.
  776. %
  777. %The \styfmt{jmlrutils} package provides the following theorem-like
  778. %environments: \env{theorem}, \env{example}, \env{lemma},
  779. %\env{proposition}, \env{remark}, \env{corollary}, \env{definition},
  780. %\env{conjecture} and \env{axiom}. Within the body of those
  781. %environments, you can use the \env{proof} environment to display the
  782. %proof if need be. The theorem-like environments all take an
  783. %optional argument, which gives the environment a title. For example:
  784. %
  785. %\begin{verbatim}
  786. %\begin{theorem}[An Example Theorem]
  787. %\label{thm:example}
  788. %This is the theorem.
  789. %\begin{proof}
  790. %This is the proof.
  791. %\end{proof}
  792. %\end{theorem}
  793. %\end{verbatim}
  794. %
  795. %You can define your own numbered theorem-like environment using:
  796. %\begin{definition}[\DescribeMacro{\newtheorem}]
  797. %\cs{newtheorem}\marg{name}\oarg{counter}\marg{title}\oarg{outer
  798. %counter}
  799. %\end{definition}
  800. %or you can define an unnumbered theorem-like environment using:
  801. %\begin{definition}[\DescribeMacro{\newtheorem*}]
  802. %\cs{newtheorem*}\marg{name}\marg{title}
  803. %\end{definition}
  804. %where \meta{name} is the name of the new environment and
  805. %\meta{title} is the title tag at the start of the environment. In
  806. %the case of the numbered theorems, \meta{counter} is a predefined
  807. %counter to use with this theorem. If omitted, a new counter called
  808. %\meta{name} will be defined. The final optional argument \meta{outer
  809. %counter} is the name of a parent counter which, when incremented, should
  810. %reset the theorem counter.
  811. %
  812. %Both \cs{newtheorem} and \cs{newtheorem*} set the new theorem's
  813. %style to the current defined style. The current style is set using
  814. %the following commands:
  815. %\begin{definition}[\DescribeMacro{\theorembodyfont}]
  816. %\cs{theorembodyfont}\marg{declarations}
  817. %\end{definition}
  818. %This sets the font declarations used in the body of the theorem.
  819. %This defaults to \cs{itshape}.
  820. %\begin{definition}[\DescribeMacro{\theoremheaderfont}]
  821. %\cs{theoremheaderfont}\marg{declarations}
  822. %\end{definition}
  823. %This sets the font declarations used for the theorem title.
  824. %This defaults to \cs{bfseries}.
  825. %\begin{definition}[\DescribeMacro{\theorempostheader}]
  826. %\cs{theorempostheader}\marg{text}
  827. %\end{definition}
  828. %This indicates what should occur at the end of the title. This
  829. %defaults to nothing.
  830. %\begin{definition}[\DescribeMacro{\theoremsep}]
  831. %\cs{theoremsep}\marg{text}
  832. %\end{definition}
  833. %This indicates what to put between the header and the body of the
  834. %environment. This defaults to nothing.
  835. %
  836. %For example, to define an unnumbered theorem-like environment called
  837. %\qt{note} with the title \qt{Note} followed by a colon and a new
  838. %line between the title and the body of the \texttt{note}
  839. %environment:
  840. %\begin{verbatim}
  841. % \theorembodyfont{\upshape}
  842. % \theoremheaderfont{\scshape}
  843. % \theorempostheader{:}
  844. % \theoremsep{\newline}
  845. % \newtheorem*{note}{Note}
  846. %\end{verbatim}
  847. %Now it can be used in the document environment:
  848. %\begin{verbatim}
  849. %\begin{note}
  850. %This is an numbered theorem-like environment.
  851. %\end{note}
  852. %\end{verbatim}
  853. %
  854. %\subsection{Cross-Referencing}
  855. %\label{sec:crossref}
  856. %
  857. %Always use \ics{label} when cross-referencing, rather than writing
  858. %the number explicitly. The \styfmt{jmlrutils} package provides some
  859. %convenience commands to assist referencing. These commands,
  860. %described below, can all take a comma-separated list of labels.
  861. %
  862. %\begin{definition}[\DescribeMacro{\sectionref}]
  863. %\cs{sectionref}\marg{label list}
  864. %\end{definition}
  865. %Used to refer to a section or sections. For example, if you defined
  866. %a section as follows:
  867. %\begin{verbatim}
  868. %\chapter{Results}\label{sec:results}
  869. %\end{verbatim}
  870. %you can refer to it as follows:
  871. %\begin{verbatim}
  872. %The results are detailed in \sectionref{sec:results}.
  873. %\end{verbatim}
  874. %This command may also be used for sub-sections and sub-sub-sections.
  875. %
  876. %\begin{definition}[\DescribeMacro{\appendixref}]
  877. %\cs{appendixref}\marg{label list}
  878. %\end{definition}
  879. %Used to refer to an appendix or multiple appendices.
  880. %
  881. %\begin{definition}[\DescribeMacro{\equationref}]
  882. %\cs{equationref}\marg{label list}
  883. %\end{definition}
  884. %Used to refer to an equation or multiple equations.
  885. %
  886. %\begin{definition}[\DescribeMacro{\tableref}]
  887. %\cs{tableref}\marg{label list}
  888. %\end{definition}
  889. %Used to refer to a table or multiple tables. This can also be
  890. %used for sub-tables where the main table number is also required.
  891. %
  892. %\begin{definition}[\DescribeMacro{\subtabref}]
  893. %\cs{subtabref}\marg{label list}
  894. %\end{definition}
  895. %Used to refer to sub-tables without the main table number, e.g.
  896. %(\emph{a}) or (\emph{b}).
  897. %
  898. %\begin{definition}[\DescribeMacro{\figureref}]
  899. %\cs{figureref}\marg{label list}
  900. %\end{definition}
  901. %Used to refer to a figure or multiple figures. This can also
  902. %be used for sub-figures where the main figure number is also
  903. %required, e.g.\ 2(\emph{a}) or 4(\emph{b}).
  904. %
  905. %\begin{definition}[\DescribeMacro{\subfigref}]
  906. %\cs{subfigref}\marg{label list}
  907. %\end{definition}
  908. %Used to refer to sub-figures without the main figure number, e.g.
  909. %(\emph{a}) or (\emph{b}).
  910. %
  911. %\begin{definition}[\DescribeMacro{\algorithmref}]
  912. %\cs{algorithmref}\marg{label list}
  913. %\end{definition}
  914. %Used to refer to an algorithm or multiple algorithms.
  915. %
  916. %\begin{definition}[\DescribeMacro{\theoremref}]
  917. %\cs{theoremref}\marg{label list}
  918. %\end{definition}
  919. %Used to refer to a theorem or multiple theorems.
  920. %
  921. %\begin{definition}[\DescribeMacro{\lemmaref}]
  922. %\cs{lemmaref}\marg{label list}
  923. %\end{definition}
  924. %Used to refer to a lemma or multiple lemmas.
  925. %
  926. %\begin{definition}[\DescribeMacro{\remarkref}]
  927. %\cs{remarkref}\marg{label list}
  928. %\end{definition}
  929. %Used to refer to a remark or multiple remarks.
  930. %
  931. %\begin{definition}[\DescribeMacro{\corollaryref}]
  932. %\cs{corollaryref}\marg{label list}
  933. %\end{definition}
  934. %Used to refer to a corollary or multiple corollaries.
  935. %
  936. %\begin{definition}[\DescribeMacro{\definitionref}]
  937. %\cs{definitionref}\marg{label list}
  938. %\end{definition}
  939. %Used to refer to a definition or multiple definitions.
  940. %
  941. %\begin{definition}[\DescribeMacro{\conjectureref}]
  942. %\cs{conjectureref}\marg{label list}
  943. %\end{definition}
  944. %Used to refer to a conjecture or multiple conjectures.
  945. %
  946. %\begin{definition}[\DescribeMacro{\axiomref}]
  947. %\cs{axiomref}\marg{label list}
  948. %\end{definition}
  949. %Used to refer to an axiom or multiple axioms.
  950. %
  951. %\begin{definition}[\DescribeMacro{\exampleref}]
  952. %\cs{exampleref}\marg{label list}
  953. %\end{definition}
  954. %Used to refer to an example or multiple examples.
  955. %
  956. %\subsection{Mathematics}
  957. %
  958. %The \clsfmt{jmlr} class loads the \sty{amsmath} package so you can
  959. %use any of the commands and environments defined in that package.
  960. %The \styfmt{jmlrutils} package will load \sty{amsmath} if the
  961. %default \pkgopt{maths} package option is used but won't load
  962. %\sty{amsmath} if the \pkgopt{nomaths} option is used. A brief
  963. %summary of some of the more common commands and environments is
  964. %provided here. See the \ctandoc{amsmath} for further details.
  965. %
  966. %\begin{definition}[\DescribeMacro{\set}]
  967. %\cs{set}\marg{maths}
  968. %\end{definition}
  969. %In addition to the commands provided by \sty{amsmath}, the
  970. %\styfmt{jmlrutils} package also provides the \cs{set} command which can
  971. %be used to typeset a set. For example:
  972. %\begin{verbatim}
  973. %The universal set is denoted $\set{U}$
  974. %\end{verbatim}
  975. %This command won't be provided if the \pkgopt{nomaths} option is
  976. %used.
  977. %
  978. %\begin{definition}[\DescribeMacro{\vec}]
  979. %\cs{vec}\marg{maths}
  980. %\end{definition}
  981. %The \cs{vec} command is redefined by \styfmt{jmlrutils} to use
  982. %\cs{boldsymbol}, which is provided by \sty{amsmath}.
  983. %(This command won't be redefined if the \pkgopt{nomaths} option is
  984. %used.) If you require
  985. %the original \cs{vec}, you can access it with:
  986. %\begin{definition}[\DescribeMacro{\orgvec}]
  987. %\cs{orgvec}\marg{maths}
  988. %\end{definition}
  989. %This command won't be provided if the \pkgopt{nomaths} option is
  990. %used.
  991. %
  992. %Unnumbered single-line equations should be displayed using
  993. %\cs{[} and \cs{]}. For example:
  994. %\begin{verbatim}
  995. %\[E = m c^2\]
  996. %\end{verbatim}
  997. %Numbered single-line equations should be displayed using the
  998. %\env{equation} environment. For example:
  999. %\begin{verbatim}
  1000. %\begin{equation}\label{eq:trigrule}
  1001. %\cos^2\theta + \sin^2\theta \equiv 1
  1002. %\end{equation}
  1003. %\end{verbatim}
  1004. %The above are provided by the \LaTeX\ kernel but may be adjusted by
  1005. %packages such as \sty{amsmath}. The commands and environments below
  1006. %are provided by \sty{amsmath}.
  1007. %
  1008. %Multi-lined numbered equations should be displayed using the
  1009. %\env{align} environment. For example:
  1010. %\begin{verbatim}
  1011. %\begin{align}
  1012. %f(x) &= x^2 + x\label{eq:f}\\
  1013. %f'(x) &= 2x + 1\label{eq:df}
  1014. %\end{align}
  1015. %\end{verbatim}
  1016. %Unnumbered multi-lined equations should be displayed using the
  1017. %\env{align*} environment. For example:
  1018. %\begin{verbatim}
  1019. %\begin{align*}
  1020. %f(x) &= (x+1)(x-1)\\
  1021. %&= x^2 - 1
  1022. %\end{align*}
  1023. %\end{verbatim}
  1024. %If you want to mix numbered with unnumbered lines use the
  1025. %\env{align} environment and suppress unwanted line numbers with
  1026. %\cs{nonumber}. For example:
  1027. %\begin{verbatim}
  1028. %\begin{align}
  1029. %y &= x^2 + 3x - 2x + 1\nonumber\\
  1030. %&= x^2 + x + 1\label{eq:y}
  1031. %\end{align}
  1032. %\end{verbatim}
  1033. %An equation that is too long to fit on a single line can be
  1034. %displayed using the \env{split} environment.
  1035. %
  1036. %Text can be embedded in an equation using \ics{text}\marg{text} or
  1037. %you can use \ics{intertext}\marg{text} to interupt a multi-line
  1038. %environment such as \env{align}.
  1039. %
  1040. %Predefined operator names are listed in \tableref{tab:operatornames}.
  1041. %For additional operators, either use
  1042. %\begin{definition}[\DescribeMacro{\operatorname}]
  1043. %\cs{operatorname}\marg{name}
  1044. %\end{definition}
  1045. %for example
  1046. %\begin{verbatim}
  1047. %If $X$ and $Y$ are independent,
  1048. %$\operatorname{var}(X+Y) =
  1049. %\operatorname{var}(X) + \operatorname{var}(Y)$
  1050. %\end{verbatim}
  1051. %or declare it with
  1052. %\begin{definition}[\DescribeMacro{\DeclareMathOperator}]
  1053. %\cs{DeclareMathOperator}\marg{command}\marg{name}
  1054. %\end{definition}
  1055. %for example
  1056. %\begin{verbatim}
  1057. %\DeclareMathOperator{\var}{var}
  1058. %\end{verbatim}
  1059. %and then use this new command:
  1060. %\begin{verbatim}
  1061. %If $X$ and $Y$ are independent,
  1062. %$\var(X+Y) = \var(X)+\var(Y)$
  1063. %\end{verbatim}
  1064. %
  1065. %If you want limits that go above and
  1066. %below the operator (like \ics{sum}) use the starred versions
  1067. %(\ics{operatorname*} or \ics{DeclareMathOperator*}).
  1068. %
  1069. %\begin{table}[htbp]
  1070. %\caption{Predefined Operator Names (taken from
  1071. % \sty{amsmath} documentation)}
  1072. %\label{tab:operatornames}%
  1073. %\vskip\baselineskip
  1074. %\centering
  1075. %\begin{tabular}{rlrlrlrl}
  1076. %\cs{arccos} & $\arccos$ & \cs{deg} & $\deg$ & \cs{lg} & $\lg$ & \cs{projlim} & $\projlim$ \\
  1077. %\cs{arcsin} & $\arcsin$ & \cs{det} & $\det$ & \cs{lim} & $\lim$ & \cs{sec} & $\sec$ \\
  1078. %\cs{arctan} & $\arctan$ & \cs{dim} & $\dim$ & \cs{liminf} & $\liminf$ & \cs{sin} & $\sin$ \\
  1079. %\cs{arg} & $\arg$ & \cs{exp} & $\exp$ & \cs{limsup} & $\limsup$ & \cs{sinh} & $\sinh$ \\
  1080. %\cs{cos} & $\cos$ & \cs{gcd} & $\gcd$ & \cs{ln} & $\ln$ & \cs{sup} & $\sup$ \\
  1081. %\cs{cosh} & $\cosh$ & \cs{hom} & $\hom$ & \cs{log} & $\log$ & \cs{tan} & $\tan$ \\
  1082. %\cs{cot} & $\cot$ & \cs{inf} & $\inf$ & \cs{max} & $\max$ & \cs{tanh} & $\tanh$ \\
  1083. %\cs{coth} & $\coth$ & \cs{injlim} & $\injlim$ & \cs{min} & $\min$ \\
  1084. %\cs{csc} & $\csc$ & \cs{ker} & $\ker$ & \cs{Pr} & $\Pr$
  1085. %\end{tabular}\par
  1086. %\begin{tabular}{rlrl}
  1087. %\cs{varlimsup} & $\varlimsup$
  1088. %& \cs{varinjlim} & $\varinjlim$\\
  1089. %\cs{varliminf} & $\varliminf$
  1090. %& \cs{varprojlim} & $\varprojlim$
  1091. %\end{tabular}
  1092. %
  1093. %\end{table}
  1094. %
  1095. %\section{Color vs Grayscale}
  1096. %\label{sec:color}
  1097. %
  1098. %It's helpful if authors supply grayscale versions of their
  1099. %articles in the event that the article is to be incorporated into
  1100. %a black and white printed book. With external PDF, PNG or JPG
  1101. %graphic files, you just need to supply a grayscale version of the
  1102. %file. For example, if the file is called \texttt{myimage.png},
  1103. %then the gray version should be \texttt{myimage-gray.png} or
  1104. %\texttt{myimage-gray.pdf} or \texttt{myimage-gray.jpg}. You don't
  1105. %need to modify your code. The \clsfmt{jmlr} class checks for
  1106. %the existence of the grayscale version if it is print mode
  1107. %(provided you have used \ics{includegraphics} and haven't
  1108. %specified the file extension). This check is performed by code
  1109. %provided by the \clsfmt{jmlr} class not the \styfmt{jmlrutils} package.
  1110. %
  1111. %\begin{definition}[\DescribeMacro{\ifprint}]
  1112. %\cs{ifprint}\marg{true part}\marg{false part}
  1113. %\end{definition}
  1114. %You can use \cs{ifprint} to determine which mode you are in.
  1115. %For example:
  1116. %\begin{verbatim}
  1117. %in \figureref{fig:nodes}, the
  1118. %\ifprint{dark gray}{purple}
  1119. %ellipse represents an input and the
  1120. %\ifprint{light gray}{yellow} ellipse
  1121. %represents an output.
  1122. %\end{verbatim}
  1123. %Another example:
  1124. %\begin{verbatim}
  1125. %{\ifprint{\bfseries}{\color{red}}important text!}
  1126. %\end{verbatim}
  1127. %
  1128. %You can use the class option \clsopt{gray} to see how the
  1129. %document will appear in gray scale mode.
  1130. %
  1131. %The \sty{xcolor} class is loaded with the \pkgoptfmt{x11names}
  1132. %option, so you can use any of the x11 predefined colors (listed
  1133. %in the \ctandoc{xcolor}).
  1134. %
  1135. %\section{Where To Go For Help}
  1136. %
  1137. %If you have a general \LaTeX\ query, the first place to go to is the
  1138. %\urlfootref{http://www.tex.ac.uk/faq}{UK TUG FAQ}.
  1139. %
  1140. %If you are unfamiliar or just getting started with \LaTeX, there's
  1141. %a list of on-line introductions to \LaTeX\ at
  1142. %\url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=man-latex}
  1143. %or have a look at
  1144. %\href{http://www.dickimaw-books.com/latex/novices}{\LaTeX\ for Complete Novices}.
  1145. %
  1146. %There are also forums, mailing lists and newsgroups. For example,
  1147. %\TeX\ on StackExchange (\url{http://tex.stackexchange.com/}),
  1148. %the \LaTeX\ Community (\url{http://www.latex-community.org/}),
  1149. %the \texttt{texhax} mailing list
  1150. %(\url{http://tug.org/mailman/listinfo/texhax}) and
  1151. %\texttt{comp.text.tex} (archives available at
  1152. %\url{http://groups.google.com/group/comp.text.tex/}).
  1153. %
  1154. %Documentation for packages or classes can be found using the
  1155. %\texttt{texdoc} application. For example:
  1156. %\begin{verbatim}
  1157. %texdoc natbib
  1158. %\end{verbatim}
  1159. %Alternatively, you can go to
  1160. %\texttt{http://www.ctan.org/pkg/}\meta{name} where
  1161. %\meta{name} is the name of the package. For example:
  1162. %\url{http://www.ctan.org/pkg/natbib}
  1163. %
  1164. %For a general guide to preparing papers (regardless of whether you
  1165. %are using \LaTeX\ or a word processor), see Kate L.~Turabian, \qt{A
  1166. %manual for writers of term papers, theses, and dissertations}, The
  1167. %University of Chicago Press, 1996.
  1168. %
  1169. %\chapter{Guidelines for Production Editors}
  1170. %\label{sec:jmlrbook}
  1171. %
  1172. %The \clsfmt{jmlrbook} class can be used to combine articles that use
  1173. %the \clsfmt{jmlr} document class into a book. The following sample
  1174. %files are provided: \texttt{paper1/paper1.tex},
  1175. %\texttt{paper2/paper2.tex}, \texttt{paper3/paper3.tex},
  1176. %\texttt{jmlr-sample.tex}, \texttt{jmlrwcp-sample.tex},
  1177. %\texttt{jmlrbook-sample.tex} and \texttt{proceedings-sample.tex}.
  1178. %All but the last two are articles using the \clsfmt{jmlr} class. The
  1179. %last two (\texttt{jmlrbook-sample.tex} and
  1180. %\texttt{proceedings-sample.tex}) uses the \clsfmt{jmlrbook} class
  1181. %file to combine the articles into a book. Note that no modifications
  1182. %are needed to the files using the \clsfmt{jmlr} class when they are
  1183. %imported into the book. They can either be compiled as stand-alone
  1184. %articles or with the entire book.
  1185. %
  1186. %Before you compile the book, make sure that all the articles
  1187. %compile as stand-alone documents (and run Bib\TeX\ where
  1188. %necessary). You can use the \app{makejmlrbookgui} application to compile
  1189. %the book. See
  1190. %\url{http://www.dickimaw-books.com/software/makejmlrbookgui/} for details.
  1191. %
  1192. %\section{\clsfmt{jmlrbook} Class Options}
  1193. %\begin{description}
  1194. %\item[\clsopt{nowcp}]The imported pre-published articles were
  1195. %published in the Journal of Machine Learning Research (default).
  1196. %\item[\clsopt{pmlr}] The imported pre-published articles were
  1197. %published in the Proceedings of Machine Learning Research (PMLR).
  1198. %\item[\clsopt{wcp}] The imported pre-published articles were
  1199. %published in the JMLR Workshop and Conference Proceedings (JMLR
  1200. %W\&CP).
  1201. %
  1202. %If the book has a mixture of JMLR, JMLR W\&CP or PMLR articles, you
  1203. %can switch between them using
  1204. %\begin{definition}[\DescribeMacro{\jmlrnowcp}]
  1205. %\cs{jmlrnowcp}
  1206. %\end{definition}
  1207. %(for JMLR) or
  1208. %\begin{definition}[\DescribeMacro{\jmlrwcp}]
  1209. %\cs{jmlrwcp}
  1210. %\end{definition}
  1211. %(for JMLR W\&CP) or
  1212. %\begin{definition}[\DescribeMacro{\jmlrpmlr}]
  1213. %\cs{jmlrpmlr}
  1214. %\end{definition}
  1215. %(for PMLR).
  1216. %Alternatively, you can set the name of the journal or conference
  1217. %proceedings using:
  1218. %\begin{definition}[\DescribeMacro{\jmlrproceedings}]
  1219. %\cs{jmlrproceedings}\marg{short title}\marg{long title}
  1220. %\end{definition}
  1221. %
  1222. %\item[\clsopt{color}] Color version (see \sectionref{sec:color}).
  1223. %Use this option for the on-line version with hyperlinks enabled
  1224. %(default).
  1225. %
  1226. %\item[\clsopt{gray}] Grayscale version (see \sectionref{sec:color}).
  1227. %Use this option for the print version without hyperlinks.
  1228. %
  1229. %\item[{\clsopt[top]{tablecaption}}] in a \env{table} environment,
  1230. %\ics{floatconts} puts the caption at the top.
  1231. %
  1232. %\item[{\clsopt[bottom]{tablecaption}}] in a \env{table} environment,
  1233. %\ics{floatconts} puts the caption at the bottom.
  1234. %
  1235. %\item[\clsopt{letterpaper}] Set the paper size to letter (default).
  1236. %
  1237. %\item[\clsopt{7x10}] Set the paper size to $7\times10$ inches.
  1238. %
  1239. %\item[\clsopt{10pt}] Use 10pt as the normal text size.
  1240. %\item[\clsopt{11pt}] Use 11pt as the normal text size (default).
  1241. %\item[\clsopt{12pt}] Use 12pt as the normal text size.
  1242. %
  1243. %\end{description}
  1244. %
  1245. %\section{The Preamble}
  1246. %
  1247. %Any packages that the imported articles load (which aren't
  1248. %automatically loaded by \clsfmt{jmlr}) must be loaded in the book's
  1249. %preamble. For example, if one or more of the articles load the
  1250. %\sty{siunitx} package, this package must be loaded in the book.
  1251. %
  1252. %Commands that are defined in the imported articles will be local
  1253. %to that article unless they have been globally defined using
  1254. %\ics{gdef} or \ics{global}. Since most authors use \ics{newcommand}
  1255. %and \ics{newenvironment} (or \ics{renewcommand} and
  1256. %\ics{renewenvironment}) this shouldn't cause a conflict if more
  1257. %that one article has defined the same command or environment.
  1258. %For example, in the sample files supplied, both
  1259. %\texttt{paper1/paper1.tex} and \texttt{paper2/paper2.tex} have
  1260. %defined the command \cs{samplecommand} using \cs{newcommand}. As
  1261. %long as this command isn't also defined in the book, there won't
  1262. %be a conflict.
  1263. %
  1264. %\begin{definition}[\DescribeMacro{\title}]
  1265. %\cs{title}\oarg{PDF title}\marg{book title}
  1266. %\end{definition}
  1267. %In the book preamble, \cs{title} sets the book title and the optional
  1268. %argument is used for the PDF title, which will be displayed
  1269. %when the reader views the PDF file's properties in their PDF viewer.
  1270. %(Note that in the imported articles, \cs{title} sets the article's
  1271. %title and the optional argument sets the short title for the
  1272. %page header and table of contents.)
  1273. %
  1274. %\begin{definition}[\DescribeMacro{\author}]
  1275. %\cs{author}\oarg{PDF author(s)}\marg{book author(s)}
  1276. %\end{definition}
  1277. %In the book preamble, \cs{author} sets the book's author (or editor)
  1278. %and the optional argument is used for the PDF author, which will be
  1279. %displayed when the reader views the PDF file's properties in their
  1280. %PDF viewer. (Note that in the imported articles, \cs{author} sets
  1281. %the article's author and the optional argument sets the short author
  1282. %list for the page header.)
  1283. %
  1284. %\begin{definition}[\DescribeMacro{\volume}]
  1285. %\cs{volume}\marg{number}
  1286. %\end{definition}
  1287. %This command sets the book's volume number. Omit if the book has no
  1288. %volume number.
  1289. %
  1290. %\begin{definition}[\DescribeMacro{\subtitle}]
  1291. %\cs{subtitle}\marg{sub-title}
  1292. %\end{definition}
  1293. %This command sets the book's subtitle. Omit if the book has no
  1294. %sub-title.
  1295. %
  1296. %\begin{definition}[\DescribeMacro{\logo}]
  1297. %\cs{logo}\oarg{url}\marg{image command}
  1298. %\end{definition}
  1299. %This sets the book's title image. Use \ics{includegraphics} and
  1300. %omit the file extension. If you provide a grayscale version as
  1301. %well as a color version, the grayscale version will be used for
  1302. %the print version of the book. (See \sectionref{sec:color}
  1303. %for further details.) The optional argument, if present, was
  1304. %formerly used by \app{makejmlrbookgui} to make the logo a link to
  1305. %\meta{url} on the index HTML page. (The HTML pages are no longer
  1306. %generated by the application as PMLR now generate the HTML from
  1307. %the .bib file for the proceedings.)
  1308. %
  1309. %\begin{definition}[\DescribeMacro{\team}]
  1310. %\cs{team}\marg{team title}
  1311. %\end{definition}
  1312. %This can be used to set the name of the editorial team. This
  1313. %command may be omitted if not required.
  1314. %
  1315. %\begin{definition}[\DescribeMacro{\productioneditor}]
  1316. %\cs{productioneditor}\marg{name}
  1317. %\end{definition}
  1318. %This command may be used to name the production editor. The command
  1319. %may be omitted if not required.
  1320. %
  1321. %\begin{definition}[\DescribeMacro{\jmlrlocation}]
  1322. %\cs{jmlrlocation}\marg{location}
  1323. %\end{definition}
  1324. %This specifies the workshop location. By default this doesn't appear
  1325. %on the title page. See \sectionref{sec:modifytitle} for details on
  1326. %how to modify the layout of the title page.
  1327. %
  1328. %\section{Main Book Commands}
  1329. %
  1330. %All commands that are provided by the \clsfmt{jmlr} class are
  1331. %also available with the \clsfmt{jmlrbook} class, but some commands
  1332. %might behave differently depending on whether they are in the
  1333. %main part of the book or within the imported articles.
  1334. %
  1335. %In the main part of the book you can use the following commands:
  1336. %\begin{definition}[\DescribeMacro{\maketitle}]
  1337. %\cs{maketitle}
  1338. %\end{definition}
  1339. %This displays the book's title page. Note that \cs{maketitle} has
  1340. %a different effect when used in imported articles.
  1341. %
  1342. %\begin{definition}[\DescribeMacro{\frontmatter}]
  1343. %\cs{frontmatter}
  1344. %\end{definition}
  1345. %Use this command at the start of the front matter (e.g.\ before the
  1346. %foreword or preface). This will make chapters unnumbered even if you
  1347. %use \cs{chapter} instead of \cs{chapter*}. It also sets the page
  1348. %style and sets the page numbering to lower case Roman numerals.
  1349. %
  1350. %\begin{definition}[\DescribeEnv{authorsignoff}]
  1351. %\cs{begin}\{authorsignoff\}\\
  1352. %\meta{author list}\\
  1353. %\cs{end}\{authorsignoff\}
  1354. %\end{definition}
  1355. %This environment may be used by the author signing off at the end of a chapter such as the
  1356. %foreword. Within the environment use:
  1357. %\begin{definition}[\DescribeMacro{\Author}]
  1358. %\cs{Author}\marg{details}
  1359. %\end{definition}
  1360. %for the author's details. More than one \cs{Author} should be used
  1361. %if there is more than one author. Example:
  1362. %\begin{verbatim}
  1363. %\begin{authorsignoff}
  1364. %\Author{Nicola Talbot\\
  1365. %University of East Anglia}
  1366. %\Author{Anne Author\\
  1367. %University of No Where}
  1368. %\end{authorsignoff}
  1369. %\end{verbatim}
  1370. %
  1371. %\begin{definition}[\DescribeEnv{preface}]
  1372. %\cs{begin}\{preface\}\oarg{filename}
  1373. %\end{definition}
  1374. %This environment may be used to typeset the preface. This starts a
  1375. %new chapter using
  1376. %\begin{verbatim}
  1377. %\chapter{\prefacename}
  1378. %\end{verbatim}
  1379. %\DescribeMacro{\prefacename}where \cs{prefacename} defaults to
  1380. %``Preface''. This environment should typically go in the front
  1381. %matter and is provided to allow \app{makejmlrbookgui} create a
  1382. %standalone document for the preface. The optional argument is the
  1383. %filename (without any extension or path) that will be used by
  1384. %\app{makejmlrbookgui}. This defaults to \texttt{preface} but, to
  1385. %conform with PMLR guidelines, should be changed to the surname of
  1386. %the first author (editor) followed by the final two digits of the
  1387. %year. See the PMLR website for further details of the guidelines.
  1388. %
  1389. %\begin{definition}[\DescribeEnv{signoff}]
  1390. %\cs{begin}\{signoff\}\oarg{team name}\marg{date}\\
  1391. %\meta{editor list}\\
  1392. %\cs{end}\{signoff\}
  1393. %\end{definition}
  1394. %This environment may be used by the editorial team when signing off
  1395. %a chapter such as the preface. If the optional argument is omitted,
  1396. %\qt{The Editorial Team} is used. If you are using the \env{preface}
  1397. %environment described above, the \env{signoff} environment must go
  1398. %inside the \env{preface} environment.
  1399. %
  1400. %Within the \env{signoff} environment use:
  1401. %\begin{definition}[\DescribeMacro{\Editor}]
  1402. %\cs{Editor}\marg{details}
  1403. %\end{definition}
  1404. %for each editor. Example:
  1405. %\begin{verbatim}
  1406. %\begin{signoff}{March 2010}
  1407. %% First editor:
  1408. %\Editor{Nicola Talbot\\
  1409. %University of East Anglia\\
  1410. %\mailto{N.Talbot@uea.ac.uk}}
  1411. %% Second editor:
  1412. %\Editor{Anne Editor\\
  1413. %University of Nowhere\\
  1414. %\mailto{ae@sample.com}}
  1415. %\end{signoff}
  1416. %\end{verbatim}
  1417. %
  1418. %\begin{definition}[\DescribeMacro{\tableofcontents}]
  1419. %\cs{tableofcontents}
  1420. %\end{definition}
  1421. %This command displays the book's table of contents. Note that it
  1422. %has a different effect if used in an imported article.
  1423. %
  1424. %\begin{definition}[\DescribeMacro{\mainmatter}]
  1425. %\cs{mainmatter}
  1426. %\end{definition}
  1427. %Use this command to switch to the book's main matter. This will
  1428. %switch the chapter numbering back on, reset the page numbering to
  1429. %Arabic and set up the main page style.
  1430. %
  1431. %\begin{definition}[\DescribeMacro{\part}]
  1432. %\cs{part}\oarg{short title}\marg{title}
  1433. %\end{definition}
  1434. %If used in the main part of the book, this command will start a
  1435. %new part and issue a clear double page. Note that this command
  1436. %has a different effect if used in an imported article (or inside the
  1437. %\env{jmlrpapers} environment).
  1438. %
  1439. %\begin{definition}[\DescribeMacro{\addtocpart}]
  1440. %\cs{addtocpart}\marg{title}
  1441. %\end{definition}
  1442. %This adds \meta{title} to the table of contents, issues a clear
  1443. %double page, but doesn't display any text or affect the part
  1444. %numbering.
  1445. %
  1446. %\begin{definition}[\DescribeMacro{\chapter}]
  1447. %\cs{chapter}\oarg{short title}\marg{title}
  1448. %\end{definition}
  1449. %This command may be used in the main body of the book but will
  1450. %cause an error if used within an imported article (or inside the
  1451. %\env{jmlrpapers} environment).
  1452. %
  1453. %\begin{definition}[\DescribeMacro{\section}]
  1454. %\cs{section}\oarg{short title}\marg{title}
  1455. %\end{definition}
  1456. %\begin{definition}[\DescribeMacro{\subsection}]
  1457. %\cs{subsection}\oarg{short title}\marg{title}
  1458. %\end{definition}
  1459. %\begin{definition}[\DescribeMacro{\subsubsection}]
  1460. %\cs{subsubsection}\oarg{short title}\marg{title}
  1461. %\end{definition}
  1462. %\begin{definition}[\DescribeMacro{\paragraph}]
  1463. %\cs{paragraph}\oarg{short title}\marg{title}
  1464. %\end{definition}
  1465. %\begin{definition}[\DescribeMacro{\subparagraph}]
  1466. %\cs{subparagraph}\oarg{short title}\marg{title}
  1467. %\end{definition}
  1468. %These commands may be used in the main body of the book or within
  1469. %imported articles. In the main body of the book (outside of the
  1470. %\env{jmlrpapers} environment) they need to be
  1471. %within a chapter and will be numbered according to the chapter.
  1472. %
  1473. %\begin{definition}[\DescribeMacro{\appendix}]
  1474. %\cs{appendix}
  1475. %\end{definition}
  1476. %If used in the main body of the book (\emph{outside} of the
  1477. %\env{jmlrpapers} environment) this will switch to the book
  1478. %appendices. Subsequent \cs{chapter} commands will produce the
  1479. %appendices. (Any imported articles in the appendix will be
  1480. %identified by \app{makejmlrbookgui} as supplemental material.) If
  1481. %used within an imported article (or within the \env{jmlrpapers}
  1482. %environment) \cs{appendix} will switch to the
  1483. %article appendices and won't affect the main part of the book.
  1484. %
  1485. %\begin{definition}[\DescribeEnv{jmlrpapers}]
  1486. %\cs{begin}\{jmlrpapers\}\\
  1487. %\meta{imported papers}\\
  1488. %\cs{end}\{jmlrpapers\}
  1489. %\end{definition}
  1490. %This environment must be used when importing articles and may be
  1491. %used as often as required. Take care not to include book sectioning
  1492. %commands, such as \ics{chapter}, in this environment. Within the
  1493. %\envfmt{jmlrpapers} environment, use the following commands to
  1494. %import articles:
  1495. %\begin{definition}[\DescribeMacro{\importpubpaper}]
  1496. %\cs{importpubpaper}\oarg{label}\marg{directory}\marg{file}\marg{pages}
  1497. %\end{definition}
  1498. %This imports an article that has already been published elsewhere.
  1499. %The \meta{pages} argument should be the page range from the
  1500. %\emph{previously published} version of this article. This may not
  1501. %necessarily be the same as the page range of the article in the
  1502. %book. The directory the imported file is contained in is given by
  1503. %\meta{directory}. If the file is in the same directory as the book,
  1504. %use a dot. The file name is given by \meta{file}. The article is
  1505. %also given a label, specified by the optional argument. This is
  1506. %\meta{directory}/\meta{file} by default. The label is used as a
  1507. %prefix to labels in the imported articles which ensures that
  1508. %cross-references are unique. You can also use this label to
  1509. %reference the article elsewhere in the book (see
  1510. %\sectionref{sec:bkcrossref}).
  1511. %
  1512. %\begin{definition}[\DescribeMacro{\importpaper}]
  1513. %\cs{importpaper}\oarg{label}\marg{directory}\marg{file}
  1514. %\end{definition}
  1515. %Imports an article that is being published in the book. The
  1516. %arguments are the same as above except that there is no page
  1517. %range (the page range is computed automatically).
  1518. %
  1519. %\begin{definition}[\DescribeMacro{\importarticle}]
  1520. %\cs{importarticle}\oarg{label}\marg{directory}\marg{file}
  1521. %\end{definition}
  1522. %This imports an article that hasn't been published elsewhere. There
  1523. %is no page range, but the other arguments are the same as
  1524. %those describe above for \cs{importpubpaper}.
  1525. %
  1526. %Example: to import a previously published paper
  1527. %\texttt{paper1/paper1.tex} and an unpublished paper
  1528. %\texttt{paper2/paper2.tex}:
  1529. %\begin{verbatim}
  1530. %\begin{jmlrpapers}
  1531. %\importpubpaper{paper1}{paper1}{23--45}
  1532. %\importarticle{paper2}{paper2}
  1533. %\end{jmlrpapers}
  1534. %\end{verbatim}
  1535. %
  1536. %\subsection{Two Column Articles in a One Column Book}
  1537. %
  1538. %The \clsfmt{jmlrbook} class column style will override the column style
  1539. %of the imported articles. You can use the \clsopt{twocolumn} class
  1540. %option to \clsfmt{jmlrbook}, but this will make the whole book with
  1541. %two columns. If you only want the imported articles to be in two
  1542. %columns, then put \ics{twocolumn} in the \env{jmlrpapers}
  1543. %environment to switch on two column formatting. The effect will be
  1544. %localised to the end of the environment.
  1545. %
  1546. %\subsection{Cross-Referencing}
  1547. %\label{sec:bkcrossref}
  1548. %
  1549. %You can cross-reference other parts of the book using the
  1550. %standard \cs{label}/\cs{ref} mechanism, but if you want to
  1551. %reference something within an imported article, you must prefix
  1552. %the label with the label given when importing the article (that
  1553. %is, the optional argument to \ics{importpubpaper},
  1554. %\ics{importpaper} or \cs{importarticle}). For example, if you
  1555. %want to reference a section labelled \texttt{sec:results} in the
  1556. %imported paper \texttt{paper1/paper1.tex}, you would need to do:
  1557. %\begin{verbatim}
  1558. %see Section~\ref{paper1/paper1sec:results}
  1559. %\end{verbatim}
  1560. %or
  1561. %\begin{verbatim}
  1562. %see \sectionref{paper1/paper1sec:results}
  1563. %\end{verbatim}
  1564. %
  1565. %In addition to the commands described in \sectionref{sec:crossref},
  1566. %the \clsfmt{jmlrbook} class also provides the following
  1567. %cross-referencing commands:
  1568. %
  1569. %\begin{definition}[\DescribeMacro{\chapterref}]
  1570. %\cs{chapterref}\marg{label list}
  1571. %\end{definition}
  1572. %Reference a chapter or chapters. The argument is a comma-separated
  1573. %list of labels.
  1574. %
  1575. %\begin{definition}[\DescribeMacro{\articlepageref}]
  1576. %\cs{articlepageref}\marg{label}
  1577. %\end{definition}
  1578. %This displays the starting page number of the article whose label
  1579. %is given by \meta{label}. Note that this must a single label, not
  1580. %a list. For example:
  1581. %\begin{verbatim}
  1582. %An interesting article starts on page~\articlepageref{paper1/paper1}
  1583. %\end{verbatim}
  1584. %
  1585. %\begin{definition}[\DescribeMacro{\articlepagesref}]
  1586. %\cs{articlepagesref}\marg{label}
  1587. %\end{definition}
  1588. %This displays the page range of the article whose label is
  1589. %given by \meta{label}. Again, this must be a single label, not a
  1590. %list. This page range is unrelated to the \meta{pages} argument of
  1591. %\ics{importpubarticle}.
  1592. %
  1593. %\begin{definition}[\DescribeMacro{\articletitleref}]
  1594. %\cs{articletitleref}\marg{label}
  1595. %\end{definition}
  1596. %This displays the short title for the article whose label is
  1597. %given by \meta{label}. Again, this must be a single label, not a
  1598. %list.
  1599. %
  1600. %\begin{definition}[\DescribeMacro{\articleauthorref}]
  1601. %\cs{articleauthorref}\marg{label}
  1602. %\end{definition}
  1603. %This displays the author list for the article whose label is
  1604. %given by \meta{label}. Again, this must be a single label, not a
  1605. %list.
  1606. %
  1607. %\section{Altering the Layout of the Main Title Page}
  1608. %\label{sec:modifytitle}
  1609. %
  1610. %\begin{definition}[\DescribeMacro{\titlebody}]
  1611. %\cs{titlebody}
  1612. %\end{definition}
  1613. %The main body of the book's title page is given by the command
  1614. %\cs{titlebody}. Within the definition of this command, you can
  1615. %use:
  1616. %\begin{definition}[\DescribeMacro{\SetTitleElement}]
  1617. %\cs{SetTitleElement}\marg{element}\marg{pre}\marg{post}
  1618. %\end{definition}
  1619. %where \meta{element} can be: \texttt{title}, \texttt{volume},
  1620. %\texttt{issue}\footnote{The default title page layout doesn't use
  1621. %\texttt{issue}, but if required it can be set with \ics{issue}\marg{number}},
  1622. %\texttt{subtitle}, \texttt{logo}, \texttt{team}, \texttt{author},
  1623. %\texttt{date}, \texttt{productioneditor}. The \meta{pre} and
  1624. %\meta{post} arguments specify what to do before and after the
  1625. %element. Note that \cs{SetTitleElement} does nothing if that
  1626. %element hasn't been set. For example, if \cs{volume} has been
  1627. %omitted or \verb|\volume{}| is used, then
  1628. %\begin{verbatim}
  1629. %\SetTitleElement{volume}{\mainvolumefont}{\postmainvolume}
  1630. %\end{verbatim}
  1631. %will do nothing (so you don't end up with \textbf{Volume :}).
  1632. %
  1633. %\begin{definition}[\DescribeMacro{\IfTitleElement}]
  1634. %\cs{IfTitleElement}\marg{element}\marg{true part}\marg{false part}
  1635. %\end{definition}
  1636. %This does \meta{true part} if \meta{element} has been set
  1637. %otherwise it does \meta{false part}. For example,
  1638. %\cs{postmainvolume} is defined as:
  1639. %\begin{verbatim}
  1640. %\newcommand{\postmainvolume}{%
  1641. % \IfTitleElement{subtitle}{}{:}\par\relax
  1642. %}
  1643. %\end{verbatim}
  1644. %This means that it will only print a colon after the volume
  1645. %number if the subtitle has been set.
  1646. %
  1647. %The default definition of \cs{titlebody} is:
  1648. %\begin{verbatim}
  1649. %\newcommand{\titlebody}{%
  1650. % \SetTitleElement{title}{\maintitlefont}{\postmaintitle}%
  1651. % \SetTitleElement{volume}{\mainvolumefont}{\postmainvolume}%
  1652. % \SetTitleElement{subtitle}{\mainsubtitlefont}{\postmainsubtitle}%
  1653. % \SetTitleElement{logo}{\mainlogofont}{\postmainlogo}%
  1654. % \SetTitleElement{team}{\mainteamfont}{\postmainteam}%
  1655. % \SetTitleElement{author}{\mainauthorfont}{\postmainauthor}%
  1656. % \SetTitleElement{productioneditor}{\mainproductioneditorfont}%
  1657. % {\postmainproductioneditor}%
  1658. %}
  1659. %\end{verbatim}
  1660. %
  1661. %\section{Potential Pitfalls}
  1662. %
  1663. %The \cls{combine} class and \sty{hyperref} package are
  1664. %individually both easily broken by packages that change certain
  1665. %internals and they don't ordinarily work together. The
  1666. %\clsfmt{jmlrbook} class applies patches to the internal referencing
  1667. %mechanism to make them work together, but it's a fairly fragile
  1668. %alliance. Some packages are known to break it, for example
  1669. %\sty{subfig}, \sty{pdfpages} and \sty{geometry}. This is why the
  1670. %\clsfmt{jmlr} class checks for known problem packages and generates an
  1671. %error message to dissuade authors from using them. It's likely that
  1672. %there are other packages that may cause a problem and, as they are
  1673. %found, they will be added to the check list. Also, it's possible for
  1674. %an author to disable the package checking mechanism if they are
  1675. %determined to use a particular package.
  1676. %
  1677. %In the event that an article has loaded a problem package, the
  1678. %editors will have to decide whether to ask the author to change
  1679. %the article so that it doesn't cause a problem or to make the changes
  1680. %themselves or to find a way of fudging things to get it to work. It
  1681. %depends on the level of \LaTeX\ expertise amongst the editors and
  1682. %the time available.
  1683. %
  1684. %Another problem that can arise is when different articles use
  1685. %packages that conflict. For example, one article uses package
  1686. %\styfmt{foo} and another uses package \styfmt{bar}. Each article compiles
  1687. %okay as a stand-alone article, but when combined \styfmt{foo} and
  1688. %\styfmt{bar} conflict. Another problem may occur when articles load the
  1689. %same package but with conflicting package options. To reduce the
  1690. %chance of this occurring, the \clsfmt{jmlr} class loads some commonly
  1691. %used packages. For example, it loads the \sty{algorithm2e}
  1692. %package with the \pkgoptfmt{algo2e} and \pkgoptfmt{ruled} options and
  1693. %provides the \env{algorithm} environment in addition to
  1694. %\sty{algorithm2e}'s \env{algorithm2e} environment. Different
  1695. %versions of the same package can also be a problem. To help
  1696. %counteract the problem caused by different papers using different
  1697. %versions of the \sty{algorithm2e} package, \sty{jmlrbook} defines
  1698. %most of the old style commands if they don't exist.
  1699. %
  1700. %Articles that use different input encodings can also cause a
  1701. %problem. For example, if one article uses \texttt{utf8} and another
  1702. %uses \texttt{latin1}. If the authors have directly entered a
  1703. %diacritic or ligature, such as \'e or \ae, instead of using a
  1704. %\LaTeX\ command, such as \cs{'e} or \cs{ae}, then this will cause an
  1705. %error on compiling the book.\footnote{and may also cause a problem
  1706. %for the editor's text editor.} The choice then is to either change
  1707. %all non-keyboard characters with the appropriate \LaTeX\ commands or
  1708. %to use the \cs{inputencoding} command, supplied by the
  1709. %\sty{inputenc} package, to switch the encoding at the start of each
  1710. %article. One thing to watch out for are bib files that contain a
  1711. %mixture of encodings caused by copying and pasting from different
  1712. %sources. Version~0.4.2b of \app{makejmlrbookgui} provides a function
  1713. %to search for characters outside the range 0x20 (space) and 0x7E
  1714. %(tilde).
  1715. %
  1716. %Authors who use \cs{nonumber} within an \env{equation} environment
  1717. %can mess up the hyperlinks. Remove \cs{nonumber} and change the
  1718. %equation environment to \cs{[} \ldots\ \cs{]} (or just make it a
  1719. %numbered equation).
  1720. %
  1721. %If the article changes the graphics path using \cs{graphicspath},
  1722. %\clsfmt{jmlrbook} won't find the graphics if the imported articles
  1723. %aren't in the same directory as the book.
  1724. %
  1725. %The \app{makejmlrbookgui} application provides some diagnostic
  1726. %tools, which can help detect some common problems. It's manual also
  1727. %has a
  1728. %\href{http://www.dickimaw-books.com/software/makejmlrbookgui/manual/troubleshooting.html}{troubleshooting
  1729. %section}.
  1730. %
  1731. %\StopEventually{\clearpage\phantomsection
  1732. % \PrintIndex
  1733. %}
  1734. %
  1735. %
  1736. %
  1737. %\chapter{The Code}
  1738. %\iffalse
  1739. % \begin{macrocode}
  1740. %<*jmlrutils.sty>
  1741. % \end{macrocode}
  1742. %\fi
  1743. %\section{jmlrutils.sty Code}
  1744. %Non-class dependent code. This package is automatically loaded by
  1745. %\cls{jmlr} but may be used with other classes.
  1746. % \begin{macrocode}
  1747. \ProvidesPackage{jmlrutils}[2017/08/01]
  1748. % \end{macrocode}
  1749. % Package options:
  1750. %\begin{macro}{\ifjmlrutilsmaths}
  1751. %Determine if the maths commands should be provided.
  1752. % \begin{macrocode}
  1753. \newif\ifjmlrutilsmaths
  1754. \jmlrutilsmathstrue
  1755. % \end{macrocode}
  1756. %\end{macro}
  1757. % \begin{macrocode}
  1758. \DeclareOption{maths}{\jmlrutilsmathstrue}
  1759. \DeclareOption{nomaths}{\jmlrutilsmathsfalse}
  1760. % \end{macrocode}
  1761. %
  1762. %\begin{macro}{\ifjmlrutilstheorems}
  1763. %Determine if the theorem environments should be provided.
  1764. % \begin{macrocode}
  1765. \newif\ifjmlrutilstheorems
  1766. \jmlrutilstheoremstrue
  1767. % \end{macrocode}
  1768. %\end{macro}
  1769. % \begin{macrocode}
  1770. \DeclareOption{theorems}{\jmlrutilstheoremstrue}
  1771. \DeclareOption{notheorems}{\jmlrutilstheoremsfalse}
  1772. % \end{macrocode}
  1773. %
  1774. %\begin{macro}{\ifjmlrutilssubfloats}
  1775. %Determine if the sub-floats should be provided.
  1776. % \begin{macrocode}
  1777. \newif\ifjmlrutilssubfloats
  1778. \jmlrutilssubfloatstrue
  1779. % \end{macrocode}
  1780. %\end{macro}
  1781. % \begin{macrocode}
  1782. \DeclareOption{subfloats}{\jmlrutilssubfloatstrue}
  1783. \DeclareOption{nosubfloats}{\jmlrutilssubfloatsfalse}
  1784. % \end{macrocode}
  1785. %
  1786. % \begin{macrocode}
  1787. \ProcessOptions
  1788. % \end{macrocode}
  1789. % Requires \sty{etoolbox}:
  1790. % \begin{macrocode}
  1791. \RequirePackage{etoolbox}
  1792. % \end{macrocode}
  1793. %If the maths commands are needed, load \sty{amsmath}.
  1794. % \begin{macrocode}
  1795. \ifjmlrutilsmaths
  1796. \RequirePackage{amsmath}
  1797. \fi
  1798. % \end{macrocode}
  1799. % The conditional \cs{iftablecaptiontop} will already have been
  1800. % defined by the \cls{jmlr} class, so only needs to be defined
  1801. % if not already done.
  1802. %\begin{macro}{\iftablecaptiontop}
  1803. % \begin{macrocode}
  1804. \@ifundefined{iftablecaptiontop}
  1805. {\newif\iftablecaptiontop
  1806. \tablecaptiontoptrue}
  1807. {}
  1808. % \end{macrocode}
  1809. %\end{macro}
  1810. %
  1811. %\subsection{Cross-Referencing}
  1812. % Convenient macros for cross-referencing.
  1813. % \begin{macrocode}
  1814. \newcommand*{\@jmlr@reflistsep}{, }
  1815. \newcommand*{\@jmlr@reflistlastsep}{ and }
  1816. \newcommand*{\sectionrefname}{Section}
  1817. \newcommand*{\sectionsrefname}{Sections}
  1818. \newcommand*{\equationrefname}{Equation}
  1819. \newcommand*{\equationsrefname}{Equations}
  1820. \newcommand*{\tablerefname}{Table}
  1821. \newcommand*{\tablesrefname}{Tables}
  1822. \newcommand*{\figurerefname}{Figure}
  1823. \newcommand*{\figuresrefname}{Figures}
  1824. \newcommand*{\algorithmrefname}{Algorithm}
  1825. \newcommand*{\algorithmsrefname}{Algorithms}
  1826. \newcommand*{\theoremrefname}{Theorem}
  1827. \newcommand*{\theoremsrefname}{Theorems}
  1828. \newcommand*{\lemmarefname}{Lemma}
  1829. \newcommand*{\lemmasrefname}{Lemmas}
  1830. \newcommand*{\remarkrefname}{Remark}
  1831. \newcommand*{\remarksrefname}{Remarks}
  1832. \newcommand*{\corollaryrefname}{Corollary}
  1833. \newcommand*{\corollarysrefname}{Corollaries}
  1834. \newcommand*{\definitionrefname}{Definition}
  1835. \newcommand*{\definitionsrefname}{Definitions}
  1836. \newcommand*{\conjecturerefname}{Conjecture}
  1837. \newcommand*{\conjecturesrefname}{Conjectures}
  1838. \newcommand*{\axiomrefname}{Axiom}
  1839. \newcommand*{\axiomsrefname}{Axioms}
  1840. \newcommand*{\examplerefname}{Example}
  1841. \newcommand*{\examplesrefname}{Examples}
  1842. \newcommand*{\appendixrefname}{Appendix}
  1843. \newcommand*{\appendixsrefname}{Appendices}
  1844. \newcommand*{\partrefname}{Part}
  1845. \newcommand*{\partsrefname}{Parts}
  1846. % \end{macrocode}
  1847. %\begin{macro}{\objectref}
  1848. % Cross-reference a particular structural element. The first
  1849. % argument is the list of labels, the second argument is a
  1850. % control sequence containing the singular tag, the third
  1851. % argument a control sequence containing the plural tag,
  1852. % the fourth argument is text to go before the reference number,
  1853. % e.g.\ an opening bracket, and the fifth argument is text
  1854. % to go after the reference number, e.g.\ a closing bracket.
  1855. %\changes{1.24}{2017-08-01}{changed \cs{DeclareRobustCommand}
  1856. %to \cs{newrobustcmd}}
  1857. % \begin{macrocode}
  1858. \newrobustcmd*{\objectref}[5]{%
  1859. \let\@objectname\@empty
  1860. \def\@objectref{}%
  1861. \let\@prevsep\@empty
  1862. \@for\@thislabel:=#1\do{%
  1863. \toks@{\@prevsep}%
  1864. \protected@edef\@objectref{\@objectref\the\toks@
  1865. #4\ref{\@thislabel}#5}%
  1866. \ifx\@objectname\@empty
  1867. \let\@objectname#2% singular tag
  1868. \else
  1869. \let\@objectname#3% plural tag
  1870. \let\@prevsep\@jmlr@reflistsep
  1871. \fi
  1872. }%
  1873. \ifx\@objectname#3% plural tag
  1874. \let\@prevsep\@jmlr@reflistlastsep
  1875. \fi
  1876. \@objectname~\@objectref
  1877. }
  1878. % \end{macrocode}
  1879. %\end{macro}
  1880. %\begin{macro}{\sectionref}
  1881. % \begin{macrocode}
  1882. \newcommand*{\sectionref}[1]{%
  1883. \objectref{#1}{\sectionrefname}{\sectionsrefname}{}{}}
  1884. % \end{macrocode}
  1885. %\end{macro}
  1886. %\begin{macro}{\equationref}
  1887. % \begin{macrocode}
  1888. \newcommand*{\equationref}[1]{%
  1889. \objectref{#1}{\equationrefname}{\equationsrefname}()}
  1890. % \end{macrocode}
  1891. %\end{macro}
  1892. %\begin{macro}{\tableref}
  1893. % \begin{macrocode}
  1894. \newcommand*{\tableref}[1]{%
  1895. \objectref{#1}{\tablerefname}{\tablesrefname}{}{}}
  1896. % \end{macrocode}
  1897. %\end{macro}
  1898. %\begin{macro}{\figureref}
  1899. % \begin{macrocode}
  1900. \newcommand*{\figureref}[1]{%
  1901. \objectref{#1}{\figurerefname}{\figuresrefname}{}{}}
  1902. % \end{macrocode}
  1903. %\end{macro}
  1904. %\begin{macro}{\algorithmref}
  1905. % \begin{macrocode}
  1906. \newcommand*{\algorithmref}[1]{%
  1907. \objectref{#1}{\algorithmrefname}{\algorithmsrefname}{}{}}
  1908. % \end{macrocode}
  1909. %\end{macro}
  1910. %\begin{macro}{\theoremmref}
  1911. % \begin{macrocode}
  1912. \newcommand*{\theoremref}[1]{%
  1913. \objectref{#1}{\theoremrefname}{\theoremsrefname}{}{}}
  1914. % \end{macrocode}
  1915. %\end{macro}
  1916. %\begin{macro}{\lemmaref}
  1917. % \begin{macrocode}
  1918. \newcommand*{\lemmaref}[1]{%
  1919. \objectref{#1}{\lemmarefname}{\lemmasrefname}{}{}}
  1920. % \end{macrocode}
  1921. %\end{macro}
  1922. %\begin{macro}{\remarkref}
  1923. % \begin{macrocode}
  1924. \newcommand*{\remarkref}[1]{%
  1925. \objectref{#1}{\remarkrefname}{\remarksrefname}{}{}}
  1926. % \end{macrocode}
  1927. %\end{macro}
  1928. %\begin{macro}{\corollaryref}
  1929. % \begin{macrocode}
  1930. \newcommand*{\corollaryref}[1]{%
  1931. \objectref{#1}{\corollaryrefname}{\corollarysrefname}{}{}}
  1932. % \end{macrocode}
  1933. %\end{macro}
  1934. %\begin{macro}{\definitionref}
  1935. % \begin{macrocode}
  1936. \newcommand*{\definitionref}[1]{%
  1937. \objectref{#1}{\definitionrefname}{\definitionsrefname}{}{}}
  1938. % \end{macrocode}
  1939. %\end{macro}
  1940. %\begin{macro}{\conjectureref}
  1941. % \begin{macrocode}
  1942. \newcommand*{\conjectureref}[1]{%
  1943. \objectref{#1}{\conjecturerefname}{\conjecturesrefname}{}{}}
  1944. % \end{macrocode}
  1945. %\end{macro}
  1946. %\begin{macro}{\axiomref}
  1947. % \begin{macrocode}
  1948. \newcommand*{\axiomref}[1]{%
  1949. \objectref{#1}{\axiomrefname}{\axiomsrefname}{}{}}
  1950. % \end{macrocode}
  1951. %\end{macro}
  1952. %\begin{macro}{\exampleref}
  1953. % \begin{macrocode}
  1954. \newcommand*{\exampleref}[1]{%
  1955. \objectref{#1}{\examplerefname}{\examplesrefname}{}{}}
  1956. % \end{macrocode}
  1957. %\end{macro}
  1958. %\begin{macro}{\appendixref}
  1959. % \begin{macrocode}
  1960. \newcommand*{\appendixref}[1]{%
  1961. \objectref{#1}{\appendixrefname}{\appendixsrefname}{}{}}
  1962. % \end{macrocode}
  1963. %\end{macro}
  1964. %\begin{macro}{\partref}
  1965. % \begin{macrocode}
  1966. \newcommand*{\partref}[1]{%
  1967. \objectref{#1}{\partrefname}{\partsrefname}{}{}}
  1968. % \end{macrocode}
  1969. %\end{macro}
  1970. %
  1971. %\subsection{Figures, Tables and Algorithms}
  1972. %
  1973. %\begin{macro}{\floatconts}
  1974. % The first argument is the label, the second argument contains the
  1975. % caption (using \cs{caption}) and the third argument contains the
  1976. % contents of the float
  1977. % \begin{macrocode}
  1978. \newcommand{\floatconts}[3]{%
  1979. \@ifundefined{\@captype conts}{\tableconts{#1}{#2}{#3}}%
  1980. {\csname\@captype conts\endcsname{#1}{#2}{#3}}%
  1981. }
  1982. % \end{macrocode}
  1983. %\end{macro}
  1984. %\begin{macro}{\tableconts}
  1985. %This will already have been defined if the \clsfmt{jmlr} class was
  1986. %loaded.
  1987. % \begin{macrocode}
  1988. \providecommand{\tableconts}[3]{%
  1989. #2\label{#1}\vskip\baselineskip
  1990. {\centering #3\par}%
  1991. }
  1992. % \end{macrocode}
  1993. %\end{macro}
  1994. %\begin{macro}{\figureconts}
  1995. % \begin{macrocode}
  1996. \newcommand{\figureconts}[3]{%
  1997. {\centering #3\par}%
  1998. \vskip\baselineskip
  1999. #2\label{#1}%
  2000. }
  2001. % \end{macrocode}
  2002. %\end{macro}
  2003. %
  2004. %The following macro and environment assume that \sty{algorithm2e}
  2005. %has been loaded (which is done by the \cls{jmlr} class). If the
  2006. %\styfmt{jmlrutils} package is loaded without the \cls{jmlr} class,
  2007. %the \sty{algorithm2e} package will have to be explicitly loaded.
  2008. %\begin{macro}{\algocfconts}
  2009. %\changes{1.09}{2010/12/01}{new}
  2010. %Command used by \cs{floatconts} to display the caption contents.
  2011. % \begin{macrocode}
  2012. \newcommand{\algocfconts}[3]{%
  2013. \@algocf@pre@ruled
  2014. #2\label{#1}\kern2pt\hrule height.8pt depth0pt\kern2pt%
  2015. #3\@algocf@pre@ruled
  2016. }
  2017. % \end{macrocode}
  2018. %\end{macro}
  2019. %
  2020. % The \env{algorithm} environment should float like a figure or table.
  2021. % It should use the same counter as the \env{algorithm2e} environment.
  2022. %\changes{1.09}{2010/12/01}{caption set up so that it doesn't use a
  2023. %box}
  2024. % \begin{macrocode}
  2025. \newenvironment{algorithm}[1][htbp]%
  2026. {%
  2027. \ifundef{\algocf}%
  2028. {`algorithm2e' package is required if you want to
  2029. use the algorithm environment}%
  2030. {}%
  2031. \begin{algocf}[#1]%
  2032. \renewcommand\@makecaption[2]{%
  2033. \hskip\AlCapHSkip
  2034. \parbox[t]{\hsize}{\algocf@captiontext{##1}{##2}}%
  2035. }%
  2036. }%
  2037. {%
  2038. \end{algocf}%
  2039. }
  2040. % \end{macrocode}
  2041. %
  2042. %\begin{macro}{\@jmlr@ifgraphicxloaded}
  2043. % \begin{macrocode}
  2044. \AtBeginDocument{%
  2045. \@ifpackageloaded{graphicx}%
  2046. {\let\@jmlr@ifgraphicxloaded\@firstoftwo}%
  2047. {\let\@jmlr@ifgraphicxloaded\@secondoftwo}%
  2048. }
  2049. % \end{macrocode}
  2050. %\end{macro}
  2051. %
  2052. %\begin{macro}{\includeteximage}
  2053. % Provide a command like \cs{includegraphics} that includes a
  2054. % file containing \LaTeX\ picture code (e.g.\ \sty{pgf}).
  2055. % \begin{macrocode}
  2056. \newcommand*{\includeteximage}[2][]{%
  2057. \@jmlr@ifgraphicxloaded
  2058. {%
  2059. \def\Gin@req@sizes{%
  2060. \Gin@req@height\Gin@nat@height
  2061. \Gin@req@width\Gin@nat@width}%
  2062. \begingroup
  2063. \let\input@path\Ginput@path
  2064. \IfFileExists{#2}%
  2065. {%
  2066. \toks@{\input{#2}}%
  2067. \ifstrempty{#1}
  2068. {}%
  2069. {%
  2070. \@tempswatrue
  2071. \setkeys{Gin}{#1}%
  2072. \Gin@esetsize
  2073. }%
  2074. \the\toks@
  2075. }%
  2076. {\@warning{File `#2' not found}}%
  2077. \endgroup
  2078. }%
  2079. {\PackageError{jmlrutils}{`graphicx' package is required
  2080. if you want to use \string\includeteximage}{}}%
  2081. }
  2082. % \end{macrocode}
  2083. %\end{macro}
  2084. %
  2085. %Sub floats.
  2086. % \begin{macrocode}
  2087. \ifjmlrutilssubfloats
  2088. % \end{macrocode}
  2089. % The \sty{subfig} package breaks jmlrbook.cls, so define \ics{subfig}
  2090. % here. (This is fairly primitive.)
  2091. %\begin{macro}{\c@subfigure}
  2092. % Define subfigure counter:
  2093. % \begin{macrocode}
  2094. \newcounter{subfigure}
  2095. \@addtoreset{subfigure}{figure}
  2096. % \end{macrocode}
  2097. %\end{macro}
  2098. %\begin{macro}{\thesubfigure}
  2099. % \begin{macrocode}
  2100. \renewcommand*{\thesubfigure}{\alph{subfigure}}
  2101. % \end{macrocode}
  2102. %\end{macro}
  2103. %\begin{macro}{\p@subfigure}
  2104. % \begin{macrocode}
  2105. \renewcommand*{\p@subfigure}{\expandafter\@p@subfigure}
  2106. \newcommand*{\@p@subfigure}[1]{%
  2107. \protect\@subfigurelabel{\thefigure}{\thesubfigure}%
  2108. }
  2109. % \end{macrocode}
  2110. %\end{macro}
  2111. %\begin{macro}{\@subfigurelabel}
  2112. % Define how label appears.
  2113. % \begin{macrocode}
  2114. \newcommand*\@subfigurelabel[2]{#1\subfigurelabel{#2}}
  2115. % \end{macrocode}
  2116. %\end{macro}
  2117. %\begin{macro}{\subfigref}
  2118. % Reference the sub-figure without including the figure number.
  2119. % \begin{macrocode}
  2120. \newcommand*\@subfigref[1]{%
  2121. {%
  2122. \def\@subfigurelabel##1##2{\subfigurelabel{##2}}%
  2123. \ref{#1}%
  2124. }%
  2125. }
  2126. \newcommand*{\subfigref}[1]{%
  2127. \let\@objectname\@empty
  2128. \def\@objectref{}%
  2129. \let\@prevsep\@empty
  2130. \@for\@thislabel:=#1\do{%
  2131. \toks@{\@prevsep}%
  2132. \protected@edef\@objectref{\@objectref\the\toks@
  2133. \protect\@subfigref{\@thislabel}}%
  2134. \ifx\@objectname\@empty
  2135. \let\@objectname\@nil
  2136. \else
  2137. \let\@objectname\relax
  2138. \let\@prevsep\@jmlr@reflistsep
  2139. \fi
  2140. }%
  2141. \ifx\@objectname\relax
  2142. \let\@prevsep\@jmlr@reflistlastsep
  2143. \fi
  2144. \@objectref
  2145. }
  2146. % \end{macrocode}
  2147. %\end{macro}
  2148. %\begin{macro}{\subfigurelabel}
  2149. % \begin{macrocode}
  2150. \newcommand*{\subfigurelabel}[1]{(\emph{#1})}
  2151. % \end{macrocode}
  2152. %\end{macro}
  2153. %
  2154. %\begin{macro}{\@subfloatcapbox}
  2155. % Box to store subfloat caption.
  2156. % \begin{macrocode}
  2157. \newsavebox\@subfloatcapbox
  2158. % \end{macrocode}
  2159. %\end{macro}
  2160. %\begin{macro}{\@subfloatcontsbox}
  2161. % Box to store subfloat contents.
  2162. % \begin{macrocode}
  2163. \newsavebox\@subfloatcontsbox
  2164. % \end{macrocode}
  2165. %\end{macro}
  2166. %\begin{macro}{\subfigure}
  2167. % \begin{macrocode}
  2168. \newcommand*{\subfigure}[1][]{%
  2169. \bgroup
  2170. \def\@subfigcap{#1}%
  2171. \@subfigure
  2172. }
  2173. % \end{macrocode}
  2174. %\changes{1.09}{2010/12/01}{Added check to determine whether the
  2175. %subfigure caption is wider than the subfigure}
  2176. % \begin{macrocode}
  2177. \newcommand*{\@subfigure}[2][b]{%
  2178. \advance\c@figure by 1\relax
  2179. \refstepcounter{subfigure}%
  2180. \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}%
  2181. \ifx\@subfigcap\@empty
  2182. \else
  2183. \space\@subfigcap
  2184. \fi}%
  2185. \sbox\@subfloatcontsbox{#2}%
  2186. \settowidth{\@tempdima}{\usebox\@subfloatcontsbox}%
  2187. \settowidth{\@tempdimb}{\usebox\@subfloatcapbox}%
  2188. \ifdim\@tempdimb>\@tempdima
  2189. \settowidth\@tempdimb{\subfigurelabel{\thesubfigure}\space}%
  2190. \addtolength{\@tempdima}{-\@tempdimb}%
  2191. \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space
  2192. \parbox[t]{\@tempdima}{\@subfigcap}}%
  2193. \fi
  2194. \begin{tabular}[#1]{@{}c@{}}%
  2195. \usebox\@subfloatcontsbox\\\usebox\@subfloatcapbox
  2196. \end{tabular}%
  2197. \egroup
  2198. }
  2199. % \end{macrocode}
  2200. %\end{macro}
  2201. %
  2202. % Sub-tables:
  2203. %\begin{macro}{\c@subtable}
  2204. % Define subtable counter:
  2205. % \begin{macrocode}
  2206. \newcounter{subtable}
  2207. \@addtoreset{subtable}{table}
  2208. % \end{macrocode}
  2209. %\end{macro}
  2210. %\begin{macro}{\thesubtable}
  2211. % \begin{macrocode}
  2212. \renewcommand*{\thesubtable}{\alph{subtable}}
  2213. % \end{macrocode}
  2214. %\end{macro}
  2215. %\begin{macro}{\p@subtable}
  2216. % \begin{macrocode}
  2217. \renewcommand*{\p@subtable}{\expandafter\@p@subtable}
  2218. \newcommand*{\@p@subtable}[1]{%
  2219. \protect\@subtablelabel{\thetable}{\thesubtable}%
  2220. }
  2221. % \end{macrocode}
  2222. %\end{macro}
  2223. %\begin{macro}{\@subtablelabel}
  2224. % Define how label appears.
  2225. % \begin{macrocode}
  2226. \newcommand*\@subtablelabel[2]{#1\subtablelabel{#2}}
  2227. % \end{macrocode}
  2228. %\end{macro}
  2229. %\begin{macro}{\subtabref}
  2230. % Reference the sub-table without including the table number.
  2231. % \begin{macrocode}
  2232. \newcommand*\@subtabref[1]{%
  2233. {%
  2234. \def\@subtablelabel##1##2{\subtablelabel{##2}}%
  2235. \ref{#1}%
  2236. }%
  2237. }
  2238. \newcommand*{\subtabref}[1]{%
  2239. \let\@objectname\@empty
  2240. \def\@objectref{}%
  2241. \let\@prevsep\@empty
  2242. \@for\@thislabel:=#1\do{%
  2243. \toks@{\@prevsep}%
  2244. \protected@edef\@objectref{\@objectref\the\toks@
  2245. \protect\@subtabref{\@thislabel}}%
  2246. \ifx\@objectname\@empty
  2247. \let\@objectname\@nil
  2248. \else
  2249. \let\@objectname\relax
  2250. \let\@prevsep\@jmlr@reflistsep
  2251. \fi
  2252. }%
  2253. \ifx\@objectname\relax
  2254. \let\@prevsep\@jmlr@reflistlastsep
  2255. \fi
  2256. \@objectref
  2257. }
  2258. % \end{macrocode}
  2259. %\end{macro}
  2260. %\begin{macro}{\subtablelabel}
  2261. % \begin{macrocode}
  2262. \newcommand*{\subtablelabel}[1]{(\emph{#1})}
  2263. % \end{macrocode}
  2264. %\end{macro}
  2265. %\begin{macro}{\subtable}
  2266. % \begin{macrocode}
  2267. \newcommand*{\subtable}[1][]{%
  2268. \def\@subtabcap{#1}%
  2269. \@subtable
  2270. }
  2271. % \end{macrocode}
  2272. %\changes{1.09}{2010/12/01}{Added check to determine whether the
  2273. %subtable caption is wider than the subtable}
  2274. % \begin{macrocode}
  2275. \newcommand*{\@subtable}[2][t]{%
  2276. \refstepcounter{subtable}%
  2277. \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}%
  2278. \ifx\@subtabcap\@empty
  2279. \else
  2280. \space\@subtabcap
  2281. \fi}%
  2282. \sbox\@subfloatcontsbox{#2}%
  2283. \settowidth{\@tempdima}{\usebox\@subfloatcontsbox}%
  2284. \settowidth{\@tempdimb}{\usebox\@subfloatcapbox}%
  2285. \ifdim\@tempdimb>\@tempdima
  2286. \settowidth\@tempdimb{\subtablelabel{\thesubtable}\space}%
  2287. \addtolength{\@tempdima}{-\@tempdimb}%
  2288. \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space
  2289. \parbox[t]{\@tempdima}{\@subtabcap}}%
  2290. \fi
  2291. \begin{tabular}[#1]{@{}c@{}}%
  2292. \usebox\@subfloatcapbox\\\usebox\@subfloatcontsbox
  2293. \end{tabular}
  2294. }
  2295. % \end{macrocode}
  2296. %\end{macro}
  2297. %End of sub-floats.
  2298. % \begin{macrocode}
  2299. \fi
  2300. % \end{macrocode}
  2301. %
  2302. %\subsection{General Markup}
  2303. %Provide maths command if required.
  2304. % \begin{macrocode}
  2305. \ifjmlrutilsmaths
  2306. % \end{macrocode}
  2307. %\begin{macro}{\set}
  2308. % \begin{macrocode}
  2309. \newcommand*{\set}[1]{\ensuremath{\mathcal{#1}}}
  2310. % \end{macrocode}
  2311. %\end{macro}
  2312. %
  2313. %\begin{macro}{\orgvec}
  2314. %\changes{1.21}{2015-02-24}{new}
  2315. %Keep a copy of original \cs{vec} in case it's wanted.
  2316. % \begin{macrocode}
  2317. \let\orgvec\vec
  2318. % \end{macrocode}
  2319. %\end{macro}
  2320. %\begin{macro}{\vec}
  2321. % Redefine \cs{vec} to produce a bold symbol. The \sty{amsmath}
  2322. %package is required for this.
  2323. % \begin{macrocode}
  2324. \renewcommand*{\vec}[1]{\boldsymbol{#1}}
  2325. % \end{macrocode}
  2326. %\end{macro}
  2327. %End of maths commands.
  2328. % \begin{macrocode}
  2329. \fi
  2330. % \end{macrocode}
  2331. %
  2332. %\begin{environment}{enumerate*}
  2333. % Define an enumerate style environment where the nested environments
  2334. % all use the same counter. It uses the enumi counter.
  2335. % \begin{macrocode}
  2336. \newenvironment{enumerate*}%
  2337. {%
  2338. \ifnum\@enumdepth=0\relax
  2339. \setcounter{enumi}{0}%
  2340. \fi
  2341. \ifnum\@enumdepth>\thr@@
  2342. \@toodeep
  2343. \else
  2344. \advance\@enumdepth\@ne
  2345. \def\@enumctr{enumi}%
  2346. \list
  2347. {\labelenumi}%
  2348. {\@nmbrlisttrue\def\@listctr{enumi}%
  2349. \def\makelabel##1{\hss\llap{##1}}}%
  2350. \fi
  2351. }%
  2352. {\endlist}
  2353. % \end{macrocode}
  2354. %\end{environment}
  2355. %
  2356. %\begin{environment}{altdescription}
  2357. % Define a description like environment where the indent is
  2358. % computed from the widest label. The optional argument is
  2359. % the widest label.
  2360. % \begin{macrocode}
  2361. \newenvironment{altdescription}[1]%
  2362. {\list{}%
  2363. {%
  2364. \settowidth{\labelwidth}{\altdescriptionlabel{#1}}%
  2365. \setlength{\labelsep}{15pt}%
  2366. \setlength{\leftmargin}{2\labelsep}%
  2367. \addtolength{\leftmargin}{\labelwidth}%
  2368. \setlength{\rightmargin}{\labelsep}%
  2369. \let\makelabel\altdescriptionlabel
  2370. }%
  2371. }%
  2372. {\endlist}
  2373. \newcommand*{\altdescriptionlabel}[1]{\normalfont\bfseries #1\hfill}
  2374. % \end{macrocode}
  2375. %\end{environment}
  2376. %
  2377. %\begin{macro}{\mailto}
  2378. % Syntax: \cs{mailto}\marg{address}
  2379. % \begin{macrocode}
  2380. \newcommand*{\mailto}[1]{\texttt{#1}}
  2381. % \end{macrocode}
  2382. %\end{macro}
  2383. %
  2384. %\subsection{Proofs and Theorems}
  2385. % \begin{macrocode}
  2386. \ifjmlrutilstheorems
  2387. % \end{macrocode}
  2388. % This code is taken from jmlr2e.sty
  2389. %\begin{macro}{\jmlrBlackBox}
  2390. % End of proof marker.
  2391. %\changes{1.24}{2017-08-01}{new}
  2392. %This command was formerly called \cs{BlackBox} but has been renamed
  2393. %in case of a clash with symbol packages.
  2394. % \begin{macrocode}
  2395. \newcommand{\jmlrBlackBox}{\rule{1.5ex}{1.5ex}}
  2396. % \end{macrocode}
  2397. %\end{macro}
  2398. %\begin{macro}{\BlackBox}
  2399. % Backward compatibility in case it was used explicitly.
  2400. % \begin{macrocode}
  2401. \providecommand{\BlackBox}{\jmlrBlackBox}
  2402. % \end{macrocode}
  2403. %\end{macro}
  2404. %\begin{macro}{\jmlrQED}
  2405. %\changes{1.21}{2015-02-24}{new}
  2406. %\changes{1.24}{2017-08-01}{changed to use \cs{par}}
  2407. % \begin{macrocode}
  2408. \newcommand{\jmlrQED}{\hfill\jmlrBlackBox\par\bigskip}
  2409. % \end{macrocode}
  2410. %\end{macro}
  2411. %\begin{environment}{proof}
  2412. % Proof environment
  2413. % \begin{macrocode}
  2414. \newenvironment{proof}%
  2415. {%
  2416. \par\noindent{\bfseries\upshape Proof\ }%
  2417. }%
  2418. {\jmlrQED}
  2419. % \end{macrocode}
  2420. %\end{environment}
  2421. %
  2422. % Since \sty{theorem}, \sty{ntheorem} and \sty{amsthm} all cause
  2423. % problems with the \cls{jmlr} and \cls{jmlrbook} classes,
  2424. % this package provides a simple alternative.
  2425. %
  2426. %\begin{macro}{\theorembodyfont}
  2427. %\changes{1.18}{2013-10-17}{new}
  2428. %\begin{definition}
  2429. %\cs{theorembodyfont}\marg{font declarations}
  2430. %\end{definition}
  2431. % \begin{macrocode}
  2432. \newcommand*{\theorembodyfont}[1]{%
  2433. \renewcommand*{\@theorembodyfont}{#1}%
  2434. }
  2435. \newcommand*{\@theorembodyfont}{\normalfont\itshape}%
  2436. % \end{macrocode}
  2437. %\end{macro}
  2438. %\begin{macro}{\theoremheaderfont}
  2439. %\changes{1.18}{2013-10-17}{new}
  2440. %\begin{definition}
  2441. %\cs{theoremheaderfont}\marg{font declarations}
  2442. %\end{definition}
  2443. % \begin{macrocode}
  2444. \newcommand*{\theoremheaderfont}[1]{%
  2445. \renewcommand*{\@theoremheaderfont}{#1}%
  2446. }
  2447. \newcommand*{\@theoremheaderfont}{\normalfont\bfseries }%
  2448. % \end{macrocode}
  2449. %\end{macro}
  2450. %
  2451. %\begin{macro}{\theoremsep}
  2452. %\changes{1.18}{2013-10-17}{new}
  2453. %\begin{definition}
  2454. %\cs{theoremsep}\marg{separation code}
  2455. %\end{definition}
  2456. % \begin{macrocode}
  2457. \newcommand*{\theoremsep}[1]{%
  2458. \renewcommand*{\@theoremsep}{#1}%
  2459. }
  2460. \newcommand*{\@theoremsep}{}%
  2461. % \end{macrocode}
  2462. %\end{macro}
  2463. %
  2464. %\begin{macro}{\theorempostheader}
  2465. %\changes{1.18}{2013-10-17}{new}
  2466. %\begin{definition}
  2467. %\cs{theorempostheader}\marg{text}
  2468. %\end{definition}
  2469. % \begin{macrocode}
  2470. \newcommand*{\theorempostheader}[1]{%
  2471. \renewcommand*{\@theorempostheader}{#1}%
  2472. }
  2473. \newcommand*{\@theorempostheader}{}%
  2474. % \end{macrocode}
  2475. %\end{macro}
  2476. %
  2477. %\begin{macro}{\newtheorem}
  2478. %\changes{1.18}{2013-10-17}{new}
  2479. % \begin{macrocode}
  2480. \let\jmlr@org@newtheorem\newtheorem
  2481. \renewcommand*{\newtheorem}{\@ifstar\jmlr@snewtheorem\jmlr@newtheorem}
  2482. % \end{macrocode}
  2483. % Define starred version:
  2484. %\begin{definition}
  2485. %\cs{newtheorem*}\marg{env-name}\marg{title tag}
  2486. %\end{definition}
  2487. % \begin{macrocode}
  2488. \newcommand*{\jmlr@snewtheorem}[2]{%
  2489. \cslet{jmlr@thm@#1@body@font}{\@theorembodyfont}%
  2490. \cslet{jmlr@thm@#1@header@font}{\@theoremheaderfont}%
  2491. \cslet{jmlr@thm@#1@sep}{\@theoremsep}%
  2492. \cslet{jmlr@thm@#1@postheader}{\@theorempostheader}%
  2493. \newenvironment{#1}%
  2494. {%
  2495. \trivlist
  2496. \item
  2497. [%
  2498. \hskip\labelsep{\csuse{jmlr@thm@#1@header@font}#2%
  2499. \csuse{jmlr@thm@#1@postheader}%
  2500. }%
  2501. ]%
  2502. \mbox{}\csuse{jmlr@thm@#1@sep}%
  2503. \csuse{jmlr@thm@#1@body@font}%
  2504. }%
  2505. {%
  2506. \endtrivlist
  2507. }%
  2508. }
  2509. % \end{macrocode}
  2510. %\end{macro}
  2511. % Unstarred version needs adjusting to take the style into account:
  2512. %\begin{macro}{\@othm}
  2513. %\changes{1.18}{2013-10-17}{new}
  2514. % \begin{macrocode}
  2515. \newcommand{\jmlr@newtheorem}[1]{%
  2516. \cslet{jmlr@thm@#1@body@font}{\@theorembodyfont}%
  2517. \cslet{jmlr@thm@#1@header@font}{\@theoremheaderfont}%
  2518. \cslet{jmlr@thm@#1@sep}{\@theoremsep}%
  2519. \cslet{jmlr@thm@#1@postheader}{\@theorempostheader}%
  2520. \jmlr@org@newtheorem{#1}%
  2521. }
  2522. % \end{macrocode}
  2523. %\end{macro}
  2524. %\begin{macro}{\@xthm}
  2525. %\changes{1.18}{2013-10-17}{new}
  2526. % \begin{macrocode}
  2527. \renewcommand*{\@xthm}[2]{%
  2528. \def\@jmlr@currentthm{#1}%
  2529. \@begintheorem{#2}{\csname the#1\endcsname}%
  2530. \ignorespaces
  2531. }
  2532. % \end{macrocode}
  2533. %\end{macro}
  2534. %\begin{macro}{\@ythm}
  2535. %\changes{1.18}{2013-10-17}{new}
  2536. % \begin{macrocode}
  2537. \def\@ythm#1#2[#3]{%
  2538. \def\@jmlr@currentthm{#1}%
  2539. \@opargbegintheorem{#2}{\csname the#1\endcsname}{#3}%
  2540. \ignorespaces
  2541. }
  2542. % \end{macrocode}
  2543. %\end{macro}
  2544. %\begin{macro}{\@begintheorem}
  2545. %\changes{1.18}{2013-10-17}{new}
  2546. % \begin{macrocode}
  2547. \renewcommand*{\@begintheorem}[2]{%
  2548. \ifdef{\@jmlr@currentthm}%
  2549. {%
  2550. \letcs{\jmlr@this@theoremheader}{jmlr@thm@\@jmlr@currentthm @header@font}%
  2551. \letcs{\jmlr@this@theorembody}{jmlr@thm@\@jmlr@currentthm @body@font}%
  2552. \letcs{\jmlr@this@theoremsep}{jmlr@thm@\@jmlr@currentthm @sep}%
  2553. \letcs{\jmlr@this@theorempostheader}%
  2554. {jmlr@thm@\@jmlr@currentthm @postheader}%
  2555. }%
  2556. {%
  2557. \let\jmlr@this@theorembody\@theorembodyfont
  2558. \let\jmlr@this@theoremheader\@theoremheaderfont
  2559. \let\jmlr@this@theoremsep\@theoremsep
  2560. \let\jmlr@this@theorempostheader\@theorempostheader
  2561. }%
  2562. \trivlist
  2563. \item
  2564. [%
  2565. \hskip\labelsep{\jmlr@this@theoremheader #1\ #2%
  2566. \jmlr@this@theorempostheader}%
  2567. ]%
  2568. \mbox{}\jmlr@this@theoremsep
  2569. \jmlr@this@theorembody
  2570. }
  2571. % \end{macrocode}
  2572. %\end{macro}
  2573. %\begin{macro}{\@opargbegintheorem}
  2574. %\changes{1.18}{2013-10-17}{new}
  2575. % \begin{macrocode}
  2576. \renewcommand*{\@opargbegintheorem}[3]{%
  2577. \ifdef{\@jmlr@currentthm}%
  2578. {%
  2579. \letcs{\jmlr@this@theoremheader}{jmlr@thm@\@jmlr@currentthm @header@font}%
  2580. \letcs{\jmlr@this@theorembody}{jmlr@thm@\@jmlr@currentthm @body@font}%
  2581. \letcs{\jmlr@this@theoremsep}{jmlr@thm@\@jmlr@currentthm @sep}%
  2582. \letcs{\jmlr@this@theorempostheader}%
  2583. {jmlr@thm@\@jmlr@currentthm @postheader}%
  2584. }%
  2585. {%
  2586. \let\jmlr@this@theorembody\@theorembodyfont
  2587. \let\jmlr@this@theoremheader\@theoremheaderfont
  2588. \let\jmlr@this@theoremsep\@theoremsep
  2589. \let\jmlr@this@theorempostheader\@theorempostheader
  2590. }%
  2591. \trivlist
  2592. \item[\hskip\labelsep{\jmlr@this@theoremheader #1\ #2\ (#3)%
  2593. \jmlr@this@theorempostheader}]%
  2594. \mbox{}\jmlr@this@theoremsep
  2595. \jmlr@this@theorembody
  2596. }
  2597. % \end{macrocode}
  2598. %\end{macro}
  2599. %
  2600. %\begin{environment}{example}
  2601. % \begin{macrocode}
  2602. \newtheorem{example}{Example}
  2603. % \end{macrocode}
  2604. %\end{environment}
  2605. %\begin{environment}{theorem}
  2606. % \begin{macrocode}
  2607. \newtheorem{theorem}{Theorem}
  2608. % \end{macrocode}
  2609. %\end{environment}
  2610. %\begin{environment}{lemma}
  2611. % \begin{macrocode}
  2612. \newtheorem{lemma}[theorem]{Lemma}
  2613. % \end{macrocode}
  2614. %\end{environment}
  2615. %\begin{environment}{proposition}
  2616. % \begin{macrocode}
  2617. \newtheorem{proposition}[theorem]{Proposition}
  2618. % \end{macrocode}
  2619. %\end{environment}
  2620. %\begin{environment}{remark}
  2621. % \begin{macrocode}
  2622. \newtheorem{remark}[theorem]{Remark}
  2623. % \end{macrocode}
  2624. %\end{environment}
  2625. %\begin{environment}{corollary}
  2626. % \begin{macrocode}
  2627. \newtheorem{corollary}[theorem]{Corollary}
  2628. % \end{macrocode}
  2629. %\end{environment}
  2630. %\begin{environment}{definition}
  2631. % \begin{macrocode}
  2632. \newtheorem{definition}[theorem]{Definition}
  2633. % \end{macrocode}
  2634. %\end{environment}
  2635. %\begin{environment}{conjecture}
  2636. % \begin{macrocode}
  2637. \newtheorem{conjecture}[theorem]{Conjecture}
  2638. % \end{macrocode}
  2639. %\end{environment}
  2640. %\begin{environment}{axiom}
  2641. % \begin{macrocode}
  2642. \newtheorem{axiom}[theorem]{Axiom}
  2643. % \end{macrocode}
  2644. %\end{environment}
  2645. % End of theorem definitions.
  2646. % \begin{macrocode}
  2647. \fi
  2648. % \end{macrocode}
  2649. %\iffalse
  2650. % \begin{macrocode}
  2651. %</jmlrutils.sty>
  2652. % \end{macrocode}
  2653. %\fi
  2654. %\iffalse
  2655. % \begin{macrocode}
  2656. %<*jmlr.cls>
  2657. % \end{macrocode}
  2658. %\fi
  2659. %\section{jmlr.cls Code}
  2660. % This class is based on the \sty{jmlr2e} package but was modified to make sure
  2661. % it works with \clsfmt{jmlrbook} which uses both \cls{combine} and
  2662. % \sty{hyperref}.
  2663. %
  2664. % Declare class and required TeX format:
  2665. % \begin{macrocode}
  2666. \NeedsTeXFormat{LaTeX2e}
  2667. \ProvidesClass{jmlr}[2017/08/01 v1.24 (NLCT) Journal of Machine Learning Research]
  2668. % \end{macrocode}
  2669. %\changes{1.10}{2011-01-05}{hyperref now loaded by jmlr instead of
  2670. %jmlrbook}
  2671. % Need \sty{xkeyval} package to have key=value class options
  2672. % \begin{macrocode}
  2673. \RequirePackage{xkeyval}
  2674. % \end{macrocode}
  2675. %\changes{1.18}{2013-10-17}{now requires calc package}
  2676. % \begin{macrocode}
  2677. \RequirePackage{calc}
  2678. % \end{macrocode}
  2679. %\changes{1.18}{2013-10-17}{now requires etoolbox package}
  2680. % \begin{macrocode}
  2681. \RequirePackage{etoolbox}
  2682. % \end{macrocode}
  2683. % Some packages need to be loaded before \sty{hyperref} so provide a
  2684. % hook to do this:
  2685. %\begin{macro}{\jmlrprehyperref}
  2686. %\changes{1.12}{2012/01/05}{removed @ from name so it can be defined
  2687. %by user}
  2688. % \begin{macrocode}
  2689. \providecommand*{\jmlrprehyperref}{}
  2690. % \end{macrocode}
  2691. %\end{macro}
  2692. %\changes{1.12}{2012/01/05}{removed class option prehyperref}
  2693. % The following conditionals are provided to make this class play nicely
  2694. % with combine and aren't required for articles.
  2695. % \begin{macrocode}
  2696. \newif\if@openright
  2697. \newif\if@mainmatter \@mainmattertrue
  2698. % \end{macrocode}
  2699. %\begin{macro}{\ifgrayscale}
  2700. % Determine whether to select grayscale alternatives
  2701. % \begin{macrocode}
  2702. \@ifundefined{ifgrayscale}{
  2703. \newif\ifgrayscale
  2704. \grayscalefalse
  2705. }{}
  2706. \DeclareOptionX{color}{\grayscalefalse
  2707. \PassOptionsToPackage{color}{xcolor}}
  2708. \DeclareOptionX{gray}{\grayscaletrue
  2709. \PassOptionsToPackage{gray}{xcolor}}
  2710. % \end{macrocode}
  2711. %\end{macro}
  2712. %\begin{option}{draft}
  2713. %\changes{1.18}{2013-10-17}{new}
  2714. % \begin{macrocode}
  2715. \DeclareOptionX{draft}{\setlength\overfullrule{5pt}}
  2716. % \end{macrocode}
  2717. %\end{option}
  2718. %\begin{option}{final}
  2719. %\changes{1.18}{2013-10-17}{new}
  2720. % \begin{macrocode}
  2721. \DeclareOptionX{final}{\setlength\overfullrule{0pt}}
  2722. % \end{macrocode}
  2723. %\end{option}
  2724. % Can't load \sty{jmlrutils} here but need the \cs{iftablecaptiontop}
  2725. % conditional for the class options.
  2726. %\begin{macro}{\iftablecaptiontop}
  2727. %\changes{1.07}{2010-06-17}{new}
  2728. % \begin{macrocode}
  2729. \newif\iftablecaptiontop
  2730. \tablecaptiontoptrue
  2731. % \end{macrocode}
  2732. %\end{macro}
  2733. % Provide table contents command that uses this conditional.
  2734. % (The \sty{jmlrutils} package doesn't use it.)
  2735. %\begin{macro}{\tableconts}
  2736. % \begin{macrocode}
  2737. \newcommand{\tableconts}[3]{%
  2738. \iftablecaptiontop
  2739. #2\label{#1}\vskip\baselineskip
  2740. {\centering #3\par}%
  2741. \else
  2742. {\centering #3\par}%
  2743. \vskip\baselineskip
  2744. #2\label{#1}%
  2745. \fi
  2746. }
  2747. % \end{macrocode}
  2748. %\end{macro}
  2749. % Determine if the table captions should go at the top.
  2750. %\begin{option}{tablecaptiontop}
  2751. % \begin{macrocode}
  2752. \DeclareOptionX{tablecaptiontop}{\tablecaptiontoptrue}
  2753. % \end{macrocode}
  2754. %\end{option}
  2755. %\begin{option}{tablecaptiontop}
  2756. % \begin{macrocode}
  2757. \DeclareOptionX{tablecaptionbottom}{\tablecaptiontopfalse}
  2758. % \end{macrocode}
  2759. %\end{option}
  2760. %\begin{option}{tablecaption}
  2761. %Key=value interface.
  2762. % \begin{macrocode}
  2763. \define@choicekey{jmlr.cls}{tablecaption}[\val\nr]{top,bottom}{%
  2764. \ifcase\nr\relax
  2765. \tablecaptiontoptrue
  2766. \or
  2767. \tablecaptiontopfalse
  2768. \fi
  2769. }
  2770. % \end{macrocode}
  2771. %\end{option}
  2772. %\begin{macro}{\ifjmlrhtml}
  2773. % Determine if we are using \app{TeX4ht}. (Deprecated.)
  2774. %This option should no longer be used. The PMLR have changed
  2775. %the submission guidelines and the production editor should
  2776. %no longer supply HTML files.
  2777. % \begin{macrocode}
  2778. \newif\ifjmlrhtml
  2779. \jmlrhtmlfalse
  2780. \DeclareOptionX{html}{%
  2781. \ClassWarning{jmlr}{html option is now deprecated}%
  2782. \jmlrhtmltrue}
  2783. \DeclareOptionX{nohtml}{\jmlrhtmlfalse}
  2784. % \end{macrocode}
  2785. %\end{macro}
  2786. % Normal font size (default is 11pt).
  2787. %\changes{1.10}{2011-01-05}{font size options don't pass option to
  2788. %class}
  2789. % \begin{macrocode}
  2790. \def\pt@size{11pt}
  2791. \DeclareOptionX{10pt}{\renewcommand{\pt@size}{10pt}}
  2792. \DeclareOptionX{11pt}{\renewcommand{\pt@size}{11pt}}
  2793. \DeclareOptionX{12pt}{\renewcommand{\pt@size}{12pt}}
  2794. % \end{macrocode}
  2795. %\begin{macro}{\@jmlrproceedings}
  2796. % The name of the proceedings.
  2797. % \begin{macrocode}
  2798. \newcommand*{\@jmlrproceedings}{Journal of Machine Learning Research}
  2799. % \end{macrocode}
  2800. %\end{macro}
  2801. %\begin{macro}{\@jmlrabbrvproceedings}
  2802. % The abbreviated name of the proceedings.
  2803. % \begin{macrocode}
  2804. \newcommand*{\@jmlrabbrvproceedings}{JMLR}
  2805. % \end{macrocode}
  2806. %\end{macro}
  2807. %\begin{macro}{\jmlrproceedings}
  2808. % Sets the title and abbreviation of the proceedings
  2809. % \begin{macrocode}
  2810. \newcommand*{\jmlrproceedings}[2]{%
  2811. \renewcommand*{\@jmlrabbrvproceedings}{#1}%
  2812. \renewcommand*{\@jmlrproceedings}{#2}%
  2813. }
  2814. % \end{macrocode}
  2815. %\end{macro}
  2816. %
  2817. %\begin{macro}{\jmlrnowcp}
  2818. % \begin{macrocode}
  2819. \newcommand*{\jmlrnowcp}{%
  2820. \jmlrproceedings{JMLR}{Journal of Machine Learning Research}%
  2821. }
  2822. % \end{macrocode}
  2823. %\end{macro}
  2824. %\begin{macro}{\jmlrwcp}
  2825. %\changes{1.11}{2011-03-24}{Fixed typo}
  2826. % \begin{macrocode}
  2827. \newcommand*{\jmlrwcp}{%
  2828. \jmlrproceedings{JMLR W\&CP}{JMLR: Workshop and Conference Proceedings}%
  2829. }
  2830. % \end{macrocode}
  2831. %\end{macro}
  2832. %\begin{macro}{\jmlrpmlr}
  2833. %\changes{1.23}{2017-03-09}{new}
  2834. %The JMLR W\&CP has been renamed PMLR, so provide code to switch to
  2835. %this instead,
  2836. % \begin{macrocode}
  2837. \newcommand*{\jmlrpmlr}{%
  2838. \jmlrproceedings{PMLR}{Proceedings of Machine Learning Research}%
  2839. }
  2840. % \end{macrocode}
  2841. %\end{macro}
  2842. % This is a journal (non JMLR W\&CP\slash PMLR) article:
  2843. % \begin{macrocode}
  2844. \DeclareOptionX{nowcp}{\jmlrnowcp}
  2845. % \end{macrocode}
  2846. % This is an article for JMLR W\&CP
  2847. % \begin{macrocode}
  2848. \DeclareOptionX{wcp}{\jmlrwcp}
  2849. % \end{macrocode}
  2850. % This is an article for PMLR
  2851. % \begin{macrocode}
  2852. \DeclareOptionX{pmlr}{\jmlrpmlr}
  2853. % \end{macrocode}
  2854. %\begin{option}{oneside}
  2855. %\changes{1.22}{2015/04/11}{new}
  2856. % \begin{macrocode}
  2857. \DeclareOptionX{oneside}{\@twosidefalse \@mparswitchfalse}
  2858. % \end{macrocode}
  2859. %\end{option}
  2860. %\begin{option}{twoside}
  2861. %\changes{1.22}{2015/04/11}{new}
  2862. % \begin{macrocode}
  2863. \DeclareOptionX{twoside}{\@twosidetrue \@mparswitchtrue}
  2864. % \end{macrocode}
  2865. %\end{option}
  2866. % Set two-sided format
  2867. % \begin{macrocode}
  2868. \@twosidetrue
  2869. % \end{macrocode}
  2870. % The default paper size is letter, but provide $7 \times 10$in
  2871. % alternative:
  2872. % \begin{macrocode}
  2873. \newif\ifviiXx
  2874. \viiXxfalse
  2875. \DeclareOptionX{7x10}{\viiXxtrue}
  2876. \DeclareOptionX{letterpaper}{\PassOptionsToPackage{letterpaper}{typearea}}
  2877. % \end{macrocode}
  2878. % Pass all remaining options to \cls{article} class:
  2879. % \begin{macrocode}
  2880. \DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{article}}
  2881. % \end{macrocode}
  2882. % Execute required options:
  2883. % \begin{macrocode}
  2884. \ExecuteOptions{letterpaper}
  2885. % \end{macrocode}
  2886. % Process options:
  2887. % \begin{macrocode}
  2888. \ProcessOptionsX
  2889. % \end{macrocode}
  2890. % Load \cls{article} class.
  2891. %\changes{1.10}{2011-01-05}{passed \cs{pt@size} when loading article
  2892. %class}
  2893. % \begin{macrocode}
  2894. \LoadClass[\pt@size]{article}
  2895. % \end{macrocode}
  2896. % Can't use \sty{geometry} package because it doesn't play nicely
  2897. % with the \cls{combine} class.
  2898. % \begin{macrocode}
  2899. \ifviiXx
  2900. \setlength{\paperwidth}{7in}
  2901. \setlength{\paperheight}{10in}
  2902. \setlength{\textwidth}{5.25in}
  2903. \setlength{\textheight}{8.2in}
  2904. \setlength{\topmargin}{0.4in}
  2905. \setlength{\headheight}{0.2in}
  2906. \setlength{\headsep}{0.2in}
  2907. \setlength{\hoffset}{-1in}
  2908. \setlength{\voffset}{-1in}
  2909. \setlength{\evensidemargin}{0.75in}
  2910. \setlength{\oddsidemargin}{1.0in}
  2911. \else
  2912. \setlength{\oddsidemargin}{0.25in}
  2913. \setlength{\evensidemargin}{0.25in}
  2914. \setlength{\marginparwidth}{0.07 true in}
  2915. \setlength{\topmargin}{-0.5in}
  2916. \addtolength{\headsep}{0.25in}
  2917. \setlength{\textheight}{8.5 true in}
  2918. \setlength{\textwidth}{6.0 true in}
  2919. \fi
  2920. % \end{macrocode}
  2921. % Need to add jmlr end document hook before natbib adds a
  2922. % \cs{clearpage} to it.
  2923. % \begin{macrocode}
  2924. \AtEndDocument{\@jmlrenddoc}
  2925. % \end{macrocode}
  2926. % Required packages:
  2927. % \begin{macrocode}
  2928. \RequirePackage{amsmath}
  2929. \RequirePackage{amssymb}
  2930. \RequirePackage{natbib}
  2931. \RequirePackage{graphicx}
  2932. \RequirePackage{url}
  2933. \PassOptionsToPackage{x11names}{xcolor}
  2934. \RequirePackage{xcolor}
  2935. % \end{macrocode}
  2936. % Allow old command names in the event that the proceedings contains
  2937. % a mixture of papers that use old and new versions. (This means
  2938. % that editors need to install the newer version.) For some reason,
  2939. % loading \sty{algorithm2e} causes the message
  2940. %\begin{verbatim}
  2941. %(\end occurred inside a group at level 1)
  2942. %\end{verbatim}
  2943. % I don't know why, but it's outside the control of this class.
  2944. % \begin{macrocode}
  2945. \PassOptionsToPackage{algo2e,ruled}{algorithm2e}
  2946. \RequirePackage{algorithm2e}
  2947. % \end{macrocode}
  2948. % Set the algorithm margin to zero.
  2949. % \begin{macrocode}
  2950. \setlength\algomargin{0pt}
  2951. % \end{macrocode}
  2952. %Load \sty{jmlrutils} before \sty{hyperref}.
  2953. %\changes{1.24}{??}{added \styfmt{jmlrutils}}
  2954. % \begin{macrocode}
  2955. \RequirePackage{jmlrutils}
  2956. % \end{macrocode}
  2957. % Do all the stuff that needs to be done before \sty{hyperref} is
  2958. % loaded:
  2959. % \begin{macrocode}
  2960. \jmlrprehyperref
  2961. % \end{macrocode}
  2962. % Do stuff that has to come immediately before \sty{hyperref} is
  2963. % loaded:
  2964. %\changes{1.13}{2012/02/25}{added \cs{@pre@hyperref}}
  2965. % \begin{macrocode}
  2966. \@ifundefined{@pre@hyperref}{}{\@pre@hyperref}
  2967. % \end{macrocode}
  2968. % Load \sty{hyperref}:
  2969. %\changes{1.19}{??}{replaced \cs{usepackage} with \cs{RequirePackage}}
  2970. % \begin{macrocode}
  2971. \RequirePackage{hyperref}
  2972. \RequirePackage{nameref}
  2973. % \end{macrocode}
  2974. % \begin{macrocode}
  2975. % Do stuff that has to come immediately after \sty{hyperref} and
  2976. % \sty{nameref} are loaded:
  2977. %\changes{1.16}{2012/05/15}{added \cs{@post@hyperref}}
  2978. \@ifundefined{@post@hyperref}{}{\@post@hyperref}
  2979. % \end{macrocode}
  2980. % Set up hyperref options:
  2981. % \begin{macrocode}
  2982. \hypersetup{colorlinks,
  2983. linkcolor=blue,
  2984. citecolor=blue,
  2985. urlcolor=magenta,
  2986. linktocpage,
  2987. plainpages=false}
  2988. % \end{macrocode}
  2989. %
  2990. % \begin{macrocode}
  2991. \ifgrayscale
  2992. % \end{macrocode}
  2993. % If this is the print version, need to disable the hyperlinks:
  2994. % \begin{macrocode}
  2995. \hypersetup{draft}
  2996. \fi
  2997. % \end{macrocode}
  2998. %
  2999. % Float parameters: the following settings were copied from jmlr2e.sty
  3000. % \begin{macrocode}
  3001. \renewcommand{\topfraction}{0.95} % let figure take up nearly whole page
  3002. \renewcommand{\textfraction}{0.05} % let figure take up nearly whole page
  3003. % \end{macrocode}
  3004. % widows/orphans
  3005. % \begin{macrocode}
  3006. \widowpenalty=10000\relax
  3007. \clubpenalty=10000\relax
  3008. % \end{macrocode}
  3009. % Put marginal notes on the outside of the page
  3010. % \begin{macrocode}
  3011. \@mparswitchtrue
  3012. % \end{macrocode}
  3013. %\changes{1.18}{2013-10-17}{removed \cs{ds@draft}}
  3014. % Use the plainnat bibliography style and set up the required
  3015. % punctuation.
  3016. % \begin{macrocode}
  3017. \bibliographystyle{plainnat}
  3018. \bibpunct{(}{)}{;}{a}{,}{,}
  3019. % \end{macrocode}
  3020. %\subsection{Sections}
  3021. %\begin{macro}{\section}
  3022. % \begin{macrocode}
  3023. \renewcommand{\section}{\@startsection{section}{1}{\z@}%
  3024. {-0.24in \@plus -1ex \@minus -.2ex}%
  3025. {0.10in \@plus.2ex}%
  3026. {\normalfont\rmfamily\bfseries\large\raggedright}%
  3027. }
  3028. % \end{macrocode}
  3029. %\end{macro}
  3030. %\begin{macro}{\subsection}
  3031. % \begin{macrocode}
  3032. \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
  3033. {-0.20in \@plus -1ex \@minus -.2ex}%
  3034. {0.08in \@plus .2ex}%
  3035. {\normalfont\rmfamily\bfseries\normalsize\raggedright}%
  3036. }
  3037. % \end{macrocode}
  3038. %\end{macro}
  3039. %\begin{macro}{\subsubsection}
  3040. % \begin{macrocode}
  3041. \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
  3042. {-0.18in \@plus -1ex \@minus -.2ex}%
  3043. {0.08in \@plus .2ex}%
  3044. {\normalfont\normalsize\rmfamily\mdseries\scshape\raggedright}%
  3045. }
  3046. % \end{macrocode}
  3047. %\end{macro}
  3048. %\begin{macro}{\paragraph}
  3049. % \begin{macrocode}
  3050. \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
  3051. {1.5ex plus 0.5ex minus .2ex}%
  3052. {-1em}%
  3053. {\normalfont\normalsize\rmfamily\bfseries}%
  3054. }
  3055. % \end{macrocode}
  3056. %\end{macro}
  3057. %\begin{macro}{\subparagraph}
  3058. % \begin{macrocode}
  3059. \renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}%
  3060. {1.5ex plus 0.5ex minus .2ex}%
  3061. {-1em}%
  3062. {\normalfont\normalsize\rmfamily\bfseries\itshape}}
  3063. % \end{macrocode}
  3064. %\end{macro}
  3065. %
  3066. %\begin{macro}{\@seccntformat}
  3067. % Redefine the way the section number appears in the section
  3068. % heading.
  3069. % \begin{macrocode}
  3070. \renewcommand*\@seccntformat[1]{%
  3071. \csname pre#1num\endcsname
  3072. \csname the#1\endcsname.\enskip
  3073. }
  3074. % \end{macrocode}
  3075. %\end{macro}
  3076. %
  3077. %\subsection{Footnotes}
  3078. %\begin{macro}{\@makefntext}
  3079. %\changes{1.08}{2010-07-27}{new}
  3080. % Redefine \cs{@makefntext} so that the text between the footnote
  3081. % symbol and the footnote text can be redefined. (It looks odd
  3082. % having a full stop after a symbol.)
  3083. % \begin{macrocode}
  3084. \renewcommand*{\@makefntext}[1]{%
  3085. \@setpar
  3086. {%
  3087. \@@par
  3088. \@tempdima\hsize
  3089. \advance \@tempdima -15pt\relax
  3090. \parshape \@ne 15pt \@tempdima
  3091. }%
  3092. \par
  3093. \parindent 2em\noindent
  3094. \hbox to \z@ {\hss {\@thefnmark }\footnoteseptext\hfil }#1%
  3095. }
  3096. % \end{macrocode}
  3097. %\end{macro}
  3098. %\begin{macro}{\footnoteseptext}
  3099. %\changes{1.08}{2010-07-27}{new}
  3100. % The separation text between the footnote symbol and the footnote
  3101. % text.
  3102. % \begin{macrocode}
  3103. \newcommand*{\footnoteseptext}{. }
  3104. % \end{macrocode}
  3105. %\end{macro}
  3106. %\begin{macro}{\thanks}
  3107. %\changes{1.21}{2015-02-24}{added optional argument to \cs{footnotetext}}
  3108. %\changes{1.10}{2011-01-05}{Modified definition of \cs{thanks}}
  3109. %Added optional argument to \cs{footnotetext} as per
  3110. %\url{http://tex.stackexchange.com/questions/229295}.
  3111. % \begin{macrocode}
  3112. \renewcommand*{\thanks}[1]{%
  3113. \footnotemark
  3114. \protected@xdef\@thanks{\@thanks
  3115. \protect\footnotetext[\arabic{footnote}]{#1}}%
  3116. }
  3117. % \end{macrocode}
  3118. %\end{macro}
  3119. %
  3120. %\subsection{Article abstract}
  3121. % This code has been taken from jmlr2e.sty but with \cs{bf} updated
  3122. % to \cs{bfseries}
  3123. %\begin{environment}{abstract}
  3124. % \begin{macrocode}
  3125. \ifjmlrhtml
  3126. \renewenvironment{abstract}{\HCode{<h3>}Abstract\HCode{</h3>}}{}%
  3127. \else
  3128. \renewenvironment{abstract}
  3129. % \end{macrocode}
  3130. %\changes{1.09}{2010/12/01}{changed \cs{centerline} to
  3131. %\cs{centering}\ldots\cs{par}}
  3132. % \begin{macrocode}
  3133. {{\centering\large\bfseries Abstract\par}\vspace{0.7ex}%
  3134. \bgroup
  3135. \leftskip 20pt\rightskip 20pt\small\noindent\ignorespaces}%
  3136. {\par\egroup\vskip 0.25ex}
  3137. \fi
  3138. % \end{macrocode}
  3139. %\end{environment}
  3140. %\subsection{Keywords}
  3141. % This code has been taken from jmlr2e.sty but with \cs{bf} updated
  3142. % to \cs{bfseries}.
  3143. %\begin{environment}{keywords}
  3144. % \begin{macrocode}
  3145. \newenvironment{keywords}
  3146. {\bgroup\leftskip 20pt\rightskip 20pt \small\noindent{\bfseries
  3147. Keywords:} \ignorespaces}%
  3148. {\par\egroup\vskip 0.25ex}
  3149. % \end{macrocode}
  3150. %\end{environment}
  3151. %\subsection{Title Page Information}
  3152. % This code has been taken from jmlr2e.sty.
  3153. %
  3154. % Title stuff, borrowed in part from aaai92.sty
  3155. % \begin{macrocode}
  3156. \newlength\aftertitskip \newlength\beforetitskip
  3157. \newlength\interauthorskip \newlength\aftermaketitskip
  3158. % \end{macrocode}
  3159. %% Changeable parameters.
  3160. % \begin{macrocode}
  3161. \setlength\aftertitskip{0.1in plus 0.2in minus 0.2in}
  3162. \setlength\beforetitskip{0.05in plus 0.08in minus 0.08in}
  3163. \setlength\interauthorskip{0.08in plus 0.1in minus 0.1in}
  3164. \setlength\aftermaketitskip{0.3in plus 0.1in minus 0.1in}
  3165. % \end{macrocode}
  3166. %
  3167. %\begin{macro}{\titlebreak}
  3168. %\changes{1.12}{2012/01/05}{new}
  3169. % Acts like new line in the paper title, but with jmlrbook acts like a space in
  3170. % the table of contents and bookmarks.
  3171. % \begin{macrocode}
  3172. \newcommand*{\titlebreak}{\newline}
  3173. % \end{macrocode}
  3174. %\end{macro}
  3175. %
  3176. %\begin{macro}{\titletag}
  3177. %\changes{1.17}{2012/05/30}{new}
  3178. % \begin{macrocode}
  3179. \newcommand*{\titletag}[1]{}
  3180. % \end{macrocode}
  3181. %\end{macro}
  3182. %
  3183. %\begin{macro}{\title}
  3184. % Override definition of \cs{title} to allow for an optional
  3185. % argument (short title)
  3186. % \begin{macrocode}
  3187. \renewcommand*{\title}[2][\@title]{%
  3188. \def\@shorttitle{#1}%
  3189. \def\@title{#2}%
  3190. \protected@write\@auxout{}{\string\jmlr@title{#1}{#2}}%
  3191. \jmlrtitlehook
  3192. }
  3193. % \end{macrocode}
  3194. %\end{macro}
  3195. %\begin{macro}{\@shorttitle}
  3196. %\changes{1.12}{2012/01/05}{provided default value}
  3197. % The short title of the document is initialised to \cs{jobname} to
  3198. % ensure a basic document will compile even if no title is set.
  3199. % \begin{macrocode}
  3200. \newcommand*{\@shorttitle}{\jobname}
  3201. % \end{macrocode}
  3202. %\end{macro}
  3203. %
  3204. %\begin{macro}{\jmlrtitlehook}
  3205. % \begin{macrocode}
  3206. \newcommand*{\jmlrtitlehook}{}
  3207. % \end{macrocode}
  3208. %\end{macro}
  3209. %\begin{macro}{\jmlr@title}
  3210. %\changes{1.20}{2014/10/15}{new}
  3211. % AUX command provided for MakeJmlrBookGUI
  3212. % \begin{macrocode}
  3213. \newcommand*{\jmlr@title}[2]{}
  3214. % \end{macrocode}
  3215. %\end{macro}
  3216. %
  3217. %\begin{macro}{\author}
  3218. % Override definition of \cs{author} to allow for an optional
  3219. % argument (list of authors for page heading)
  3220. % \begin{macrocode}
  3221. \renewcommand*{\author}[2][]{%
  3222. \def\@author{#2}%
  3223. \def\@sauthor{#1}%
  3224. \def\@jmlr@aux@author{#2}\@onelevel@sanitize\@jmlr@aux@author
  3225. \ifx\@sauthor\@empty
  3226. \let\@jmlr@aux@sauthor\@jmlr@aux@author
  3227. \else
  3228. \let\@shortauthor\@sauthor
  3229. \def\@jmlr@aux@sauthor{#1}\@onelevel@sanitize\@jmlr@aux@sauthor
  3230. \fi
  3231. \jmlrauthorhook
  3232. \protected@write\@auxout
  3233. {}{\string\jmlr@author{\@jmlr@aux@sauthor}{\@jmlr@aux@author}}%
  3234. }
  3235. % \end{macrocode}
  3236. %\end{macro}
  3237. %\begin{macro}{\jmlrauthorhook}
  3238. % \begin{macrocode}
  3239. \newcommand*{\jmlrauthorhook}{}
  3240. % \end{macrocode}
  3241. %\end{macro}
  3242. %\begin{macro}{\jmlr@author}
  3243. %\changes{1.20}{2014/10/15}{new}
  3244. % AUX command provided for MakeJmlrBookGUI
  3245. % \begin{macrocode}
  3246. \newcommand*{\jmlr@author}[2]{}
  3247. % \end{macrocode}
  3248. %\end{macro}
  3249. %
  3250. %\begin{macro}{\@shortauthor}
  3251. % \begin{macrocode}
  3252. \newcommand*{\@shortauthor}{}
  3253. % \end{macrocode}
  3254. %\end{macro}
  3255. %
  3256. %\begin{macro}{\@firstauthor}
  3257. % \begin{macrocode}
  3258. \newcommand*{\@firstauthor}{}
  3259. % \end{macrocode}
  3260. %\end{macro}
  3261. %\begin{macro}{\@firstsurname}
  3262. % \begin{macrocode}
  3263. \newcommand*{\@firstsurname}{}
  3264. % \end{macrocode}
  3265. %\end{macro}
  3266. %
  3267. %\begin{macro}{\jmlrlength}
  3268. % \begin{macrocode}
  3269. \newlength\jmlrlength
  3270. % \end{macrocode}
  3271. %\end{macro}
  3272. %
  3273. %\begin{macro}{\jmlrmaketitle}
  3274. % Make the title
  3275. % \begin{macrocode}
  3276. \def\jmlrmaketitle{%
  3277. \jmlrpremaketitlehook
  3278. \def\@jmlr@authors@sep{, }%
  3279. \par
  3280. \begingroup
  3281. % \end{macrocode}
  3282. %\changes{1.08}{2010-07-27}{modified footnote marker in the footnote
  3283. %text so that it is raised and isn't followed by a full stop}
  3284. % \begin{macrocode}
  3285. \def\footnoteseptext{ }%
  3286. \def\thempfn{\textsuperscript{\thefootnote}}%
  3287. \def\thefootnote{\fnsymbol{footnote}}%
  3288. % \end{macrocode}
  3289. %\changes{1.07}{2010-06-30}{added check for two column mode}
  3290. % \begin{macrocode}
  3291. \if@twocolumn
  3292. \twocolumn[\@jmlrmaketitle]%
  3293. \else
  3294. \@jmlrmaketitle
  3295. \fi
  3296. \@thanks
  3297. \endgroup
  3298. \label{jmlrstart}%
  3299. \ifx\@sauthor\@empty
  3300. \settowidth{\jmlrlength}{\@evenhead}%
  3301. \ifdim\jmlrlength>\textwidth
  3302. \def\@shortauthor{\@firstsurname\space et al.}%
  3303. \fi
  3304. \fi
  3305. \settowidth{\jmlrlength}{\@titlefoot}%
  3306. \ifdim\jmlrlength>\textwidth
  3307. \def\@jmlrauthors{\@firstauthor\space \emph{et al}}%
  3308. \fi
  3309. \jmlrmaketitlehook
  3310. \thispagestyle{jmlrtps}%
  3311. \setcounter{footnote}{0}%
  3312. \let\maketitle\relax \let\@maketitle\relax
  3313. \gdef\@thanks{}\gdef\@author{}\let\thanks\@gobble
  3314. \def\@jmlr@authors@sep{ \& }%
  3315. }
  3316. % \end{macrocode}
  3317. %\end{macro}
  3318. %
  3319. %\begin{macro}{\jmlrmaketitlehook}
  3320. % \begin{macrocode}
  3321. \newcommand*{\jmlrmaketitlehook}{}
  3322. % \end{macrocode}
  3323. %\end{macro}
  3324. %\begin{macro}{\jmlrpremaketitlehook}
  3325. % \begin{macrocode}
  3326. \newcommand*{\jmlrpremaketitlehook}{}
  3327. % \end{macrocode}
  3328. %\end{macro}
  3329. %
  3330. % Provide a different title layout for HTML
  3331. %\begin{macro}{\jmlrhtmlmaketitle}
  3332. % \begin{macrocode}
  3333. \newcommand{\jmlrhtmlmaketitle}{%
  3334. \ifx\@jmlr@authors\@empty
  3335. \sbox\jmlrbox{\let\addr\relax\@author}%
  3336. \fi
  3337. \noindent\HCode{<h2>}\@title\HCode{</h2>}
  3338. \noindent\@jmlr@authors
  3339. }
  3340. % \end{macrocode}
  3341. %\end{macro}
  3342. %%\begin{macro}{\jmlrbox}
  3343. % Define a save box
  3344. % \begin{macrocode}
  3345. \newsavebox\jmlrbox
  3346. % \end{macrocode}
  3347. %\end{macro}
  3348. %\begin{macro}{\maketitle}
  3349. % If we're creating HTML, set \cs{maketitle} to
  3350. % \cs{jmlrhtmlmaketitle}, otherwise set it to \cs{jmlrmaketitle}
  3351. % \begin{macrocode}
  3352. \ifjmlrhtml
  3353. \let\maketitle\jmlrhtmlmaketitle
  3354. \else
  3355. \let\maketitle\jmlrmaketitle
  3356. \fi
  3357. % \end{macrocode}
  3358. %\end{macro}
  3359. %
  3360. % Author and editor information.
  3361. % \begin{macrocode}
  3362. \def\@startauthor{\noindent \normalsize\bfseries}
  3363. \def\@endauthor{}
  3364. \def\@starteditor{\noindent \small {\bfseries \@edname:~}}
  3365. \def\@endeditor{\normalsize}
  3366. % \end{macrocode}
  3367. % Provide hooks to make it easier to adapted with \cls{combine}
  3368. % class.
  3369. %\begin{macro}{\jmlrpretitle}
  3370. % \begin{macrocode}
  3371. \def\jmlrpretitle{\vskip\beforetitskip\begin{center}\Large\bfseries}
  3372. % \end{macrocode}
  3373. %\end{macro}
  3374. %\begin{macro}{\jmlrposttitle}
  3375. % \begin{macrocode}
  3376. \def\jmlrposttitle{\par\end{center}\vskip\aftertitskip}
  3377. % \end{macrocode}
  3378. %\end{macro}
  3379. %\begin{macro}{\nametag}
  3380. %\changes{1.09}{2010/12/01}{new}
  3381. % \begin{macrocode}
  3382. \newcommand*{\nametag}[1]{}
  3383. % \end{macrocode}
  3384. %\end{macro}
  3385. %\begin{macro}{\jmlrpreauthor}
  3386. %\changes{1.09}{2010/12/01}{added \cs{nametag}}
  3387. % \begin{macrocode}
  3388. \def\jmlrpreauthor{%
  3389. \bgroup
  3390. \def\nametag##1{##1}%
  3391. \def\and{\unskip\enspace{\normalfont and}\enspace}%
  3392. % \end{macrocode}
  3393. %\changes{1.10}{2011-01-05}{added \cs{mdseries} to \cs{addr}}
  3394. % \begin{macrocode}
  3395. \def\addr{\mdseries\small\itshape}%
  3396. \def\name{\ClassError{jmlr}{Use \string\Name{Author's Name} not \string\name}{}}%
  3397. \def\email{\ClassError{jmlr}{Use \string\Email{address} not \string\email}{}}%
  3398. \def\AND{\@endauthor\normalfont\hss \vskip \interauthorskip
  3399. \@startauthor}%
  3400. \@startauthor
  3401. }
  3402. % \end{macrocode}
  3403. %\end{macro}
  3404. %\begin{macro}{\addr}
  3405. %\changes{1.20}{2014/10/15}{initialised to nothing}
  3406. % Initialise to do nothing if used outside of \cs{author}
  3407. % \begin{macrocode}
  3408. \newcommand{\addr}{}
  3409. % \end{macrocode}
  3410. %\end{macro}
  3411. %\begin{macro}{\@email}
  3412. % \begin{macrocode}
  3413. \def\@email{\hfill\small\mdseries\scshape}%
  3414. % \end{macrocode}
  3415. %\end{macro}
  3416. %\begin{macro}{\@name}
  3417. % \begin{macrocode}
  3418. \def\@name{\normalsize\upshape\bfseries}%
  3419. % \end{macrocode}
  3420. %\end{macro}
  3421. %
  3422. %\begin{macro}{\@parsename}
  3423. % Parse a name. Appends forename to \cs{@forenames} and stores
  3424. % surname in \cs{@surname}.
  3425. % \begin{macrocode}
  3426. \def\@parsename#1 #2\end@parsename{%
  3427. \def\@tmp{#2}%
  3428. \ifx\@tmp\@nnil
  3429. \def\@surname{#1}%
  3430. \let\@nextparsename\@parsenamenoop
  3431. \else
  3432. \@getinitial#1-\relax\relax\end@getinitial
  3433. \ifx\@forenames\@empty
  3434. \def\@forenames{#1}%
  3435. \protected@edef\@initials{\@initial}%
  3436. \else
  3437. \expandafter\toks@\expandafter{\@forenames}%
  3438. \edef\@forenames{\space\the\toks@}%
  3439. \expandafter\toks@\expandafter{\@initials}%
  3440. \protected@edef\@initials{\the\toks@\@initial}%
  3441. \fi
  3442. \let\@nextparsename\@parsename
  3443. \fi
  3444. \@nextparsename#2\end@parsename
  3445. }
  3446. \def\@parsenamenoop#1\end@parsename{}
  3447. % \end{macrocode}
  3448. %\end{macro}
  3449. %
  3450. %\begin{macro}{\@getinitial}
  3451. % \begin{macrocode}
  3452. \def\@getinitial#1#2-#3#4\end@getinitial{%
  3453. \def\@jmlr@tmp{#3}%
  3454. \if\@jmlr@tmp\relax
  3455. \def\@initial{#1.}%
  3456. \else
  3457. \def\@initial{#1.-#3.}%
  3458. \fi
  3459. }
  3460. % \end{macrocode}
  3461. %\end{macro}
  3462. %
  3463. %\begin{macro}{\Name}
  3464. % Get the author's name and add surname to \cs{@shortauthors}.
  3465. % (Surnames with \qt{von} parts or with spaces in should be
  3466. % enclosed in braces)
  3467. %\changes{1.12}{2012/01/05}{added optional argument}
  3468. % \begin{macrocode}
  3469. \newcommand*{\Name}[2][]{%
  3470. \def\@authorlist{#1}%
  3471. \def\@forenames{}%
  3472. \def\@surname{}%
  3473. \def\nametag##1{}%
  3474. \@parsename#2 \@nil\end@parsename
  3475. \ifx\@shortauthor\@empty
  3476. \ifx\@sauthor\@empty
  3477. \global\let\@shortauthor\@surname
  3478. \global\let\@firstsurname\@surname
  3479. \fi
  3480. \ifx\@authorlist\@empty
  3481. \protected@xdef\@jmlrauthors{\@initials\space\@surname}%
  3482. \else
  3483. \protected@xdef\@jmlrauthors{\@authorlist}%
  3484. \fi
  3485. \global\let\@firstauthor\@jmlrauthors
  3486. \else
  3487. \ifx\@sauthor\@empty
  3488. \expandafter\toks@\expandafter{\@shortauthor}%
  3489. \protected@xdef\@shortauthor{\the\toks@\space\@surname}%
  3490. \fi
  3491. \ifx\@authorlist\@empty
  3492. \ifx\@jmlrauthors\@empty
  3493. \protected@xdef\@jmlrauthors{\@initials\space\@surname}%
  3494. \else
  3495. \protected@xdef\@jmlrauthors{\@jmlrauthors
  3496. \noexpand\@jmlr@authors@sep
  3497. \@initials\space\@surname}%
  3498. \fi
  3499. \else
  3500. \ifx\@jmlrauthors\@empty
  3501. \protected@xdef\@jmlrauthors{\@authorlist}%
  3502. \else
  3503. \protected@xdef\@jmlrauthors{\@jmlrauthors
  3504. \noexpand\@jmlr@authors@sep
  3505. \@authorlist
  3506. }%
  3507. \fi
  3508. \fi
  3509. \fi
  3510. \def\nametag##1{##1}%
  3511. \@name #2%
  3512. }
  3513. % \end{macrocode}
  3514. %\end{macro}
  3515. %
  3516. %\begin{macro}{\jmlrabbrnamelist}
  3517. %\changes{1.11}{2011-03-24}{new}
  3518. % Display list of names in abbreviated form. (Mainly designed for use with
  3519. % makejmlrbook for the preface authors.) The author should be
  3520. % grouped if the name contains a comma.
  3521. % \begin{macrocode}
  3522. \newcommand*{\jmlrabbrnamelist}[1]{%
  3523. \def\nametag##1{}%
  3524. \def\@jmlr@authors@sep{, }%
  3525. \def\@jmlr@namelist{}%
  3526. \@for\@thisname:=#1\do{%
  3527. \expandafter\@jmlrabbrname\expandafter{\@thisname}%
  3528. \ifx\@jmlr@namelist\@empty
  3529. \protected@edef\@jmlr@namelist{%
  3530. \@initials\space\@surname
  3531. }%
  3532. \else
  3533. \protected@edef\@jmlr@namelist{%
  3534. \@jmlr@namelist
  3535. \noexpand\@jmlr@authors@sep
  3536. \@initials\space\@surname
  3537. }%
  3538. \fi
  3539. }%
  3540. \def\@jmlr@authors@sep{ \& }%
  3541. \@jmlr@namelist
  3542. }
  3543. % \end{macrocode}
  3544. %\end{macro}
  3545. %\begin{macro}{\@jmlrabbrname}
  3546. % \begin{macrocode}
  3547. \newcommand*{\@jmlrabbrname}[1]{%
  3548. \def\@initials{}%
  3549. \def\@surname{}%
  3550. \def\@forenames{}%
  3551. \@parsename#1 \@nil\end@parsename
  3552. }
  3553. % \end{macrocode}
  3554. %\end{macro}
  3555. %
  3556. %\begin{macro}{\Email}
  3557. % \begin{macrocode}
  3558. \newcommand*{\Email}[1]{{\@email #1}}
  3559. % \end{macrocode}
  3560. %\end{macro}
  3561. %\begin{macro}{\jmlrpostauthor}
  3562. % \begin{macrocode}
  3563. \def\jmlrpostauthor{\@endauthor\egroup
  3564. \par
  3565. \vskip \aftermaketitskip
  3566. \noindent
  3567. \ifx\@editor\@empty
  3568. \else
  3569. \@starteditor \@editor \@endeditor
  3570. \fi
  3571. \vskip \aftermaketitskip
  3572. }
  3573. % \end{macrocode}
  3574. %\end{macro}
  3575. %\begin{macro}{\@jmlrmaketitle}
  3576. % \begin{macrocode}
  3577. \def\@jmlrmaketitle{\vbox{\hsize\textwidth
  3578. \linewidth\hsize
  3579. \jmlrpretitle
  3580. {%
  3581. \def\titletag##1{##1}%
  3582. \@title
  3583. }%
  3584. \jmlrposttitle
  3585. \jmlrpreauthor \@author \jmlrpostauthor
  3586. }}
  3587. % \end{macrocode}
  3588. %\end{macro}
  3589. %\begin{macro}{\kernelmachines}
  3590. % Convenience command
  3591. % \begin{macrocode}
  3592. \newcommand*\kernelmachines{(for
  3593. {\textsc{http://www.kernel-machines.org}})}
  3594. % \end{macrocode}
  3595. %\end{macro}
  3596. %
  3597. %\begin{macro}{\editorname}
  3598. % Label for the editor
  3599. % \begin{macrocode}
  3600. \newcommand*{\editorname}{Editor}
  3601. % \end{macrocode}
  3602. %\end{macro}
  3603. %\begin{macro}{\editorsname}
  3604. % Label for the editor
  3605. % \begin{macrocode}
  3606. \newcommand*{\editorsname}{Editors}
  3607. % \end{macrocode}
  3608. %\end{macro}
  3609. %\begin{macro}{\@edname}
  3610. % This will either be Editor or Editors depending on whether
  3611. % \cs{editor} or \cs{editors} is used. Defaults to \cs{editorname}
  3612. % \begin{macrocode}
  3613. \let\@edname\editorname
  3614. % \end{macrocode}
  3615. %\end{macro}
  3616. %\begin{macro}{\@editor}
  3617. % The editor or editors are stored in \cs{@editor}
  3618. % \begin{macrocode}
  3619. \def\@editor{}
  3620. % \end{macrocode}
  3621. %\end{macro}
  3622. %\begin{macro}{\editor}
  3623. % A single editor
  3624. % \begin{macrocode}
  3625. \def\editor#1{%
  3626. \global\let\@edname\editorname
  3627. \gdef\@editor{#1}%
  3628. }
  3629. % \end{macrocode}
  3630. %\end{macro}
  3631. %\begin{macro}{\editors}
  3632. % Multiple editors
  3633. % \begin{macrocode}
  3634. \def\editors#1{%
  3635. \global\let\@edname\editorsname
  3636. \gdef\@editor{#1}%
  3637. }
  3638. % \end{macrocode}
  3639. %\end{macro}
  3640. %
  3641. %\subsection{Pagestyles}
  3642. % This is taken from jmlr2e.sty
  3643. %
  3644. %\begin{macro}{\firstpageno}
  3645. % Set the page counter.
  3646. % \begin{macrocode}
  3647. \def\firstpageno#1{\setcounter{page}{#1}}
  3648. % \end{macrocode}
  3649. %\end{macro}
  3650. %\begin{macro}{\startpage}
  3651. %\changes{1.10}{2011-01-05}{new}
  3652. % If \cs{startpage} has been defined, use its value for the first
  3653. % page.
  3654. % \begin{macrocode}
  3655. \@ifundefined{startpage}{}{\firstpageno{\startpage}}
  3656. % \end{macrocode}
  3657. %\end{macro}
  3658. %
  3659. % Label end page.
  3660. %\begin{macro}{\@jmlrenddoc}
  3661. % Label end page
  3662. % \begin{macrocode}
  3663. \newcommand*{\@jmlrenddoc}{%
  3664. \phantomsection
  3665. \protected@edef\@currentlabelname{end of \@shorttitle}%
  3666. \label{jmlrend}\null
  3667. \global\let\@reprint\@empty
  3668. }
  3669. % \end{macrocode}
  3670. %\end{macro}
  3671. %
  3672. %\begin{macro}{\@titlefoot}
  3673. %\changes{1.09}{2010/12/01}{added \cs{@reprint}}
  3674. % \begin{macrocode}
  3675. \newcommand*{\@titlefoot}{\scriptsize\copyright\space\@jmlryear
  3676. \space\@jmlr@authors.\hfill
  3677. \@reprint
  3678. }
  3679. % \end{macrocode}
  3680. %\end{macro}
  3681. %\begin{macro}{\reprint}
  3682. %\changes{1.09}{2010/12/01}{new}
  3683. % \begin{macrocode}
  3684. \let\@reprint\@empty
  3685. \newcommand{\reprint}[1]{%
  3686. \gdef\@reprint{Reprinted with permission for JMLR#1}}
  3687. % \end{macrocode}
  3688. %\end{macro}
  3689. %
  3690. %\begin{macro}{\ps@jmlrtps}
  3691. % Title page style
  3692. % \begin{macrocode}
  3693. \newcommand\ps@jmlrtps{%
  3694. \let\@mkboth\@gobbletwo
  3695. \def\@oddhead{\scriptsize \@jmlrproceedings
  3696. \ifx\@jmlrvolume\@empty
  3697. \else
  3698. \space\@jmlrvolume
  3699. \ifx\@jmlrissue\@empty\else(\@jmlrissue)\fi
  3700. \ifx\@jmlrpages\@empty
  3701. \ifx\@jmlryear\@empty
  3702. \else
  3703. \if\@jmlrissue\@empty,\fi
  3704. \fi
  3705. \else
  3706. :%
  3707. \fi
  3708. \fi
  3709. \ifx\@jmlrpages\@empty
  3710. \else
  3711. \ifx\@jmlrvolume\@empty\space\fi
  3712. \@jmlrpages
  3713. \ifx\@jmlryear\@empty\else,\fi
  3714. \fi
  3715. \ifx\@jmlryear\@empty\else\space\@jmlryear\fi
  3716. \hfill
  3717. \ifx\@jmlrworkshop\@empty
  3718. \ifx\@jmlrsubmitted\@empty
  3719. \else
  3720. Submitted \@jmlrsubmitted
  3721. \ifx\@jmlrpublished\@empty\else;\fi
  3722. \fi
  3723. \ifx\@jmlrpublished\@empty
  3724. \else
  3725. \space Published \@jmlrpublished
  3726. \fi
  3727. \else
  3728. \space\@jmlrworkshop
  3729. \fi
  3730. }%
  3731. \let\@evenhead\@oddhead
  3732. \def\@oddfoot{\@titlefoot}%
  3733. \let\@evenfoot\@oddfoot
  3734. }
  3735. % \end{macrocode}
  3736. %\end{macro}
  3737. %\begin{macro}{\ps@jmlrps}
  3738. % Page style for subsequent pages
  3739. % \begin{macrocode}
  3740. \def\ps@jmlrps{%
  3741. \let\@mkboth\@gobbletwo
  3742. \def\@oddhead{\hfill {\small\scshape \@shorttitle} \hfill}%
  3743. \def\@oddfoot{\hfill \small\rmfamily \thepage \hfill}%
  3744. \def\@evenhead{\hfill {\small\scshape \@shortauthor} \hfill}%
  3745. \def\@evenfoot{\hfill \small\rmfamily \thepage \hfill}%
  3746. }%
  3747. % \end{macrocode}
  3748. % Set the page style:
  3749. % \begin{macrocode}
  3750. \pagestyle{jmlrps}
  3751. % \end{macrocode}
  3752. %\end{macro}
  3753. % Set the heading information:
  3754. %\begin{macro}{\@jmlrvolume}
  3755. % The volume number:
  3756. %\changes{1.17}{2012/05/30}{changed initial definition to use
  3757. %\cs{providecommand}}
  3758. % \begin{macrocode}
  3759. \providecommand*{\@jmlrvolume}{}
  3760. % \end{macrocode}
  3761. %\end{macro}
  3762. %\begin{macro}{\jmlrvolume}
  3763. % \begin{macrocode}
  3764. \newcommand*{\jmlrvolume}[1]{\renewcommand*{\@jmlrvolume}{#1}}
  3765. % \end{macrocode}
  3766. %\end{macro}
  3767. %\begin{macro}{\@jmlrissue}
  3768. % The issue number:
  3769. % \begin{macrocode}
  3770. \providecommand*{\@jmlrissue}{}
  3771. % \end{macrocode}
  3772. %\end{macro}
  3773. %\begin{macro}{\jmlrissue}
  3774. % \begin{macrocode}
  3775. \newcommand*{\jmlrissue}[1]{\renewcommand*{\@jmlrissue}{#1}}
  3776. % \end{macrocode}
  3777. %\end{macro}
  3778. %\begin{macro}{\@jmlryear}
  3779. % The year of publication:
  3780. %\changes{1.17}{2012/05/30}{changed initial definition to use
  3781. %\cs{providecommand}}
  3782. % \begin{macrocode}
  3783. \providecommand*{\@jmlryear}{}
  3784. % \end{macrocode}
  3785. %\end{macro}
  3786. %\begin{macro}{\jmlryear}
  3787. % \begin{macrocode}
  3788. \newcommand*{\jmlryear}[1]{\renewcommand*{\@jmlryear}{#1}}
  3789. % \end{macrocode}
  3790. %\end{macro}
  3791. %\begin{macro}{\@jmlrpages}
  3792. % The page range:
  3793. %\changes{1.17}{2012/05/30}{changed initial definition to use
  3794. %\cs{providecommand}}
  3795. % \begin{macrocode}
  3796. \providecommand*\@jmlrpages{\pageref{jmlrstart}--\pageref{jmlrend}}
  3797. % \end{macrocode}
  3798. %\end{macro}
  3799. %\begin{macro}{\jmlrpages}
  3800. % \begin{macrocode}
  3801. \newcommand*{\jmlrpages}[1]{\renewcommand*{\@jmlrpages}{#1}}
  3802. % \end{macrocode}
  3803. %\end{macro}
  3804. %\begin{macro}{\@jmlrsubmitted}
  3805. % The date the article was submitted:
  3806. %\changes{1.17}{2012/05/30}{changed initial definition to use
  3807. %\cs{providecommand}}
  3808. % \begin{macrocode}
  3809. \providecommand*\@jmlrsubmitted{}
  3810. % \end{macrocode}
  3811. %\end{macro}
  3812. %\begin{macro}{\jmlrsubmitted}
  3813. % \begin{macrocode}
  3814. \newcommand*{\jmlrsubmitted}[1]{\renewcommand*{\@jmlrsubmitted}{#1}}
  3815. % \end{macrocode}
  3816. %\end{macro}
  3817. %\begin{macro}{\@jmlrpublished}
  3818. % The date the article was published:
  3819. %\changes{1.17}{2012/05/30}{changed initial definition to use
  3820. %\cs{providecommand}}
  3821. % \begin{macrocode}
  3822. \providecommand*\@jmlrpublished{}
  3823. % \end{macrocode}
  3824. %\end{macro}
  3825. %\begin{macro}{\jmlrpublished}
  3826. % \begin{macrocode}
  3827. \newcommand*{\jmlrpublished}[1]{\renewcommand*{\@jmlrpublished}{#1}}
  3828. % \end{macrocode}
  3829. %\end{macro}
  3830. %\begin{macro}{\@jmlrworkshop}
  3831. % The name of the workshop:
  3832. %\changes{1.17}{2012/05/30}{changed initial definition to use
  3833. %\cs{providecommand}}
  3834. % \begin{macrocode}
  3835. \providecommand*\@jmlrworkshop{}
  3836. % \end{macrocode}
  3837. %\end{macro}
  3838. %\begin{macro}{\jmlrworkshop}
  3839. % \begin{macrocode}
  3840. \newcommand*{\jmlrworkshop}[1]{%
  3841. \renewcommand*{\@jmlrworkshop}{#1}%
  3842. \protected@write\@auxout{}{\string\jmlr@workshop{#1}}%
  3843. }
  3844. % \end{macrocode}
  3845. %\end{macro}
  3846. %\begin{macro}{\jmlr@workshop}
  3847. %\changes{1.20}{2014/10/15}{new}
  3848. % \begin{macrocode}
  3849. \newcommand*{\jmlr@workshop}[1]{}
  3850. % \end{macrocode}
  3851. %\end{macro}
  3852. %\begin{macro}{\date}
  3853. % \begin{macrocode}
  3854. \renewcommand*{\date}[1]{%
  3855. \renewcommand*{\@date}{#1}%
  3856. \protected@write\@auxout{}{\string\jmlr@date{#1}}%
  3857. }
  3858. % \end{macrocode}
  3859. %\end{macro}
  3860. %\begin{macro}{\jmlr@date}
  3861. %\changes{1.20}{2014/10/15}{new}
  3862. % \begin{macrocode}
  3863. \newcommand*{\jmlr@date}[1]{}
  3864. % \end{macrocode}
  3865. %\end{macro}
  3866. %\begin{macro}{\@jmlrauthors}
  3867. % \begin{macrocode}
  3868. \newcommand*{\@jmlrauthors}{}
  3869. % \end{macrocode}
  3870. %\end{macro}
  3871. %\begin{macro}{\@jmlr@authors}
  3872. %\changes{1.12}{2012/01/05}{new}
  3873. % \begin{macrocode}
  3874. \newcommand*{\@jmlr@authors}{\@jmlrauthors}
  3875. % \end{macrocode}
  3876. %\end{macro}
  3877. %\begin{macro}{\jmlrauthors}
  3878. % This is provided in case \cs{Name} doesn't set \cs{@jmlrauthors}
  3879. % correctly.
  3880. %\changes{1.12}{2012/01/05}{\cs{jmlrauthors} now redefines
  3881. %\cs{@jmlr@authors} instead of \cs{@jmlrauthors}}
  3882. % \begin{macrocode}
  3883. \newcommand*{\jmlrauthors}[1]{\global\def\@jmlr@authors{#1}}
  3884. % \end{macrocode}
  3885. %\end{macro}
  3886. %
  3887. %
  3888. %\subsection{Miscellany}
  3889. % This code was taken from jmlr2e.sty.
  3890. % Define macros for figure captions and table titles
  3891. % \begin{macrocode}
  3892. \def\figurecaption#1#2{\noindent\hangindent 40pt
  3893. \hbox to 36pt {\small\slshape #1 \hfil}
  3894. \ignorespaces {\small #2}}
  3895. % \end{macrocode}
  3896. % Figurecenter prints the caption title centered.
  3897. % \begin{macrocode}
  3898. \def\figurecenter#1#2{\centerline{{\slshape #1} #2}}
  3899. \def\figurecenter#1#2{\centerline{{\small\slshape #1} {\small #2}}}
  3900. % \end{macrocode}
  3901. %
  3902. % Allow ``hanging indents'' in long captions
  3903. %
  3904. %\begin{macro}{\@makecaption}
  3905. % \begin{macrocode}
  3906. \long\def\@makecaption#1#2{%
  3907. \vskip 10pt
  3908. \setbox\@tempboxa\hbox{#1: #2}%
  3909. \ifdim \wd\@tempboxa >\hsize % IF longer than one line:
  3910. \begin{list}{#1:}{%
  3911. \settowidth{\labelwidth}{#1:}
  3912. \setlength{\leftmargin}{\labelwidth}
  3913. \addtolength{\leftmargin}{\labelsep}
  3914. }\item #2 \end{list}\par % Output in quote mode
  3915. \else % ELSE center.
  3916. \hbox to\hsize{\hfil\box\@tempboxa\hfil}
  3917. \fi}
  3918. % \end{macrocode}
  3919. %\end{macro}
  3920. % Define strut macros for skipping spaces above and below text in a
  3921. % tabular environment.
  3922. % \begin{macrocode}
  3923. \def\abovestrut#1{\rule[0in]{0in}{#1}\ignorespaces}
  3924. \def\belowstrut#1{\rule[-#1]{0in}{#1}\ignorespaces}
  3925. % \end{macrocode}
  3926. %\begin{macro}{\acks}
  3927. % Acknowledgements
  3928. % \begin{macrocode}
  3929. \newcommand{\acks}[1]{\section*{Acknowledgments}#1}
  3930. % \end{macrocode}
  3931. %\end{macro}
  3932. % Research Note
  3933. %\begin{macro}{\researchnote}
  3934. % \begin{macrocode}
  3935. \newcommand{\researchnote}[1]{\noindent {\LARGE\itshape Research Note} #1}
  3936. % \end{macrocode}
  3937. %\end{macro}
  3938. %
  3939. %Other macros now moved to \sty{jmlrutils}.
  3940. %
  3941. %\begin{macro}{\ifprint}
  3942. % Provide command to check if this is the printed greyscale
  3943. % version or the online colour version.
  3944. % \begin{macrocode}
  3945. \providecommand{\ifprint}[2]{\ifgrayscale#1\else#2\fi}
  3946. % \end{macrocode}
  3947. %\end{macro}
  3948. %
  3949. % Modify \cs{includegraphics} so that it can pick up the greyscale
  3950. % version of images if this is the print version.
  3951. %% \begin{macrocode}
  3952. \ifjmlrhtml
  3953. \else
  3954. \let\@org@Ginclude@graphics\Ginclude@graphics
  3955. \def\Ginclude@graphics#1{%
  3956. \begingroup
  3957. \let\input@path\Ginput@path
  3958. \ifprint{\filename@parse{#1-gray}}{\filename@parse{#1}}%
  3959. \ifx\filename@ext\relax
  3960. \@for\Gin@temp:=\Gin@extensions\do{%
  3961. \ifx\Gin@ext\relax
  3962. \Gin@getbase\Gin@temp
  3963. \fi}%
  3964. \else
  3965. \ifprint{\filename@parse{#1}}{}%
  3966. \Gin@getbase{\Gin@sepdefault\filename@ext}%
  3967. \ifx\Gin@ext\relax
  3968. \@warning{File `#1' not found}%
  3969. \def\Gin@base{\filename@area\filename@base}%
  3970. \edef\Gin@ext{\Gin@sepdefault\filename@ext}%
  3971. \fi
  3972. \fi
  3973. \ifx\Gin@ext\relax
  3974. \ifprint{\@org@Ginclude@graphics{#1}}%
  3975. {%
  3976. \@latex@error{File `#1' not found}%
  3977. {I could not locate the file with any of these extensions:^^J%
  3978. \Gin@extensions^^J\@ehc}%
  3979. }%
  3980. \else
  3981. \@ifundefined{Gin@rule@\Gin@ext}%
  3982. {\ifx\Gin@rule@*\@undefined
  3983. \@latex@error{Unknown graphics extension: \Gin@ext}\@ehc
  3984. \else
  3985. \expandafter\Gin@setfile\Gin@rule@*{\Gin@base\Gin@ext}%
  3986. \fi}%
  3987. {\expandafter\expandafter\expandafter\Gin@setfile
  3988. \csname Gin@rule@\Gin@ext\endcsname{\Gin@base\Gin@ext}}%
  3989. \fi
  3990. \endgroup}
  3991. \fi
  3992. % \end{macrocode}
  3993. %
  3994. %\begin{macro}{\artappendix}
  3995. % Switch to appendices in an article
  3996. % \begin{macrocode}
  3997. \newcommand{\artappendix}{\par
  3998. \setcounter{section}{0}
  3999. \setcounter{subsection}{0}
  4000. \def\thesection{\Alph{section}}
  4001. % \end{macrocode}
  4002. %\changes{1.12}{2012/01/05}{added chapter to \cs{theHsection} to ensure unique
  4003. %hyperlink names in book}
  4004. % \begin{macrocode}
  4005. \def\theHsection{\theHchapter.\Alph{section}}
  4006. \def\presectionnum{Appendix~}%
  4007. }
  4008. % \end{macrocode}
  4009. %\end{macro}
  4010. % The default assumes a stand-alone article.
  4011. %\begin{macro}{\appendix}
  4012. % \begin{macrocode}
  4013. \let\appendix\artappendix
  4014. % \end{macrocode}
  4015. %\end{macro}
  4016. %
  4017. %\begin{macro}{\booklinebreak}
  4018. %\changes{1.18}{2013-10-17}{new}
  4019. % Provided for book production editors to fine tune the book
  4020. % line breaking. Does nothing in the standalone article.
  4021. % \begin{macrocode}
  4022. \newcommand{\booklinebreak}[1][]{}
  4023. % \end{macrocode}
  4024. %\end{macro}
  4025. %
  4026. %\subsection{Compatibility with combine.cls}
  4027. %
  4028. % Define chapters to make this class play nicely with \cls{combine}.
  4029. % These definitions are just copied from book.cls
  4030. % \begin{macrocode}
  4031. \newcounter{chapter}
  4032. \renewcommand\thechapter{\@arabic\c@chapter}
  4033. \newcommand\@chapapp{\chaptername}
  4034. % \end{macrocode}
  4035. % Add sections to the chapter reset.
  4036. % \begin{macrocode}
  4037. \@addtoreset{section}{chapter}
  4038. % \end{macrocode}
  4039. %\begin{macro}{\chaptermark}
  4040. % \begin{macrocode}
  4041. \newcommand*\chaptermark[1]{}
  4042. % \end{macrocode}
  4043. %\end{macro}
  4044. % Chapters should only be defined when we're combining documents
  4045. % into a book.
  4046. %\begin{macro}{\bookchapter}
  4047. % \begin{macrocode}
  4048. \newcommand\bookchapter{%
  4049. \if@openright\cleardoublepage\else\clearpage\fi
  4050. \thispagestyle{plain}%
  4051. \global\@topnum\z@
  4052. \@afterindentfalse
  4053. \secdef\@chapter\@schapter}
  4054. % \end{macrocode}
  4055. %\end{macro}
  4056. %\begin{macro}{\artchapter}
  4057. % Disable chapters for articles.
  4058. % \begin{macrocode}
  4059. \newcommand\artchapter{%
  4060. \ClassError{jmlr}{Chapters not permitted in articles}{}}
  4061. % \end{macrocode}
  4062. %\end{macro}
  4063. %\begin{macro}{\chapter}
  4064. % The default assumes a stand-alone document.
  4065. % \begin{macrocode}
  4066. \let\chapter\artchapter
  4067. % \end{macrocode}
  4068. %\end{macro}
  4069. % Label for the chapter entries in the toc.
  4070. % \begin{macrocode}
  4071. \def\@chaptoclabel{chapter}
  4072. % \end{macrocode}
  4073. %\begin{macro}{\@chapter}
  4074. % Numbered chapters
  4075. % \begin{macrocode}
  4076. \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  4077. \refstepcounter{chapter}%
  4078. \if@mainmatter
  4079. \typeout{\@chapapp\space\thechapter.}%
  4080. \addcontentsline{toc}{\@chaptoclabel}%
  4081. {\protect\numberline{\thechapter}#1}%
  4082. \else
  4083. \addcontentsline{toc}{\@chaptoclabel}{#1}%
  4084. \fi
  4085. \else
  4086. \addcontentsline{toc}{\@chaptoclabel}{#1}%
  4087. \fi
  4088. \chaptermark{#1}%
  4089. \addtocontents{lof}{\protect\addvspace{10\p@}}%
  4090. \addtocontents{lot}{\protect\addvspace{10\p@}}%
  4091. \if@twocolumn
  4092. \@topnewpage[\@makechapterhead{#2}]%
  4093. \else
  4094. \@makechapterhead{#2}%
  4095. \@afterheading
  4096. \fi}
  4097. % \end{macrocode}
  4098. %\end{macro}
  4099. %\begin{macro}{\chaptertitleformat}
  4100. % Formats the chapter title
  4101. % \begin{macrocode}
  4102. \newcommand{\chaptertitleformat}[1]{%
  4103. \Huge\bfseries#1%
  4104. }
  4105. % \end{macrocode}
  4106. %\end{macro}
  4107. %\begin{macro}{\chapternumberformat}
  4108. % Formats the chapter number
  4109. % \begin{macrocode}
  4110. \newcommand{\chapternumberformat}[1]{%
  4111. \huge\bfseries \@chapapp\space#1\par\nobreak
  4112. \vskip 20\p@
  4113. }
  4114. % \end{macrocode}
  4115. %\end{macro}
  4116. %\begin{macro}{\chapterformat}
  4117. % Overall format for chapter headings
  4118. % \begin{macrocode}
  4119. \newcommand*{\chapterformat}{\raggedright}
  4120. % \end{macrocode}
  4121. %\end{macro}
  4122. %\begin{macro}{\postchapterskip}
  4123. % Vertical gap after chapter heading
  4124. % \begin{macrocode}
  4125. \newlength\postchapterskip
  4126. \setlength\postchapterskip{40pt}
  4127. % \end{macrocode}
  4128. %\end{macro}
  4129. %\begin{macro}{\prechapterskip}
  4130. % Vertical gap before chapter heading
  4131. % \begin{macrocode}
  4132. \newlength\prechapterskip
  4133. \setlength\prechapterskip{50pt}
  4134. % \end{macrocode}
  4135. %\end{macro}
  4136. %\begin{macro}{\@makechapterhead}
  4137. % Chapter heading for numbered chapters
  4138. % \begin{macrocode}
  4139. \def\@makechapterhead#1{%
  4140. \null\vskip\prechapterskip
  4141. {\parindent \z@ \normalfont\chapterformat
  4142. \ifnum \c@secnumdepth >\m@ne
  4143. \if@mainmatter
  4144. \chapternumberformat{\thechapter}%
  4145. \fi
  4146. \fi
  4147. \interlinepenalty\@M
  4148. \chaptertitleformat{#1}\par\nobreak
  4149. \vskip \postchapterskip
  4150. }}
  4151. % \end{macrocode}
  4152. %\end{macro}
  4153. %\begin{macro}{\@schapter}
  4154. % Unnumbered chapters.
  4155. % \begin{macrocode}
  4156. \def\@schapter#1{\if@twocolumn
  4157. \@topnewpage[\@makeschapterhead{#1}]%
  4158. \else
  4159. \@makeschapterhead{#1}%
  4160. \@afterheading
  4161. \fi}
  4162. % \end{macrocode}
  4163. %\end{macro}
  4164. %\begin{macro}{\@makeschapterhead}
  4165. % Layout for unnumbered chapter headings
  4166. % \begin{macrocode}
  4167. \def\@makeschapterhead#1{%
  4168. \vspace*{\prechapterskip}%
  4169. {\parindent \z@
  4170. \normalfont\chapterformat
  4171. \interlinepenalty\@M
  4172. \chaptertitleformat{#1}\par\nobreak
  4173. \vskip \postchapterskip
  4174. }}
  4175. % \end{macrocode}
  4176. %\end{macro}
  4177. %\begin{macro}{\l@chapter}
  4178. % Format for chapter entry in toc
  4179. % \begin{macrocode}
  4180. \newcommand*\l@chapter[2]{%
  4181. \ifnum \c@tocdepth >\m@ne
  4182. \addpenalty{-\@highpenalty}%
  4183. \vskip 1.0em \@plus\p@
  4184. \setlength\@tempdima{1.5em}%
  4185. \begingroup
  4186. \parindent \z@ \rightskip \@pnumwidth
  4187. \parfillskip -\@pnumwidth
  4188. \leavevmode \large\bfseries
  4189. \advance\leftskip\@tempdima
  4190. \hskip -\leftskip
  4191. #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
  4192. \penalty\@highpenalty
  4193. \endgroup
  4194. \fi}
  4195. % \end{macrocode}
  4196. %\end{macro}
  4197. %\begin{macro}{\l@appendix}
  4198. % Make appendix entries in the toc the same as that for chapters
  4199. % by default
  4200. % \begin{macrocode}
  4201. \let\l@appendix\l@chapter
  4202. % \end{macrocode}
  4203. %\end{macro}
  4204. %\begin{macro}{\chaptername}
  4205. % \begin{macrocode}
  4206. \newcommand\chaptername{Chapter}
  4207. % \end{macrocode}
  4208. %\end{macro}
  4209. %\begin{macro}{\frontmatter}
  4210. % Start the front matter (in book)
  4211. % \begin{macrocode}
  4212. \newcommand\frontmatter{%
  4213. \cleardoublepage
  4214. \@mainmatterfalse
  4215. \renewcommand*{\theHchapter}{front-\thechapter}%
  4216. \pagenumbering{roman}%
  4217. \morefrontmatter
  4218. }
  4219. \newcommand\morefrontmatter{}
  4220. % \end{macrocode}
  4221. %\end{macro}
  4222. %\begin{macro}{\mainmatter}
  4223. % Start the main matter (in book)
  4224. % \begin{macrocode}
  4225. \newcommand\mainmatter{%
  4226. \cleardoublepage
  4227. \@mainmattertrue
  4228. \setcounter{chapter}{0}%
  4229. \renewcommand*{\theHchapter}{\thechapter}%
  4230. \pagenumbering{arabic}%
  4231. \moremainmatter
  4232. }
  4233. \newcommand\moremainmatter{}
  4234. % \end{macrocode}
  4235. %\end{macro}
  4236. %\begin{macro}{\backmatter}
  4237. % Start the back matter (in book)
  4238. % \begin{macrocode}
  4239. \newcommand\backmatter{%
  4240. \if@openright
  4241. \cleardoublepage
  4242. \else
  4243. \clearpage
  4244. \fi
  4245. \@mainmatterfalse}
  4246. % \end{macrocode}
  4247. %\end{macro}
  4248. %
  4249. %\begin{macro}{\booktocpreamble}
  4250. %\changes{1.09}{2010/12/01}{new}
  4251. % \begin{macrocode}
  4252. \newcommand*{\booktocpreamble}{}
  4253. % \end{macrocode}
  4254. %\end{macro}
  4255. %
  4256. %\begin{macro}{\booktocpostamble}
  4257. %\changes{1.14}{2012-04-24}{new}
  4258. % \begin{macrocode}
  4259. \newcommand*{\booktocpostamble}{}
  4260. % \end{macrocode}
  4261. %\end{macro}
  4262. %
  4263. %\begin{macro}{\booktableofcontents}
  4264. % This is for the main table of contents when using
  4265. % the combine class file, and is not for use in individual
  4266. % articles.
  4267. %\changes{1.14}{2012-04-24}{reset page headers at end of toc}
  4268. % \begin{macrocode}
  4269. \newcommand\booktableofcontents{%
  4270. \if@twocolumn
  4271. \@restonecoltrue\onecolumn
  4272. \else
  4273. \@restonecolfalse
  4274. \fi
  4275. \chapter*{\contentsname
  4276. \@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
  4277. \booktocpreamble
  4278. \@starttoc{toc}%
  4279. \booktocpostamble
  4280. \if@restonecol
  4281. \twocolumn
  4282. \else
  4283. \clearpage
  4284. \fi
  4285. \@mkboth{}{}%
  4286. }
  4287. % \end{macrocode}
  4288. %\end{macro}
  4289. %\begin{macro}{\arttableofcontents}
  4290. % Table of contents for individual articles.
  4291. % \begin{macrocode}
  4292. \let\arttableofcontents\tableofcontents
  4293. % \end{macrocode}
  4294. %\end{macro}
  4295. %\begin{macro}{\artpart}
  4296. % A part in an article
  4297. % \begin{macrocode}
  4298. \newcommand{\artpart}{%
  4299. % \end{macrocode}
  4300. %\changes{1.10}{2011-01-05}{set \cs{toclevel@part}}
  4301. % \begin{macrocode}
  4302. \def\toclevel@part{0}%
  4303. \if@noskipsec \leavevmode\fi
  4304. \par
  4305. \addvspace{4ex}%
  4306. \@afterindentfalse
  4307. \secdef\@artpart\@sartpart
  4308. }
  4309. \let\@artpart\@part
  4310. \let\@sartpart\@spart
  4311. % \end{macrocode}
  4312. %\end{macro}
  4313. %\begin{macro}{\bookpart}
  4314. % A part in a book forming a collection of articles
  4315. % \begin{macrocode}
  4316. \newcommand\bookpart{%
  4317. % \end{macrocode}
  4318. %\changes{1.10}{2011-01-05}{set \cs{toclevel@part}}
  4319. % \begin{macrocode}
  4320. \def\toclevel@part{-1}%
  4321. \if@openright
  4322. \cleardoublepage
  4323. \else
  4324. \clearpage
  4325. \fi
  4326. \thispagestyle{plain}%
  4327. \if@twocolumn
  4328. \onecolumn
  4329. \@tempswatrue
  4330. \else
  4331. \@tempswafalse
  4332. \fi
  4333. \preparthook
  4334. \secdef\@bookpart\@sbookpart}
  4335. % \end{macrocode}
  4336. %\end{macro}
  4337. %\begin{macro}{\parttitleformat}
  4338. % Format of the title for a part (in a book)
  4339. % \begin{macrocode}
  4340. \newcommand{\parttitleformat}[1]{%
  4341. \Huge\bfseries#1%
  4342. }
  4343. % \end{macrocode}
  4344. %\end{macro}
  4345. %
  4346. % Part labels
  4347. % \begin{macrocode}
  4348. \newcommand*{\@parttoclabel}{part}
  4349. % \end{macrocode}
  4350. %
  4351. %\begin{macro}{\@partapp}
  4352. %\changes{1.09}{2010/12/01}{new}
  4353. % \begin{macrocode}
  4354. \def\@partapp{\partname}
  4355. % \end{macrocode}
  4356. %\end{macro}
  4357. %
  4358. %\begin{macro}{\partnumberformat}
  4359. % Format of the part number (in a book)
  4360. % \begin{macrocode}
  4361. \newcommand{\partnumberformat}[1]{%
  4362. \Huge\bfseries \@partapp\nobreakspace#1\par\nobreak
  4363. \vskip 20\p@
  4364. }
  4365. % \end{macrocode}
  4366. %\end{macro}
  4367. %\begin{macro}{\preparthook}
  4368. % Hook at the start of a part (in a book)
  4369. % \begin{macrocode}
  4370. \newcommand{\preparthook}{\null\vfil}
  4371. % \end{macrocode}
  4372. %\end{macro}
  4373. %\begin{macro}{\partformat}
  4374. % Overall format of part
  4375. % \begin{macrocode}
  4376. \newcommand*{\partformat}{\centering}
  4377. % \end{macrocode}
  4378. %\end{macro}
  4379. %
  4380. %\begin{macro}{\@bookpart}
  4381. % Numbered book part format
  4382. % \begin{macrocode}
  4383. \def\@bookpart[#1]#2{%
  4384. \ifnum \c@secnumdepth >-2\relax
  4385. \refstepcounter{part}%
  4386. \addcontentsline{toc}{\@parttoclabel}{\protect\numberline{\thepart}#1}%
  4387. \else
  4388. \addcontentsline{toc}{\@parttoclabel}{#1}%
  4389. \fi
  4390. \markboth{}{}%
  4391. {\interlinepenalty \@M
  4392. \normalfont\partformat
  4393. \ifnum \c@secnumdepth >-2\relax
  4394. \partnumberformat{\thepart}%
  4395. \fi
  4396. \parttitleformat{#2}\par}%
  4397. \postparthook}
  4398. % \end{macrocode}
  4399. %\end{macro}
  4400. %\begin{macro}{\@sbookpart}
  4401. % Unnumbered book part format
  4402. % \begin{macrocode}
  4403. \def\@sbookpart#1{%
  4404. {\interlinepenalty \@M
  4405. \normalfont\partformat
  4406. \parttitleformat{#1}\par}%
  4407. \postparthook}
  4408. % \end{macrocode}
  4409. %\end{macro}
  4410. %\begin{macro}{\postparthook}
  4411. % Hook after part heading
  4412. % \begin{macrocode}
  4413. \def\postparthook{\vfil\newpage
  4414. \if@twoside
  4415. \if@openright
  4416. \null
  4417. \thispagestyle{empty}%
  4418. \newpage
  4419. \fi
  4420. \fi
  4421. \if@tempswa
  4422. \twocolumn
  4423. \fi}
  4424. % \end{macrocode}
  4425. %\end{macro}
  4426. %\begin{macro}{\bookappendix}
  4427. % Switch to appendices in book
  4428. %\changes{1.17}{2012/05/30}{added def \cs{@write@jmlr@import}}
  4429. % \begin{macrocode}
  4430. \newcommand\bookappendix{\par
  4431. \setcounter{table}{0}%
  4432. \setcounter{figure}{0}%
  4433. \zeroextracounters
  4434. \par
  4435. \gdef\theHchapter{\Alph {chapter}}%
  4436. \xdef\Hy@chapapp{\Hy@appendixstring}%
  4437. \setcounter{chapter}{0}%
  4438. \setcounter{section}{0}%
  4439. \gdef\@chapapp{\appendixname}%
  4440. \gdef\thechapter{\@Alph\c@chapter}%
  4441. \def\@write@jmlr@import{\@@write@jmlr@apdimport}%
  4442. \csname appendixmore\endcsname
  4443. }
  4444. % \end{macrocode}
  4445. %\end{macro}
  4446. % Define commands to switch between book/article modes
  4447. %\begin{macro}{\jmlrbookcommands}
  4448. % Switch to book commands
  4449. % \begin{macrocode}
  4450. \newcommand*{\jmlrbookcommands}{%
  4451. \let\part\bookpart
  4452. \let\chapter\bookchapter
  4453. \let\appendix\bookappendix
  4454. \let\tableofcontents\booktableofcontents
  4455. \def\thesection{\thechapter.\arabic{section}}%
  4456. }
  4457. % \end{macrocode}
  4458. %\end{macro}
  4459. %\begin{macro}{\jmlarticlecommands}
  4460. % Switch to article commands
  4461. % \begin{macrocode}
  4462. \newcommand*{\jmlrarticlecommands}{%
  4463. \let\part\artpart
  4464. \let\chapter\artchapter
  4465. \let\appendix\artappendix
  4466. \let\tableofcontents\arttableofcontents
  4467. \def\thesection{\arabic{section}}%
  4468. }
  4469. % \end{macrocode}
  4470. %\end{macro}
  4471. % Check for packages that are known to cause problems when
  4472. % combining articles into a book.
  4473. %\begin{macro}{\@jmlr@check@packages}
  4474. % \begin{macrocode}
  4475. \newcommand*{\@jmlr@check@packages}{%
  4476. \@ifpackageloaded{epsfig}{%
  4477. \ClassError{jmlr}{Obsolete package `epsfig' detected.
  4478. \MessageBreak
  4479. Please use \string\includegraphics\space to include images
  4480. instead}{}}{}%
  4481. \@ifpackageloaded{psfig}{%
  4482. \ClassError{jmlr}{Obsolete package `psfig' detected.
  4483. \MessageBreak
  4484. Please use \string\includegraphics\space to include images
  4485. instead}{}}{}%
  4486. \@ifpackageloaded{subfig}{%
  4487. \ClassError{jmlr}{Package `subfig' detected.\MessageBreak
  4488. This will cause a conflict if the article is incorporated
  4489. \MessageBreak
  4490. into a book using jmlbook.cls.
  4491. \MessageBreak
  4492. Please use \string\subfigure\space and
  4493. \string\subtable\space instead}{}}{}%
  4494. \@ifpackageloaded{theorem}{%
  4495. \ClassError{jmlr}{Package `theorem' detected.\MessageBreak
  4496. This can cause a conflict with other packages used by jmlr}{}}{}%
  4497. \@ifpackageloaded{ntheorem}{%
  4498. \ClassError{jmlr}{Package `ntheorem' detected.\MessageBreak
  4499. This can cause a conflict with other packages used by jmlr}{}}{}%
  4500. \@ifpackageloaded{amsthm}{%
  4501. \ClassError{jmlr}{Package `amsthm' detected.\MessageBreak
  4502. This package conflicts with the jmlr class}{}}{}%
  4503. \@ifpackageloaded{pdfpages}{Package `pdfpages' detected.\MessageBreak
  4504. This can cause a problem for jmlrbook}{}%
  4505. \@ifpackageloaded{geometry}{Package `geometry' detected.\MessageBreak
  4506. This can cause a problem for jmlrbook}{}%
  4507. \@ifpackageloaded{tabularx}{%
  4508. \ClassError{jmlr}{Package `tabularx' detected.\MessageBreak
  4509. This will break footnote links}{}}{}%
  4510. % \end{macrocode}
  4511. %\changes{1.21}{2015-02-24}{Added check for jmlr2e package}
  4512. % \begin{macrocode}
  4513. \@ifpackageloaded{jmlr2e}{%
  4514. \ClassError{jmlr}{Package `jmlr2e' detected.\MessageBreak
  4515. This can't be used with the jmlr class}{}}{}%
  4516. }
  4517. \AtBeginDocument{%
  4518. \@jmlr@check@packages
  4519. \let\@jmlr@check@packages\relax
  4520. }
  4521. % \end{macrocode}
  4522. %\end{macro}
  4523. %\begin{macro}{\jmlrSuppressPackageChecks}
  4524. % Don't check for potentially problematic packages.
  4525. % (If I find this in any paper sent to me for inclusion in a book,
  4526. % it will annoy me.)
  4527. % \begin{macrocode}
  4528. \newcommand*{\jmlrSuppressPackageChecks}{%
  4529. \let\@jmlr@check@packages\relax
  4530. }
  4531. % \end{macrocode}
  4532. %\end{macro}
  4533. % Discourage authors from using obsolete commands:
  4534. %\begin{macro}{\obsoletefontcs}
  4535. % \begin{macrocode}
  4536. \DeclareRobustCommand*{\obsoletefontcs}[1]{%
  4537. \ClassWarning{jmlr}{Obsolete command
  4538. \expandafter\string\csname#1\endcsname\space detected}%
  4539. \csname #1 \endcsname
  4540. }
  4541. % \end{macrocode}
  4542. %\end{macro}
  4543. %\begin{macro}{\bf}
  4544. %\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning}
  4545. % \begin{macrocode}
  4546. \renewcommand*{\bf}{%
  4547. \obsoletefontcs{bf}%
  4548. }
  4549. % \end{macrocode}
  4550. %\end{macro}
  4551. %\begin{macro}{\it}
  4552. %\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning}
  4553. % \begin{macrocode}
  4554. \renewcommand*{\it}{%
  4555. \obsoletefontcs{it}%
  4556. }
  4557. % \end{macrocode}
  4558. %\end{macro}
  4559. %\begin{macro}{\sc}
  4560. %\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning}
  4561. % \begin{macrocode}
  4562. \renewcommand*{\sc}{%
  4563. \obsoletefontcs{sc}%
  4564. }
  4565. % \end{macrocode}
  4566. %\end{macro}
  4567. %\begin{macro}{\rm}
  4568. %\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning}
  4569. % \begin{macrocode}
  4570. \renewcommand*{\rm}{%
  4571. \obsoletefontcs{rm}%
  4572. }
  4573. % \end{macrocode}
  4574. %\end{macro}
  4575. %\begin{macro}{\sf}
  4576. %\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning}
  4577. % \begin{macrocode}
  4578. \renewcommand*{\sf}{%
  4579. \obsoletefontcs{sf}%
  4580. }
  4581. % \end{macrocode}
  4582. %\end{macro}
  4583. %\begin{macro}{\tt}
  4584. %\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning}
  4585. % \begin{macrocode}
  4586. \renewcommand*{\tt}{%
  4587. \obsoletefontcs{tt}%
  4588. }
  4589. % \end{macrocode}
  4590. %\end{macro}
  4591. %
  4592. %\begin{macro}{\jmlrcheckforpseudocode}
  4593. %\changes{1.21}{2015-02-24}{Added check for pseudocode package}
  4594. % Check for \sty{pseudocode} package since it conflicts with
  4595. % the \sty{algorithm} package and quite often both packages
  4596. % are used in the same book or proceedings.
  4597. % \begin{macrocode}
  4598. \providecommand*{\jmlrcheckforpseudocode}{%
  4599. \@ifpackageloaded{pseudocode}%
  4600. {%
  4601. \let\pseudoRETURN\RETURN
  4602. \let\pseudoTRUE\TRUE
  4603. \let\pseudoFALSE\FALSE
  4604. \let\pseudoAND\AND
  4605. \let\pseudoOR\OR
  4606. \let\pseudoNOT\NOT
  4607. \let\pseudoTO\TO
  4608. \let\pseudoCOMMENT\COMMENT
  4609. \let\pseudoIF\IF
  4610. \let\pseudoELSE\ELSE
  4611. \let\pseudoFOR\FOR
  4612. \let\pseudoFORALL\FORALL
  4613. \let\pseudoWHILE\WHILE
  4614. \let\pseudoREPEAT\REPEAT
  4615. \let\pseudoUNTIL\UNTIL
  4616. \let\pseudoENDFOR\ENDFOR
  4617. \let\RETURN\undefined
  4618. \let\TRUE\undefined
  4619. \let\FALSE\undefined
  4620. \let\AND\undefined
  4621. \let\OR\undefined
  4622. \let\NOT\undefined
  4623. \let\TO\undefined
  4624. \let\COMMENT\undefined
  4625. \let\IF\undefined
  4626. \let\ELSE\undefined
  4627. \let\FOR\undefined
  4628. \let\FORALL\undefined
  4629. \let\WHILE\undefined
  4630. \let\REPEAT\undefined
  4631. \let\UNTIL\undefined
  4632. \let\ENDFOR\undefined
  4633. \preto\pseudocode{%
  4634. \let\RETURN\pseudoRETURN
  4635. \let\TRUE\pseudoTRUE
  4636. \let\FALSE\pseudoFALSE
  4637. \let\AND\pseudoAND
  4638. \let\OR\pseudoOR
  4639. \let\NOT\pseudoNOT
  4640. \let\TO\pseudoTO
  4641. \let\COMMENT\pseudoCOMMENT
  4642. \let\IF\pseudoIF
  4643. \let\ELSE\pseudoELSE
  4644. \let\FOR\pseudoFOR
  4645. \let\FORALL\pseudoFORALL
  4646. \let\WHILE\pseudoWHILE
  4647. \let\REPEAT\pseudoREPEAT
  4648. \let\UNTIL\pseudoUNTIL
  4649. \let\ENDFOR\pseudoENDFOR
  4650. }%
  4651. }%
  4652. {}%
  4653. }
  4654. \jmlrcheckforpseudocode
  4655. % \end{macrocode}
  4656. %\end{macro}
  4657. %\iffalse
  4658. % \begin{macrocode}
  4659. %</jmlr.cls>
  4660. % \end{macrocode}
  4661. %\fi
  4662. %\iffalse
  4663. % \begin{macrocode}
  4664. %<*jmlrbook.cls>
  4665. % \end{macrocode}
  4666. %\fi
  4667. %\section{jmlrbook.cls Code}
  4668. % Class file for books composed of articles using the \clsfmt{jmlr} class.
  4669. % \begin{macrocode}
  4670. \NeedsTeXFormat{LaTeX2e}
  4671. % \end{macrocode}
  4672. % Declare class:
  4673. % \begin{macrocode}
  4674. \ProvidesClass{jmlrbook}[2017/08/01 v1.24 (NLCT) JMLR Book Style]
  4675. % \end{macrocode}
  4676. % Need \sty{xkeyval} package to have key=value class options
  4677. % \begin{macrocode}
  4678. \RequirePackage{xkeyval}
  4679. % \end{macrocode}
  4680. % Requires double spacing for the title page
  4681. % \begin{macrocode}
  4682. \RequirePackage{setspace}
  4683. % \end{macrocode}
  4684. %
  4685. % Path used to determine if the preface is in the main
  4686. % document or in a separate file.
  4687. %\begin{macro}{\jmlrprefacefile}
  4688. %\changes{1.20}{2014/10/15}{new}
  4689. % \begin{macrocode}
  4690. \newcommand*\jmlrprefacepath{}
  4691. % \end{macrocode}
  4692. %\end{macro}
  4693. % The \sty{fink} package is now deprecated, so only use it if
  4694. % \sty{currfile} isn't installed.
  4695. % \begin{macrocode}
  4696. \IfFileExists{currfile.sty}%
  4697. {
  4698. \RequirePackage{currfile}
  4699. \renewcommand*\jmlrprefacepath{\currfilepath}
  4700. }%
  4701. {%
  4702. % \end{macrocode}
  4703. %\changes{1.11}{2011-03-24}{fink package now required}
  4704. % \begin{macrocode}
  4705. \RequirePackage{fink}
  4706. \ifdef\finkpath
  4707. {%
  4708. \renewcommand*\jmlrprefacepath{\finkpath}%
  4709. }
  4710. {%
  4711. % \end{macrocode}
  4712. % \sty{fink} version too old.
  4713. % \begin{macrocode}
  4714. \ClassWarning{jmlrbook}{Install `currfile' package or update
  4715. `fink' package}
  4716. }
  4717. }
  4718. % \end{macrocode}
  4719. % Some packages need to be loaded before \sty{hyperref} so provide a
  4720. % hook to do this:
  4721. %\changes{1.12}{2012/01/05}{changed \cs{newcommand} to \cs{providecommand}}
  4722. % \begin{macrocode}
  4723. \providecommand*{\jmlrprehyperref}{}
  4724. % \end{macrocode}
  4725. %\begin{macro}{\ifgrayscale}
  4726. % Determine whether to select color or grayscale
  4727. % \begin{macrocode}
  4728. \newif\ifgrayscale
  4729. \grayscalefalse
  4730. % \end{macrocode}
  4731. %\end{macro}
  4732. %\begin{option}{draft}
  4733. %\changes{1.18}{2013-10-17}{new}
  4734. % \begin{macrocode}
  4735. \DeclareOptionX{draft}{\setlength\overfullrule{5pt}}
  4736. % \end{macrocode}
  4737. %\end{option}
  4738. %\begin{option}{final}
  4739. %\changes{1.18}{2013-10-17}{new}
  4740. % \begin{macrocode}
  4741. \DeclareOptionX{final}{\setlength\overfullrule{0pt}}
  4742. % \end{macrocode}
  4743. %\end{option}
  4744. %\begin{option}{color}
  4745. % \begin{macrocode}
  4746. \DeclareOptionX{color}{\grayscalefalse}
  4747. % \end{macrocode}
  4748. %\end{option}
  4749. %\begin{option}{gray}
  4750. % \begin{macrocode}
  4751. \DeclareOptionX{gray}{\grayscaletrue}
  4752. % \end{macrocode}
  4753. %\end{option}
  4754. % Pass \clsopt{letterpaper} and \clsopt{7x10} to \clsfmt{jmlr}.
  4755. %\begin{option}{letterpaper}
  4756. % \begin{macrocode}
  4757. \DeclareOptionX{letterpaper}{\PassOptionsToClass{\CurrentOption}{jmlr}}
  4758. % \end{macrocode}
  4759. %\end{option}
  4760. %\begin{option}{7x10}
  4761. % \begin{macrocode}
  4762. \DeclareOptionX{7x10}{\PassOptionsToClass{\CurrentOption}{jmlr}}
  4763. % \end{macrocode}
  4764. %\end{option}
  4765. % Pass \clsopt{html} and \clsopt{nohtml} to \clsfmt{jmlr}.
  4766. % (Used by \app{makejmlrbookgui})
  4767. %\begin{option}{html}
  4768. % \begin{macrocode}
  4769. \DeclareOptionX{html}{\PassOptionsToClass{\CurrentOption}{jmlr}}
  4770. % \end{macrocode}
  4771. %\end{option}
  4772. %\begin{option}{nohtml}
  4773. % \begin{macrocode}
  4774. \DeclareOptionX{nohtml}{\PassOptionsToClass{\CurrentOption}{jmlr}}
  4775. % \end{macrocode}
  4776. %\end{option}
  4777. %\begin{macro}{\jmlrprefaceheader}
  4778. %\changes{1.20}{2014/10/15}{new}
  4779. % \begin{macrocode}
  4780. \newcommand*{\jmlrprefaceheader}{%
  4781. \phantomsection
  4782. \chapter*{\prefacename}%
  4783. \addcontentsline{toc}{chapter}{\prefacename}%
  4784. \markboth{\prefacename}{\prefacename}%
  4785. }
  4786. % \end{macrocode}
  4787. %\end{macro}
  4788. % Pass \clsopt{wcp}, \clsopt{pmlr} and \clsopt{nowcp} options to \clsfmt{jmlr} and
  4789. % set preface header.
  4790. %\begin{option}{wcp}
  4791. %\changes{1.21}{2015-02-24}{No longer changes preface header}
  4792. % \begin{macrocode}
  4793. \DeclareOptionX{wcp}{%
  4794. \PassOptionsToClass{\CurrentOption}{jmlr}%
  4795. }
  4796. % \end{macrocode}
  4797. %\end{option}
  4798. %\begin{option}{pmlr}
  4799. %\changes{1.23}{2017-03-09}{new}
  4800. % \begin{macrocode}
  4801. \DeclareOptionX{pmlr}{%
  4802. \PassOptionsToClass{\CurrentOption}{jmlr}%
  4803. }
  4804. % \end{macrocode}
  4805. %\end{option}
  4806. %\begin{option}{nowcp}
  4807. %\changes{1.21}{2015-02-24}{No longer changes preface header}
  4808. % \begin{macrocode}
  4809. \DeclareOptionX{nowcp}{%
  4810. \PassOptionsToClass{\CurrentOption}{jmlr}%
  4811. }
  4812. % \end{macrocode}
  4813. %\end{option}
  4814. % Pass \clsopt{tablecaptiontop} and \clsopt{tablecaptionbottom} options
  4815. % to \clsfmt{jmlr}.
  4816. %\begin{option}{tablecaptiontop}
  4817. % \begin{macrocode}
  4818. \DeclareOptionX{tablecaptiontop}{\PassOptionsToClass{\CurrentOption}{jmlr}}
  4819. % \end{macrocode}
  4820. %\end{option}
  4821. %\begin{option}{tablecaptionbottom}
  4822. % \begin{macrocode}
  4823. \DeclareOptionX{tablecaptionbottom}{\PassOptionsToClass{\CurrentOption}{jmlr}}
  4824. % \end{macrocode}
  4825. %\end{option}
  4826. %
  4827. % Pass font size commands to \clsfmt{jmlr}
  4828. %\changes{1.10}{2011-01-05}{Added 10pt, 11pt and 12pt options to
  4829. %jmlrbook}
  4830. %\begin{option}{10pt}
  4831. % \begin{macrocode}
  4832. \DeclareOptionX{10pt}{\PassOptionsToClass{\CurrentOption}{jmlr}}
  4833. % \end{macrocode}
  4834. %\end{option}
  4835. %\begin{option}{11pt}
  4836. % \begin{macrocode}
  4837. \DeclareOptionX{11pt}{\PassOptionsToClass{\CurrentOption}{jmlr}}
  4838. % \end{macrocode}
  4839. %\end{option}
  4840. %\begin{option}{12pt}
  4841. % \begin{macrocode}
  4842. \DeclareOptionX{12pt}{\PassOptionsToClass{\CurrentOption}{jmlr}}
  4843. % \end{macrocode}
  4844. %\end{option}
  4845. %
  4846. % Switch on two-side mode by default
  4847. % \begin{macrocode}
  4848. \@twosidetrue
  4849. % \end{macrocode}
  4850. %\begin{option}{oneside}
  4851. %\changes{1.22}{2015/04/11}{new}
  4852. % \begin{macrocode}
  4853. \DeclareOptionX{oneside}{\@twosidefalse \@mparswitchfalse}
  4854. % \end{macrocode}
  4855. %\end{option}
  4856. %\begin{option}{twoside}
  4857. %\changes{1.22}{2015/04/11}{new}
  4858. % \begin{macrocode}
  4859. \DeclareOptionX{twoside}{\@twosidetrue \@mparswitchtrue}
  4860. % \end{macrocode}
  4861. %\end{option}
  4862. %
  4863. %\begin{option}{pdfxa}
  4864. %\changes{1.13}{2012/02/25}{new}
  4865. % \begin{macrocode}
  4866. \define@boolkey{jmlrbook.cls}[jmlr]{pdfxa}[true]{}
  4867. \jmlrpdfxafalse
  4868. % \end{macrocode}
  4869. %\end{option}
  4870. % Process options
  4871. % \begin{macrocode}
  4872. \ProcessOptionsX
  4873. % \end{macrocode}
  4874. % If \ics{jmlrgrayscale} has been defined, let it override the
  4875. % class options. If it is defined, it should be set to 0 for the
  4876. % online version and any other number for the grayscale print
  4877. % version.
  4878. % \begin{macrocode}
  4879. \@ifundefined{jmlrgrayscale}{}%
  4880. {%
  4881. \ifnum\jmlrgrayscale=0\relax
  4882. \grayscalefalse
  4883. \else
  4884. \grayscaletrue
  4885. \fi
  4886. }
  4887. % \end{macrocode}
  4888. %
  4889. % This next bit is a modification of \sty{pdfx}. It's only used for
  4890. % the print version when the \clsopt{pdfxa} option is used.
  4891. %\changes{1.13}{2012/02/25}{added support for pdfx-1a}
  4892. % \begin{macrocode}
  4893. \ifgrayscale
  4894. \newcommand*{\jmlrwritepdfinfo}{%
  4895. \protected@write\@auxout{}{\string\jmlrbook@info{\xmpAuthor}{\xmpTitle}}%
  4896. }
  4897. \ifjmlrpdfxa
  4898. \def\convertDate{\getYear}
  4899. {\catcode`\D=12
  4900. \gdef\getYear D:#1#2#3#4{\edef\xYear{#1#2#3#4}\getMonth}
  4901. }
  4902. \def\getMonth#1#2{\edef\xMonth{#1#2}\getDay}
  4903. \def\getDay#1#2{\edef\xDay{#1#2}\getHour}
  4904. \def\getHour#1#2{\edef\xHour{#1#2}\getMin}
  4905. \def\getMin#1#2{\edef\xMin{#1#2}\getSec}
  4906. \def\getSec#1#2{\edef\xSec{#1#2}\getTZh}
  4907. {%
  4908. \catcode`\Z=12
  4909. \gdef\tmpz{Z}
  4910. }
  4911. \def\hash{\expandafter\@gobble\string\#}%
  4912. \def\amp{\expandafter\@gobble\string\&}%
  4913. \def\xmpAmp{\amp\hash x0026;}%
  4914. \def\sep{</rdf:li><rdf:li>}
  4915. \def\TextCopyright{\amp\hash x00A9;}
  4916. \def\Title#1{\gdef\xmpTitle{#1}}
  4917. \def\Author#1{\gdef\xmpAuthor{#1}}
  4918. \def\Keywords#1{\gdef\xmpKeywords{#1}}
  4919. \let\xmpKeywords\@empty
  4920. \let\xmpSubject\xmpKeywords
  4921. \def\Creator#1{\gdef\xmpCreator{#1}}
  4922. \def\xmpCreator{\@pdfcreator}
  4923. \def\Producer#1{\gdef\xmpProducer{#1}}
  4924. \def\xmpProducer{pdfTeX}
  4925. \def\Volume#1{\gdef\xmpVolume{#1}}
  4926. \let\xmpVolume\@empty
  4927. \def\Issue#1{\gdef\xmpIssue{#1}}
  4928. \let\xmpIssue\@empty
  4929. \def\CoverDisplayDate#1{\gdef\xmpCoverDisplayDate{#1}}
  4930. \let\xmpCoverDisplayDate\@empty
  4931. \def\CoverDate#1{\gdef\xmpCoverDate{#1}}
  4932. \let\xmpCoverDate\@empty
  4933. \def\Copyright#1{\gdef\xmpCopyright{#1}}
  4934. \let\xmpCopyright\@empty
  4935. \def\Doi#1{\gdef\xmpDoi{#1}}
  4936. \let\xmpDoi\@empty
  4937. \def\Lastpage#1{\gdef\xmpLastpage{#1}}
  4938. \let\xmpLastpage\@empty
  4939. \def\Firstpage#1{\gdef\xmpFirstpage{#1}}
  4940. \let\xmpFirstpage\@empty
  4941. \def\Journaltitle#1{\gdef\xmpJournaltitle{#1}}
  4942. \let\xmpJournaltitle\@empty
  4943. \def\Journalnumber#1{\gdef\xmpJournalnumber{#1}}
  4944. \let\xmpJournalnumber\@empty
  4945. \def\Org#1{\gdef\xmpOrg{#1}}
  4946. \let\xmpOrg\@empty
  4947. \def\CreatorTool#1{\gdef\xmpCreatorTool{#1}}
  4948. \def\xmpCreatorTool{\xmpProducer}
  4949. \def\AuthoritativeDomain#1{\gdef\xmpAuthoritativeDomain{#1}}
  4950. \let\xmpAuthoritativeDomain\@empty
  4951. \def\findUUID#1{\edef\tmpstring{\pdfmdfivesum{#1}}
  4952. \expandafter\eightofnine\tmpstring\end}
  4953. \def\eightofnine#1#2#3#4#5#6#7#8#9\end{%
  4954. \xdef\eightchars{#1#2#3#4#5#6#7#8}
  4955. \fouroffive#9\end}
  4956. \def\fouroffive#1#2#3#4#5\end{\xdef\ffourchars{#1#2#3#4}
  4957. \sfouroffive#5\end}
  4958. \def\sfouroffive#1#2#3#4#5\end{\xdef\sfourchars{#1#2#3#4}
  4959. \tfouroffive#5\end}
  4960. \def\tfouroffive#1#2#3#4#5\end{\xdef\tfourchars{#1#2#3#4}
  4961. \xdef\laststring{#5}}
  4962. \def\uuid{\eightchars-%
  4963. \ffourchars-%
  4964. \sfourchars-%
  4965. \tfourchars-%
  4966. \laststring}
  4967. % \end{macrocode}
  4968. %
  4969. %\begin{macro}{\getTZh}
  4970. %\changes{1.14}{2012-04-24}{fixed for times zones other than Z}
  4971. % This is a modification of the command from \sty{pdfx} that also
  4972. % works for zero and negative hours.
  4973. % \begin{macrocode}
  4974. \def\getTZh#1{%
  4975. \def\TZprefix{#1}%
  4976. \ifx\TZprefix\tmpz
  4977. \def\xTZsign{+}%
  4978. \def\xTZh{00}%
  4979. \def\xTZm{00}%
  4980. \let\getTZnext\doConvDate
  4981. \else
  4982. \let\xTZsign\TZprefix
  4983. \let\getTZnext\getTZhm
  4984. \fi
  4985. \getTZnext
  4986. }
  4987. % \end{macrocode}
  4988. %\end{macro}
  4989. %
  4990. %\begin{macro}{\getTZm}
  4991. % This is a modified version of the command from \sty{pdfx}.
  4992. % \begin{macrocode}
  4993. \def\getTZhm#1#2'#3#4'{%
  4994. \edef\xTZh{#1#2}%
  4995. \edef\xTZm{#3#4}%
  4996. \doConvDate
  4997. }
  4998. % \end{macrocode}
  4999. %\end{macro}
  5000. %\begin{macro}{\doConvDate}
  5001. % Defines the date using information derived from parsing
  5002. % \ics{pdfcreationdate}
  5003. % \begin{macrocode}
  5004. \def\doConvDate{%
  5005. \edef\convDate{\xYear-\xMonth-\xDay
  5006. T\xHour:\xMin:\xSec\xTZsign\xTZh:\xTZm}%
  5007. }
  5008. % \end{macrocode}
  5009. %\end{macro}
  5010. %\begin{macro}{\@pre@hyperref}
  5011. % This macro contains a trimmed down version of \sty{pdfx}.
  5012. % \begin{macrocode}
  5013. \newcommand{\@pre@hyperref}{%
  5014. \IfFileExists{FOGRA39L.icc}%
  5015. {%
  5016. \pdfminorversion=3
  5017. \pdfpageattr{/MediaBox[0 0 595 793]
  5018. /BleedBox[0 0 595 793]
  5019. /TrimBox[25 20 570 773]}%
  5020. \findUUID{\jobname.pdf}%
  5021. \edef\xmpdocid{\uuid}%
  5022. \findUUID{\pdfcreationdate}%
  5023. \edef\xmpinstid{\uuid}%
  5024. \InputIfFileExists{\jobname.xmpdata}{}{}%
  5025. \RequirePackage{xmpincl}%
  5026. \expandafter\convertDate\pdfcreationdate
  5027. \def\@pctchar{\expandafter\@gobble\string\%}
  5028. \def\@bchar{\expandafter\@gobble\string\\}
  5029. \immediate\pdfobj stream attr{/N 4} file{FOGRA39L.icc}
  5030. \edef\OBJ@CVR{\the\pdflastobj}
  5031. \pdfcatalog{/OutputIntents [ <<
  5032. /Type/OutputIntent
  5033. /S/GTS_PDFX
  5034. /OutputCondition (FOGRA39)
  5035. /OutputConditionIdentifier (FOGRA39 \@bchar(ISO Coated v2
  5036. 300\@pctchar\space \@bchar(ECI\@bchar)\@bchar))
  5037. /DestOutputProfile \OBJ@CVR\space 0 R
  5038. /RegistryName(http://www.color.org)
  5039. >> ]}
  5040. \input glyphtounicode.tex
  5041. \input glyphtounicode-cmr.tex
  5042. \pdfgentounicode=1
  5043. \RequirePackage[draft,pdftex,pdfpagemode=UseNone,bookmarks=false]{hyperref}%
  5044. }%
  5045. {%
  5046. \ClassError{jmlrbook}{Can't find `FOGRA39L.icc'}%
  5047. {Download ISOcoated\string_v2\string_330\string_bas.icc from
  5048. http://www.colormanagement.org/en/isoprofile.html
  5049. Rename it FOGRA39L.icc and put it in the pdfx folder}%
  5050. }%
  5051. }
  5052. \renewcommand*{\jmlrwritepdfinfo}{%
  5053. \begingroup
  5054. \let\&=\xmpAmp
  5055. \IfFileExists{pdfx-1a.xmp}{%
  5056. \pdfcompresslevel=0
  5057. \immediate\pdfobj stream attr {/Type /Metadata /Subtype /XML}
  5058. file{pdfx-1a.xmpi}
  5059. \pdfcatalog{/Metadata \the\pdflastobj\space 0 R}
  5060. }%
  5061. {}%
  5062. \endgroup
  5063. \protected@write\@auxout{}{\string\jmlrbook@info{\xmpAuthor}{\xmpTitle}}%
  5064. \pdfinfo{
  5065. /Author(\xmpAuthor)%
  5066. /Title(\xmpTitle)%
  5067. /Creator(\xmpProducer)%
  5068. /CreationDate(\convDate)%
  5069. /ModDate(\convDate)%
  5070. /Producer(\xmpProducer)%
  5071. /Trapped /False
  5072. /GTS_PDFXVersion (PDF/X-1:2001)%
  5073. /GTS_PDFXConformance (PDF/X-1a:2001)%
  5074. }%
  5075. }
  5076. % \end{macrocode}
  5077. %\end{macro}
  5078. % \begin{macrocode}
  5079. \fi
  5080. \else
  5081. \newcommand*{\jmlrwritepdfinfo}{}
  5082. \fi
  5083. % \end{macrocode}
  5084. %
  5085. %\begin{macro}{\jmlrbook@info}
  5086. %\changes{1.14}{2012-04-24}{new}
  5087. % Not needed (information provided for MakeJmlrBookGUI)
  5088. % \begin{macrocode}
  5089. \newcommand*{\jmlrbook@info}[2]{}
  5090. % \end{macrocode}
  5091. %\end{macro}
  5092. %\begin{macro}{\jmlrbook@location}
  5093. %\changes{1.20}{2014/10/15}{new}
  5094. % Not needed (information provided for MakeJmlrBookGUI)
  5095. % \begin{macrocode}
  5096. \newcommand*{\jmlrbook@location}[1]{}
  5097. % \end{macrocode}
  5098. %\end{macro}
  5099. %\begin{macro}{\@post@hyperref}
  5100. %\changes{1.16}{2012/05/15}{new}
  5101. % \begin{macrocode}
  5102. \newcommand*{\@post@hyperref}{%
  5103. \let\@org@c@lenddoca\c@lenddoca
  5104. \let\c@lenddoca\undefined
  5105. }
  5106. % \end{macrocode}
  5107. %\end{macro}
  5108. %
  5109. % Load \cls{combine} class. This requires a little bit of trickery.
  5110. % \begin{macrocode}
  5111. \let\@org@LoadClass\LoadClass
  5112. \def\LoadClass#1{\let\LoadClass\@org@LoadClass\@org@LoadClass{jmlr}}
  5113. \@org@LoadClass{combine}
  5114. \let\c@lenddoca\@org@c@lenddoca
  5115. % \end{macrocode}
  5116. % Requires \sty{combnat} to work with \sty{natbib}:
  5117. % \begin{macrocode}
  5118. \RequirePackage{combnat}
  5119. % \end{macrocode}
  5120. % Need to apply a patch to \sty{combnat} (this has now been fixed
  5121. % in \sty{combnat}, but user might be using an old version):
  5122. % \begin{macrocode}
  5123. \renewcommand\c@laNAT@parse[1]{{%
  5124. \let\protect=\@unexpandable@protect\let~\relax
  5125. \let\active@prefix=\@gobble
  5126. \xdef\NAT@temp{\csname b@#1\@extra@b@citeb\endcsname}}%
  5127. \expandafter\NAT@split\NAT@temp?????@@%
  5128. \expandafter\NAT@parse@date\NAT@date??????@@%
  5129. \ifciteindex\NAT@index\fi}
  5130. \renewcommand\c@lbNAT@parse[1]{{%
  5131. \let\protect=\@unexpandable@protect\let~\relax
  5132. \let\active@prefix=\@gobble
  5133. \xdef\NAT@temp{\csname B?\jobname?@#1\@extra@b@citeb\endcsname}}%
  5134. \expandafter\NAT@split\NAT@temp?????@@%
  5135. \expandafter\NAT@parse@date\NAT@date??????@@%
  5136. \ifciteindex\NAT@index\fi}
  5137. % \end{macrocode}
  5138. % Start new chapters on the right hand page:
  5139. % \begin{macrocode}
  5140. \newif\if@openright
  5141. \@openrighttrue
  5142. \newif\if@mainmatter
  5143. % \end{macrocode}
  5144. % Define commands that affect the formatting:
  5145. %\begin{macro}{\pagerule}
  5146. % Draw line across the text block.
  5147. % \begin{macrocode}
  5148. \newcommand*{\pagerule}[1][0pt]{\par\noindent
  5149. \rule[#1]{\linewidth}{2pt}\par}
  5150. % \end{macrocode}
  5151. %\end{macro}
  5152. %
  5153. %\begin{environment}{preface}
  5154. % The preface environment starts a new chapter but also writes
  5155. % information to the main aux file for \app{makejmlrbook}. The
  5156. % optional argument is the file name for the extracted preface.
  5157. %\changes{1.11}{2011-03-24}{new}
  5158. %\changes{1.13}{2012/02/25}{changed the chapter to an unnumbered one}
  5159. % \begin{macrocode}
  5160. \ifjmlrhtml
  5161. \newenvironment{preface}[1][preface]%
  5162. {%
  5163. \noindent\HCode{<h2>\prefacename</h2>}%
  5164. }%
  5165. {%
  5166. }
  5167. \else
  5168. \newenvironment{preface}[1][preface]%
  5169. {%
  5170. % \end{macrocode}
  5171. %\changes{1.19}{2014/09/29}{changed to unstarred chapter}
  5172. % \begin{macrocode}
  5173. \jmlrprefaceheader
  5174. \protected@write\@mainauxout
  5175. {}{\string\@prefacestart{\thepage}{\arabic{page}}}%
  5176. \protected@write\@mainauxout{}{\string\@prefacefile{\jmlrprefacepath}{#1}}%
  5177. }%
  5178. {%
  5179. \protected@write\@mainauxout{}{\string\@prefaceend{\thepage}}%
  5180. }
  5181. \fi
  5182. % \end{macrocode}
  5183. %\end{environment}
  5184. %\begin{macro}{\prefacename}
  5185. %\changes{1.11}{2011-03-24}{new}
  5186. % \begin{macrocode}
  5187. \newcommand*{\prefacename}{Preface}
  5188. % \end{macrocode}
  5189. %\end{macro}
  5190. %\begin{macro}{\@prefacefile}
  5191. % \begin{macrocode}
  5192. \newcommand*{\@prefacefile}[2]{}
  5193. % \end{macrocode}
  5194. %\end{macro}
  5195. %\begin{macro}{\@prefacestart}
  5196. % \begin{macrocode}
  5197. \newcommand*{\@prefacestart}[2]{}
  5198. % \end{macrocode}
  5199. %\end{macro}
  5200. %\begin{macro}{\@prefaceend}
  5201. % \begin{macrocode}
  5202. \newcommand*{\@prefaceend}[1]{}
  5203. % \end{macrocode}
  5204. %\end{macro}
  5205. %\begin{macro}{\@prefaceeditor}
  5206. % \begin{macrocode}
  5207. \newcommand*{\@prefaceeditor}[1]{}
  5208. % \end{macrocode}
  5209. %\end{macro}
  5210. %
  5211. % Cross-reference chapters:
  5212. % \begin{macrocode}
  5213. \newcommand*{\chapterrefname}{Chapter}
  5214. \newcommand*{\chaptersrefname}{Chapters}
  5215. % \end{macrocode}
  5216. %\begin{macro}{\chapterref}
  5217. % \begin{macrocode}
  5218. \newcommand*{\chapterref}[1]{%
  5219. \objectref{#1}{\chapterrefname}{\chaptersrefname}{}{}}
  5220. % \end{macrocode}
  5221. %\end{macro}
  5222. %
  5223. % Cross-referencing imported articles:
  5224. %\begin{macro}{\articlepageref}
  5225. % Page number of start of article
  5226. % \begin{macrocode}
  5227. \newcommand*{\articlepageref}[1]{%
  5228. \pageref{#1jmlrstart}%
  5229. }
  5230. % \end{macrocode}
  5231. %\end{macro}
  5232. %\begin{macro}{\articlepagesref}
  5233. % Page range of article
  5234. % \begin{macrocode}
  5235. \newcommand*{\articlepagesref}[1]{%
  5236. \pageref{#1jmlrstart}--\pageref{#1jmlrend}%
  5237. }
  5238. % \end{macrocode}
  5239. %\end{macro}
  5240. %\begin{macro}{\@articlepagesref}
  5241. % Page range of article for use within the article
  5242. % \begin{macrocode}
  5243. \newcommand*{\@articlepagesref}{%
  5244. \pageref{jmlrstart}--\pageref{jmlrend}%
  5245. }
  5246. % \end{macrocode}
  5247. %\end{macro}
  5248. %\begin{macro}{\articletitleref}
  5249. % Reference the short title of an imported article
  5250. % \begin{macrocode}
  5251. \newcommand*{\articletitleref}[1]{\nameref{#1jmlrstart}}
  5252. % \end{macrocode}
  5253. %\end{macro}
  5254. %\begin{macro}{\articleauthorref}
  5255. % Reference the authors of an imported article
  5256. % \begin{macrocode}
  5257. \newcommand*{\articleauthorref}[1]{%
  5258. \@ifundefined{@jmlr@author@#1}%
  5259. {%
  5260. \ClassWarning{jmlrbook}{Label `#1' undefined}%
  5261. }%
  5262. {%
  5263. \@nameuse{@jmlr@author@#1}%
  5264. }%
  5265. }
  5266. % \end{macrocode}
  5267. %\end{macro}
  5268. %
  5269. %\begin{macro}{\jmlrtitlehook}
  5270. %\changes{1.20}{2014/10/15}{changed \cs{let} to \cs{def}}
  5271. % Extra title information
  5272. % \begin{macrocode}
  5273. \renewcommand*\jmlrtitlehook{%
  5274. \hypersetup{pdftitle={\@shorttitle}}%
  5275. \def\xmpTitle{\@shorttitle}%
  5276. \let\jmlrtitlehook\relax
  5277. }
  5278. \providecommand*{\xmpTitle}{\@title}%
  5279. % \end{macrocode}
  5280. %\end{macro}
  5281. %
  5282. %\begin{macro}{\jmlrauthorhook}
  5283. %\changes{1.20}{2014/10/15}{changed \cs{let} to \cs{def}}
  5284. % \begin{macrocode}
  5285. \renewcommand*\jmlrauthorhook{%
  5286. \ifx\@sauthor\@empty
  5287. \hypersetup{pdfauthor={\@author}}%
  5288. \else
  5289. \hypersetup{pdfauthor={\@sauthor}}%
  5290. \fi
  5291. \def\xmpAuthor{\@sauthor}%
  5292. \let\jmlrauthorhook\relax
  5293. \let\@shortauthor\@empty
  5294. }
  5295. \providecommand*\xmpAuthor{\@author}%
  5296. % \end{macrocode}
  5297. %\end{macro}
  5298. %\begin{macro}{\subtitle}
  5299. % \begin{macrocode}
  5300. \newcommand*{\@subtitle}{}
  5301. \newcommand*{\subtitle}[1]{\renewcommand*{\@subtitle}{#1}}
  5302. % \end{macrocode}
  5303. %\end{macro}
  5304. %\begin{macro}{\volume}
  5305. % \begin{macrocode}
  5306. \newcommand*{\@volume}{\@jmlrvolume}
  5307. \newcommand*{\volume}[1]{%
  5308. \renewcommand*{\@volume}{#1}%
  5309. \ifjmlrpdfxa
  5310. \let\xmpVolume\@volume
  5311. \fi
  5312. }
  5313. % \end{macrocode}
  5314. %\end{macro}
  5315. %\begin{macro}{\jmlrissue}
  5316. % \begin{macrocode}
  5317. \newcommand*{\@issue}{\@jmlrissue}
  5318. \newcommand*{\issue}[1]{%
  5319. \renewcommand*{\@issue}{#1}%
  5320. \ifjmlrpdfxa
  5321. \let\xmpIssue\@issue
  5322. \fi
  5323. }
  5324. % \end{macrocode}
  5325. %\end{macro}
  5326. %\begin{macro}{\thejmlrworkshop}
  5327. % Provided in the event that it's required for the title page.
  5328. % \begin{macrocode}
  5329. \newcommand*{\thejmlrworkshop}{\@jmlrworkshop}
  5330. % \end{macrocode}
  5331. %\end{macro}
  5332. %\begin{macro}{\team}
  5333. % \begin{macrocode}
  5334. \newcommand*{\@team}{}
  5335. \newcommand*{\team}[1]{\renewcommand*{\@team}{#1}}
  5336. % \end{macrocode}
  5337. %\end{macro}
  5338. %\begin{macro}{\jmlrlocation}
  5339. %\changes{1.20}{2014/10/15}{new}
  5340. % \begin{macrocode}
  5341. \newcommand*{\@jmlrlocation}{}
  5342. \newcommand*{\jmlrlocation}[1]{%
  5343. \renewcommand*{\@jmlrlocation}{#1}%
  5344. \protected@write\@auxout{}{\string\jmlrbook@location{#1}}%
  5345. }
  5346. % \end{macrocode}
  5347. %\end{macro}
  5348. %\begin{macro}{\@productioneditorname}
  5349. % \begin{macrocode}
  5350. \newcommand*{\@productioneditorname}{Production Editor}
  5351. % \end{macrocode}
  5352. %\end{macro}
  5353. %\begin{macro}{\productioneditor}
  5354. % \begin{macrocode}
  5355. \newcommand*{\@productioneditor}{}
  5356. \newcommand*{\productioneditor}[1]{%
  5357. \renewcommand*{\@productioneditor}{#1}%
  5358. \renewcommand*{\@productioneditorname}{Production Editor}%
  5359. }
  5360. % \end{macrocode}
  5361. %\end{macro}
  5362. %\begin{macro}{\productioneditors}
  5363. % \begin{macrocode}
  5364. \newcommand*{\productioneditors}[1]{%
  5365. \renewcommand*{\@productioneditor}{#1}%
  5366. \renewcommand*{\@productioneditorname}{Production Editors}%
  5367. }
  5368. % \end{macrocode}
  5369. %\end{macro}
  5370. %\begin{macro}{\logo}
  5371. % Title page image
  5372. %\changes{1.17}{2012/05/30}{added optional argument}
  5373. % \begin{macrocode}
  5374. \newcommand*{\@logo}{}
  5375. \newcommand*{\logo}[2][]{%
  5376. \ifjmlrhtml
  5377. \def\@logo@tmp{#1}%
  5378. \ifx\@logo@tmp\@empty
  5379. \renewcommand*{\@logo}{#2}%
  5380. \else
  5381. \renewcommand*{\@logo}{\HCode{<a href="#1">}#2\HCode{</a>}}%
  5382. \fi
  5383. \else
  5384. \renewcommand*{\@logo}{#2}%
  5385. \fi
  5386. }
  5387. % \end{macrocode}
  5388. %\end{macro}
  5389. %
  5390. %\begin{macro}{\booklinebreak}
  5391. %\changes{1.18}{2013-10-17}{new}
  5392. % Provided for book production editors to fine tune the book
  5393. % line breaking.
  5394. % \begin{macrocode}
  5395. \renewcommand*{\booklinebreak}[1][4]{\linebreak[#1]}
  5396. % \end{macrocode}
  5397. %\end{macro}
  5398. %
  5399. % Set article title
  5400. % \begin{macrocode}
  5401. \def\c@lbmaketitle{\jmlrmaketitle}
  5402. % \end{macrocode}
  5403. % The book's title:
  5404. %\begin{macro}{\maintitle}
  5405. % \begin{macrocode}
  5406. \newcommand*{\maintitle}{}
  5407. % \end{macrocode}
  5408. %\end{macro}
  5409. %
  5410. % Make it easier to modify the book's title page:
  5411. %\begin{macro}{\SetTitleElement}
  5412. % \begin{macrocode}
  5413. \newcommand*{\SetTitleElement}[3]{%
  5414. {%
  5415. \expandafter\ifx\csname @#1\endcsname\@empty
  5416. \else
  5417. #2\csname @#1\endcsname#3%
  5418. \fi
  5419. }%
  5420. }
  5421. % \end{macrocode}
  5422. %\end{macro}
  5423. %
  5424. %\begin{macro}{\IfTitleElement}
  5425. % Determine if the given element has been set:
  5426. % \begin{macrocode}
  5427. \newcommand{\IfTitleElement}[3]{%
  5428. \expandafter\ifx\csname @#1\endcsname\@empty
  5429. #2%
  5430. \else
  5431. #3%
  5432. \fi
  5433. }
  5434. % \end{macrocode}
  5435. %\end{macro}
  5436. %
  5437. %\begin{macro}{\titlebody}
  5438. % \begin{macrocode}
  5439. \newcommand{\titlebody}{%
  5440. \SetTitleElement{title}{\maintitlefont}{\postmaintitle}%
  5441. \SetTitleElement{volume}{\mainvolumefont}{\postmainvolume}%
  5442. \SetTitleElement{subtitle}{\mainsubtitlefont}{\postmainsubtitle}%
  5443. \SetTitleElement{logo}{\mainlogofont}{\postmainlogo}%
  5444. \SetTitleElement{team}{\mainteamfont}{\postmainteam}%
  5445. \SetTitleElement{author}{\mainauthorfont}{\postmainauthor}%
  5446. \SetTitleElement{productioneditor}{\mainproductioneditorfont}%
  5447. {\postmainproductioneditor}%
  5448. }
  5449. % \end{macrocode}
  5450. %\end{macro}
  5451. %\begin{macro}{\c@lamaketitle}
  5452. % \begin{macrocode}
  5453. \ifjmlrhtml
  5454. \renewcommand{\c@lamaketitle}{%
  5455. \HCode{<table cellpadding="2" cellspacing="2" border="0" width="100\%">}%
  5456. \HCode{<tbody><tr><td valign="top">}%
  5457. \HCode{<h1>}%
  5458. \@title\newline
  5459. \ifx\@jmlrvolume\@empty
  5460. \ifx\@volume\@empty
  5461. \else
  5462. Volume \@volume
  5463. \ifx\@subtitle\@empty\else: \fi
  5464. \fi
  5465. \else
  5466. Volume \@jmlrvolume
  5467. \ifx\@subtitle\@empty\else: \fi
  5468. \fi
  5469. \@subtitle
  5470. \HCode{</h1>}%
  5471. \newline
  5472. \textbf{Editors: \@author}
  5473. \HCode{</td><td valign="top">}%
  5474. \@logo
  5475. \HCode{</td></tr></tbody></table>}%
  5476. \let\maintitle\@title
  5477. }
  5478. \else
  5479. \renewcommand{\c@lamaketitle}{%
  5480. \pagenumbering{alph}%
  5481. \pagestyle{empty}%
  5482. \begin{titlepage}%
  5483. \let\footnotesize\small
  5484. \let\footnoterule\relax
  5485. \let\footnote\thanks
  5486. \titlebody
  5487. \par
  5488. \@thanks
  5489. \end{titlepage}%
  5490. \setcounter{footnote}{0}%
  5491. \let\maintitle\@title
  5492. \c@lmtitlempty
  5493. }
  5494. \fi
  5495. % \end{macrocode}
  5496. %\end{macro}
  5497. %\begin{macro}{\maintitlefont}
  5498. % \begin{macrocode}
  5499. \renewcommand{\maintitlefont}{%
  5500. \null\vskip15pt\relax\par
  5501. \flushleft\Huge\bfseries\noindent}
  5502. % \end{macrocode}
  5503. %\end{macro}
  5504. %\begin{macro}{\postmaintitle}
  5505. % \begin{macrocode}
  5506. \renewcommand{\postmaintitle}{%
  5507. \par\relax
  5508. }
  5509. % \end{macrocode}
  5510. %\end{macro}
  5511. %\begin{macro}{\mainvolumefont}
  5512. % \begin{macrocode}
  5513. \newcommand{\mainvolumefont}{%
  5514. \flushleft\noindent\LARGE\bfseries Volume
  5515. }
  5516. % \end{macrocode}
  5517. %\end{macro}
  5518. %\begin{macro}{\postmainvolume}
  5519. % \begin{macrocode}
  5520. \newcommand{\postmainvolume}{%
  5521. \IfTitleElement{subtitle}{}{:}\par\relax
  5522. }
  5523. % \end{macrocode}
  5524. %\end{macro}
  5525. %
  5526. %\begin{macro}{\mainissuefont}
  5527. % \begin{macrocode}
  5528. \newcommand{\mainissuefont}{%
  5529. \flushleft\noindent\LARGE\bfseries Issue
  5530. }
  5531. % \end{macrocode}
  5532. %\end{macro}
  5533. %\begin{macro}{\postmainissue}
  5534. % \begin{macrocode}
  5535. \newcommand{\postmainissue}{%
  5536. \par\relax
  5537. }
  5538. % \end{macrocode}
  5539. %\end{macro}
  5540. %
  5541. %\begin{macro}{\mainsubtitlefont}
  5542. % \begin{macrocode}
  5543. \newcommand{\mainsubtitlefont}{%
  5544. \flushleft\LARGE\bfseries\noindent}
  5545. % \end{macrocode}
  5546. %\end{macro}
  5547. %\begin{macro}{\postmainsubtitle}
  5548. % \begin{macrocode}
  5549. \newcommand{\postmainsubtitle}{\par}
  5550. % \end{macrocode}
  5551. %\end{macro}
  5552. %
  5553. %\begin{macro}{\mainlogofont}
  5554. % \begin{macrocode}
  5555. \newcommand{\mainlogofont}{%
  5556. \vfill
  5557. \begin{center}}
  5558. % \end{macrocode}
  5559. %\end{macro}
  5560. %\begin{macro}{\postmainlogo}
  5561. % \begin{macrocode}
  5562. \newcommand{\postmainlogo}{\end{center}\vfill\par}
  5563. % \end{macrocode}
  5564. %\end{macro}
  5565. %
  5566. %\begin{macro}{\mainteamfont}
  5567. % \begin{macrocode}
  5568. \newcommand{\mainteamfont}{\flushleft\bfseries\Large\noindent}
  5569. % \end{macrocode}
  5570. %\end{macro}
  5571. %\begin{macro}{\postmainteam}
  5572. % \begin{macrocode}
  5573. \newcommand{\postmainteam}{\par}
  5574. % \end{macrocode}
  5575. %\end{macro}
  5576. %\begin{macro}{\mainauthorfont}
  5577. % \begin{macrocode}
  5578. \renewcommand{\mainauthorfont}{%
  5579. \flushleft\Large\itshape\doublespacing\noindent}
  5580. % \end{macrocode}
  5581. %\end{macro}
  5582. %\begin{macro}{\postmainauthor}
  5583. % \begin{macrocode}
  5584. \renewcommand{\postmainauthor}{%
  5585. \par}
  5586. % \end{macrocode}
  5587. %\end{macro}
  5588. %
  5589. %\begin{macro}{\mainproductioneditorfont}
  5590. % \begin{macrocode}
  5591. \newcommand{\mainproductioneditorfont}{%
  5592. \flushleft\Large\noindent \@productioneditorname: \itshape}
  5593. % \end{macrocode}
  5594. %\end{macro}
  5595. %\begin{macro}{\postmainproductioneditor}
  5596. % \begin{macrocode}
  5597. \newcommand{\postmainproductioneditor}{\par}
  5598. % \end{macrocode}
  5599. %\end{macro}
  5600. %
  5601. %\begin{macro}{\maindatefont}
  5602. % \begin{macrocode}
  5603. \renewcommand{\maindatefont}{}
  5604. % \end{macrocode}
  5605. %\end{macro}
  5606. %\begin{macro}{\postmaindate}
  5607. % \begin{macrocode}
  5608. \renewcommand{\postmaindate}{}
  5609. % \end{macrocode}
  5610. %\end{macro}
  5611. %
  5612. %\begin{environment}{signoff}
  5613. % Editorial team listed at the end of a preface etc. The mandatory
  5614. % argument is the date, the optional argument is the team title.
  5615. % Each editor should be separated with \ics{Editor}.
  5616. %\changes{1.19}{2014/09/29}{added \cs{nopagebreak}}
  5617. % \begin{macrocode}
  5618. \ifjmlrhtml
  5619. \newenvironment{signoff}[2][The Editorial Team]{%
  5620. \def\Editor##1{##1\par\vskip\baselineskip\noindent\ignorespaces}%
  5621. \def\@editorialteam{#1}%
  5622. \def\@signoffdate{#2}%
  5623. \par\vskip\baselineskip\noindent
  5624. \ifx\@signoffdate\@empty
  5625. \else
  5626. \emph{\@signoffdate}\nopagebreak\par
  5627. \nopagebreak\vskip\baselineskip\noindent
  5628. \fi
  5629. \ifx\@editorialteam\@empty
  5630. \else
  5631. \@editorialteam:\nopagebreak\par\nopagebreak\vskip\baselineskip
  5632. \fi
  5633. \nopagebreak\noindent\ignorespaces
  5634. }%
  5635. {%
  5636. }%
  5637. \else
  5638. \newenvironment{signoff}[2][The Editorial Team]{%
  5639. \def\Editor##1{%
  5640. \protected@write\@mainauxout{}{\string\@prefaceeditor{##1}}%
  5641. \begin{tabular}{@{}l@{}}%
  5642. ##1%
  5643. \end{tabular}%
  5644. \par\vskip\baselineskip\noindent\ignorespaces
  5645. }%
  5646. \def\@editorialteam{#1}%
  5647. \def\@signoffdate{#2}%
  5648. \par\vskip\baselineskip\noindent
  5649. \ifx\@signoffdate\@empty
  5650. \else
  5651. \emph{\@signoffdate}\par
  5652. \vskip\baselineskip\noindent
  5653. \fi
  5654. \ifx\@editorialteam\@empty
  5655. \else
  5656. % \end{macrocode}
  5657. %\changes{1.21}{2015-02-24}{added \cs{nopagebreak}}
  5658. % \begin{macrocode}
  5659. \@editorialteam:\nopagebreak\par\vskip\baselineskip
  5660. \fi
  5661. \nopagebreak\noindent\ignorespaces
  5662. }%
  5663. {%
  5664. }
  5665. \fi
  5666. % \end{macrocode}
  5667. %\end{environment}
  5668. %\begin{environment}{authorsignoff}
  5669. % An author can sign off at the end of a chapter (such as a
  5670. % foreword).
  5671. % Each author should be separated with \ics{Author}.
  5672. % \begin{macrocode}
  5673. \newenvironment{authorsignoff}{%
  5674. \def\Author##1{\begin{tabular}{@{}p{\linewidth}@{}}%
  5675. ##1%
  5676. \end{tabular}%
  5677. \par\vskip\baselineskip\noindent\ignorespaces
  5678. }%
  5679. \par\vskip\baselineskip\noindent\ignorespaces
  5680. }{%
  5681. }
  5682. % \end{macrocode}
  5683. %\end{environment}
  5684. %
  5685. %\begin{macro}{\zeroextracounters}
  5686. % Reset counters at the start of each imported article
  5687. %\changes{1.15}{2012/05/12}{added algocf and definition to reset}
  5688. % \begin{macrocode}
  5689. \renewcommand{\zeroextracounters}{%
  5690. \@ifundefined{c@theorem}{}{\setcounter{theorem}{0}}%
  5691. \@ifundefined{c@algorithm}{}{\setcounter{algorithm}{0}}%
  5692. \@ifundefined{c@algocf}{}{\setcounter{algocf}{0}}%
  5693. \@ifundefined{c@example}{}{\setcounter{example}{0}}%
  5694. \@ifundefined{c@definition}{}{\setcounter{definition}{0}}%
  5695. }
  5696. % \end{macrocode}
  5697. %\end{macro}
  5698. %\begin{macro}{\contentsname}
  5699. % Redcfine title of the table of contents
  5700. % \begin{macrocode}
  5701. \renewcommand*{\contentsname}{Table of Contents}
  5702. % \end{macrocode}
  5703. %\end{macro}
  5704. %\begin{macro}{\theHalgorithm}
  5705. %\changes{1.12}{2012/01/05}{in definition, changed \cs{thechapter}
  5706. %to \cs{theHchapter}}
  5707. % \begin{macrocode}
  5708. \def\theHalgorithm{\theHchapter.\thealgorithm}
  5709. % \end{macrocode}
  5710. %\end{macro}
  5711. \def\theHexample{\theHchapter.\theexample}
  5712. \def\theHtheorem{\theHchapter.\thetheorem}
  5713. %\begin{macro}{\theHsection}
  5714. % \begin{macrocode}
  5715. \def\theHsection{\theHchapter.\thesection}
  5716. \def\theHsubsection{\theHchapter.\thesubsection}
  5717. \def\theHsubsubsection{\theHchapter.\thesubsubsection}
  5718. \def\theHparagraph{\theHchapter.\theparagraph}
  5719. % \end{macrocode}
  5720. %\end{macro}
  5721. %\begin{macro}{\theHsubfigure}
  5722. % \begin{macrocode}
  5723. \def\theHsubfigure{\theHfigure.\arabic{subfigure}}
  5724. \def\theHsubtable{\theHtable.\arabic{subtable}}
  5725. % \end{macrocode}
  5726. %\end{macro}
  5727. %\begin{macro}{\theHfootnote}
  5728. %\changes{1.12}{2012/01/05}{new}
  5729. % \begin{macrocode}
  5730. \def\theHfootnote{\theHchapter.\alpha{footnote}}
  5731. % \end{macrocode}
  5732. %\end{macro}
  5733. %\begin{macro}{\theHtable}
  5734. %\changes{1.12}{2012/01/05}{new}
  5735. % \begin{macrocode}
  5736. \def\theHtable{\theHchapter.\arabic{table}}
  5737. % \end{macrocode}
  5738. %\end{macro}
  5739. %\begin{macro}{\theHfigure}
  5740. %\changes{1.12}{2012/01/05}{new}
  5741. % \begin{macrocode}
  5742. \def\theHfigure{\theHchapter.\arabic{figure}}
  5743. % \end{macrocode}
  5744. %\end{macro}
  5745. %\begin{macro}{\theHalgocf}
  5746. %\changes{1.15}{2012/05/12}{new}
  5747. % \begin{macrocode}
  5748. \def\theHalgocf{\theHchapter.\thealgocf}
  5749. % \end{macrocode}
  5750. %\end{macro}
  5751. %\begin{macro}{\mailto}
  5752. % \begin{macrocode}
  5753. \renewcommand*{\mailto}[1]{%
  5754. \href{mailto:#1}{\nolinkurl{#1}}%
  5755. }
  5756. % \end{macrocode}
  5757. %\end{macro}
  5758. % \begin{macrocode}
  5759. \c@lhaschapterfalse
  5760. \let\c@lthesec\thesection
  5761. % \end{macrocode}
  5762. % Make sure the hyperlinks work
  5763. %\begin{macro}{\doimportchapterHref}
  5764. % \begin{macrocode}
  5765. \newcommand\doimportchapterHref{%
  5766. \edef\@currentHref{chapter.\thechapter}%
  5767. }
  5768. % \end{macrocode}
  5769. %\end{macro}
  5770. %\begin{macro}{\toclevel@appendix}
  5771. % Set the toc level for the main appendices
  5772. % \begin{macrocode}
  5773. \def\toclevel@appendix{-1}
  5774. % \end{macrocode}
  5775. %\end{macro}
  5776. %
  5777. % \sty{hyperref} and \cls{combine} don't play nicely
  5778. % need to fudge the cross-referencing a bit.
  5779. %\begin{macro}{\Xprefix}
  5780. % \begin{macrocode}
  5781. \def\Xprefix{}
  5782. % \end{macrocode}
  5783. %\end{macro}
  5784. %\begin{macro}{\Xref}
  5785. % \begin{macrocode}
  5786. \DeclareRobustCommand\Xref{\@ifstar\@Xrefstar\T@Xref}%
  5787. % \end{macrocode}
  5788. %\end{macro}
  5789. %\begin{macro}{\Xpageref}
  5790. % \begin{macrocode}
  5791. \DeclareRobustCommand\Xpageref{%
  5792. \@ifstar\@Xpagerefstar\T@Xpageref
  5793. }%
  5794. % \end{macrocode}
  5795. %\end{macro}
  5796. %\begin{macro}{\HyRef@StarSetXRef}
  5797. % \begin{macrocode}
  5798. \def\HyRef@StarSetXRef#1{%
  5799. \begingroup
  5800. \Hy@safe@activestrue
  5801. \edef\x{#1}%
  5802. \@onelevel@sanitize\x
  5803. \edef\x{\endgroup
  5804. \noexpand\HyRef@@StarSetRef
  5805. \expandafter\noexpand\csname r@\Xprefix\x\endcsname{\x}%
  5806. }%
  5807. \x
  5808. }
  5809. % \end{macocode}
  5810. %\end{macro}
  5811. %
  5812. %\begin{macro}{\@Xrefstar}
  5813. % \begin{macrocode}
  5814. \def\@Xrefstar#1{%
  5815. \HyRef@StarSetXRef{#1}\@firstoffive
  5816. }
  5817. % \end{macrocode}
  5818. %\end{macro}
  5819. %\begin{macro}{\@Xpagerefstar}
  5820. % \begin{macrocode}
  5821. \def\@Xpagerefstar#1{%
  5822. \HyRef@StarSetXRef{#1}\@secondoffive
  5823. }
  5824. % \end{macrocode}
  5825. %\end{macro}
  5826. %\begin{macro}{\T@Xref}
  5827. % \begin{macrocode}
  5828. \def\T@Xref#1{%
  5829. \Hy@safe@activestrue
  5830. \expandafter\@setXref\csname r@\Xprefix#1\endcsname\@firstoffive{#1}%
  5831. \Hy@safe@activesfalse
  5832. }%
  5833. % \end{macrocode}
  5834. %\end{macro}
  5835. %
  5836. %\begin{macro}{\T@Xpageref}
  5837. % \begin{macrocode}
  5838. \def\T@Xpageref#1{%
  5839. \Hy@safe@activestrue
  5840. \expandafter\@setXref\csname r@\Xprefix#1\endcsname\@secondoffive{#1}%
  5841. \Hy@safe@activesfalse
  5842. }%
  5843. % \end{macrocode}
  5844. %\end{macro}
  5845. %
  5846. %\begin{macro}{\Xlabel}
  5847. % \begin{macrocode}
  5848. \def\Xlabel#1{%
  5849. \@bsphack
  5850. \begingroup
  5851. \@onelevel@sanitize\@currentlabelname
  5852. \edef\@currentlabelname{%
  5853. \expandafter\strip@period\@currentlabelname\relax.\relax\@@@
  5854. }%
  5855. \protected@write\@mainauxout{}{%
  5856. \string\newlabel{\Xprefix#1}{{\@currentlabel}{\thepage}%
  5857. {\@currentlabelname}{\@currentHref}{}}%
  5858. }%
  5859. \endgroup
  5860. \@esphack
  5861. }
  5862. \let\ltx@label\Xlabel
  5863. % \end{macrocode}
  5864. %\end{macro}
  5865. %\begin{macro}{\@setXref}
  5866. % \begin{macrocode}
  5867. \def\@setXref#1#2#3{% csname, extract group, refname
  5868. \ifx#1\relax
  5869. \protect\G@refundefinedtrue
  5870. \nfss@text{\reset@font\bfseries ??}%
  5871. \@latex@warning{%
  5872. Reference `#3' on page \thepage \space undefined%
  5873. }%
  5874. \else
  5875. \expandafter\Hy@setref@link#1\@empty\@empty\@nil{#2}%
  5876. \fi
  5877. }
  5878. % \end{macrocode}
  5879. %\end{macro}
  5880. %\begin{macro}{\@secondoffive}
  5881. % Something's redefining \cs{@secondoffive} incorrectly at the
  5882. % start of the document when hyperref's draft mode is on. Need
  5883. % to fix it.
  5884. % \begin{macrocode}
  5885. \AtBeginDocument{%
  5886. \renewcommand\@secondoffive[5]{#2}%
  5887. \jmlrwritepdfinfo
  5888. \let\jmlrwritepdfinfo\relax
  5889. }
  5890. % \end{macrocode}
  5891. %\end{macro}
  5892. %
  5893. % Need to write imported chapter label to main auxfile.
  5894. %\begin{macro}{\@setimportlabel}
  5895. % \begin{macrocode}
  5896. \def\@setimportlabel{%
  5897. \let\@mainauxout\@auxout
  5898. \let\HRlabel\label
  5899. }
  5900. % \end{macrocode}
  5901. %\end{macro}
  5902. % \begin{macrocode}
  5903. \AtBeginDocument{\@jmlrbegindoc}
  5904. % \end{macrocode}
  5905. %\begin{macro}{\@jmlrbegindoc}
  5906. % \begin{macrocode}
  5907. \newcommand*\@jmlrbegindoc{
  5908. \@setimportlabel
  5909. \gdef\@setimportlabel{\let\ref\Xref \let\pageref\Xpageref}%
  5910. \let\ReadBookmarks\relax
  5911. % \end{macrocode}
  5912. % Patch to work with \sty{auxhook} if loaded
  5913. %\changes{1.18}{2013-10-17}{patched to work with auxhook}
  5914. % \begin{macrocode}
  5915. \@ifundefined{@beginmainauxhook}{}{\@beginmainauxhook}%
  5916. }
  5917. % \end{macrocode}
  5918. %\end{macro}
  5919. % Imported papers modify \ics{InputIfFileExists} so save original
  5920. % definition.
  5921. % \begin{macrocode}
  5922. \let\@org@InputIfFileExists\InputIfFileExists
  5923. % \end{macrocode}
  5924. %
  5925. %\begin{environment}{jmlrpapers}
  5926. % \begin{macrocode}
  5927. \newenvironment{jmlrpapers}{%
  5928. % \end{macrocode}
  5929. %\changes{1.09}{2010/12/01}{reset start and end document hook to avoid
  5930. %problems caused by packages defining duplicate commands etc}
  5931. % \begin{macrocode}
  5932. \def\@begindocumenthook{%
  5933. \@jmlrbegindoc
  5934. \let\bibcite\c@lbNATbibcite
  5935. }
  5936. \def\@enddocumenthook{%
  5937. \@jmlrenddoc
  5938. \let\bibcite\c@lbNAT@testdef
  5939. }
  5940. \begin{papers}[]
  5941. % \end{macrocode}
  5942. %\changes{1.07}{2010-07-30}{Added check for two column style}
  5943. % \begin{macrocode}
  5944. \if@twocolumn
  5945. \def\@jmlr@restore{\twocolumn}%
  5946. \else
  5947. \def\@jmlr@restore{\onecolumn}%
  5948. \fi
  5949. \jmlrarticlecommands
  5950. \let\importpubpaper\@importpubpaper
  5951. \let\importpaper\@importpaper
  5952. \let\importarticle\@importarticle
  5953. \let\label\Xlabel
  5954. \let\ref\Xref
  5955. \pagestyle{article}%
  5956. }{%
  5957. \@jmlr@restore
  5958. \end{papers}
  5959. }
  5960. % \end{macrocode}
  5961. %\end{environment}
  5962. %
  5963. %\begin{macro}{\addtomaincontents}
  5964. % \begin{macrocode}
  5965. \newcommand{\addtomaincontents}[2]{%
  5966. \protected@write\@mainauxout{\let\label\@gobble\let\index\@gobble
  5967. \let\glossary\@gobble}{\string\@writefile{#1}{#2}}%
  5968. }
  5969. % \end{macrocode}
  5970. %\end{macro}
  5971. %\begin{macro}{\@write@author}
  5972. % \begin{macrocode}
  5973. \newcommand*{\@write@author}[2]{%
  5974. \def\@jmlr@authors@sep{ and }%
  5975. \protected@write\@mainauxout{}{%
  5976. \string\@new@articleauthor{#1}{#2}%
  5977. }%
  5978. }
  5979. % \end{macrocode}
  5980. %\end{macro}
  5981. %\begin{macro}{\@new@articleauthor}
  5982. % \begin{macrocode}
  5983. \newcommand*{\@new@articleauthor}[2]{%
  5984. \expandafter\gdef\csname @jmlr@author@#1\endcsname{%
  5985. \hyperref[#1jmlrstart]{#2}}%
  5986. }
  5987. % \end{macrocode}
  5988. %\end{macro}
  5989. %
  5990. %\begin{macro}{\@@write@jmlr@import}
  5991. % The accompanying \app{makejmlrbook} Perl script scans the aux file
  5992. % for information. Any articles imported using \ics{importpubpaper},
  5993. % \ics{importpaper} or \ics{importarticle} need to write the
  5994. % relevant information to the aux file.
  5995. % \begin{macrocode}
  5996. \newcommand*{\@@write@jmlr@import}[3]{%
  5997. \protected@write\@mainauxout{}{\string\@jmlr@import{#1}{#2}{#3}}%
  5998. }
  5999. % \end{macrocode}
  6000. %\end{macro}
  6001. %\begin{macro}{\@jmlr@import}
  6002. % \LaTeX\ should ignore \cs{@jmlr@import} as it's only needed for
  6003. % \app{makejmlrbook}:
  6004. % \begin{macrocode}
  6005. \newcommand*{\@jmlr@import}[3]{}
  6006. % \end{macrocode}
  6007. %\end{macro}
  6008. %\begin{macro}{\@@write@jmlr@apdimport}
  6009. %\changes{1.17}{2012/05/30}{new}
  6010. % As above but for files imported in the appendix.
  6011. % \begin{macrocode}
  6012. \newcommand*{\@@write@jmlr@apdimport}[3]{%
  6013. \protected@write\@mainauxout{}{\string\@jmlr@apdimport{#1}{#2}{#3}}%
  6014. }
  6015. % \end{macrocode}
  6016. %\end{macro}
  6017. %\begin{macro}{\@jmlr@apdimport}
  6018. %\changes{1.17}{2012/05/30}{new}
  6019. % As above but for files imported in the appendix.
  6020. % \LaTeX\ should ignore \cs{@jmlr@apdimport} as it's only needed for
  6021. % \app{makejmlrbookgui}:
  6022. % \begin{macrocode}
  6023. \newcommand*{\@jmlr@apdimport}[3]{}
  6024. % \end{macrocode}
  6025. %\end{macro}
  6026. %\begin{macro}{\@write@jmlr@import}
  6027. % Initialise to \cs{@@write@jmlr@import} and switch to
  6028. % \cs{@@write@jmlr@apdimport} in the appendices.
  6029. % \begin{macrocode}
  6030. \def\@write@jmlr@import{\@@write@jmlr@import}
  6031. % \end{macrocode}
  6032. %\end{macro}
  6033. %
  6034. %\begin{macro}{\jmlrpremaketitlehook}
  6035. %\changes{1.09}{2010/12/01}{Moved redefinition outside of import
  6036. %macros}
  6037. % Redefine \cs{jmlrpremaketitlehook}
  6038. % \begin{macrocode}
  6039. \def\jmlrpremaketitlehook{%
  6040. \cleardoublepage
  6041. \phantomsection
  6042. \let\@currentlabelname\@shorttitle
  6043. % \end{macrocode}
  6044. %\changes{1.09}{2010/12/01}{Moved \cs{refstepcounter} from
  6045. %\cs{jmlrmaketitlehook} to \cs{jmlrpremaketitlehook}}
  6046. % \begin{macrocode}
  6047. \refstepcounter{chapter}%
  6048. }%
  6049. % \end{macrocode}
  6050. %\end{macro}
  6051. %\begin{macro}{\jmlrimporthook}
  6052. % Hook just before document is imported.
  6053. %\changes{1.09}{2010/12/01}{new}
  6054. % \begin{macrocode}
  6055. \newcommand*{\jmlrimporthook}{}
  6056. % \end{macrocode}
  6057. %\end{macro}
  6058. %
  6059. %\begin{macro}{\importpubpaper}
  6060. % Import a document that has already been published.
  6061. % Syntax: \cs{importpubpaper}\oarg{label}\marg{dir}\marg{file}\marg{pages}
  6062. % where \meta{dir} is the directory in which the paper is located,
  6063. % \meta{file} is the name of the file and \meta{pages} indicates
  6064. % the page range \emph{for the original version}. The optional
  6065. % argument is a label. This is used to prefix the labels and
  6066. % citations in the document so they don't clash with other imported
  6067. % articles. If omitted, \meta{dir}/\meta{file} is used instead.
  6068. % \begin{macrocode}
  6069. \newcommand*{\@importpubpaper}[4][\@importdir\@importfile]{%
  6070. \bgroup
  6071. \def\@importdir{#2/}%
  6072. \def\@importfile{#3}%
  6073. \@write@jmlr@import{#1}{#2}{#3}%
  6074. \def\@extra@b@citeb{#1}%
  6075. \def\@extra@binfo{#1}%
  6076. \jmlrpages{#4}%
  6077. \graphicspath{{\@importdir}}%
  6078. \def\jmlrmaketitlehook{%
  6079. % \end{macrocode}
  6080. %\changes{1.09}{2010/12/01}{Added \cs{label} to \cs{jmlrmaketitlehook}}
  6081. % \begin{macrocode}
  6082. \label{}%
  6083. \def\titlebreak{ }%
  6084. \addtomaincontents{toc}%
  6085. % \end{macrocode}
  6086. %\changes{1.12}{2012/01/05}{changed \cs{@shorttitle} to \cs{@title}}
  6087. % \begin{macrocode}
  6088. {%
  6089. \protect\contentsline{papertitle}{\@title}{\thepage}%
  6090. {page.\thepage}}%
  6091. \pdfbookmark{\@shorttitle}{chapter.\theHchapter}%
  6092. \def\@jmlr@authors@sep{ \& }%
  6093. % \end{macrocode}
  6094. %\changes{1.12}{2012/01/05}{changed \cs{@jmlrauthors} to \cs{@jmlr@authors}}
  6095. % \begin{macrocode}
  6096. \tocchapterpubauthor{\@jmlr@authors}%
  6097. {%
  6098. \@jmlrabbrvproceedings
  6099. \ifx\@jmlrvolume\@empty
  6100. \ifx\@jmlrpages\@empty\else\space\fi
  6101. \else
  6102. \space\@jmlrvolume
  6103. \ifx\@jmlrissue\@empty
  6104. \else
  6105. (\@jmlrissue)%
  6106. \fi
  6107. \ifx\@jmlrpages\@empty\else:\fi
  6108. \fi
  6109. \ifx\@jmlrpages\@empty
  6110. \else
  6111. \@jmlrpages
  6112. \ifx\@jmlryear\@empty\else,\fi
  6113. \fi
  6114. \space\@jmlryear
  6115. }%
  6116. % \end{macrocode}
  6117. %\changes{1.12}{2012/01/05}{changed \cs{@jmlrauthors} to \cs{@jmlr@authors}}
  6118. % \begin{macrocode}
  6119. \@write@author{#1}{\@jmlr@authors}%
  6120. }%
  6121. \def\InputIfFileExists##1##2##3{%
  6122. \IfFileExists{##1}{%
  6123. \@org@InputIfFileExists{##1}{##2}{##3}%
  6124. }%
  6125. {%
  6126. \@org@InputIfFileExists{\@importdir##1}{##2}{##3}%
  6127. }%
  6128. }%
  6129. \def\Xprefix{#1}%
  6130. \jmlrimporthook
  6131. \import{\@importdir\@importfile}%
  6132. \def\Xprefix{}%
  6133. \egroup
  6134. \gdef\@shortauthor{}%
  6135. \gdef\@shorttitle{}%
  6136. \gdef\@firstauthor{}%
  6137. \gdef\@jmlr@authors{\@jmlrauthors}%
  6138. \gdef\@jmlrauthors{}%
  6139. \gdef\@firstsurname{}%
  6140. }
  6141. \newcommand{\importpubpaper}[4][]{%
  6142. \ClassError{jmlrbook}{\string\importpubpaper\space
  6143. not permitted outside `jmlrpapers' environment}{}%
  6144. }
  6145. % \end{macrocode}
  6146. %\end{macro}
  6147. %
  6148. %\begin{macro}{\importpaper}
  6149. % Like \cs{importpubpaper} but sets the pages to the page-range for
  6150. % this book.
  6151. % \begin{macrocode}
  6152. \newcommand{\@importpaper}[3][\@importdir\@importfile]{%
  6153. \bgroup
  6154. \def\@importdir{#2/}%
  6155. \def\@importfile{#3}%
  6156. \@write@jmlr@import{#1}{#2}{#3}%
  6157. \def\@extra@b@citeb{#1}%
  6158. \def\@extra@binfo{#1}%
  6159. \jmlrpages{\protect\@articlepagesref}%
  6160. \graphicspath{{\@importdir}}%
  6161. \def\jmlrmaketitlehook{%
  6162. % \end{macrocode}
  6163. %\changes{1.09}{2010/12/01}{Added \cs{label} to \cs{jmlrmaketitlehook}}
  6164. % \begin{macrocode}
  6165. \label{}%
  6166. \def\titlebreak{ }%
  6167. \addtomaincontents{toc}%
  6168. % \end{macrocode}
  6169. %\changes{1.12}{2012/01/05}{changed \cs{@shorttitle} to \cs{@title}}
  6170. % \begin{macrocode}
  6171. {%
  6172. \protect\contentsline{papertitle}{\@title}{\thepage}%
  6173. {page.\thepage}}%
  6174. \pdfbookmark{\@shorttitle}{chapter.\theHchapter}%
  6175. \def\@jmlr@authors@sep{ \& }%
  6176. % \end{macrocode}
  6177. %\changes{1.12}{2012/01/05}{changed \cs{@jmlrauthors} to \cs{@jmlr@authors}}
  6178. % \begin{macrocode}
  6179. \tocchapterpubauthor{\@jmlr@authors}%
  6180. {%
  6181. \@jmlrabbrvproceedings
  6182. \ifx\@jmlrvolume\@empty
  6183. \space
  6184. \else
  6185. \space\@jmlrvolume
  6186. \ifx\@jmlrissue\@empty
  6187. \else
  6188. (\@jmlrissue)%
  6189. \fi
  6190. :%
  6191. \fi
  6192. \protect\articlepagesref{#1}%
  6193. \ifx\@jmlryear\@empty\else,\fi
  6194. \space\@jmlryear
  6195. }%
  6196. % \end{macrocode}
  6197. %\changes{1.12}{2012/01/05}{changed \cs{@jmlrauthors} to \cs{@jmlr@authors}}
  6198. % \begin{macrocode}
  6199. \@write@author{#1}{\@jmlr@authors}%
  6200. }%
  6201. \def\InputIfFileExists##1##2##3{%
  6202. \IfFileExists{##1}{%
  6203. \@org@InputIfFileExists{##1}{##2}{##3}%
  6204. }%
  6205. {%
  6206. \@org@InputIfFileExists{\@importdir##1}{##2}{##3}%
  6207. }%
  6208. }%
  6209. \def\Xprefix{#1}%
  6210. % \end{macrocode}
  6211. % Disable \ics{jmlrvolume}, \ics{jmlryear}, \ics{jmlrworkshop} etc
  6212. % (since the imported papers belong to the same volume as the
  6213. % book---use \ics{importpubpaper} for papers pre-published in
  6214. %\changes{1.17}{2012/05/30}{disable \cs{jmlrvolume}, \cs{jmlryear}
  6215. %and \cs{jmlrworkshop} in imported papers}
  6216. % another volume).
  6217. % \begin{macrocode}
  6218. \let\jmlrvolume\@gobble
  6219. \let\jmlryear\@gobble
  6220. \let\jmlrworkshop\@gobble
  6221. \let\jmlrissue\@gobble
  6222. \let\jmlrpages\@gobble
  6223. \jmlrimporthook
  6224. \import{\@importdir\@importfile}%
  6225. \def\Xprefix{}%
  6226. \egroup
  6227. \gdef\@shortauthor{}%
  6228. \gdef\@shorttitle{}%
  6229. \gdef\@firstauthor{}%
  6230. \gdef\@jmlr@authors{\@jmlrauthors}%
  6231. \gdef\@jmlrauthors{}%
  6232. \gdef\@firstsurname{}%
  6233. }
  6234. \newcommand{\importpaper}[3][]{%
  6235. \ClassError{jmlrbook}{\string\importpaper\space
  6236. not permitted outside `jmlrpapers' environment}{}%
  6237. }
  6238. % \end{macrocode}
  6239. %\end{macro}
  6240. %
  6241. %\begin{macro}{\importarticle}
  6242. % Import a document that hasn't been published.
  6243. % Syntax: \cs{importarticle}\oarg{label}\marg{dir}\marg{file}
  6244. % where \meta{dir} is the directory in which the paper is located and
  6245. % \meta{file} is the name of the file. The optional
  6246. % argument is a label. This is used to prefix the labels and
  6247. % citations in the document so they don't clash with other imported
  6248. % articles. If omitted, \meta{file} is used instead.
  6249. % \begin{macrocode}
  6250. \newcommand{\@importarticle}[3][\@importdir\@importfile]{%
  6251. \bgroup
  6252. \def\@importdir{#2/}%
  6253. \def\@importfile{#3}%
  6254. \@write@jmlr@import{#1}{#2}{#3}%
  6255. \def\@extra@b@citeb{#1}%
  6256. \def\@extra@binfo{#1}%
  6257. \def\jmlrmaketitlehook{%
  6258. \def\titlebreak{ }%
  6259. \addtomaincontents{toc}%
  6260. % \end{macrocode}
  6261. %\changes{1.12}{2012/01/05}{changed \cs{@shorttitle} to \cs{@title}}
  6262. % \begin{macrocode}
  6263. {%
  6264. \protect\contentsline{papertitle}{\@title}{\thepage}%
  6265. {page.\thepage}}%
  6266. % \end{macrocode}
  6267. %\changes{1.09}{2010/12/01}{Added \cs{label} to \cs{jmlrmaketitlehook}}
  6268. % \begin{macrocode}
  6269. \label{}%
  6270. \pdfbookmark{\@shorttitle}{chapter.\theHchapter}%
  6271. \def\@jmlr@authors@sep{ \& }%
  6272. % \end{macrocode}
  6273. %\changes{1.12}{2012/01/05}{changed \cs{@jmlrauthors} to \cs{@jmlr@authors}}
  6274. % \begin{macrocode}
  6275. \tocchapterauthor{\@jmlr@authors}%
  6276. \@write@author{#1}{\@jmlr@authors}%
  6277. \jmlrpages{}%
  6278. \jmlrvolume{}%
  6279. \jmlryear{}%
  6280. \jmlrsubmitted{}%
  6281. \jmlrpublished{}%
  6282. \jmlrproceedings{}{}%
  6283. }%
  6284. \graphicspath{{\@importdir}}%
  6285. \def\InputIfFileExists##1##2##3{%
  6286. \IfFileExists{##1}{%
  6287. \@org@InputIfFileExists{##1}{##2}{##3}%
  6288. }%
  6289. {%
  6290. \@org@InputIfFileExists{\@importdir##1}{##2}{##3}%
  6291. }%
  6292. }%
  6293. \def\Xprefix{#1}%
  6294. \jmlrimporthook
  6295. % \end{macrocode}
  6296. %\changes{1.17}{2012/15/28}{set title page style for imported
  6297. %articles to articlet style}
  6298. % \begin{macrocode}
  6299. \let\ps@jmlrtps\ps@articlet
  6300. \import{\@importdir\@importfile}%
  6301. \def\Xprefix{}%
  6302. \egroup
  6303. \gdef\@shortauthor{}%
  6304. \gdef\@shorttitle{}%
  6305. \gdef\@firstauthor{}%
  6306. \gdef\@jmlr@authors{\@jmlrauthors}%
  6307. \gdef\@jmlrauthors{}%
  6308. \gdef\@firstsurname{}%
  6309. }
  6310. \newcommand{\importarticle}[3][]{%
  6311. \ClassError{jmlrbook}{\string\importarticle\space
  6312. not permitted outside `jmlrpapers' environment}{}%
  6313. }
  6314. % \end{macrocode}
  6315. %\end{macro}
  6316. %
  6317. %\begin{macro}{\addtocpart}
  6318. % Add a part to the TOC without printing anything in the text
  6319. % (but does a \cs{cleardoublepage}).
  6320. % \begin{macrocode}
  6321. \newcommand{\addtocpart}[1]{%
  6322. \cleardoublepage
  6323. \refstepcounter{tocpart}%
  6324. \addtocontents{toc}{\protect\tocpart{#1}}%
  6325. \pdfbookmark[-1]{#1}{part.\thetocpart}%
  6326. }
  6327. \newcounter{tocpart}
  6328. % \end{macrocode}
  6329. %\end{macro}
  6330. %
  6331. %\begin{macro}{\tocpart}
  6332. % Define the appearance of a part in the TOC.
  6333. % \begin{macrocode}
  6334. \newcommand{\tocpart}[1]{%
  6335. \addpenalty{-\@highpenalty}%
  6336. \vskip 1.0ex \@plus\p@
  6337. \setlength\@tempdima{2.25em}%
  6338. \begingroup
  6339. \parindent \z@ \rightskip \@pnumwidth
  6340. \parfillskip -\@pnumwidth
  6341. \leavevmode \large\bfseries
  6342. \advance\leftskip\@tempdima
  6343. \hskip -\leftskip
  6344. #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss \null}\par
  6345. \penalty\@highpenalty
  6346. \endgroup
  6347. }
  6348. % \end{macrocode}
  6349. %\end{macro}
  6350. %
  6351. % Set up the layout of the chapter headings
  6352. % \begin{macrocode}
  6353. \setlength{\prechapterskip}{3em}
  6354. \setlength{\postchapterskip}{20pt}
  6355. % \end{macrocode}
  6356. %
  6357. %\begin{macro}{\chapternumberformat}
  6358. % \begin{macrocode}
  6359. \renewcommand{\chapternumberformat}[1]{%
  6360. \Large\bfseries \@chapapp\space#1\par
  6361. }
  6362. % \end{macrocode}
  6363. %\end{macro}
  6364. %
  6365. %\begin{macro}{\chaptertitleformat}
  6366. % \begin{macrocode}
  6367. \renewcommand{\chaptertitleformat}[1]{%
  6368. \Large\bfseries #1}
  6369. % \end{macrocode}
  6370. %\end{macro}
  6371. %\begin{macro}{\chapterformat}
  6372. % \begin{macrocode}
  6373. \renewcommand*{\chapterformat}{%
  6374. \raggedright
  6375. }
  6376. % \end{macrocode}
  6377. %\end{macro}
  6378. % Set up the format of a part in the book (not a part in an
  6379. % article).
  6380. %\begin{macro}{\preparthook}
  6381. % \begin{macrocode}
  6382. \renewcommand{\preparthook}{\cleardoublepage\null\vfil}
  6383. % \end{macrocode}
  6384. %\end{macro}
  6385. %\begin{macro}{\partnumberformat}
  6386. % \begin{macrocode}
  6387. \renewcommand{\partnumberformat}[1]{%
  6388. \Huge\bfseries \@partapp\nobreakspace#1\par\nobreak
  6389. \vskip 20\p@
  6390. }
  6391. % \end{macrocode}
  6392. %\end{macro}
  6393. %\begin{macro}{\postparthook}
  6394. % \begin{macrocode}
  6395. \def\postparthook{%
  6396. \thispagestyle{empty}%
  6397. \vfil\newpage
  6398. \null
  6399. \thispagestyle{empty}%
  6400. \newpage
  6401. }
  6402. % \end{macrocode}
  6403. %\end{macro}
  6404. %
  6405. %\begin{macro}{\@curparthead}
  6406. % The heading of the current part
  6407. % \begin{macrocode}
  6408. \newcommand{\@curparthead}{}
  6409. % \end{macrocode}
  6410. %\end{macro}
  6411. %
  6412. %\begin{macro}{\parttitleformat}
  6413. % \begin{macrocode}
  6414. \renewcommand{\parttitleformat}[1]{#1%
  6415. \gdef\@curparthead{\@partapp\space \thepart. #1}%
  6416. \@mkboth{\@curparthead}{\@curparthead}%
  6417. }
  6418. % \end{macrocode}
  6419. %\end{macro}
  6420. %
  6421. %\begin{macro}{\firstpageno}
  6422. % Change \cs{firstpageno} to do nothing as the page number will
  6423. % be determined by the book.
  6424. % \begin{macrocode}
  6425. \renewcommand{\firstpageno}[1]{}
  6426. % \end{macrocode}
  6427. %\end{macro}
  6428. %
  6429. %\begin{macro}{\tocchapterauthor}
  6430. % Add the author of the current chapter to the table of contents.
  6431. % \begin{macrocode}
  6432. \newcommand{\tocchapterauthor}[1]{%
  6433. \addtomaincontents{toc}{\protect\contentsline{chapterauthor}{%
  6434. #1}{}{}}%
  6435. }
  6436. % \end{macrocode}
  6437. %\end{macro}
  6438. %
  6439. %\begin{macro}{\tocchapterpubauthor}
  6440. % Add the author of an imported prepublished paper to the
  6441. % table of contents. The first argument is the author (or list
  6442. % of authors). The second argument is the reference to the
  6443. % published article.
  6444. % \begin{macrocode}
  6445. \newcommand{\tocchapterpubauthor}[2]{%
  6446. \addtomaincontents{toc}{\protect\contentsline{chapterauthor}{%
  6447. #1; #2.}{}{}}%
  6448. }
  6449. % \end{macrocode}
  6450. %\end{macro}
  6451. %
  6452. % Set up the formatting in the TOC
  6453. % \begin{macrocode}
  6454. \renewcommand*\@pnumwidth{2em}
  6455. % \end{macrocode}
  6456. %
  6457. %\begin{macro}{\l@part}
  6458. % Format for book parts
  6459. % \begin{macrocode}
  6460. \renewcommand*\l@part[2]{%
  6461. \ifnum \c@tocdepth >\m@ne
  6462. \addpenalty{-\@highpenalty}%
  6463. \vskip 1.0em \@plus\p@
  6464. %\setlength\@tempdima{5em}%
  6465. \settowidth\@tempdima{\large\bfseries \@partapp\space MM}%
  6466. \vbox{%
  6467. \pagerule
  6468. \begingroup
  6469. \parindent \z@ \rightskip \@pnumwidth
  6470. \parfillskip -\@pnumwidth
  6471. \leavevmode \large\bfseries
  6472. \advance\leftskip\@tempdima
  6473. \hskip -\leftskip
  6474. \renewcommand*\numberline[1]{\hb@xt@ \@tempdima
  6475. {\@partapp\space ##1\hfil }}%
  6476. #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss
  6477. \normalfont\normalsize #2}\par
  6478. \penalty\@highpenalty
  6479. \endgroup
  6480. \pagerule
  6481. }%
  6482. \fi}
  6483. % \end{macrocode}
  6484. %\end{macro}
  6485. %
  6486. %\begin{macro}{\l@chapter}
  6487. % \begin{macrocode}
  6488. \renewcommand{\l@chapter}[2]{%
  6489. \ifnum\c@tocdepth>\m@ne
  6490. \addpenalty{-\@highpenalty}%
  6491. \vskip 1.0em \@plus \p@
  6492. \setlength\@tempdima{2em}%
  6493. \begingroup
  6494. \parindent \z@
  6495. \rightskip \@pnumwidth
  6496. \parfillskip -\@pnumwidth
  6497. \leavevmode \large \bfseries
  6498. \advance \leftskip \@tempdima
  6499. \hskip -\leftskip
  6500. \renewcommand*\numberline[1]{\hb@xt@ \@tempdima
  6501. {##1\hfil }}%
  6502. #1\nobreak \hfil \nobreak \hb@xt@ \@pnumwidth {\hss
  6503. \normalfont\normalsize #2}\par
  6504. \penalty \@highpenalty
  6505. \endgroup
  6506. \fi
  6507. }
  6508. % \end{macrocode}
  6509. %\end{macro}
  6510. %
  6511. %\begin{macro}{\l@papertitle}
  6512. % \begin{macrocode}
  6513. \newcommand*{\l@papertitle}[2]{%
  6514. \ifnum \c@tocdepth >\m@ne
  6515. \addpenalty{-\@highpenalty}%
  6516. \vskip 1.0em \@plus\p@
  6517. \setlength\@tempdima{3em}%
  6518. \begingroup
  6519. \leavevmode \raggedright\itshape
  6520. #1\nobreak\hfill \nobreak\hb@xt@\@pnumwidth{\hss
  6521. \normalfont#2}%
  6522. \par
  6523. \penalty\@highpenalty
  6524. \endgroup
  6525. \fi
  6526. }
  6527. % \end{macrocode}
  6528. %\end{macro}
  6529. %
  6530. %\begin{macro}{\l@chapterauthor}
  6531. % \begin{macrocode}
  6532. \newcommand*\l@chapterauthor[2]{%
  6533. \ifnum \c@tocdepth >\m@ne
  6534. % \end{macrocode}
  6535. %\changes{1.11}{2011/01/06}{removed penalty}
  6536. % \begin{macrocode}
  6537. \begingroup
  6538. \parindent \z@
  6539. \rightskip \@pnumwidth
  6540. \parfillskip -\@pnumwidth
  6541. \leavevmode \raggedright
  6542. \parbox{\linewidth-\@pnumwidth}{\raggedright#1\par}%
  6543. \par
  6544. \endgroup
  6545. \fi}
  6546. % \end{macrocode}
  6547. %\end{macro}
  6548. %
  6549. %\begin{macro}{\l@section}
  6550. % \begin{macrocode}
  6551. \renewcommand*\l@section[2]{%
  6552. \ifnum \c@tocdepth >\m@ne
  6553. \addpenalty{-\@highpenalty}%
  6554. \vskip 1.0em \@plus\p@
  6555. \setlength\@tempdima{3em}%
  6556. \begingroup
  6557. \parindent \z@ \rightskip \@pnumwidth
  6558. \parfillskip -\@pnumwidth
  6559. \leavevmode \normalsize\mdseries
  6560. \advance\leftskip\@tempdima
  6561. \hskip -\leftskip
  6562. #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
  6563. \penalty\@highpenalty
  6564. \endgroup
  6565. \fi}
  6566. % \end{macrocode}
  6567. %\end{macro}
  6568. %
  6569. %\begin{macro}{\l@subsection}
  6570. % \begin{macrocode}
  6571. \renewcommand*\l@subsection[2]{%
  6572. \ifnum \c@tocdepth >\m@ne
  6573. \addpenalty{-\@highpenalty}%
  6574. \vskip 1.0em \@plus\p@
  6575. \setlength\@tempdima{3.5em}%
  6576. \begingroup
  6577. \parindent \z@ \rightskip \@pnumwidth
  6578. \parfillskip -\@pnumwidth
  6579. \leavevmode \normalsize\mdseries
  6580. \advance\leftskip\@tempdima
  6581. \hskip -\leftskip
  6582. #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
  6583. \penalty\@highpenalty
  6584. \endgroup
  6585. \fi}
  6586. % \end{macrocode}
  6587. %\end{macro}
  6588. %
  6589. %\begin{macro}{\chaptermark}
  6590. % \begin{macrocode}
  6591. \renewcommand*{\chaptermark}[1]{%
  6592. \@mkboth{\@curparthead}{\protect\thechapter. #1}%
  6593. }
  6594. % \end{macrocode}
  6595. %\end{macro}
  6596. %
  6597. % Set up page styles
  6598. %\begin{macro}{\firstpagehead}
  6599. % \begin{macrocode}
  6600. \newcommand{\firstpagehead}{}
  6601. % \end{macrocode}
  6602. %\end{macro}
  6603. %\begin{macro}{\firstpagefoot}
  6604. %\changes{1.09}{2010/12/01}{added \cs{@reprint}}
  6605. % \begin{macrocode}
  6606. \newcommand{\firstpagefoot}{%
  6607. \@reprint\hfill\thepage
  6608. }
  6609. % \end{macrocode}
  6610. %\end{macro}
  6611. %
  6612. %\begin{macro}{\headfont}
  6613. % Set the header font
  6614. % \begin{macrocode}
  6615. \newcommand*{\headfont}{\reset@font\small\scshape}%
  6616. % \end{macrocode}
  6617. %\end{macro}
  6618. %\begin{macro}{\footfont}
  6619. % Set the footer font
  6620. % \begin{macrocode}
  6621. \newcommand*{\footfont}{\reset@font\small\itshape}%
  6622. % \end{macrocode}
  6623. %\end{macro}
  6624. %
  6625. %\begin{macro}{\ps@chplain}
  6626. % Page style for first page of a chapter
  6627. % \begin{macrocode}
  6628. \newcommand*{\ps@chplain}{%
  6629. \let\@mkboth\@gobbletwo
  6630. \renewcommand*{\@oddhead}{\headfont\firstpagehead}%
  6631. \renewcommand*{\@evenhead}{}%
  6632. \renewcommand*{\@oddfoot}{\footfont\firstpagefoot}%
  6633. \renewcommand*{\@evenfoot}{\footfont\thepage\hfill
  6634. }%
  6635. }
  6636. \let\ps@plain\ps@chplain
  6637. % \end{macrocode}
  6638. %\end{macro}
  6639. %\begin{macro}{\ps@article}
  6640. % Page style for the imported articles.
  6641. % \begin{macrocode}
  6642. \newcommand*{\ps@article}{%
  6643. \let\@mkboth\@gobbletwo
  6644. \renewcommand*{\@oddhead}{\headfont\hfill\@shorttitle}%
  6645. \renewcommand*{\@evenhead}{\headfont\@shortauthor\hfill}%
  6646. \renewcommand*{\@oddfoot}{\footfont\hfill\thepage}
  6647. \renewcommand*{\@evenfoot}{\footfont\thepage\hfill}
  6648. }
  6649. % \end{macrocode}
  6650. %\end{macro}
  6651. %\begin{macro}{\ps@articlet}
  6652. % Title page style for imported articles (imported using
  6653. % \cs{importarticle})
  6654. % \begin{macrocode}
  6655. \newcommand*{\ps@articlet}{%
  6656. \let\@mkboth\@gobbletwo
  6657. \renewcommand*{\@oddhead}{}%
  6658. \renewcommand*{\@evenhead}{}%
  6659. \renewcommand*{\@oddfoot}{\footfont\hfill\thepage}
  6660. \renewcommand*{\@evenfoot}{\footfont\thepage\hfill}
  6661. }
  6662. % \end{macrocode}
  6663. %\end{macro}
  6664. %
  6665. %\begin{macro}{\ps@jmlrbook}
  6666. % Page style for book
  6667. %\changes{1.15}{2012/05/12}{removed dependence on \cs{ps@headings}
  6668. %(made consistent with article page style)}
  6669. % \begin{macrocode}
  6670. \newcommand*{\ps@jmlrbook}{%
  6671. \renewcommand*{\@oddfoot}{\footfont\hfill\thepage}
  6672. \renewcommand*{\@evenfoot}{\footfont\thepage\hfill}
  6673. \def\@evenhead{\headfont\leftmark\hfill}%
  6674. \def\@oddhead{\hfill\headfont\rightmark}%
  6675. \let\@mkboth\markboth
  6676. \renewcommand*{\sectionmark}[1]{}%
  6677. }
  6678. % \end{macrocode}
  6679. %\end{macro}
  6680. %
  6681. %\begin{macro}{\markleft}
  6682. %\changes{1.15}{2012/05/12}{new}
  6683. % Provide a command to set just the left header mark.
  6684. % \begin{macrocode}
  6685. \newcommand*{\markleft}[1]{%
  6686. \begingroup
  6687. \let\label\relax
  6688. \let\index\relax
  6689. \let\glossary\relax
  6690. \expandafter\@markleft\@themark{#1}%
  6691. \@temptokena
  6692. \expandafter{\@themark}%
  6693. \mark{\the\@temptokena}
  6694. \endgroup
  6695. \if@nobreak
  6696. \ifvmode
  6697. \nobreak
  6698. \fi
  6699. \fi
  6700. }
  6701. \newcommand*{\@markleft}[3]{%
  6702. \@temptokena{#2}%
  6703. \unrestored@protected@xdef\@themark{{#3}{\the\@temptokena}}
  6704. }
  6705. % \end{macrocode}
  6706. %\end{macro}
  6707. %
  6708. %\begin{macro}{\morefrontmatter}
  6709. % \begin{macrocode}
  6710. \renewcommand*{\morefrontmatter}{\pagestyle{jmlrbook}%
  6711. \def\chaptermark##1{%
  6712. \@mkboth{##1\hfill}{\hfill##1}}%
  6713. }
  6714. % \end{macrocode}
  6715. %\end{macro}
  6716. %
  6717. %\begin{macro}{\moremainmatter}
  6718. % \begin{macrocode}
  6719. \renewcommand*{\moremainmatter}{\pagestyle{jmlrbook}%
  6720. \def\chaptermark##1{%
  6721. \@mkboth{\@curparthead}{\protect\thechapter. ##1}%
  6722. }%
  6723. }
  6724. % \end{macrocode}
  6725. %\end{macro}
  6726. %
  6727. %\begin{macro}{\bibsection}
  6728. % Set the bibliography headings in the articles
  6729. % \begin{macrocode}
  6730. \renewcommand*\bibsection{\section*{\refname}}
  6731. % \end{macrocode}
  6732. %\end{macro}
  6733. %\changes{1.10}{2011-01-05}{Removed redundant redefinition of
  6734. %\cs{@bookpart}}
  6735. %
  6736. % Set up the book commands:
  6737. % \begin{macrocode}
  6738. \jmlrbookcommands
  6739. % \end{macrocode}
  6740. %
  6741. % In the event that authors have used different versions of
  6742. % \sty{algorithm2e}, define old command names.
  6743. %\changes{1.11}{2011-03-24}{added old algorithm2e commands}
  6744. % \begin{macrocode}
  6745. \providecommand*{\SetNoLine}{\SetAlgoNoLine}
  6746. \providecommand*{\SetVline}{\SetAlgoVlined}
  6747. \providecommand*{\Setvlineskip}{\SetVlineSkip}
  6748. \providecommand*{\SetLine}{\SetAlgoLined}
  6749. \providecommand*{\dontprintsemicolon}{\DontPrintSemicolon}
  6750. \providecommand*{\printsemicolon}{\PrintSemicolon}
  6751. \providecommand*{\incmargin}{\IncMargin}
  6752. \providecommand*{\decmargin}[1]{\DecMargin{-#1}}
  6753. \providecommand*{\setnlskip}{\SetNlSkip}
  6754. \providecommand*{\Setnlskip}{\SetNlSkip}
  6755. \providecommand*{\setalcapskip}{\SetAlCapSkip}
  6756. \providecommand*{\setalcaphskip}{\SetAlCapHSkip}
  6757. \providecommand*{\nlSty}{\NlSty}
  6758. \providecommand*{\Setnlsty}{\SetNlSty}
  6759. \providecommand*{\linesnumbered}{\LinesNumbered}
  6760. \providecommand*{\linesnotnumbered}{\LinesNotNumbered}
  6761. \providecommand*{\linesnumberedhidden}{\LinesNumberedHidden}
  6762. \providecommand*{\showln}{\ShowLn}
  6763. \providecommand*{\showlnlabel}{\ShowLnLabel}
  6764. \providecommand*{\nocaptionofalgo}{\NoCaptionOfAlgo}
  6765. \providecommand*{\restorecaptionofalgo}{\RestoreCaptionOfAlgo}
  6766. \providecommand*{\restylealgo}{\RestyleAlgo}
  6767. \providecommand*{\Titleofalgo}{\TitleOfAlgo}
  6768. % \end{macrocode}
  6769. %\iffalse
  6770. % \begin{macrocode}
  6771. %</jmlrbook.cls>
  6772. % \end{macrocode}
  6773. %\fi
  6774. %\Finale
  6775. \endinput