summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/jmlr/jmlr.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-02-28 00:35:20 +0000
committerKarl Berry <karl@freefriends.org>2012-02-28 00:35:20 +0000
commiteb73e4b0206537b52fa1542a2572854dae55e414 (patch)
tree5dccda4d958f78baa2eda1fab8ad684b317fe2cd /Master/texmf-dist/source/latex/jmlr/jmlr.dtx
parent3896a3ce963e514325035018b02583376d23aa6c (diff)
jmlr 1.13 (26feb12)
git-svn-id: svn://tug.org/texlive/trunk@25518 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/jmlr/jmlr.dtx')
-rw-r--r--Master/texmf-dist/source/latex/jmlr/jmlr.dtx283
1 files changed, 275 insertions, 8 deletions
diff --git a/Master/texmf-dist/source/latex/jmlr/jmlr.dtx b/Master/texmf-dist/source/latex/jmlr/jmlr.dtx
index bea32ff22a6..3b45a8cfcb1 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 2012/1/5 12:59
+% Created on 2012/2/25 23:22
%\fi
%\iffalse
%<*package>
@@ -47,7 +47,9 @@
pdftitle={jmlr: LaTeX2e Classes for the Journal of Machine Learning Research},
pdfkeywords={LaTeX,jmlr}]{hyperref}
-\CheckSum{3918}
+\doxitem{Option}{option}{package options}
+
+\CheckSum{4294}
\OnlyDescription
\newcommand*{\appopt}[1]{\texttt{-{}-#1}}
@@ -65,7 +67,7 @@
% \author{Nicola L. C. Talbot\\[10pt]
%\url{http://theoval.cmp.uea.ac.uk/~nlct/}}
%
-% \date{2012-01-05 (version 1.12)}
+% \date{2012-02-25 (version 1.13)}
% \maketitle
%\tableofcontents
%
@@ -123,6 +125,11 @@
%articles. \sectionref{sec:makejmlrbook} describes how
%to use the \app{makejmlrbook} application.
%
+%There is also a prototype Java application that can be used as an
+%alternative to \app{makejmlrbook}, which includes diagnostic tools.
+%See \url{http://theoval.cmp.uea.ac.uk/~nlct/} for further
+%information.
+%
%\section{Required Packages}
%
%The \clsfmt{jmlr} class is based on the \cls{scrartcl} class and loads
@@ -1580,7 +1587,7 @@
% Declare class and required TeX format:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{jmlr}[2012/01/05 v1.12 (NLCT) Journal of Machine Learning Research]
+\ProvidesClass{jmlr}[2012/02/25 v1.13 (NLCT) Journal of Machine Learning Research]
% \end{macrocode}
%\changes{1.10}{2011-01-05}{hyperref now loaded by jmlr instead of
%jmlrbook}
@@ -1773,6 +1780,12 @@
% \begin{macrocode}
\jmlrprehyperref
% \end{macrocode}
+% Do stuff that has to come immediately before \sty{hyperref} is
+% loaded:
+%\changes{1.13}{2012/02/25}{added \cs{@pre@hyperref}}
+% \begin{macrocode}
+\@ifundefined{@pre@hyperref}{}{\@pre@hyperref}
+% \end{macrocode}
% Load \sty{hyperref}:
% \begin{macrocode}
\usepackage{hyperref}
@@ -3824,7 +3837,7 @@ Keywords:} \ignorespaces}%
% \end{macrocode}
% Declare class:
% \begin{macrocode}
-\ProvidesClass{jmlrbook}[2012/01/05 v1.12 (NLCT) JMLR Book Style]
+\ProvidesClass{jmlrbook}[2012/02/25 v1.13 (NLCT) JMLR Book Style]
% \end{macrocode}
% Need \sty{xkeyval} package to have key=value class options
% \begin{macrocode}
@@ -3847,42 +3860,95 @@ Keywords:} \ignorespaces}%
% \begin{macrocode}
\providecommand*{\jmlrprehyperref}{}
% \end{macrocode}
+%\begin{macro}{\ifgrayscale}
% Determine whether to select color or grayscale
% \begin{macrocode}
\newif\ifgrayscale
\grayscalefalse
+% \end{macrocode}
+%\end{macro}
+%\begin{option}{color}
+% \begin{macrocode}
\DeclareOptionX{color}{\grayscalefalse}
+% \end{macrocode}
+%\end{option}
+%\begin{option}{gray}
+% \begin{macrocode}
\DeclareOptionX{gray}{\grayscaletrue}
% \end{macrocode}
+%\end{option}
% Pass \clsopt{letterpaper} and \clsopt{7x10} to \clsfmt{jmlr}.
+%\begin{option}{letterpaper}
% \begin{macrocode}
\DeclareOptionX{letterpaper}{\PassOptionsToClass{\CurrentOption}{jmlr}}
+% \end{macrocode}
+%\end{option}
+%\begin{option}{7x10}
+% \begin{macrocode}
\DeclareOptionX{7x10}{\PassOptionsToClass{\CurrentOption}{jmlr}}
% \end{macrocode}
+%\end{option}
% Pass \clsopt{html} and \clsopt{nohtml} to \clsfmt{jmlr}.
+%\begin{option}{html}
% \begin{macrocode}
\DeclareOptionX{html}{\PassOptionsToClass{\CurrentOption}{jmlr}}
+% \end{macrocode}
+%\end{option}
+%\begin{option}{nohtml}
+% \begin{macrocode}
\DeclareOptionX{nohtml}{\PassOptionsToClass{\CurrentOption}{jmlr}}
% \end{macrocode}
+%\end{option}
% Pass \clsopt{wcp} and \clsopt{nowcp} options to \clsfmt{jmlr}.
+%\begin{option}{wcp}
% \begin{macrocode}
\DeclareOptionX{wcp}{\PassOptionsToClass{\CurrentOption}{jmlr}}
+% \end{macrocode}
+%\end{option}
+%\begin{option}{nowcp}
+% \begin{macrocode}
\DeclareOptionX{nowcp}{\PassOptionsToClass{\CurrentOption}{jmlr}}
% \end{macrocode}
+%\end{option}
% Pass \clsopt{tablecaptiontop} and \clsopt{tablecaptionbottom} options
% to \clsfmt{jmlr}.
+%\begin{option}{tablecaptiontop}
% \begin{macrocode}
\DeclareOptionX{tablecaptiontop}{\PassOptionsToClass{\CurrentOption}{jmlr}}
+% \end{macrocode}
+%\end{option}
+%\begin{option}{tablecaptionbottom}
+% \begin{macrocode}
\DeclareOptionX{tablecaptionbottom}{\PassOptionsToClass{\CurrentOption}{jmlr}}
% \end{macrocode}
+%\end{option}
+%
% Pass font size commands to \clsfmt{jmlr}
%\changes{1.10}{2011-01-05}{Added 10pt, 11pt and 12pt options to
%jmlrbook}
+%\begin{option}{10pt}
% \begin{macrocode}
\DeclareOptionX{10pt}{\PassOptionsToClass{\CurrentOption}{jmlr}}
+% \end{macrocode}
+%\end{option}
+%\begin{option}{11pt}
+% \begin{macrocode}
\DeclareOptionX{11pt}{\PassOptionsToClass{\CurrentOption}{jmlr}}
+% \end{macrocode}
+%\end{option}
+%\begin{option}{12pt}
+% \begin{macrocode}
\DeclareOptionX{12pt}{\PassOptionsToClass{\CurrentOption}{jmlr}}
% \end{macrocode}
+%\end{option}
+%
+%\begin{option}{pdfxa}
+%\changes{1.13}{2012/02/25}{new}
+% \begin{macrocode}
+\define@boolkey{jmlrbook.cls}[jmlr]{pdfxa}[true]{}
+\jmlrpdfxafalse
+% \end{macrocode}
+%\end{option}
% Process options
% \begin{macrocode}
\ProcessOptionsX
@@ -3901,6 +3967,192 @@ Keywords:} \ignorespaces}%
\fi
}
% \end{macrocode}
+%
+% This next bit is a modification of \sty{pdfx}. It's only used for
+% the print version when the \clsopt{pdfxa} option is used.
+%\changes{1.13}{2012/02/25}{added support for pdfx-1a}
+% \begin{macrocode}
+\newcommand*{\jmlrwritepdfinfo}{}
+\ifgrayscale
+ \ifjmlrpdfxa
+ \def\convertDate{\getYear}
+ {\catcode`\D=12
+ \gdef\getYear D:#1#2#3#4{\edef\xYear{#1#2#3#4}\getMonth}
+ }
+ \def\getMonth#1#2{\edef\xMonth{#1#2}\getDay}
+ \def\getDay#1#2{\edef\xDay{#1#2}\getHour}
+ \def\getHour#1#2{\edef\xHour{#1#2}\getMin}
+ \def\getMin#1#2{\edef\xMin{#1#2}\getSec}
+ \def\getSec#1#2{\edef\xSec{#1#2}\getTZh}
+ {%
+ \catcode`\Z=12
+ \gdef\tmpz{Z}
+ }
+ \def\hash{\expandafter\@gobble\string\#}%
+ \def\amp{\expandafter\@gobble\string\&}%
+ \def\xmpAmp{\amp\hash x0026;}%
+ \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
+ \def\Creator#1{\gdef\xmpCreator{#1}}
+ \def\xmpCreator{\@pdfcreator}
+ \def\Producer#1{\gdef\xmpProducer{#1}}
+ \def\xmpProducer{pdfTeX}
+ \def\Volume#1{\gdef\xmpVolume{#1}}
+ \let\xmpVolume\@empty
+ \def\Issue#1{\gdef\xmpIssue{#1}}
+ \let\xmpIssue\@empty
+ \def\CoverDisplayDate#1{\gdef\xmpCoverDisplayDate{#1}}
+ \let\xmpCoverDisplayDate\@empty
+ \def\CoverDate#1{\gdef\xmpCoverDate{#1}}
+ \let\xmpCoverDate\@empty
+ \def\Copyright#1{\gdef\xmpCopyright{#1}}
+ \let\xmpCopyright\@empty
+ \def\Doi#1{\gdef\xmpDoi{#1}}
+ \let\xmpDoi\@empty
+ \def\Lastpage#1{\gdef\xmpLastpage{#1}}
+ \let\xmpLastpage\@empty
+ \def\Firstpage#1{\gdef\xmpFirstpage{#1}}
+ \let\xmpFirstpage\@empty
+ \def\Journaltitle#1{\gdef\xmpJournaltitle{#1}}
+ \let\xmpJournaltitle\@empty
+ \def\Journalnumber#1{\gdef\xmpJournalnumber{#1}}
+ \let\xmpJournalnumber\@empty
+ \def\Org#1{\gdef\xmpOrg{#1}}
+ \let\xmpOrg\@empty
+ \def\CreatorTool#1{\gdef\xmpCreatorTool{#1}}
+ \def\xmpCreatorTool{\xmpProducer}
+ \def\AuthoritativeDomain#1{\gdef\xmpAuthoritativeDomain{#1}}
+ \let\xmpAuthoritativeDomain\@empty
+ \def\findUUID#1{\edef\tmpstring{\pdfmdfivesum{#1}}
+ \expandafter\eightofnine\tmpstring\end}
+ \def\eightofnine#1#2#3#4#5#6#7#8#9\end{%
+ \xdef\eightchars{#1#2#3#4#5#6#7#8}
+ \fouroffive#9\end}
+ \def\fouroffive#1#2#3#4#5\end{\xdef\ffourchars{#1#2#3#4}
+ \sfouroffive#5\end}
+ \def\sfouroffive#1#2#3#4#5\end{\xdef\sfourchars{#1#2#3#4}
+ \tfouroffive#5\end}
+ \def\tfouroffive#1#2#3#4#5\end{\xdef\tfourchars{#1#2#3#4}
+ \xdef\laststring{#5}}
+ \def\uuid{\eightchars-%
+ \ffourchars-%
+ \sfourchars-%
+ \tfourchars-%
+ \laststring}
+% \end{macrocode}
+%
+%\begin{macro}{\getTZh}
+% This is a modification of the command from \sty{pdfx} that also
+% works for zero and negative hours.
+% \begin{macrocode}
+ \def\getTZh#1{%
+ \def\TZprefix{#1}%
+ \ifx\TZprefix\tmpz
+ \def\xTZsign{+}%
+ \def\xTZh{00}%
+ \def\xTZm{00}%
+ \let\getTZnext\doConvDate
+ \else
+ \let\xTZsign\TZprefix
+ \let\getTZnext\getTZm
+ \fi
+ \getTZnext
+ }
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\getTZm}
+% This is a modified version of the command from \sty{pdfx}.
+% \begin{macrocode}
+ \def\getTZm '#1#2'{%
+ \edef\xTZm{#1#2}%
+ \doConvDate
+ }
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\doConvDate}
+% Defines the date using information derived from parsing
+% \ics{pdfcreationdate}
+% \begin{macrocode}
+ \def\doConvDate{%
+ \edef\convDate{\xYear-\xMonth-\xDay
+ T\xHour:\xMin:\xSec\xTZsign\xTZh:\xTZm}%
+ }
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\@pre@hyperref}
+% This macro contains a trimmed down version of \sty{pdfx}.
+% \begin{macrocode}
+ \newcommand{\@pre@hyperref}{%
+ \IfFileExists{FOGRA39L.icc}%
+ {%
+ \pdfminorversion=3
+ \pdfpageattr{/MediaBox[0 0 595 793]
+ /BleedBox[0 0 595 793]
+ /TrimBox[25 20 570 773]}%
+ \findUUID{\jobname.pdf}%
+ \edef\xmpdocid{\uuid}%
+ \findUUID{\pdfcreationdate}%
+ \edef\xmpinstid{\uuid}%
+ \InputIfFileExists{\jobname.xmpdata}{}{}%
+ \RequirePackage{xmpincl}%
+ \expandafter\convertDate\pdfcreationdate
+ \def\@pctchar{\expandafter\@gobble\string\%}
+ \def\@bchar{\expandafter\@gobble\string\\}
+ \immediate\pdfobj stream attr{/N 4} file{FOGRA39L.icc}
+ \edef\OBJ@CVR{\the\pdflastobj}
+ \pdfcatalog{/OutputIntents [ <<
+ /Type/OutputIntent
+ /S/GTS_PDFX
+ /OutputCondition (FOGRA39)
+ /OutputConditionIdentifier (FOGRA39 \@bchar(ISO Coated v2
+ 300\@pctchar\space \@bchar(ECI\@bchar)\@bchar))
+ /DestOutputProfile \OBJ@CVR\space 0 R
+ /RegistryName(http://www.color.org)
+ >> ]}
+ \input glyphtounicode.tex
+ \input glyphtounicode-cmr.tex
+ \pdfgentounicode=1
+ \RequirePackage[draft,pdftex,pdfpagemode=UseNone,bookmarks=false]{hyperref}%
+ }%
+ {%
+ \ClassError{jmlrbook}{Can't find `FOGRA39L.icc'}%
+ {Download ISOcoated\string_v2\string_330\string_bas.icc from
+ http://www.colormanagement.org/en/isoprofile.html
+ Rename it FOGRA39L.icc and put it in the pdfx folder}%
+ }%
+ }
+ \renewcommand*{\jmlrwritepdfinfo}{%
+ \begingroup
+ \let\&=\xmpAmp
+ \includexmp{pdfx-1a}%
+ \endgroup
+ \pdfinfo{
+ /Author(\xmpAuthor)%
+ /Title(\xmpTitle)%
+ /Creator(\xmpProducer)%
+ /CreationDate(\convDate)%
+ /ModDate(\convDate)%
+ /Producer(\xmpProducer)%
+ /Trapped /False
+ /GTS_PDFXVersion (PDF/X-1:2001)%
+ /GTS_PDFXConformance (PDF/X-1a:2001)%
+ }%
+ }
+% \end{macrocode}
+%\end{macro}
+% \begin{macrocode}
+ \fi
+\fi
+% \end{macrocode}
+%
% Load \cls{combine} class. This requires a little bit of trickery.
% \begin{macrocode}
\let\@org@LoadClass\LoadClass
@@ -3954,6 +4206,7 @@ Keywords:} \ignorespaces}%
% information to the main aux file for \app{makejmlrbook}. The
% optional argument is the file name for the extracted preface.
%\changes{1.11}{2011-03-24}{new}
+%\changes{1.13}{2012/02/25}{changed the chapter to an unnumbered one}
% \begin{macrocode}
\ifjmlrhtml
\newenvironment{preface}[1][preface]%
@@ -3965,7 +4218,7 @@ Keywords:} \ignorespaces}%
\else
\newenvironment{preface}[1][preface]%
{%
- \chapter{\prefacename}
+ \chapter*{\prefacename}
\protected@write\@mainauxout
{}{\string\@prefacestart{\thepage}{\arabic{page}}}%
\protected@write\@mainauxout{}{\string\@prefacefile{\finkpath}{#1}}%
@@ -4065,6 +4318,7 @@ Keywords:} \ignorespaces}%
% \begin{macrocode}
\renewcommand*\jmlrtitlehook{%
\hypersetup{pdftitle={\@shorttitle}}%
+ \let\xmpTitle\@shorttitle
\let\jmlrtitlehook\relax
}
\renewcommand*\jmlrauthorhook{%
@@ -4073,6 +4327,9 @@ Keywords:} \ignorespaces}%
\else
\hypersetup{pdfauthor={\@sauthor}}%
\fi
+ \ifjmlrpdfxa
+ \let\xmpAuthor\@sauthor
+ \fi
\let\jmlrauthorhook\relax
\let\@shortauthor\@empty
}
@@ -4086,13 +4343,23 @@ Keywords:} \ignorespaces}%
%\begin{macro}{\volume}
% \begin{macrocode}
\newcommand*{\@volume}{\@jmlrvolume}
-\newcommand*{\volume}[1]{\renewcommand*{\@volume}{#1}}
+\newcommand*{\volume}[1]{%
+ \renewcommand*{\@volume}{#1}%
+ \ifjmlrpdfxa
+ \let\xmpVolume\@volume
+ \fi
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\jmlrissue}
% \begin{macrocode}
\newcommand*{\@issue}{\@jmlrissue}
-\newcommand*{\issue}[1]{\renewcommand*{\@issue}{#1}}
+\newcommand*{\issue}[1]{%
+ \renewcommand*{\@issue}{#1}%
+ \ifjmlrpdfxa
+ \let\xmpIssue\@issue
+ \fi
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\thejmlrworkshop}