From cf902eaabacb3ba258a35e8e461a2315c35d59e8 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 2 Dec 2010 01:14:48 +0000
Subject: jmlr 1.09 (1dec10)

git-svn-id: svn://tug.org/texlive/trunk@20630 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls | 90 ++++++++++++++++++---------
 1 file changed, 61 insertions(+), 29 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls')

diff --git a/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls b/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls
index 9ccf32d3d35..4dc4c64e7d3 100644
--- a/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls
+++ b/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls
@@ -41,7 +41,7 @@
 %% First editor:
 %% Second editor:
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{jmlrbook}[2010/07/27 v1.07 (NLCT) JMLR Book Style]
+\ProvidesClass{jmlrbook}[2010/12/01 v1.09 (NLCT) JMLR Book Style]
 \RequirePackage{xkeyval}
 \newcommand*{\@prehyperref}{}
 \define@key{jmlrbook.cls}{prehyperref}{%
@@ -50,6 +50,8 @@
 \grayscalefalse
 \DeclareOptionX{color}{\grayscalefalse}
 \DeclareOptionX{gray}{\grayscaletrue}
+\DeclareOptionX{letterpaper}{\PassOptionsToClass{\CurrentOption}{jmlr}}
+\DeclareOptionX{7x10}{\PassOptionsToClass{\CurrentOption}{jmlr}}
 \DeclareOptionX{html}{\PassOptionsToClass{\CurrentOption}{jmlr}}
 \DeclareOptionX{nohtml}{\PassOptionsToClass{\CurrentOption}{jmlr}}
 \DeclareOptionX{wcp}{\PassOptionsToClass{\CurrentOption}{jmlr}}
@@ -125,8 +127,6 @@
     \@nameuse{@jmlr@author@#1}%
   }%
 }
-\newcommand*{\@parttoclabel}{part}
-\newcommand*{\@partapp}{\partname}
 \renewcommand*\jmlrtitlehook{%
   \hypersetup{pdftitle={\@shorttitle}}%
   \let\jmlrtitlehook\relax
@@ -140,6 +140,8 @@
   \let\jmlrauthorhook\relax
   \let\@shortauthor\@empty
 }
+\newcommand*{\@subtitle}{}
+\newcommand*{\subtitle}[1]{\renewcommand*{\@subtitle}{#1}}
 \newcommand*{\@volume}{\@jmlrvolume}
 \newcommand*{\volume}[1]{\renewcommand*{\@volume}{#1}}
 \newcommand*{\@issue}{\@jmlrissue}
@@ -371,18 +373,29 @@
     \expandafter\Hy@setref@link#1\@empty\@empty\@nil{#2}%
   \fi
 }
-\AtBeginDocument{\renewcommand\@secondoffive[5]{#2}}
+\AtBeginDocument{%
+  \renewcommand\@secondoffive[5]{#2}%
+}
 \def\@setimportlabel{%
   \let\@mainauxout\@auxout
   \let\HRlabel\label
 }
-\AtBeginDocument{%
+\AtBeginDocument{\@jmlrbegindoc}
+\newcommand*\@jmlrbegindoc{
   \@setimportlabel
   \gdef\@setimportlabel{\let\ref\Xref \let\pageref\Xpageref}%
   \let\ReadBookmarks\relax
 }
 \let\@org@InputIfFileExists\InputIfFileExists
 \newenvironment{jmlrpapers}{%
+\def\@begindocumenthook{%
+  \@jmlrbegindoc
+  \let\bibcite\c@lbNATbibcite
+}
+\def\@enddocumenthook{%
+  \@jmlrenddoc
+  \let\bibcite\c@lbNAT@testdef
+}
   \begin{papers}[]
   \if@twocolumn
     \def\@jmlr@restore{\twocolumn}%
@@ -418,6 +431,13 @@
   \protected@write\@mainauxout{}{\string\@jmlr@import{#1}{#2}{#3}}%
 }
 \newcommand*{\@jmlr@import}[3]{}
+\def\jmlrpremaketitlehook{%
+  \cleardoublepage
+  \phantomsection
+  \let\@currentlabelname\@shorttitle
+  \refstepcounter{chapter}%
+}%
+\newcommand*{\jmlrimporthook}{}
 \newcommand*{\@importpubpaper}[4][\@importdir\@importfile]{%
   \bgroup
     \def\@importdir{#2/}%
@@ -428,7 +448,7 @@
     \jmlrpages{#4}%
     \graphicspath{{\@importdir}}%
     \def\jmlrmaketitlehook{%
-      \refstepcounter{chapter}%
+      \label{}%
       \addtomaincontents{toc}%
         {\protect\contentsline{papertitle}{\@shorttitle}{\thepage}%
    {page.\thepage}}%
@@ -452,11 +472,6 @@
       }%
       \@write@author{#1}{\@jmlrauthors}%
     }%
-    \def\jmlrpremaketitlehook{%
-      \cleardoublepage
-      \phantomsection
-      \let\@currentlabelname\@shorttitle
-    }%
     \def\InputIfFileExists##1##2##3{%
        \IfFileExists{##1}{%
           \@org@InputIfFileExists{##1}{##2}{##3}%
@@ -466,6 +481,7 @@
        }%
      }%
     \def\Xprefix{#1}%
+    \jmlrimporthook
     \import{\@importdir\@importfile}%
     \def\Xprefix{}%
   \egroup
@@ -489,7 +505,7 @@ not permitted outside `jmlrpapers' environment}{}%
     \jmlrpages{\protect\@articlepagesref}%
     \graphicspath{{\@importdir}}%
     \def\jmlrmaketitlehook{%
-      \refstepcounter{chapter}%
+      \label{}%
       \addtomaincontents{toc}%
         {\protect\contentsline{papertitle}{\@shorttitle}{\thepage}%
    {page.\thepage}}%
@@ -509,11 +525,6 @@ not permitted outside `jmlrpapers' environment}{}%
       }%
       \@write@author{#1}{\@jmlrauthors}%
     }%
-    \def\jmlrpremaketitlehook{%
-      \cleardoublepage
-      \phantomsection
-      \let\@currentlabelname\@shorttitle
-    }%
     \def\InputIfFileExists##1##2##3{%
        \IfFileExists{##1}{%
           \@org@InputIfFileExists{##1}{##2}{##3}%
@@ -523,6 +534,7 @@ not permitted outside `jmlrpapers' environment}{}%
        }%
      }%
     \def\Xprefix{#1}%
+    \jmlrimporthook
     \import{\@importdir\@importfile}%
     \def\Xprefix{}%
   \egroup
@@ -548,7 +560,7 @@ not permitted outside `jmlrpapers' environment}{}%
       \addtomaincontents{toc}%
         {\protect\contentsline{papertitle}{\@shorttitle}{\thepage}%
    {page.\thepage}}%
-      \refstepcounter{chapter}%
+      \label{}%
       \pdfbookmark{\@shorttitle}{chapter.\thechapter}%
       \def\@jmlr@authors@sep{ \& }%
       \tocchapterauthor{\@jmlrauthors}%
@@ -560,11 +572,6 @@ not permitted outside `jmlrpapers' environment}{}%
       \jmlrpublished{}%
       \jmlrproceedings{}{}%
     }%
-    \def\jmlrpremaketitlehook{%
-      \cleardoublepage
-      \phantomsection
-      \let\@currentlabelname\@shorttitle
-    }%
     \graphicspath{{\@importdir}}%
     \def\InputIfFileExists##1##2##3{%
        \IfFileExists{##1}{%
@@ -575,6 +582,7 @@ not permitted outside `jmlrpapers' environment}{}%
        }%
      }%
     \def\Xprefix{#1}%
+    \jmlrimporthook
     \import{\@importdir\@importfile}%
     \def\Xprefix{}%
   \egroup
@@ -650,7 +658,8 @@ not permitted outside `jmlrpapers' environment}{}%
   \ifnum \c@tocdepth >\m@ne
     \addpenalty{-\@highpenalty}%
     \vskip 1.0em \@plus\p@
-    \setlength\@tempdima{5em}%
+    %\setlength\@tempdima{5em}%
+    \settowidth\@tempdima{\large\bfseries \@partapp\space MM}%
     \vbox{%
       \pagerule
       \begingroup
@@ -660,13 +669,34 @@ not permitted outside `jmlrpapers' environment}{}%
         \advance\leftskip\@tempdima
         \hskip -\leftskip
         \renewcommand*\numberline[1]{\hb@xt@ \@tempdima
-          {\partname\space ##1\hfil }}%
-        #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss }\par
+          {\@partapp\space ##1\hfil }}%
+        #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss
+           \normalfont\normalsize #2}\par
         \penalty\@highpenalty
       \endgroup
       \pagerule
     }%
   \fi}
+\renewcommand{\l@chapter}[2]{%
+  \ifnum\c@tocdepth>\m@ne
+    \addpenalty{-\@highpenalty}%
+    \vskip 1.0em \@plus \p@
+    \setlength\@tempdima{2em}%
+    \begingroup
+      \parindent \z@
+      \rightskip \@pnumwidth
+      \parfillskip -\@pnumwidth
+      \leavevmode \large \bfseries
+      \advance \leftskip \@tempdima
+      \hskip -\leftskip
+        \renewcommand*\numberline[1]{\hb@xt@ \@tempdima
+          {##1\hfil }}%
+      #1\nobreak \hfil \nobreak \hb@xt@ \@pnumwidth {\hss
+       \normalfont\normalsize #2}\par
+      \penalty \@highpenalty
+    \endgroup
+  \fi
+}
 \newcommand*{\l@papertitle}[2]{%
   \ifnum \c@tocdepth >\m@ne
     \addpenalty{-\@highpenalty}%
@@ -726,9 +756,11 @@ not permitted outside `jmlrpapers' environment}{}%
   \@mkboth{\@curparthead}{\protect\thechapter. #1}%
 }
 \newcommand{\firstpagehead}{}
-\newcommand{\firstpagefoot}{\hfill\thepage}
-\renewcommand*{\headfont}{\reset@font\small\scshape}%
-\renewcommand*{\footfont}{\reset@font\small\itshape}%
+\newcommand{\firstpagefoot}{%
+  \@reprint\hfill\thepage
+}
+\newcommand*{\headfont}{\reset@font\small\scshape}%
+\newcommand*{\footfont}{\reset@font\small\itshape}%
 \newcommand*{\ps@chplain}{%
   \let\@mkboth\@gobbletwo
   \renewcommand*{\@oddhead}{\headfont\firstpagehead}%
-- 
cgit v1.2.3

