summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/jmlr/jmlr.cls
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-12-02 01:14:48 +0000
committerKarl Berry <karl@freefriends.org>2010-12-02 01:14:48 +0000
commitcf902eaabacb3ba258a35e8e461a2315c35d59e8 (patch)
treefad1e3dd42075ecd697cf3949196e447d509b359 /Master/texmf-dist/tex/latex/jmlr/jmlr.cls
parent0f2a338755c61f4f03c87894c1fb0fc55e248f85 (diff)
jmlr 1.09 (1dec10)
git-svn-id: svn://tug.org/texlive/trunk@20630 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/jmlr/jmlr.cls')
-rw-r--r--Master/texmf-dist/tex/latex/jmlr/jmlr.cls150
1 files changed, 109 insertions, 41 deletions
diff --git a/Master/texmf-dist/tex/latex/jmlr/jmlr.cls b/Master/texmf-dist/tex/latex/jmlr/jmlr.cls
index 8ae797d599b..3f8f8151f2a 100644
--- a/Master/texmf-dist/tex/latex/jmlr/jmlr.cls
+++ b/Master/texmf-dist/tex/latex/jmlr/jmlr.cls
@@ -41,7 +41,7 @@
%% First editor:
%% Second editor:
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{jmlr}[2010/07/27 v1.08 (NLCT) Journal of Machine Learning Research]
+\ProvidesClass{jmlr}[2010/12/01 v1.09 (NLCT) Journal of Machine Learning Research]
\newif\if@openright
\newif\if@mainmatter \@mainmattertrue
\@ifundefined{ifgrayscale}{
@@ -85,10 +85,10 @@
\viiXxfalse
\DeclareOption{7x10}{\viiXxtrue}
\DeclareOption{letterpaper}{\PassOptionsToPackage{letterpaper}{typearea}}
-\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ExecuteOptions{twoside,letterpaper}
\ProcessOptions
-\LoadClass[pointednumbers,normalheadings]{scrartcl}
+\LoadClass{article}
\ifviiXx
\setlength{\paperwidth}{7in}
\setlength{\paperheight}{10in}
@@ -126,13 +126,34 @@
\def\ds@draft{\overfullrule 5pt}
\bibliographystyle{plainnat}
\bibpunct{(}{)}{;}{a}{,}{,}
-\addtokomafont{section}{\rmfamily\large}
-\addtokomafont{subsection}{\rmfamily\normalsize}
-\addtokomafont{subsubsection}{\rmfamily\mdseries\normalsize\scshape}
-\addtokomafont{paragraph}{\rmfamily\normalsize}
-\addtokomafont{subparagraph}{\rmfamily\itshape\normalsize}
-\renewcommand*{\othersectionlevelsformat}[1]{%
- \csname pre#1num\endcsname\csname the#1\endcsname\autodot\enskip}
+\renewcommand{\section}{\@startsection{section}{1}{\z@}%
+ {-0.24in \@plus -1ex \@minus -.2ex}%
+ {0.10in \@plus.2ex}%
+ {\normalfont\rmfamily\bfseries\large\raggedright}%
+}
+\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
+ {-0.20in \@plus -1ex \@minus -.2ex}%
+ {0.08in \@plus .2ex}%
+ {\normalfont\rmfamily\bfseries\normalsize\raggedright}%
+}
+\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
+ {-0.18in \@plus -1ex \@minus -.2ex}%
+ {0.08in \@plus .2ex}%
+ {\normalfont\normalsize\rmfamily\mdseries\scshape\raggedright}%
+}
+\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
+ {1.5ex plus 0.5ex minus .2ex}%
+ {-1em}%
+ {\normalfont\normalsize\rmfamily\bfseries}%
+}
+\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}%
+ {1.5ex plus 0.5ex minus .2ex}%
+ {-1em}%
+ {\normalfont\normalsize\rmfamily\bfseries\itshape}}
+\renewcommand*\@seccntformat[1]{%
+ \csname pre#1num\endcsname
+ \csname the#1\endcsname.\enskip
+}
\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}
@@ -140,7 +161,7 @@
\renewenvironment{abstract}{\HCode{<h3>}Abstract\HCode{</h3>}}{}%
\else
\renewenvironment{abstract}
- {\centerline{\large\bfseries Abstract}\vspace{0.7ex}%
+ {{\centering\large\bfseries Abstract\par}\vspace{0.7ex}%
\bgroup
\leftskip 20pt\rightskip 20pt\small\noindent\ignorespaces}%
{\par\egroup\vskip 0.25ex}
@@ -244,8 +265,10 @@ Keywords:} \ignorespaces}%
\def\@endeditor{\normalsize}
\def\jmlrpretitle{\vskip\beforetitskip\begin{center}\Large\bfseries}
\def\jmlrposttitle{\par\end{center}\vskip\aftertitskip}
+\newcommand*{\nametag}[1]{}
\def\jmlrpreauthor{%
\bgroup
+ \def\nametag##1{##1}%
\def\and{\unskip\enspace{\normalfont and}\enspace}%
\def\addr{\small\itshape}%
\def\name{\ClassError{jmlr}{Use \string\Name{Author's Name} not \string\name}{}}%
@@ -256,13 +279,13 @@ Keywords:} \ignorespaces}%
}
\def\@email{\hfill\small\mdseries\scshape}%
\def\@name{\normalsize\upshape\bfseries}%
-\def\@parsename#1 #2\@nil{%
+\def\@parsename#1 #2\end@parsename{%
\def\@tmp{#2}%
- \ifx\@tmp\@empty
+ \ifx\@tmp\@nnil
\def\@surname{#1}%
\let\@nextparsename\@parsenamenoop
\else
- \@getinitial#1-\relax\relax\end
+ \@getinitial#1-\relax\relax\end@getinitial
\ifx\@forenames\@empty
\def\@forenames{#1}%
\protected@edef\@initials{\@initial}%
@@ -274,10 +297,10 @@ Keywords:} \ignorespaces}%
\fi
\let\@nextparsename\@parsename
\fi
- \@nextparsename#2\@nil
+ \@nextparsename#2\end@parsename
}
-\def\@parsenamenoop#1\@nil{}
-\def\@getinitial#1#2-#3#4\end{%
+\def\@parsenamenoop#1\end@parsename{}
+\def\@getinitial#1#2-#3#4\end@getinitial{%
\def\@jmlr@tmp{#3}%
\if\@jmlr@tmp\relax
\def\@initial{#1.}%
@@ -288,7 +311,8 @@ Keywords:} \ignorespaces}%
\newcommand*{\Name}[1]{%
\def\@forenames{}%
\def\@surname{}%
- \@parsename#1 \@nil
+ \def\nametag##1{}%
+ \@parsename#1 \@nil\end@parsename
\ifx\@shortauthor\@empty
\ifx\@sauthor\@empty
\global\let\@shortauthor\@surname
@@ -305,6 +329,7 @@ Keywords:} \ignorespaces}%
\noexpand\@jmlr@authors@sep
\@initials\space\@surname}%
\fi
+ \def\nametag##1{##1}%
\@name #1%
}
\newcommand*{\Email}[1]{{\@email #1}}
@@ -338,13 +363,20 @@ Keywords:} \ignorespaces}%
\gdef\@editor{#1}%
}
\def\firstpageno#1{\setcounter{page}{#1}}
-\AtEndDocument{%
+\AtEndDocument{\@jmlrenddoc}
+\newcommand*{\@jmlrenddoc}{%
\@ifundefined{phantomsection}{}{\phantomsection}%
\protected@edef\@currentlabelname{end of \@shorttitle}%
\label{jmlrend}%
+ \global\let\@reprint\@empty
}
\newcommand*{\@titlefoot}{\scriptsize\copyright\space\@jmlryear
- \space\@jmlrauthors.\hfill}
+ \space\@jmlrauthors.\hfill
+ \@reprint
+}
+\let\@reprint\@empty
+\newcommand{\reprint}[1]{%
+ \gdef\@reprint{Reprinted with permission for JMLR#1}}
\newcommand\ps@jmlrtps{%
\let\@mkboth\@gobbletwo
\def\@oddhead{\scriptsize \@jmlrproceedings
@@ -449,7 +481,7 @@ Keywords:} \ignorespaces}%
\newcommand*{\appendixsrefname}{Appendices}
\newcommand*{\partrefname}{Part}
\newcommand*{\partsrefname}{Parts}
-\newcommand*{\objectref}[5]{%
+\DeclareRobustCommand*{\objectref}[5]{%
\let\@objectname\@empty
\def\@objectref{}%
\let\@prevsep\@empty
@@ -518,6 +550,11 @@ Keywords:} \ignorespaces}%
\vskip\baselineskip
#2\label{#1}%
}
+\newcommand{\algocfconts}[3]{%
+ \@algocf@pre@ruled
+ #2\label{#1}\kern2pt\hrule height.8pt depth0pt\kern2pt%
+ #3\@algocf@pre@ruled
+}
\newcommand*{\includeteximage}[2][]{%
\def\Gin@req@sizes{%
\Gin@req@height\Gin@nat@height
@@ -575,16 +612,14 @@ Keywords:} \ignorespaces}%
\fi
\newenvironment{algorithm}[1][htbp]%
{%
- \@algocf@init%
- \@algocf@init@caption
\begin{algocf}[#1]%
- \@algocf@start%
+ \renewcommand\@makecaption[2]{%
+ \hskip\AlCapHSkip
+ \parbox[t]{\hsize}{\algocf@captiontext{##1}{##2}}%
+ }%
}%
{%
- \@algocf@finish%
- \@algocf@term@caption
\end{algocf}%
- \@algocf@term
}
\setlength\algomargin{0pt}
\newcommand{\artappendix}{\par
@@ -642,6 +677,7 @@ Keywords:} \ignorespaces}%
\newcounter{subfigure}
\@addtoreset{subfigure}{figure}
\renewcommand*{\thesubfigure}{\alph{subfigure}}
+\newcommand*{\theHsubfigure}{\theHfigure.\alph{subfigure}}
\renewcommand*{\p@subfigure}{\expandafter\@p@subfigure}
\newcommand*{\@p@subfigure}[1]{%
\protect\@subfigurelabel{\thefigure}{\thesubfigure}%
@@ -674,23 +710,33 @@ Keywords:} \ignorespaces}%
\@objectref
}
\newcommand*{\subfigurelabel}[1]{(\emph{#1})}
+\newsavebox\@subfloatcapbox
+\newsavebox\@subfloatcontsbox
\newcommand*{\subfigure}[1][]{%
\bgroup
\def\@subfigcap{#1}%
\@subfigure
}
-
\newcommand*{\@subfigure}[2][b]{%
\advance\c@figure by 1\relax
\refstepcounter{subfigure}%
- \begin{tabular}[#1]{@{}c@{}}%
- #2\\
- \subfigurelabel{\thesubfigure}%
+ \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}%
\ifx\@subfigcap\@empty
\else
\space\@subfigcap
+ \fi}%
+ \sbox\@subfloatcontsbox{#2}%
+ \settowidth{\@tempdima}{\usebox\@subfloatcontsbox}%
+ \settowidth{\@tempdimb}{\usebox\@subfloatcapbox}%
+ \ifdim\@tempdimb>\@tempdima
+ \settowidth\@tempdimb{\subfigurelabel{\thesubfigure}\space}%
+ \addtolength{\@tempdima}{-\@tempdimb}%
+ \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space
+ \parbox[t]{\@tempdima}{\@subfigcap}}%
\fi
- \end{tabular}
+ \begin{tabular}[#1]{@{}c@{}}%
+ \usebox\@subfloatcontsbox\\\usebox\@subfloatcapbox
+ \end{tabular}%
\egroup
}
\newcounter{subtable}
@@ -732,16 +778,24 @@ Keywords:} \ignorespaces}%
\def\@subtabcap{#1}%
\@subtable
}
-
\newcommand*{\@subtable}[2][t]{%
\refstepcounter{subtable}%
- \begin{tabular}[#1]{@{}c@{}}%
- \subtablelabel{\thesubtable}%
+ \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}%
\ifx\@subtabcap\@empty
\else
\space\@subtabcap
+ \fi}%
+ \sbox\@subfloatcontsbox{#2}%
+ \settowidth{\@tempdima}{\usebox\@subfloatcontsbox}%
+ \settowidth{\@tempdimb}{\usebox\@subfloatcapbox}%
+ \ifdim\@tempdimb>\@tempdima
+ \settowidth\@tempdimb{\subtablelabel{\thesubtable}\space}%
+ \addtolength{\@tempdima}{-\@tempdimb}%
+ \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space
+ \parbox[t]{\@tempdima}{\@subtabcap}}%
\fi
- \\#2%
+ \begin{tabular}[#1]{@{}c@{}}%
+ \usebox\@subfloatcapbox\\\usebox\@subfloatcontsbox
\end{tabular}
}
\newcounter{chapter}
@@ -856,7 +910,19 @@ Keywords:} \ignorespaces}%
\clearpage
\fi
\@mainmatterfalse}
-\let\booktableofcontents\tableofcontents
+\newcommand*{\booktocpreamble}{}
+\newcommand\booktableofcontents{%
+ \if@twocolumn
+ \@restonecoltrue\onecolumn
+ \else
+ \@restonecolfalse
+ \fi
+ \chapter*{\contentsname
+ \@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
+ \booktocpreamble
+ \@starttoc{toc}%
+ \if@restonecol\twocolumn\fi
+}
\let\arttableofcontents\tableofcontents
\newcommand{\artpart}{%
\if@noskipsec \leavevmode\fi
@@ -885,18 +951,20 @@ Keywords:} \ignorespaces}%
\newcommand{\parttitleformat}[1]{%
\Huge\bfseries#1%
}
+\newcommand*{\@parttoclabel}{part}
+\def\@partapp{\partname}
\newcommand{\partnumberformat}[1]{%
- \Huge\bfseries \partname\nobreakspace#1\par\nobreak
+ \Huge\bfseries \@partapp\nobreakspace#1\par\nobreak
\vskip 20\p@
}
\newcommand{\preparthook}{\null\vfil}
-\renewcommand*{\partformat}{\centering}
+\newcommand*{\partformat}{\centering}
\def\@bookpart[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
- \addcontentsline{toc}{part}{\protect\numberline{\thepart}#1}%
+ \addcontentsline{toc}{\@parttoclabel}{\protect\numberline{\thepart}#1}%
\else
- \addcontentsline{toc}{part}{#1}%
+ \addcontentsline{toc}{\@parttoclabel}{#1}%
\fi
\markboth{}{}%
{\interlinepenalty \@M