From 3fa71c8703f40728cf20c8d9f6ed721cbe9bfd44 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 8 Jan 2011 00:39:26 +0000 Subject: jmlr 1.10 (5jan10) git-svn-id: svn://tug.org/texlive/trunk@20967 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/jmlr/jmlr.dtx | 296 +++++++++++++++------------ Master/texmf-dist/source/latex/jmlr/jmlr.ins | 4 +- 2 files changed, 172 insertions(+), 128 deletions(-) (limited to 'Master/texmf-dist/source/latex') diff --git a/Master/texmf-dist/source/latex/jmlr/jmlr.dtx b/Master/texmf-dist/source/latex/jmlr/jmlr.dtx index b520db4de28..b64c1d955f0 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 2010/12/1 14:29 +% Created on 2011/1/5 14:41 %\fi %\iffalse %<*package> @@ -30,7 +30,7 @@ %\fi % \iffalse % Doc-Source file to use with LaTeX2e -% Copyright (C) 2010 Nicola Talbot, all rights reserved. +% Copyright (C) 2011 Nicola Talbot, all rights reserved. % \fi % \iffalse %<*driver> @@ -63,7 +63,7 @@ % \author{Nicola L. C. Talbot\\[10pt] %\url{http://theoval.cmp.uea.ac.uk/~nlct/}} % -% \date{2010-12-01 (version 1.09)} +% \date{2011-01-05 (version 1.10)} % \maketitle %\tableofcontents % @@ -106,13 +106,13 @@ % %The \clsfmt{jmlr} class is based on the \cls{scrartcl} class and loads %the following packages: \sty{amsmath}, \sty{amssymb}, -%\sty{natbib}, \sty{url}, \sty{graphicx} and \sty{algorithm2e}. +%\sty{natbib}, \sty{url}, \sty{graphicx} and \sty{algorithm2e}, +%\sty{hyperref}, \sty{nameref} and \sty{xkeyval}. %Note that unlike the \sty{jmlr2e} and \sty{jmlrwcp2e} packages, %this class file does not load the obsolete \sty{epsfig} package. % %The \clsfmt{jmlrbook} class additionally loads the \cls{combine} class -%and the following packages: \sty{hyperref}, \sty{xkeyval}, -%\sty{combnat} and \sty{setspace}. +%and the following packages: \sty{combnat} and \sty{setspace}. % %The \app{makejmlrbook} script requires Perl, \TeX\ and \TeX4ht. % @@ -138,11 +138,14 @@ % %\item[\clsopt{gray}] Grayscale version (see \sectionref{sec:color}). % -%\item[\clsopt{tablecaptiontop}] in a \env{table} environment, +%\item[{\clsopt[top]{tablecaption}}] in a \env{table} environment, %\ics{floatconts} puts the caption at the top. % -%\item[\clsopt{tablecaptionbottom}] in a \env{table} environment, +%\item[{\clsopt[bottom]{tablecaption}}] in a \env{table} environment, %\ics{floatconts} puts the caption at the bottom. +% +%\item[\clsopt{prehyperref}=\marg{stuff}] Does \meta{stuff} before +%loading \sty{hyperref}. %\end{description} % %\subsection{Title Information} @@ -969,17 +972,18 @@ %\item[\clsopt{gray}] Grayscale version (see \sectionref{sec:color}). %Use this option for the print version without hyperlinks. % -%\item[\clsopt{tablecaptiontop}] in a \env{table} environment, +%\item[{\clsopt[top]{tablecaption}}] in a \env{table} environment, %\ics{floatconts} puts the caption at the top. % -%\item[\clsopt{tablecaptionbottom}] in a \env{table} environment, +%\item[{\clsopt[bottom]{tablecaption}}] in a \env{table} environment, %\ics{floatconts} puts the caption at the bottom. % %\item[\clsopt{letterpaper}] Set the paper size to letter (default). % %\item[\clsopt{7x10}] Set the paper size to $7\times10$ inches. % -%\item[\clsopt{prehyperref}] The \clsfmt{jmlrbook} automatically loads +%\item[\clsopt{prehyperref}=\marg{stuff}] The \clsfmt{jmlr} class +%automatically loads %the \sty{hyperref} package, but some packages need to be loaded %before \sty{hyperref}. This information can be specified using %the \clsopt{prehyperref} option. This is a key=value option. For @@ -1523,7 +1527,25 @@ % Declare class and required TeX format: % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{jmlr}[2010/12/01 v1.09 (NLCT) Journal of Machine Learning Research] +\ProvidesClass{jmlr}[2011/01/05 v1.10 (NLCT) Journal of Machine Learning Research] +% \end{macrocode} +%\changes{1.10}{2011-01-05}{hyperref now loaded by jmlr instead of +%jmlrbook} +% Need \sty{xkeyval} package to have key=value class options +% \begin{macrocode} +\RequirePackage{xkeyval} +% \end{macrocode} +% Some packages need to be loaded before \sty{hyperref} so provide a +% hook to do this: +%\begin{macro}{\jmlr@prehyperref} +% \begin{macrocode} +\providecommand*{\jmlr@prehyperref}{} +% \end{macrocode} +%\end{macro} +% Provide option to add stuff before \sty{hyperref} is loaded: +% \begin{macrocode} +\define@key{jmlr.cls}{prehyperref}{% + \renewcommand*{\jmlr@prehyperref}{#1}} % \end{macrocode} % The following conditionals are provided to make this class play nicely % with combine and aren't required for articles. @@ -1538,9 +1560,9 @@ \newif\ifgrayscale \grayscalefalse }{} -\DeclareOption{color}{\grayscalefalse +\DeclareOptionX{color}{\grayscalefalse \PassOptionsToPackage{color}{xcolor}} -\DeclareOption{gray}{\grayscaletrue +\DeclareOptionX{gray}{\grayscaletrue \PassOptionsToPackage{gray}{xcolor}} % \end{macrocode} %\end{macro} @@ -1550,8 +1572,16 @@ % \begin{macrocode} \newif\iftablecaptiontop \tablecaptiontoptrue -\DeclareOption{tablecaptiontop}{\tablecaptiontoptrue} -\DeclareOption{tablecaptionbottom}{\tablecaptionbottomtrue} +\DeclareOptionX{tablecaptiontop}{\tablecaptiontoptrue} +\DeclareOptionX{tablecaptionbottom}{\tablecaptiontopfalse} + +\define@choicekey{jmlr.cls}{tablecaption}[\val\nr]{top,bottom}{% + \ifcase\nr\relax + \tablecaptiontoptrue + \or + \tablecaptiontopfalse + \fi +} % \end{macrocode} %\end{macro} %\begin{macro}{\ifjmlrhtml} @@ -1559,19 +1589,18 @@ % \begin{macrocode} \newif\ifjmlrhtml \jmlrhtmlfalse -\DeclareOption{html}{\jmlrhtmltrue} -\DeclareOption{nohtml}{\jmlrhtmlfalse} +\DeclareOptionX{html}{\jmlrhtmltrue} +\DeclareOptionX{nohtml}{\jmlrhtmlfalse} % \end{macrocode} %\end{macro} -% Normal font size (default is 11pt) +% Normal font size (default is 11pt). +%\changes{1.10}{2011-01-05}{font size options don't pass option to +%class} % \begin{macrocode} \def\pt@size{11pt} -\DeclareOption{10pt}{\renewcommand{\pt@size}{10}% - \PassOptionsToClass{\CurrentOption}{article}} -\DeclareOption{11pt}{\renewcommand{\pt@size}{11}% - \PassOptionsToClass{\CurrentOption}{article}} -\DeclareOption{12pt}{\renewcommand{\pt@size}{12}% - \PassOptionsToClass{\CurrentOption}{article}} +\DeclareOptionX{10pt}{\renewcommand{\pt@size}{10pt}} +\DeclareOptionX{11pt}{\renewcommand{\pt@size}{11pt}} +\DeclareOptionX{12pt}{\renewcommand{\pt@size}{12pt}} % \end{macrocode} %\begin{macro}{\@jmlrproceedings} % The name of the proceedings. @@ -1610,23 +1639,23 @@ %\end{macro} % This isn't an article for a workshop: % \begin{macrocode} -\DeclareOption{nowcp}{\jmlrnowcp} +\DeclareOptionX{nowcp}{\jmlrnowcp} % \end{macrocode} % This is an article for a workshop % \begin{macrocode} -\DeclareOption{wcp}{\jmlrwcp} +\DeclareOptionX{wcp}{\jmlrwcp} % \end{macrocode} % The default paper size is letter, but provide $7 \times 10$in % alternative: % \begin{macrocode} \newif\ifviiXx \viiXxfalse -\DeclareOption{7x10}{\viiXxtrue} -\DeclareOption{letterpaper}{\PassOptionsToPackage{letterpaper}{typearea}} +\DeclareOptionX{7x10}{\viiXxtrue} +\DeclareOptionX{letterpaper}{\PassOptionsToPackage{letterpaper}{typearea}} % \end{macrocode} % Pass all remaining options to \cls{article} class: % \begin{macrocode} -\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} +\DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{article}} % \end{macrocode} % Execute required options: % \begin{macrocode} @@ -1634,11 +1663,13 @@ % \end{macrocode} % Process options: % \begin{macrocode} -\ProcessOptions +\ProcessOptionsX % \end{macrocode} -% Load \cls{scrartcl} class +% Load \cls{article} class. +%\changes{1.10}{2011-01-05}{passed \cs{pt@size} when loading article +%class} % \begin{macrocode} -\LoadClass{article} +\LoadClass[\pt@size]{article} % \end{macrocode} % Can't use \sty{geometry} package because it doesn't play nicely % with the \cls{combine} class. @@ -1665,6 +1696,11 @@ \setlength{\textwidth}{6.0 true in} \fi % \end{macrocode} +% Need to add jmlr end document hook before natbib adds a +% \cs{clearpage} to it. +% \begin{macrocode} +\AtEndDocument{\@jmlrenddoc} +% \end{macrocode} % Required packages: % \begin{macrocode} \RequirePackage{amsmath} @@ -1675,6 +1711,28 @@ \RequirePackage[x11names]{xcolor} \RequirePackage[algo2e,ruled]{algorithm2e} % \end{macrocode} +% Do all the stuff that needs to be done before \sty{hyperref} is +% loaded: +% \begin{macrocode} +\jmlr@prehyperref +% \end{macrocode} +% Load \sty{hyperref}: +% \begin{macrocode} +\usepackage[colorlinks, + linkcolor=blue, + citecolor=blue, + urlcolor=magenta, + linktocpage, + plainpages=false]{hyperref} +\usepackage{nameref} +% \end{macrocode} +% If this is the print version, need to disable the hyperlinks: +% \begin{macrocode} +\ifgrayscale + \hypersetup{draft} +\fi +% \end{macrocode} +% % Float parameters: the following settings were copied from jmlr2e.sty % \begin{macrocode} \renewcommand{\topfraction}{0.95} % let figure take up nearly whole page @@ -1760,12 +1818,45 @@ %\end{macro} % %\subsection{Footnotes} -% This code has been taken from jmlr2e.sty +%\begin{macro}{\@makefntext} +%\changes{1.08}{2010-07-27}{new} +% Redefine \cs{@makefntext} so that the text between the footnote +% symbol and the footnote text can be redefined. (It looks odd +% having a full stop after a symbol.) +% \begin{macrocode} +\renewcommand*{\@makefntext}[1]{% + \@setpar + {% + \@@par + \@tempdima\hsize + \advance \@tempdima -15pt\relax + \parshape \@ne 15pt \@tempdima + }% + \par + \parindent 2em\noindent + \hbox to \z@ {\hss {\@thefnmark }\footnoteseptext\hfil }#1% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\footnoteseptext} +%\changes{1.08}{2010-07-27}{new} +% The separation text between the footnote symbol and the footnote +% text. +% \begin{macrocode} +\newcommand*{\footnoteseptext}{. } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\thanks} +%\changes{1.10}{2011-01-05}{Modified definition of \cs{thanks}} % \begin{macrocode} -\long\def\@makefntext#1{\@setpar{\@@par\@tempdima \hsize - \advance\@tempdima-15pt\parshape \@ne 15pt \@tempdima}\par - \parindent 2em\noindent \hbox to \z@{\hss{\@thefnmark}. \hfil}#1} +\renewcommand*{\thanks}[1]{% + \footnotemark + \protected@xdef\@thanks{\@thanks + \protect\footnotetext{#1}}% +} % \end{macrocode} +%\end{macro} +% %\subsection{Article abstract} % This code has been taken from jmlr2e.sty but with \cs{bf} updated % to \cs{bfseries} @@ -1874,35 +1965,6 @@ Keywords:} \ignorespaces}% % \end{macrocode} %\end{macro} % -%\begin{macro}{\@makefntext} -%\changes{1.08}{2010-07-27}{new} -% Redefine \cs{@makefntext} so that the text between the footnote -% symbol and the footnote text can be redefined. (It looks odd -% having a full stop after a symbol.) -% \begin{macrocode} -\renewcommand*{\@makefntext}[1]{% - \@setpar - {% - \@@par - \@tempdima\hsize - \advance \@tempdima -15pt\relax - \parshape \@ne 15pt \@tempdima - }% - \par - \parindent 2em\noindent - \hbox to \z@ {\hss {\@thefnmark }\footnoteseptext\hfil }#1% -} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\footnoteseptext} -%\changes{1.08}{2010-07-27}{new} -% The separation text between the footnote symbol and the footnote -% text. -% \begin{macrocode} -\newcommand*{\footnoteseptext}{. } -% \end{macrocode} -%\end{macro} -% %\begin{macro}{\jmlrmaketitle} % Make the title % \begin{macrocode} @@ -1943,7 +2005,7 @@ Keywords:} \ignorespaces}% \thispagestyle{jmlrtps}% \setcounter{footnote}{0}% \let\maketitle\relax \let\@maketitle\relax -\gdef\@thanks{}\gdef\@author{}\let\thanks\relax +\gdef\@thanks{}\gdef\@author{}\let\thanks\@gobble \def\@jmlr@authors@sep{ \& }% } % \end{macrocode} @@ -2022,7 +2084,10 @@ Keywords:} \ignorespaces}% \bgroup \def\nametag##1{##1}% \def\and{\unskip\enspace{\normalfont and}\enspace}% - \def\addr{\small\itshape}% +% \end{macrocode} +%\changes{1.10}{2011-01-05}{added \cs{mdseries} to \cs{addr}} +% \begin{macrocode} + \def\addr{\mdseries\small\itshape}% \def\name{\ClassError{jmlr}{Use \string\Name{Author's Name} not \string\name}{}}% \def\email{\ClassError{jmlr}{Use \string\Email{address} not \string\email}{}}% \def\AND{\@endauthor\normalfont\hss \vskip \interauthorskip @@ -2204,18 +2269,23 @@ Keywords:} \ignorespaces}% \def\firstpageno#1{\setcounter{page}{#1}} % \end{macrocode} %\end{macro} -% -% Label end page. +%\begin{macro}{\startpage} +%\changes{1.10}{2011-01-05}{new} +% If \cs{startpage} has been defined, use its value for the first +% page. % \begin{macrocode} -\AtEndDocument{\@jmlrenddoc} +\@ifundefined{startpage}{}{\firstpageno{\startpage}} % \end{macrocode} +%\end{macro} +% +% Label end page. %\begin{macro}{\@jmlrenddoc} % Label end page % \begin{macrocode} \newcommand*{\@jmlrenddoc}{% - \@ifundefined{phantomsection}{}{\phantomsection}% + \phantomsection \protected@edef\@currentlabelname{end of \@shorttitle}% - \label{jmlrend}% + \label{jmlrend}\null \global\let\@reprint\@empty } % \end{macrocode} @@ -2434,6 +2504,7 @@ Keywords:} \ignorespaces}% \newcommand*{\set}[1]{\ensuremath{\mathcal{#1}}} % \end{macrocode} %\end{macro} +% % Convenient macros for cross-referencing. % \begin{macrocode} \newcommand*{\@jmlr@reflistsep}{, } @@ -2739,6 +2810,7 @@ Keywords:} \ignorespaces}% \setcounter{section}{0} \setcounter{subsection}{0} \def\thesection{\Alph{section}} + \def\theHsection{\Alph{section}} \def\presectionnum{Appendix~}% } % \end{macrocode} @@ -2885,12 +2957,6 @@ Keywords:} \ignorespaces}% \renewcommand*{\thesubfigure}{\alph{subfigure}} % \end{macrocode} %\end{macro} -%\begin{macro}{\theHsubfigure} -%\changes{1.09}{2010/12/01}{new} -% \begin{macrocode} -\newcommand*{\theHsubfigure}{\theHfigure.\alph{subfigure}} -% \end{macrocode} -%\end{macro} %\begin{macro}{\p@subfigure} % \begin{macrocode} \renewcommand*{\p@subfigure}{\expandafter\@p@subfigure} @@ -3137,8 +3203,8 @@ Keywords:} \ignorespaces}% % Numbered chapters % \begin{macrocode} \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% \if@mainmatter - \refstepcounter{chapter}% \typeout{\@chapapp\space\thechapter.}% \addcontentsline{toc}{\@chaptoclabel}% {\protect\numberline{\thechapter}#1}% @@ -3275,6 +3341,7 @@ Keywords:} \ignorespaces}% \newcommand\frontmatter{% \cleardoublepage \@mainmatterfalse + \renewcommand*{\theHchapter}{front-\thechapter}% \pagenumbering{roman}% \morefrontmatter } @@ -3287,6 +3354,8 @@ Keywords:} \ignorespaces}% \newcommand\mainmatter{% \cleardoublepage \@mainmattertrue + \setcounter{chapter}{0}% + \renewcommand*{\theHchapter}{\thechapter}% \pagenumbering{arabic}% \moremainmatter } @@ -3342,6 +3411,10 @@ Keywords:} \ignorespaces}% % A part in an article % \begin{macrocode} \newcommand{\artpart}{% +% \end{macrocode} +%\changes{1.10}{2011-01-05}{set \cs{toclevel@part}} +% \begin{macrocode} + \def\toclevel@part{0}% \if@noskipsec \leavevmode\fi \par \addvspace{4ex}% @@ -3356,6 +3429,10 @@ Keywords:} \ignorespaces}% % A part in a book forming a collection of articles % \begin{macrocode} \newcommand\bookpart{% +% \end{macrocode} +%\changes{1.10}{2011-01-05}{set \cs{toclevel@part}} +% \begin{macrocode} + \def\toclevel@part{-1}% \if@openright \cleardoublepage \else @@ -3566,7 +3643,7 @@ Keywords:} \ignorespaces}% % \end{macrocode} % Declare class: % \begin{macrocode} -\ProvidesClass{jmlrbook}[2010/12/01 v1.09 (NLCT) JMLR Book Style] +\ProvidesClass{jmlrbook}[2011/01/05 v1.10 (NLCT) JMLR Book Style] % \end{macrocode} % Need \sty{xkeyval} package to have key=value class options % \begin{macrocode} @@ -3575,12 +3652,12 @@ Keywords:} \ignorespaces}% % Some packages need to be loaded before \sty{hyperref} so provide a % hook to do this: % \begin{macrocode} -\newcommand*{\@prehyperref}{} +\newcommand*{\jmlr@prehyperref}{} % \end{macrocode} % Option to add stuff before \sty{hyperref} is loaded: % \begin{macrocode} \define@key{jmlrbook.cls}{prehyperref}{% - \renewcommand*{\@prehyperref}{#1}} + \renewcommand*{\jmlr@prehyperref}{#1}} % \end{macrocode} % Determine whether to select color or grayscale % \begin{macrocode} @@ -3610,6 +3687,14 @@ Keywords:} \ignorespaces}% \DeclareOptionX{tablecaptiontop}{\PassOptionsToClass{\CurrentOption}{jmlr}} \DeclareOptionX{tablecaptionbottom}{\PassOptionsToClass{\CurrentOption}{jmlr}} % \end{macrocode} +% Pass font size commands to \clsfmt{jmlr} +%\changes{1.10}{2011-01-05}{Added 10pt, 11pt and 12pt options to +%jmlrbook} +% \begin{macrocode} +\DeclareOptionX{10pt}{\PassOptionsToClass{\CurrentOption}{jmlr}} +\DeclareOptionX{11pt}{\PassOptionsToClass{\CurrentOption}{jmlr}} +\DeclareOptionX{12pt}{\PassOptionsToClass{\CurrentOption}{jmlr}} +% \end{macrocode} % Process options % \begin{macrocode} \ProcessOptionsX @@ -3661,27 +3746,6 @@ Keywords:} \ignorespaces}% % \begin{macrocode} \RequirePackage{setspace} % \end{macrocode} -% Do all the stuff that needs to be done before \sty{hyperref} is -% loaded: -% \begin{macrocode} -\@prehyperref -% \end{macrocode} -% Load \sty{hyperref}: -% \begin{macrocode} -\usepackage[colorlinks, - linkcolor=blue, - citecolor=blue, - urlcolor=magenta, - linktocpage, - plainpages=false]{hyperref} -\usepackage{nameref} -% \end{macrocode} -% If this is the print version, need to disable the hyperlinks -% \begin{macrocode} -\ifgrayscale - \hypersetup{draft} -\fi -% \end{macrocode} % Switch on two-side mode % \begin{macrocode} \@twosidetrue @@ -4965,28 +5029,8 @@ not permitted outside `jmlrpapers' environment}{}% \renewcommand*\bibsection{\section*{\refname}} % \end{macrocode} %\end{macro} -% -%\begin{macro}{\@bookpart} -% Define the layout of a book part -% \begin{macrocode} -\def\@bookpart[#1]#2{% - \ifnum \c@secnumdepth >-2\relax - \refstepcounter{part}% - \addcontentsline{toc}{\@parttoclabel}{% - \protect\numberline{\thepart}#1}% - \else - \addcontentsline{toc}{\@parttoclabel}{#1}% - \fi - \markboth{}{}% - {\interlinepenalty \@M - \normalfont\partformat - \ifnum \c@secnumdepth >-2\relax - \partnumberformat{\thepart}% - \fi - \parttitleformat{#2}\par}% - \postparthook} -% \end{macrocode} -%\end{macro} +%\changes{1.10}{2011-01-05}{Removed redundant redefinition of +%\cs{@bookpart}} % % Set up the book commands: % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/jmlr/jmlr.ins b/Master/texmf-dist/source/latex/jmlr/jmlr.ins index 4cab2626ba8..2dc51bfc4ae 100644 --- a/Master/texmf-dist/source/latex/jmlr/jmlr.ins +++ b/Master/texmf-dist/source/latex/jmlr/jmlr.ins @@ -1,10 +1,10 @@ -% jmlr.ins generated using makedtx version 0.94b 2010/12/1 14:29 +% jmlr.ins generated using makedtx version 0.94b 2011/1/5 14:41 \input docstrip \preamble jmlr.dtx - Copyright 2010 Nicola Talbot + Copyright 2011 Nicola Talbot This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 -- cgit v1.2.3