From e18df9905249ee6442dc1f4ca9626b8ebaf919e8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 29 Jan 2022 21:45:49 +0000 Subject: jmlr (29jan22) git-svn-id: svn://tug.org/texlive/trunk@61793 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/jmlr/jmlr.cls | 26 +++-- Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls | 7 +- Master/texmf-dist/tex/latex/jmlr/jmlrutils.sty | 126 +++++++++++++++++++++---- 3 files changed, 128 insertions(+), 31 deletions(-) (limited to 'Master/texmf-dist/tex/latex/jmlr') diff --git a/Master/texmf-dist/tex/latex/jmlr/jmlr.cls b/Master/texmf-dist/tex/latex/jmlr/jmlr.cls index dc3f8c7172b..fe190f07484 100644 --- a/Master/texmf-dist/tex/latex/jmlr/jmlr.cls +++ b/Master/texmf-dist/tex/latex/jmlr/jmlr.cls @@ -7,7 +7,7 @@ %% jmlr.dtx (with options: `jmlr.cls,package') %% %% jmlr.dtx -%% Copyright 2020 Nicola Talbot +%% Copyright 2022 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -41,7 +41,7 @@ %% First editor: %% Second editor: \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{jmlr}[2020/09/21 v1.28 (NLCT) Journal of Machine Learning Research] +\ProvidesClass{jmlr}[2022/01/29 v1.29 (NLCT) Journal of Machine Learning Research] \RequirePackage{xkeyval} \RequirePackage{calc} \RequirePackage{etoolbox} @@ -56,8 +56,8 @@ \PassOptionsToPackage{color}{xcolor}} \DeclareOptionX{gray}{\grayscaletrue \PassOptionsToPackage{gray}{xcolor}} -\DeclareOptionX{draft}{\setlength\overfullrule{5pt}} -\DeclareOptionX{final}{\setlength\overfullrule{0pt}} +\DeclareOptionX{draft}{\PassOptionsToClass{\CurrentOption}{article}} +\DeclareOptionX{final}{\PassOptionsToClass{\CurrentOption}{article}} \newif\iftablecaptiontop \tablecaptiontoptrue \newcommand{\tableconts}[3]{% @@ -107,6 +107,7 @@ \DeclareOptionX{nowcp}{\jmlrnowcp} \DeclareOptionX{wcp}{\jmlrwcp} \DeclareOptionX{pmlr}{\jmlrpmlr} +\DeclareOptionX{cleveref}{\PassOptionsToPackage{cleveref}{jmlrutils}} \DeclareOptionX{oneside}{\@twosidefalse \@mparswitchfalse} \DeclareOptionX{twoside}{\@twosidetrue \@mparswitchtrue} \@twosidetrue @@ -143,6 +144,7 @@ \setlength{\textwidth}{6.0 true in} \fi \AtEndDocument{\@jmlrenddoc} +\RequirePackage{placeins} \RequirePackage{amsmath} \RequirePackage{amssymb} \RequirePackage{natbib} @@ -481,6 +483,7 @@ Keywords:} \ignorespaces}% \def\firstpageno#1{\setcounter{page}{#1}} \@ifundefined{startpage}{}{\firstpageno{\startpage}} \newcommand*{\@jmlrenddoc}{% + \FloatBarrier \phantomsection \protected@edef\@currentlabelname{end of \@shorttitle}% \label{jmlrend}\null @@ -958,6 +961,7 @@ Keywords:} \ignorespaces}% \let\tableofcontents\arttableofcontents \def\thesection{\arabic{section}}% } +\newcommand*{\@jmlr@check@warn}[1]{} \newcommand*{\@jmlr@check@packages}{% \@ifpackageloaded{epsfig}{% \ClassError{jmlr}{Obsolete package `epsfig' detected. @@ -970,13 +974,13 @@ Keywords:} \ignorespaces}% Please use \string\includegraphics\space to include images instead}{}}{}% \@ifpackageloaded{subfig}{% - \ClassError{jmlr}{Package `subfig' detected.\MessageBreak + \@jmlr@check@warn{Package `subfig' detected.\MessageBreak This will cause a conflict if the article is incorporated \MessageBreak into a book using jmlbook.cls. \MessageBreak Please use \string\subfigure\space and - \string\subtable\space instead}{}}{}% + \string\subtable\space instead}}{}% \@ifpackageloaded{theorem}{% \ClassError{jmlr}{Package `theorem' detected.\MessageBreak This can cause a conflict with other packages used by jmlr}{}}{}% @@ -986,10 +990,12 @@ Keywords:} \ignorespaces}% \@ifpackageloaded{amsthm}{% \ClassError{jmlr}{Package `amsthm' detected.\MessageBreak This package conflicts with the jmlr class}{}}{}% - \@ifpackageloaded{pdfpages}{Package `pdfpages' detected.\MessageBreak - This can cause a problem for jmlrbook}{}% - \@ifpackageloaded{geometry}{Package `geometry' detected.\MessageBreak - This can cause a problem for jmlrbook}{}% + \@ifpackageloaded{pdfpages}% + {\@jmlr@check@warn{Package `pdfpages' detected.\MessageBreak + This can cause a problem for jmlrbook}}{}% + \@ifpackageloaded{geometry}% + {\@jmlr@check@warn{Package `geometry' detected.\MessageBreak + This can cause a problem for jmlrbook}}{}% \@ifpackageloaded{tabularx}{% \ClassError{jmlr}{Package `tabularx' detected.\MessageBreak This will break footnote links}{}}{}% diff --git a/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls b/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls index 123762e8b02..725cc1ba22d 100644 --- a/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls +++ b/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls @@ -7,7 +7,7 @@ %% jmlr.dtx (with options: `jmlrbook.cls,package') %% %% jmlr.dtx -%% Copyright 2020 Nicola Talbot +%% Copyright 2022 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -41,7 +41,7 @@ %% First editor: %% Second editor: \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{jmlrbook}[2020/09/21 v1.28 (NLCT) JMLR Book Style] +\ProvidesClass{jmlrbook}[2022/01/29 v1.29 (NLCT) JMLR Book Style] \RequirePackage{xkeyval} \RequirePackage{setspace} \newcommand*\jmlrprefacepath{} @@ -57,8 +57,7 @@ \renewcommand*\jmlrprefacepath{\finkpath}% } {% - \ClassWarning{jmlrbook}{Install `currfile' package or update - `fink' package} + \ClassWarning{jmlrbook}{`currfile' package required} } } \providecommand*{\jmlrprehyperref}{} diff --git a/Master/texmf-dist/tex/latex/jmlr/jmlrutils.sty b/Master/texmf-dist/tex/latex/jmlr/jmlrutils.sty index ef52cc96427..11b7f5f7204 100644 --- a/Master/texmf-dist/tex/latex/jmlr/jmlrutils.sty +++ b/Master/texmf-dist/tex/latex/jmlr/jmlrutils.sty @@ -7,7 +7,7 @@ %% jmlr.dtx (with options: `jmlrutils.sty,package') %% %% jmlr.dtx -%% Copyright 2020 Nicola Talbot +%% Copyright 2022 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -40,15 +40,21 @@ %% Right brace \} Tilde \~} %% First editor: %% Second editor: -\ProvidesPackage{jmlrutils}[2020/09/21 v1.28 (NLCT)] +\ProvidesPackage{jmlrutils}[2022/01/29 v1.29 (NLCT)] \newif\ifjmlrutilsmaths \jmlrutilsmathstrue \DeclareOption{maths}{\jmlrutilsmathstrue} \DeclareOption{nomaths}{\jmlrutilsmathsfalse} +\DeclareOption{math}{\jmlrutilsmathstrue} +\DeclareOption{nomath}{\jmlrutilsmathsfalse} \newif\ifjmlrutilstheorems \jmlrutilstheoremstrue \DeclareOption{theorems}{\jmlrutilstheoremstrue} \DeclareOption{notheorems}{\jmlrutilstheoremsfalse} +\newif\ifjmlrcleveref +\jmlrclevereffalse +\DeclareOption{cleveref}{\jmlrclevereftrue} +\DeclareOption{nocleveref}{\jmlrclevereffalse} \newif\ifjmlrutilssubfloats \jmlrutilssubfloatstrue \DeclareOption{subfloats}{\jmlrutilssubfloatstrue} @@ -58,6 +64,19 @@ \ifjmlrutilsmaths \RequirePackage{amsmath} \fi +\ifjmlrcleveref + \ifdef\jmlrprehyperref + { + \jmlrprehyperref + \@ifundefined{@pre@hyperref}{}{\@pre@hyperref\undef\@pre@hyperref} + \RequirePackage{hyperref} + \let\jmlrprehyperref\relax + \@ifundefined{@post@hyperref}{}{\@post@hyperref\undef\@post@hyperref} + } + {} + \RequirePackage{aliascnt} + \RequirePackage{cleveref} +\fi \@ifundefined{iftablecaptiontop} {\newif\iftablecaptiontop \tablecaptiontoptrue} @@ -158,10 +177,13 @@ #2\label{#1}% } \newcommand{\algocfconts}[3]{% - \@algocf@pre@ruled - #2\label{#1}\kern2pt\hrule height.8pt depth0pt\kern2pt% - #3\@algocf@pre@ruled + \jmlralgorule\par\smallskip + #2\label{#1}% caption and label + \jmlralgorule\par\smallskip + #3% algorithm content + \jmlralgorule } +\newcommand{\jmlralgorule}{\kern2pt\hrule height.8pt depth0pt\kern2pt} \newenvironment{algorithm}[1][htbp]% {% \ifundef{\algocf}% @@ -171,7 +193,7 @@ \begin{algocf}[#1]% \renewcommand\@makecaption[2]{% \hskip\AlCapHSkip - \parbox[t]{\hsize}{\algocf@captiontext{##1}{##2}}% + \parbox[t]{\dimexpr\linewidth-\AlCapHSkip}{\algocf@captiontext{##1}{##2}}% }% }% {% @@ -258,6 +280,7 @@ \newcommand*{\subfigurelabel}[1]{(\emph{#1})} \newsavebox\@subfloatcapbox \newsavebox\@subfloatcontsbox + \newlength\jmlrminsubcaptionwidth \newcommand*{\subfigure}[1][]{% \bgroup \def\@subfigcap{#1}% @@ -277,8 +300,18 @@ \ifdim\@tempdimb>\@tempdima \settowidth\@tempdimb{\subfigurelabel{\thesubfigure}\space}% \addtolength{\@tempdima}{-\@tempdimb}% - \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space - \parbox[t]{\@tempdima}{\@subfigcap}}% + \ifdim\@tempdima>\jmlrminsubcaptionwidth + \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space + \parbox[t]{\@tempdima}{\@subfigcap}}% + \else + \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space + \parbox[t]{\jmlrminsubcaptionwidth}{\@subfigcap}}% + \fi + \else + \ifdim\@tempdimb<\jmlrminsubcaptionwidth + \sbox\@subfloatcapbox{\subfigurelabel{\thesubfigure}\space + \parbox[t]{\jmlrminsubcaptionwidth}{\@subfigcap}}% + \fi \fi \begin{tabular}[#1]{@{}c@{}}% \usebox\@subfloatcontsbox\\\usebox\@subfloatcapbox @@ -349,8 +382,18 @@ \ifdim\@tempdimb>\@tempdima \settowidth\@tempdimb{\subtablelabel{\thesubtable}\space}% \addtolength{\@tempdima}{-\@tempdimb}% - \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space - \parbox[t]{\@tempdima}{\@subtabcap}}% + \ifdim\@tempdima>\jmlrminsubcaptionwidth + \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space + \parbox[t]{\@tempdima}{\@subtabcap}}% + \else + \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space + \parbox[t]{\jmlrminsubcaptionwidth}{\@subtabcap}}% + \fi + \else + \ifdim\@tempdimb<\jmlrminsubcaptionwidth + \sbox\@subfloatcapbox{\subtablelabel{\thesubtable}\space + \parbox[t]{\jmlrminsubcaptionwidth}{\@subtabcap}}% + \fi \fi \begin{tabular}[#1]{@{}c@{}}% \usebox\@subfloatcapbox\\\usebox\@subfloatcontsbox @@ -507,13 +550,62 @@ } \newtheorem{example}{Example} \newtheorem{theorem}{Theorem} - \newtheorem{lemma}[theorem]{Lemma} - \newtheorem{proposition}[theorem]{Proposition} - \newtheorem{remark}[theorem]{Remark} - \newtheorem{corollary}[theorem]{Corollary} - \newtheorem{definition}[theorem]{Definition} - \newtheorem{conjecture}[theorem]{Conjecture} - \newtheorem{axiom}[theorem]{Axiom} + \ifjmlrcleveref + \newaliascnt{lemma}{theorem} + \newtheorem{lemma}[theorem]{Lemma} + \aliascntresetthe{lemma} + \crefname{lemma}{lemma}{lemmas} + \else + \newtheorem{lemma}[theorem]{Lemma} + \fi + \ifjmlrcleveref + \newaliascnt{proposition}{theorem} + \newtheorem{proposition}[proposition]{Proposition} + \aliascntresetthe{proposition} + \crefname{proposition}{proposition}{propositions} + \else + \newtheorem{proposition}[theorem]{Proposition} + \fi + \ifjmlrcleveref + \newaliascnt{remark}{theorem} + \newtheorem{remark}[remark]{Remark} + \aliascntresetthe{remark} + \crefname{remark}{remark}{remarks} + \else + \newtheorem{remark}[theorem]{Remark} + \fi + \ifjmlrcleveref + \newaliascnt{corollary}{theorem} + \newtheorem{corollary}[corollary]{Corollary} + \aliascntresetthe{corollary} + \crefname{corollary}{corollary}{corollaries} + \else + \newtheorem{corollary}[theorem]{Corollary} + \fi + \ifjmlrcleveref + \newaliascnt{definition}{theorem} + \newtheorem{definition}[definition]{Definition} + \aliascntresetthe{definition} + \crefname{definition}{definition}{definitions} + \else + \newtheorem{definition}[theorem]{Definition} + \fi + \ifjmlrcleveref + \newaliascnt{conjecture}{theorem} + \newtheorem{conjecture}[conjecture]{Conjecture} + \aliascntresetthe{conjecture} + \crefname{conjecture}{conjecture}{conjectures} + \else + \newtheorem{conjecture}[theorem]{Conjecture} + \fi + \ifjmlrcleveref + \newaliascnt{axiom}{theorem} + \newtheorem{axiom}[axiom]{axiom} + \aliascntresetthe{axiom} + \crefname{axiom}{axiom}{axioms} + \else + \newtheorem{axiom}[theorem]{Axiom} + \fi \fi \endinput %% -- cgit v1.2.3