diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/jmlr/jmlr.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/jmlr/jmlr.dtx | 451 |
1 files changed, 334 insertions, 117 deletions
diff --git a/Master/texmf-dist/source/latex/jmlr/jmlr.dtx b/Master/texmf-dist/source/latex/jmlr/jmlr.dtx index 7aaeae520dc..5bf541aef18 100644 --- a/Master/texmf-dist/source/latex/jmlr/jmlr.dtx +++ b/Master/texmf-dist/source/latex/jmlr/jmlr.dtx @@ -7,7 +7,7 @@ % -author "Nicola Talbot" % -codetitle "jmlr.cls Code" % jmlr -% Created on 2012/5/16 8:16 +% Created on 2012/5/30 13:49 %\fi %\iffalse %<*package> @@ -34,7 +34,7 @@ % \fi % \iffalse %<*driver> -\documentclass{nlctdoc} +\documentclass[report]{nlctdoc} \usepackage{amsmath} \usepackage[utf8]{inputenc} @@ -49,7 +49,7 @@ \doxitem{Option}{option}{package options} -\CheckSum{4403} +\CheckSum{4533} \OnlyDescription \newcommand*{\appopt}[1]{\texttt{-{}-#1}} @@ -67,11 +67,11 @@ % \author{Nicola L. C. Talbot\\[10pt] %\url{http://theoval.cmp.uea.ac.uk/~nlct/}} % -% \date{2012-05-16 (version 1.16)} +% \date{2012-05-30 (version 1.17)} % \maketitle %\tableofcontents % -%\section{Introduction} +%\chapter{Introduction} % %The \clsfmt{jmlr} class is for articles that need to be formatted %according to the Journal of Machine Learning Research style. This @@ -80,21 +80,22 @@ %\cls{combine} class to collate the articles into a book. %\sectionref{sec:jmlr} describes how to use the \clsfmt{jmlr} class. % -%The \clsfmt{jmlrbook} class is for combining JMLR articles into a book. -%This class uses \cls{combine} and \sty{hyperref}, which are -%troublesome enough on their own but together are quite fragile. The -%\clsfmt{jmlrbook} class redefines some internals to get \clsfmt{combine} -%and \clsfmt{hyperref} to work together but some packages (e.g.\ -%\sty{subfig} and \sty{pdfpages}) are likely to mess everything up -%and cause errors. This is why the guidelines to authors are fairly -%stringent and why \clsfmt{jmlr} will give an error message if certain -%packages are loaded.\footnote{Currently \clsfmt{jmlr} will check if -%\sty{subfig}, \sty{pdfpages}, \sty{geometry}, \sty{psfig}, -%\sty{epsfig} and \sty{theorem} are loaded and will throw an error. +%The \clsfmt{jmlrbook} class is for combining JMLR articles into a +%book. This class uses \cls{combine} and \sty{hyperref}, which are +%troublesome enough on their own but together are quite fragile. The +%\clsfmt{jmlrbook} class redefines some internals to get +%\clsfmt{combine} and \clsfmt{hyperref} to work together but some +%packages (e.g.\ \sty{subfig} and \sty{pdfpages}) are likely to mess +%everything up and cause errors. This is why the guidelines to +%authors are fairly stringent and why \clsfmt{jmlr} will give an +%error message if certain packages are loaded.\footnote{Currently +%\clsfmt{jmlr} will check if \sty{subfig}, \sty{pdfpages}, +%\sty{geometry}, \sty{psfig}, \sty{epsfig}, \sty{theorem}, +%\sty{tabularx} and \sty{theorem} are loaded and will throw an error. %If other packages are found to be a problem, they will be added to %the list.} The \clsfmt{jmlrbook} class works best with PDF\LaTeX\ so %authors should ensure that their articles can compile with -%PDF\LaTeX. \sectionref{sec:jmlrbook} describes how to use the +%PDF\LaTeX. \sectionref{sec:jmlrbook} describes how to use the %\clsfmt{jmlrbook} class. % %\begin{important} @@ -116,23 +117,26 @@ %\documentclass{jmlr} %\end{verbatim} % -%The \app{makejmlrbook} Perl script can be used to make a book that -%uses the \clsfmt{jmlrbook} class. In addition to creating the print -%and online versions of the book, it will compile the individual -%articles, running Bib\TeX\ where necessary, and create a set of -%HTML files containing a list of all the articles imported into the -%book along with links to the abstracts and PDFs of the individual -%articles. \sectionref{sec:makejmlrbook} describes how -%to use the \app{makejmlrbook} application. +%There is a Java application called \app{makejmlrbookgui} that can +%compile all the individual papers from the book and generate the +%accompanying HTML files for the JMLR proceedings page. It can also +%create a grey nonhyperlinked PDF/X compliant print version of the +%book. The application can be downloaded from +%\url{http://www.dickimaw-books.com/apps/makejmlrbookgui/} where +%there is also a +%\href{http://www.dickimaw-books.com/apps/makejmlrbookgui/manual/troubleshooting.html}{troubleshooting +%section}. +% +%There is also a Perl script called \app{makejmlrbook}, which is +%distributed with the \clsfmt{jmlr} and \clsfmt{jmlrbook} bundle, +%however it has been superseded by \app{makejmlrbookgui}. For those who +%still want to use it, \app{makejmlrbook} is described in +%\sectionref{sec:makejmlrbook}. % -%There is also a Java application that can be used as an alternative -%to \app{makejmlrbook}, which includes diagnostic tools. See -%\url{http://www.dickimaw-books.com/apps/makejmlrbookgui/} for -%further information. % %\section{Required Packages} % -%The \clsfmt{jmlr} class is based on the \cls{scrartcl} class and loads +%The \clsfmt{jmlr} class is based on the \cls{article} class and loads %the following packages: \sty{amsmath}, \sty{amssymb}, %\sty{natbib}, \sty{url}, \sty{graphicx} and \sty{algorithm2e}, %\sty{hyperref}, \sty{nameref} and \sty{xkeyval}. @@ -142,9 +146,11 @@ %The \clsfmt{jmlrbook} class additionally loads the \cls{combine} class %and the following packages: \sty{combnat}, \sty{setspace} and \sty{fink}. % +%The \app{makejmlrbookgui} application requires Java (at least +%JRE~7), \TeX, \TeX4HT and Ghostscript. %The \app{makejmlrbook} script requires Perl, \TeX\ and \TeX4ht. % -%\section{Guidelines for Article Authors} +%\chapter{Guidelines for Article Authors} %\label{sec:jmlr} % %Article authors should use the \clsfmt{jmlr} class. This class @@ -174,7 +180,7 @@ % %\end{description} % -%\subsection{Title Information} +%\section{Title Information} % %The \clsfmt{jmlr} class uses different syntax from \sty{jmlr2e} and %\sty{jmlrwcp2e} to specify the title information. In particular, it @@ -238,7 +244,19 @@ %\end{definition} %instead of \cs{newline} or \verb|\\| as this will ensure that the %line break doesn't also end up in the table of contents or bookmarks -%when the article is included in a book. +%when the article is included in a book. If there is content within +%the title that should not appear in the page headings or table of +%contents (for example, a footnote) use +%\begin{definition}[\DescribeMacro{\titletag}] +%\cs{titletag}\marg{title only stuff} +%\end{definition} +%For example: +%\begin{verbatim} +%\title{An Interesting Paper\titlebreak +%With a Line Break\titletag{\thanks{and an +%acknowledgement}}} +%\end{verbatim} +% % %\begin{definition}[\DescribeMacro{\editor}] %\cs{editor}\marg{name} @@ -262,6 +280,19 @@ %the initial letter of each forename is a diacritic it must be %grouped. If the abbreviation of the name doesn't get parsed %properly you can override the default using the optional argument. (See below for examples.) +% +%If there is any content within \meta{author's name} that shouldn't +%get copied to the header, footer or table of contents, it should be +%enclosed within the argument of +%\begin{definition}[\DescribeMacro{\nametag}] +%\cs{nametag}\marg{title only stuff} +%\end{definition} +%For example: +%\begin{verbatim} +%\Name{Ann Other\nametag{\thanks{formerly with some other +%institute}}} +%\end{verbatim} +% %\begin{definition}[\DescribeMacro{\Email}] %\cs{Email}\marg{author's email} %\end{definition} @@ -328,11 +359,12 @@ %\end{verbatim} %\end{description} % -%\subsection{Font Changing Commands} +%\section{Font Changing Commands} % %Use the \LaTeXe\ font changing commands, such as \cs{bfseries} or %\cs{textbf}\marg{text}, rather than the obsolete \LaTeX2.09 -%commands, such as \cs{bf}. +%commands, such as \cs{bf}. (The obsolete font changing commands +%will produce a warning if used.) % %\begin{definition}[\DescribeMacro{\url}] %\cs{url}\marg{address} @@ -350,7 +382,7 @@ %Note that this is not the same as \cs{Email}, which should only be %used in the argument of \cs{author}. % -%\subsection{Structure} +%\section{Structure} % %\begin{definition}[\DescribeEnv{abstract}] %\cs{begin}\{abstract\}\\ @@ -410,10 +442,10 @@ %\cs{section} to produce an appendix. Example: %\begin{verbatim} %\appendix -%\section{Proof of Theorems} +%\chapter{Proof of Theorems} %\end{verbatim} % -%\subsection{Citations and Bibliography} +%\section{Citations and Bibliography} % %The \clsfmt{jmlr} class automatically loads \sty{natbib} and sets %the bibliography style to \texttt{plainnat}. References should @@ -436,7 +468,7 @@ % %See the \ctandoc{natbib} for further details. % -%\subsection{Figures and Tables} +%\section{Figures and Tables} % %Floats, such as figures, tables and algorithms, are moving objects %and are supposed to float to the nearest convenient location. @@ -448,7 +480,7 @@ %stand out from the rest of the text. This extra space is put in %automatically and shouldn't need modifying. % -%To ensure consistency, please \emph{don't} try changing the +%To ensure consistency, please \emph{\bfseries don't} try changing the %format of the caption by doing something like: %\begin{verbatim} %\caption{\textit{A Sample Caption.}} @@ -519,10 +551,10 @@ %commands) the file can be included using \cs{includeteximage}. %The optional argument is a key=value comma-separated list %where the keys are a subset of those provided by -%\cs{includegraphics}. The main keys are: \texttt{width}, +%\linebreak\cs{includegraphics}. The main keys are: \texttt{width}, %\texttt{height}, \texttt{scale} and \texttt{angle}. % -%\subsubsection{Sub-Figures and Sub-Tables} +%\subsection{Sub-Figures and Sub-Tables} % %The \sty{subfig} package causes a problem for \clsfmt{jmlrbook} so %the \clsfmt{jmlr} class will give an error if it is used. Therefore @@ -567,7 +599,7 @@ %This is an analogous command for sub-tables. The default value %for \meta{valign} is \texttt{t}. % -%\subsection{Algorithms} +%\section{Algorithms} % %\begin{definition}[\DescribeEnv{algorithm}] %\cs{begin}\{algorithm\}\\ @@ -637,7 +669,7 @@ % %See the \ctandoc{algorithm2e} for more details. % -%\subsection{Description Lists} +%\section{Description Lists} % %\begin{definition}[\DescribeEnv{altdescription}] %\cs{begin}\{altdescription\}\marg{widest label}\\ @@ -655,7 +687,7 @@ %\end{altdescription} %\end{verbatim} % -%\subsection{Theorems, Lemmas etc} +%\section{Theorems, Lemmas etc} % %The \clsfmt{jmlr} class provides the following theorem-like %environments: \env{theorem}, \env{example}, \env{lemma}, @@ -675,7 +707,7 @@ %\end{theorem} %\end{verbatim} % -%\subsection{Cross-Referencing} +%\section{Cross-Referencing} %\label{sec:crossref} % %Always use \ics{label} when cross-referencing, rather than writing @@ -689,7 +721,7 @@ %Used to refer to a section or sections. For example, if you defined %a section as follows: %\begin{verbatim} -%\section{Results}\label{sec:results} +%\chapter{Results}\label{sec:results} %\end{verbatim} %you can refer to it as follows: %\begin{verbatim} @@ -777,7 +809,7 @@ %\end{definition} %Used to refer to an example or multiple examples. % -%\subsection{Mathematics} +%\section{Mathematics} % %The \clsfmt{jmlr} class loads the \sty{amsmath} package so you can use %any of the commands and environments defined in that package. A @@ -893,7 +925,7 @@ % %\end{table} % -%\subsection{Color vs Grayscale} +%\section{Color vs Grayscale} %\label{sec:color} % %It's helpful if authors supply grayscale versions of their @@ -932,9 +964,9 @@ %option, so you can use any of the x11 predefined colors (listed %in the \ctandoc{xcolor}). % -%\subsection{Where To Go For Help} +%\section{Where To Go For Help} % -%If you have a \LaTeX\ query, the first place to go to is the +%If you have a general \LaTeX\ query, the first place to go to is the %\urlfootref{http://www.tex.ac.uk/faq}{UK TUG FAQ}. % %If you are unfamiliar or just getting started with \LaTeX, there's @@ -947,6 +979,10 @@ %(\url{http://tug.org/mailman/listinfo/texhax}) and %\texttt{comp.text.tex} (archives available at %\url{http://groups.google.com/group/comp.text.tex/}). +%The best place for queries about the \clsfmt{jmlr} class is the +%\qt{Document Classes} section of the \LaTeX\ Community Forum, as +%there's a high chance I'll see it there and help if I can. (Emails +%directly to me tend to get lost in my overcrowded inbox.) % %Documentation for packages or classes can be found using the %\texttt{texdoc} application. For example: @@ -963,7 +999,7 @@ %manual for writers of term papers, theses, and dissertations}, The %University of Chicago Press, 1996. % -%\section{Guidelines for Production Editors} +%\chapter{Guidelines for Production Editors} %\label{sec:jmlrbook} % %The \clsfmt{jmlrbook} class can be used to combine articles that use @@ -982,11 +1018,11 @@ % %Before you compile the book, make sure that all the articles %compile as stand-alone documents (and run Bib\TeX\ where -%necessary). You can use the \app{makejmlrbook} Perl script to compile +%necessary). You can use the \app{makejmlrbookgui} application to compile %the book and create associated HTML files. See -%\sectionref{sec:makejmlrbook} for details. +%\url{http://www.dickimaw-books.com/apps/makejmlrbookgui/} for details. % -%\subsection{\clsfmt{jmlrbook} Class Options} +%\section{\clsfmt{jmlrbook} Class Options} %\begin{description} %\item[\clsopt{nowcp}]The imported pre-published articles were %published in the Journal of Machine Learning Research (default). @@ -1031,7 +1067,7 @@ % %\end{description} % -%\subsection{The Preamble} +%\section{The Preamble} % %Any packages that the imported articles load (which aren't %automatically loaded by \clsfmt{jmlr}) must be loaded in the book's @@ -1083,13 +1119,15 @@ %sub-title. % %\begin{definition}[\DescribeMacro{\logo}] -%\cs{logo}\marg{image command} +%\cs{logo}\oarg{url}\marg{image command} %\end{definition} %This sets the book's title image. Use \ics{includegraphics} and %omit the file extension. If you provide a grayscale version as %well as a color version, the grayscale version will be used for %the print version of the book. (See \sectionref{sec:color} -%for further details.) +%for further details.) The optional argument, if present, is used by +%\app{makejmlrbookgui} to make the logo a link to \meta{url} on the +%index HTML page, otherwise it's ignored. % %\begin{definition}[\DescribeMacro{\team}] %\cs{team}\marg{team title} @@ -1106,7 +1144,7 @@ %See \sectionref{sec:modifytitle} for details on how to modify the %layout of the title page. % -%\subsection{Main Book Commands} +%\section{Main Book Commands} % %All commands that are provided by the \clsfmt{jmlr} class are %also available with the \clsfmt{jmlrbook} class, but some commands @@ -1159,10 +1197,10 @@ %\end{verbatim} %\DescribeMacro{\prefacename}where \cs{prefacename} defaults to %``Preface''. This environment should typically go in the front -%matter and is provided to allow \app{makejmlrbook} create a +%matter and is provided to allow \app{makejmlrbookgui} create a %standalone document for the preface. The optional argument is the %filename (without any extension or path) that will be used by -%\app{makejmlrbook}. This defaults to \texttt{preface} but, to +%\app{makejmlrbookgui}. This defaults to \texttt{preface} but, to %conform with JMLR guidelines, should be changed to the surname of %the first author (editor) followed by the final two digits of the %year. See the JMLR website for further details of the guidelines. @@ -1214,7 +1252,8 @@ %\end{definition} %If used in the main part of the book, this command will start a %new part and issue a clear double page. Note that this command -%has a different effect if used in an imported article. +%has a different effect if used in an imported article (or inside the +%\env{jmlrpapers} environment). % %\begin{definition}[\DescribeMacro{\addtocpart}] %\cs{addtocpart}\marg{title} @@ -1227,7 +1266,8 @@ %\cs{chapter}\oarg{short title}\marg{title} %\end{definition} %This command may be used in the main body of the book but will -%cause an error if used within an imported article. +%cause an error if used within an imported article (or inside the +%\env{jmlrpapers} environment). % %\begin{definition}[\DescribeMacro{\section}] %\cs{section}\oarg{short title}\marg{title} @@ -1245,40 +1285,48 @@ %\cs{subparagraph}\oarg{short title}\marg{title} %\end{definition} %These commands may be used in the main body of the book or within -%imported articles. In the main body of the book they need to be +%imported articles. In the main body of the book (outside of the +%\env{jmlrpapers} environment) they need to be %within a chapter and will be numbered according to the chapter. % %\begin{definition}[\DescribeMacro{\appendix}] %\cs{appendix} %\end{definition} -%If used in the main body of the book, this will switch to the -%book appendices. Subsequent \cs{chapter} commands will produce the -%appendices. If used within an imported article, it will switch -%to the article appendices and won't affect the main part of -%the book. +%If used in the main body of the book (\emph{outside} of the +%\env{jmlrpapers} environment) this will switch to the book +%appendices. Subsequent \cs{chapter} commands will produce the +%appendices. (Any imported articles in the appendix will be +%identified by \app{makejmlrbookgui} as supplemental material.) If +%used within an imported article (or within the \env{jmlrpapers} +%environment) \cs{appendix} will switch to the +%article appendices and won't affect the main part of the book. % %\begin{definition}[\DescribeEnv{jmlrpapers}] %\cs{begin}\{jmlrpapers\}\\ %\meta{imported papers}\\ %\cs{end}\{jmlrpapers\} %\end{definition} -%This environment must be used when importing articles. Within this -%environment, use the following commands to import articles: +%This environment must be used when importing articles and may be +%used as often as required. Take care not to include book sectioning +%commands, such as \ics{chapter}, in this environment. Within the +%\envfmt{jmlrpapers} environment, use the following commands to +%import articles: %\begin{definition}[\DescribeMacro{\importpubpaper}] %\cs{importpubpaper}\oarg{label}\marg{directory}\marg{file}\marg{pages} %\end{definition} %This imports an article that has already been published elsewhere. %The \meta{pages} argument should be the page range from the %\emph{previously published} version of this article. This may not -%necessarily be the same as the page range of the article in the book. -%The directory the imported file is contained in is is given by -%\meta{directory}. If the file is in the same directory as the -%book, use a dot. The file name is given by \meta{file}. The article -%is also given a label, specified by the optional argument. This -%is \meta{directory}/\meta{file} by default. The label is used -%as a prefix to labels in the imported articles which ensures that -%cross-references are unique. You can also use this label to reference -%the article elsewhere in the book (see \sectionref{sec:bkcrossref}). +%necessarily be the same as the page range of the article in the +%book. The directory the imported file is contained in is given by +%\meta{directory}. If the file is in the same directory as the book, +%use a dot. The file name is given by \meta{file}. The article is +%also given a label, specified by the optional argument. This is +%\meta{directory}/\meta{file} by default. The label is used as a +%prefix to labels in the imported articles which ensures that +%cross-references are unique. You can also use this label to +%reference the article elsewhere in the book (see +%\sectionref{sec:bkcrossref}). % %\begin{definition}[\DescribeMacro{\importpaper}] %\cs{importpaper}\oarg{label}\marg{directory}\marg{file} @@ -1304,7 +1352,7 @@ %\end{jmlrpapers} %\end{verbatim} % -%\subsubsection{Two Column Articles in a One Column Book} +%\subsection{Two Column Articles in a One Column Book} % %The \clsfmt{jmlrbook} class column style will override the column style %of the imported articles. You can use the \clsopt{twocolumn} class @@ -1314,7 +1362,7 @@ %environment to switch on two column formatting. The effect will be %localised to the end of the environment. % -%\subsubsection{Cross-Referencing} +%\subsection{Cross-Referencing} %\label{sec:bkcrossref} % %You can cross-reference other parts of the book using the @@ -1323,7 +1371,7 @@ %the label with the label given when importing the article (that %is, the optional argument to \ics{importpubpaper}, %\ics{importpaper} or \cs{importarticle}). For example, if you -%want to reference a section labeled \texttt{sec:results} in the +%want to reference a section labelled \texttt{sec:results} in the %imported paper \texttt{paper1/paper1.tex}, you would need to do: %\begin{verbatim} %see Section~\ref{paper1/paper1sec:results} @@ -1375,7 +1423,7 @@ %given by \meta{label}. Again, this must be a single label, not a %list. % -%\subsection{Altering the Layout of the Main Title Page} +%\section{Altering the Layout of the Main Title Page} %\label{sec:modifytitle} % %\begin{definition}[\DescribeMacro{\titlebody}] @@ -1429,7 +1477,7 @@ %} %\end{verbatim} % -%\subsection{Potential Pitfalls} +%\section{Potential Pitfalls} % %The \cls{combine} class and \sty{hyperref} package are %individually both easily broken by packages that change certain @@ -1472,13 +1520,17 @@ %problem. For example, if one article uses \texttt{utf8} and another %uses \texttt{latin1}. If the authors have directly entered a %diacritic or ligature, such as \'e or \ae, instead of using a -%\LaTeX\ command, such as \cs{'e} or \cs{ae}, then -%this will cause an error on compiling the book.\footnote{and may also -%cause a problem for the editor's text editor.} The choice then is to -%either change all non-keyboard characters with the appropriate -%\LaTeX\ commands or to use the \cs{inputencoding} command, supplied -%by the \sty{inputenc} package, to switch the encoding at the start -%of each article. +%\LaTeX\ command, such as \cs{'e} or \cs{ae}, then this will cause an +%error on compiling the book.\footnote{and may also cause a problem +%for the editor's text editor.} The choice then is to either change +%all non-keyboard characters with the appropriate \LaTeX\ commands or +%to use the \cs{inputencoding} command, supplied by the +%\sty{inputenc} package, to switch the encoding at the start of each +%article. One thing to watch out for are bib files that contain a +%mixture of encodings caused by copying and pasting from different +%sources. Version~0.4.2b of \app{makejmlrbookgui} provides a function +%to search for characters outside the range 0x20 (space) and 0x7E +%(tilde). % %Authors who use \cs{nonumber} within an \env{equation} environment %can mess up the hyperlinks. Remove \cs{nonumber} and change the @@ -1489,9 +1541,21 @@ %\clsfmt{jmlrbook} won't find the graphics if the imported articles %aren't in the same directory as the book. % -%\subsection{Creating the Book Using \appfmt{makejmlrbook}} +%The \app{makejmlrbookgui} application provides some diagnostic +%tools, which can help detect some common problems. It's manual also +%has a +%\href{http://www.dickimaw-books.com/apps/makejmlrbookgui/manual/troubleshooting.html}{troubleshooting +%section}. +% +%\section{Creating the Book Using \appfmt{makejmlrbook}} %\label{sec:makejmlrbook} % +%\begin{important} +%The \app{makejmlrbook} script has been superseded by the +%\app{makejmlrbookgui} application, which can be downloaded +%from \url{http://www.dickimaw-books.com/apps/makejmlrbookgui/}. +%\end{important} +% %The \app{makejmlrbook} Perl script is designed to make it %easier to produce the print and online versions of the book, as %well as producing an HTML index of all the imported articles with @@ -1501,12 +1565,6 @@ %the imported articles must use the \clsfmt{jmlr} class. %Note that I have only tested \app{makejmlrbook} on Linux. % -% -%(If you don't like using a command line script or you want to use -%some diagnostic tools, you may prefer to use MakeJmlrBookGUI, which -%can be downloaded from -%\url{http://www.dickimaw-books.com/apps/makejmlrbookgui/}) -% %On UNIX style systems, the script can be invoked from a terminal %using: %\begin{prompt} @@ -1585,15 +1643,14 @@ %<*jmlr.cls> % \end{macrocode} %\fi -% This class is based on the \sty{jmlr2e} package but was updated to use -% \cls{scrartcl} instead of \cls{article} and was modified to make sure +% This class is based on the \sty{jmlr2e} package but was modified to make sure % it works with \clsfmt{jmlrbook} which uses both \cls{combine} and % \sty{hyperref}. % % Declare class and required TeX format: % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{jmlr}[2012/05/16 v1.16 (NLCT) Journal of Machine Learning Research] +\ProvidesClass{jmlr}[2012/05/30 v1.17 (NLCT) Journal of Machine Learning Research] % \end{macrocode} %\changes{1.10}{2011-01-05}{hyperref now loaded by jmlr instead of %jmlrbook} @@ -2000,6 +2057,13 @@ Keywords:} \ignorespaces}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\titletag} +%\changes{1.17}{2012/05/30}{new} +% \begin{macrocode} +\newcommand*{\titletag}[1]{} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\title} % Override definition of \cs{title} to allow for an optional % argument (short title) @@ -2369,7 +2433,12 @@ Keywords:} \ignorespaces}% % \begin{macrocode} \def\@jmlrmaketitle{\vbox{\hsize\textwidth \linewidth\hsize - \jmlrpretitle \@title \jmlrposttitle + \jmlrpretitle + {% + \def\titletag##1{##1}% + \@title + }% + \jmlrposttitle \jmlrpreauthor \@author \jmlrpostauthor }} % \end{macrocode} @@ -2541,8 +2610,10 @@ Keywords:} \ignorespaces}% % Set the heading information: %\begin{macro}{\@jmlrvolume} % The volume number: +%\changes{1.17}{2012/05/30}{changed initial definition to use +%\cs{providecommand}} % \begin{macrocode} -\let\@jmlrvolume\@empty +\providecommand*{\@jmlrvolume}{} % \end{macrocode} %\end{macro} %\begin{macro}{\jmlrvolume} @@ -2553,7 +2624,7 @@ Keywords:} \ignorespaces}% %\begin{macro}{\@jmlrissue} % The issue number: % \begin{macrocode} -\let\@jmlrissue\@empty +\providecommand*{\@jmlrissue}{} % \end{macrocode} %\end{macro} %\begin{macro}{\jmlrissue} @@ -2563,8 +2634,10 @@ Keywords:} \ignorespaces}% %\end{macro} %\begin{macro}{\@jmlryear} % The year of publication: +%\changes{1.17}{2012/05/30}{changed initial definition to use +%\cs{providecommand}} % \begin{macrocode} -\let\@jmlryear\@empty +\providecommand*{\@jmlryear}{} % \end{macrocode} %\end{macro} %\begin{macro}{\jmlryear} @@ -2574,8 +2647,10 @@ Keywords:} \ignorespaces}% %\end{macro} %\begin{macro}{\@jmlrpages} % The page range: +%\changes{1.17}{2012/05/30}{changed initial definition to use +%\cs{providecommand}} % \begin{macrocode} -\newcommand*\@jmlrpages{\pageref{jmlrstart}--\pageref{jmlrend}} +\providecommand*\@jmlrpages{\pageref{jmlrstart}--\pageref{jmlrend}} % \end{macrocode} %\end{macro} %\begin{macro}{\jmlrpages} @@ -2585,8 +2660,10 @@ Keywords:} \ignorespaces}% %\end{macro} %\begin{macro}{\@jmlrsubmitted} % The date the article was submitted: +%\changes{1.17}{2012/05/30}{changed initial definition to use +%\cs{providecommand}} % \begin{macrocode} -\let\@jmlrsubmitted\@empty +\providecommand*\@jmlrsubmitted{} % \end{macrocode} %\end{macro} %\begin{macro}{\jmlrsubmitted} @@ -2596,8 +2673,10 @@ Keywords:} \ignorespaces}% %\end{macro} %\begin{macro}{\@jmlrpublished} % The date the article was published: +%\changes{1.17}{2012/05/30}{changed initial definition to use +%\cs{providecommand}} % \begin{macrocode} -\let\@jmlrpublished\@empty +\providecommand*\@jmlrpublished{} % \end{macrocode} %\end{macro} %\begin{macro}{\jmlrpublished} @@ -2607,8 +2686,10 @@ Keywords:} \ignorespaces}% %\end{macro} %\begin{macro}{\@jmlrworkshop} % The name of the workshop: +%\changes{1.17}{2012/05/30}{changed initial definition to use +%\cs{providecommand}} % \begin{macrocode} -\let\@jmlrworkshop\@empty +\providecommand*\@jmlrworkshop{} % \end{macrocode} %\end{macro} %\begin{macro}{\jmlrworkshop} @@ -3749,6 +3830,7 @@ Keywords:} \ignorespaces}% %\end{macro} %\begin{macro}{\bookappendix} % Switch to appendices in book +%\changes{1.17}{2012/05/30}{added def \cs{@write@jmlr@import}} % \begin{macrocode} \newcommand\bookappendix{\par \setcounter{table}{0}% @@ -3761,6 +3843,7 @@ Keywords:} \ignorespaces}% \setcounter{section}{0}% \gdef\@chapapp{\appendixname}% \gdef\thechapter{\@Alph\c@chapter}% + \def\@write@jmlr@import{\@@write@jmlr@apdimport}% \csname appendixmore\endcsname } % \end{macrocode} @@ -3832,12 +3915,72 @@ Keywords:} \ignorespaces}% %\end{macro} %\begin{macro}{\jmlrSuppressPackageChecks} % Don't check for potentially problematic packages. +% (If I find this in any paper sent to me for inclusion in a book, +% it will annoy me.) % \begin{macrocode} \newcommand*{\jmlrSuppressPackageChecks}{% \let\@jmlr@check@packages\relax } % \end{macrocode} %\end{macro} +% Discourage authors from using obsolete commands: +%\begin{macro}{\obsoletefontcs} +% \begin{macrocode} +\DeclareRobustCommand*{\obsoletefontcs}[1]{% + \ClassWarning{jmlr}{Obsolete command + \expandafter\string\csname#1\endcsname\space detected.}% + \csname #1 \endcsname +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\bf} +%\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning} +% \begin{macrocode} +\renewcommand*{\bf}{% + \obsoletefontcs{bf}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\it} +%\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning} +% \begin{macrocode} +\renewcommand*{\it}{% + \obsoletefontcs{it}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\sc} +%\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning} +% \begin{macrocode} +\renewcommand*{\sc}{% + \obsoletefontcs{sc}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\rm} +%\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning} +% \begin{macrocode} +\renewcommand*{\rm}{% + \obsoletefontcs{rm}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\sf} +%\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning} +% \begin{macrocode} +\renewcommand*{\sf}{% + \obsoletefontcs{sf}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\tt} +%\changes{1.17}{2012/05/30}{added redefinition to produce obsolete warning} +% \begin{macrocode} +\renewcommand*{\tt}{% + \obsoletefontcs{tt}% +} +% \end{macrocode} +%\end{macro} %\iffalse % \begin{macrocode} %</jmlr.cls> @@ -3855,7 +3998,7 @@ Keywords:} \ignorespaces}% % \end{macrocode} % Declare class: % \begin{macrocode} -\ProvidesClass{jmlrbook}[2012/05/16 v1.16 (NLCT) JMLR Book Style] +\ProvidesClass{jmlrbook}[2012/05/30 v1.17 (NLCT) JMLR Book Style] % \end{macrocode} % Need \sty{xkeyval} package to have key=value class options % \begin{macrocode} @@ -3907,6 +4050,7 @@ Keywords:} \ignorespaces}% % \end{macrocode} %\end{option} % Pass \clsopt{html} and \clsopt{nohtml} to \clsfmt{jmlr}. +% (Used by \app{makejmlrbookgui}) %\begin{option}{html} % \begin{macrocode} \DeclareOptionX{html}{\PassOptionsToClass{\CurrentOption}{jmlr}} @@ -4443,9 +4587,21 @@ Keywords:} \ignorespaces}% %\end{macro} %\begin{macro}{\logo} % Title page image +%\changes{1.17}{2012/05/30}{added optional argument} % \begin{macrocode} \newcommand*{\@logo}{} -\newcommand*{\logo}[1]{\renewcommand*{\@logo}{#1}} +\newcommand*{\logo}[2][]{% +\ifjmlrhtml + \def\@logo@tmp{#1}% + \ifx\@logo@tmp\@empty + \renewcommand*{\@logo}{#2}% + \else + \renewcommand*{\@logo}{\HCode{<a href="#1">}#2\HCode{</a>}}% + \fi +\else + \renewcommand*{\@logo}{#2}% +\fi +} % \end{macrocode} %\end{macro} % @@ -4509,10 +4665,15 @@ Keywords:} \ignorespaces}% \HCode{<tbody><tr><td valign="top">}% \HCode{<h1>}% \@title\newline - \ifx\@volume\@empty + \ifx\@jmlrvolume\@empty + \ifx\@volume\@empty + \else + Volume \@volume + \ifx\@subtitle\@empty\else: \fi + \fi \else - Volume \@volume - \ifx\@subtitle\@empty\else: \fi + Volume \@jmlrvolume + \ifx\@subtitle\@empty\else: \fi \fi \@subtitle \HCode{</h1>}% @@ -5026,13 +5187,13 @@ Keywords:} \ignorespaces}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\@write@jmlr@import} +%\begin{macro}{\@@write@jmlr@import} % The accompanying \app{makejmlrbook} Perl script scans the aux file % for information. Any articles imported using \ics{importpubpaper}, % \ics{importpaper} or \ics{importarticle} need to write the % relevant information to the aux file. % \begin{macrocode} -\newcommand*{\@write@jmlr@import}[3]{% +\newcommand*{\@@write@jmlr@import}[3]{% \protected@write\@mainauxout{}{\string\@jmlr@import{#1}{#2}{#3}}% } % \end{macrocode} @@ -5044,6 +5205,31 @@ Keywords:} \ignorespaces}% \newcommand*{\@jmlr@import}[3]{} % \end{macrocode} %\end{macro} +%\begin{macro}{\@@write@jmlr@apdimport} +%\changes{1.17}{2012/05/30}{new} +% As above but for files imported in the appendix. +% \begin{macrocode} +\newcommand*{\@@write@jmlr@apdimport}[3]{% + \protected@write\@mainauxout{}{\string\@jmlr@apdimport{#1}{#2}{#3}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@jmlr@apdimport} +%\changes{1.17}{2012/05/30}{new} +% As above but for files imported in the appendix. +% \LaTeX\ should ignore \cs{@jmlr@apdimport} as it's only needed for +% \app{makejmlrbookgui}: +% \begin{macrocode} +\newcommand*{\@jmlr@apdimport}[3]{} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\@write@jmlr@import} +% Initialise to \cs{@@write@jmlr@import} and switch to +% \cs{@@write@jmlr@apdimport} in the appendices. +% \begin{macrocode} +\def\@write@jmlr@import{\@@write@jmlr@import} +% \end{macrocode} +%\end{macro} % %\begin{macro}{\jmlrpremaketitlehook} %\changes{1.09}{2010/12/01}{Moved redefinition outside of import @@ -5221,6 +5407,19 @@ not permitted outside `jmlrpapers' environment}{}% }% }% \def\Xprefix{#1}% +% \end{macrocode} +% Disable \ics{jmlrvolume}, \ics{jmlryear}, \ics{jmlrworkshop} etc +% (since the imported papers belong to the same volume as the +% book---use \ics{importpubpaper} for papers pre-published in +%\changes{1.17}{2012/05/30}{disable \cs{jmlrvolume}, \cs{jmlryear} +%and \cs{jmlrworkshop} in imported papers} +% another volume). +% \begin{macrocode} + \let\jmlrvolume\@gobble + \let\jmlryear\@gobble + \let\jmlrworkshop\@gobble + \let\jmlrissue\@gobble + \let\jmlrpages\@gobble \jmlrimporthook \import{\@importdir\@importfile}% \def\Xprefix{}% @@ -5294,6 +5493,11 @@ not permitted outside `jmlrpapers' environment}{}% }% \def\Xprefix{#1}% \jmlrimporthook +% \end{macrocode} +%\changes{1.17}{2012/15/28}{set title page style for imported +%articles to articlet style} +% \begin{macrocode} + \let\ps@jmlrtps\ps@articlet \import{\@importdir\@importfile}% \def\Xprefix{}% \egroup @@ -5644,6 +5848,19 @@ not permitted outside `jmlrpapers' environment}{}% } % \end{macrocode} %\end{macro} +%\begin{macro}{\ps@articlet} +% Title page style for imported articles (imported using +% \cs{importarticle}) +% \begin{macrocode} +\newcommand*{\ps@articlet}{% + \let\@mkboth\@gobbletwo + \renewcommand*{\@oddhead}{}% + \renewcommand*{\@evenhead}{}% + \renewcommand*{\@oddfoot}{\footfont\hfill\thepage} + \renewcommand*{\@evenfoot}{\footfont\thepage\hfill} +} +% \end{macrocode} +%\end{macro} % %\begin{macro}{\ps@jmlrbook} % Page style for book |