diff options
author | Karl Berry <karl@freefriends.org> | 2014-10-17 22:03:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-10-17 22:03:50 +0000 |
commit | 1c8b8bbccba9cf74ffbc49bf62cf52a95d2f5964 (patch) | |
tree | 849e02a7b8200ce4da88bf2ffe325f3e5f88612f /Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls | |
parent | e4be7587df5492162d7adfe6879775b191974ccc (diff) |
jmlr (17oct14)
git-svn-id: svn://tug.org/texlive/trunk@35393 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls | 62 |
1 files changed, 49 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls b/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls index 4b75264a9dc..9bf6963244f 100644 --- a/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls +++ b/Master/texmf-dist/tex/latex/jmlr/jmlrbook.cls @@ -41,10 +41,26 @@ %% First editor: %% Second editor: \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{jmlrbook}[2014/09/29 v1.19 (NLCT) JMLR Book Style] +\ProvidesClass{jmlrbook}[2014/10/15 v1.20 (NLCT) JMLR Book Style] \RequirePackage{xkeyval} \RequirePackage{setspace} -\RequirePackage{fink} +\newcommand*\jmlrprefacepath{} +\IfFileExists{currfile.sty}% +{ + \RequirePackage{currfile} + \renewcommand*\jmlrprefacepath{\currfilepath} +}% +{% + \RequirePackage{fink} + \ifdef\finkpath + {% + \renewcommand*\jmlrprefacepath{\finkpath}% + } + {% + \ClassWarning{jmlrbook}{Install `currfile' package or update + `fink' package} + } +} \providecommand*{\jmlrprehyperref}{} \newif\ifgrayscale \grayscalefalse @@ -56,8 +72,20 @@ \DeclareOptionX{7x10}{\PassOptionsToClass{\CurrentOption}{jmlr}} \DeclareOptionX{html}{\PassOptionsToClass{\CurrentOption}{jmlr}} \DeclareOptionX{nohtml}{\PassOptionsToClass{\CurrentOption}{jmlr}} -\DeclareOptionX{wcp}{\PassOptionsToClass{\CurrentOption}{jmlr}} -\DeclareOptionX{nowcp}{\PassOptionsToClass{\CurrentOption}{jmlr}} +\newcommand*{\jmlrprefaceheader}{% + \phantomsection + \chapter*{\prefacename}% + \addcontentsline{toc}{chapter}{\prefacename}% + \markboth{\prefacename}{\prefacename}% +} +\DeclareOptionX{wcp}{% + \PassOptionsToClass{\CurrentOption}{jmlr}% + \renewcommand*{\jmlrprefaceheader}{\chapter*{\prefacename}} +} +\DeclareOptionX{nowcp}{% + \PassOptionsToClass{\CurrentOption}{jmlr}% + \renewcommand*{\jmlrprefaceheader}{\chapter{\prefacename}} +} \DeclareOptionX{tablecaptiontop}{\PassOptionsToClass{\CurrentOption}{jmlr}} \DeclareOptionX{tablecaptionbottom}{\PassOptionsToClass{\CurrentOption}{jmlr}} \DeclareOptionX{10pt}{\PassOptionsToClass{\CurrentOption}{jmlr}} @@ -74,10 +102,10 @@ \grayscaletrue \fi } -\newcommand*{\jmlrwritepdfinfo}{% - \protected@write\@auxout{}{\string\jmlrbook@info{\xmpAuthor}{\xmpTitle}}% -} \ifgrayscale + \newcommand*{\jmlrwritepdfinfo}{% + \protected@write\@auxout{}{\string\jmlrbook@info{\xmpAuthor}{\xmpTitle}}% + } \ifjmlrpdfxa \def\convertDate{\getYear} {\catcode`\D=12 @@ -98,9 +126,7 @@ \def\sep{</rdf:li><rdf:li>} \def\TextCopyright{\amp\hash x00A9;} \def\Title#1{\gdef\xmpTitle{#1}} - \let\xmpTitle\@empty \def\Author#1{\gdef\xmpAuthor{#1}} - \let\xmpAuthor\@empty \def\Keywords#1{\gdef\xmpKeywords{#1}} \let\xmpKeywords\@empty \let\xmpSubject\xmpKeywords @@ -236,8 +262,11 @@ }% } \fi +\else + \newcommand*{\jmlrwritepdfinfo}{} \fi \newcommand*{\jmlrbook@info}[2]{} +\newcommand*{\jmlrbook@location}[1]{} \newcommand*{\@post@hyperref}{% \let\@org@c@lenddoca\c@lenddoca \let\c@lenddoca\undefined @@ -278,10 +307,10 @@ \else \newenvironment{preface}[1][preface]% {% - \chapter{\prefacename} + \jmlrprefaceheader \protected@write\@mainauxout {}{\string\@prefacestart{\thepage}{\arabic{page}}}% - \protected@write\@mainauxout{}{\string\@prefacefile{\finkpath}{#1}}% + \protected@write\@mainauxout{}{\string\@prefacefile{\jmlrprefacepath}{#1}}% }% {% \protected@write\@mainauxout{}{\string\@prefaceend{\thepage}}% @@ -317,19 +346,21 @@ } \renewcommand*\jmlrtitlehook{% \hypersetup{pdftitle={\@shorttitle}}% - \let\xmpTitle\@shorttitle + \def\xmpTitle{\@shorttitle}% \let\jmlrtitlehook\relax } +\providecommand*{\xmpTitle}{\@title}% \renewcommand*\jmlrauthorhook{% \ifx\@sauthor\@empty \hypersetup{pdfauthor={\@author}}% \else \hypersetup{pdfauthor={\@sauthor}}% \fi - \let\xmpAuthor\@sauthor + \def\xmpAuthor{\@sauthor}% \let\jmlrauthorhook\relax \let\@shortauthor\@empty } +\providecommand*\xmpAuthor{\@author}% \newcommand*{\@subtitle}{} \newcommand*{\subtitle}[1]{\renewcommand*{\@subtitle}{#1}} \newcommand*{\@volume}{\@jmlrvolume} @@ -349,6 +380,11 @@ \newcommand*{\thejmlrworkshop}{\@jmlrworkshop} \newcommand*{\@team}{} \newcommand*{\team}[1]{\renewcommand*{\@team}{#1}} +\newcommand*{\@jmlrlocation}{} +\newcommand*{\jmlrlocation}[1]{% + \renewcommand*{\@jmlrlocation}{#1}% + \protected@write\@auxout{}{\string\jmlrbook@location{#1}}% +} \newcommand*{\@productioneditorname}{Production Editor} \newcommand*{\@productioneditor}{} \newcommand*{\productioneditor}[1]{% |