summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cd
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-05-06 01:02:24 +0000
committerKarl Berry <karl@freefriends.org>2008-05-06 01:02:24 +0000
commit441728c3fc15c10e69422d748dc214751ef51c17 (patch)
treed29c70e0731e4e981f55f2405e2aeacd138496ee /Master/texmf-dist/tex/latex/cd
parent101395e54ec0c670b2308650550de02c7b4ce460 (diff)
cd update (5may08)
git-svn-id: svn://tug.org/texlive/trunk@7882 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cd')
-rw-r--r--Master/texmf-dist/tex/latex/cd/cd.cls248
1 files changed, 217 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/cd/cd.cls b/Master/texmf-dist/tex/latex/cd/cd.cls
index fcbb68300fa..0ad8b597f34 100644
--- a/Master/texmf-dist/tex/latex/cd/cd.cls
+++ b/Master/texmf-dist/tex/latex/cd/cd.cls
@@ -6,7 +6,7 @@
%%
%% cd.dtx (with options: `class')
%%
-%% Copyright (C) 1998-2002 by Sebastiano Vigna
+%% Copyright (C) 1998-2007 by Sebastiano Vigna
%%
%% This file is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@
%% Right brace \} Tilde \~}
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{cd}[2002/01/10 v1.0 CD Cover Class]
+\ProvidesClass{cd}[2007/10/12 v1.3 CD Cover Class]
\newif\if@lignspine
\@lignspinefalse
@@ -53,6 +53,8 @@
\DeclareOption{aligninsidetop}{\def\@ligninside{t}}
\DeclareOption{alignbacktop}{\def\@lignback{t}}
+\DeclareOption{covergraphics}{\def\@lignback{t}}
+
\DeclareOption{aligntop}%
{\ExecuteOptions{aligncovertop,aligninsidetop,alignbacktop}}
@@ -86,24 +88,23 @@
\DeclareRobustCommand{\backtext}[1]{\def\b@cktext{#1}}
\DeclareRobustCommand{\insidetext}[1]{\def\insid@text{#1}}
+\DeclareRobustCommand{\covergraphics}[1]{\def\c@vertext{#1}\def\c@vergraphics{}}
+\DeclareRobustCommand{\insidegraphics}[1]{\def\insid@text{#1}\def\insid@graphics{}}
+
\DeclareRobustCommand*{\leftspine}[1]{\def\leftspin@{#1}}
\DeclareRobustCommand*{\centerspine}[1]{\def\centerspin@{#1}}
\DeclareRobustCommand*{\rightspine}[1]{\def\rightspin@{#1}}
\DeclareRobustCommand*{\leftspinebis}[1]{\def\leftspin@bis{#1}}
\DeclareRobustCommand*{\centerspinebis}[1]{\def\centerspin@bis{#1}}
\DeclareRobustCommand*{\rightspinebis}[1]{\def\rightspin@bis{#1}}
-\hoffset=-1in
-\voffset=-1in
-\evensidemargin=1.5cm
-\oddsidemargin=1.5cm
-\topmargin=1.5cm
+\evensidemargin=0cm
+\oddsidemargin=0cm
+\topmargin=0cm
\headheight=0cm
\headsep=0cm
\footskip=0cm
\textwidth=\paperwidth
-\advance\textwidth by -3cm
\textheight=\paperheight
-\advance\textheight by -3cm
\lineskip=0pt
\lineskiplimit=0pt
@@ -174,7 +175,6 @@
\lefttracklist{}%
\righttracklist{}%
\covertext{}%
- \backtext{\c@vertext}%
\insidetext{}%
\leftspine{}%
\centerspine{}%
@@ -205,6 +205,7 @@
\vspace*{-\@temp}\par
}
\DeclareRobustCommand*{\makecover}[1][lrtb]{%
+\voffset=0in
\begin{picture}(120,240)
\end{picture}%
\begin{rotate}{90}%
@@ -237,24 +238,45 @@
\fi\fi\fi\fi\fi
}
- \put(10,10){%
- \makebox(100,100)[\@ligninside]{%
- \parbox{10cm}{%
- \raggedright\insidef@nt\insid@text\alignt@baseline
+ \ifx\insid@graphics\@empty
+ \put(0,0){%
+ \makebox(120,120)[\@ligninside]{%
+ \parbox{12cm}{%
+ \raggedright\insidef@nt\insid@text\alignt@baseline
+ }%
}%
- }%
- }
- \put(130,10){%
- \makebox(100,100)[\@ligncover]{%
- \parbox{10cm}{%
- \raggedright\coverf@nt\c@vertext\alignt@baseline
+ }
+ \else
+ \put(10,10){%
+ \makebox(100,100)[\@ligninside]{%
+ \parbox{10cm}{%
+ \raggedright\insidef@nt\insid@text\alignt@baseline
+ }%
}%
- }%
- }
+ }
+ \fi
+ \ifx\c@vergraphics\@empty
+ \put(120,0){%
+ \makebox(120,120)[\@ligncover]{%
+ \parbox{12cm}{%
+ \raggedright\coverf@nt\c@vertext\alignt@baseline
+ }%
+ }%
+ }
+ \else
+ \put(130,10){%
+ \makebox(100,100)[\@ligncover]{%
+ \parbox{10cm}{%
+ \raggedright\coverf@nt\c@vertext\alignt@baseline
+ }%
+ }%
+ }
+ \fi
\end{picture}%
\end{rotate}%
}
\DeclareRobustCommand*{\makeback}[1][lrtb]{%
+\voffset=-.5in
\setindex{1}%
\settowidth{\squ@re}{\indexf@nt00}%
\settoheight{\@temp}{\indexf@nt0}%
@@ -373,7 +395,13 @@
\put(0,82){%
\makebox(120,30)[\@lignback]{%
\parbox{12.1cm}{%
- \raggedright\backf@nt\b@cktext\alignt@baseline
+ \raggedright\backf@nt
+ \ifx\b@cktext\undefined
+ \ifx\c@vergraphics\@empty\else\c@vertext\fi
+ \else
+ \b@cktext
+ \fi
+ \alignt@baseline
}%
}%
}
@@ -417,11 +445,134 @@
\end{picture}%
}
-\DeclareRobustCommand*{\makeCD}[1][]{%
+\DeclareRobustCommand*{\makeslimcover}[1][lrtb]{%
+\voffset=0in
+\setindex{1}%
+\settowidth{\squ@re}{\indexf@nt00}%
+\settoheight{\@temp}{\indexf@nt0}%
+\addtolength{\squ@re}{.4\@temp}%
+\setlength{\h@nging}{\squ@re}%
+\addtolength{\h@nging}{6pt}%
+\settoheight{\@hstrip}{\spinef@nt ABCDEFGHIJKLMNOPQRSTUVWXYZ}%
+\ifx\righttr@cklist\@empty
+ \setlength{\wtr@cklist}{10cm}%
+\else
+ \setlength{\wtr@cklist}{4.7cm}%
+\fi
+\ifx\rightinf@\@empty
+ \setlength{\winf@}{10cm}%
+\else
+ \setlength{\winf@}{4.7cm}%
+\fi
+\begin{picture}(120,240)
+\end{picture}%
+\begin{rotate}{90}%
+\begin{picture}(240,120)
+ \@tfor\cr@pmark := #1 \do {
+ \if l\cr@pmark
+ \put(-1,0){\line(-1,0){5}}
+ \put(-1,120){\line(-1,0){5}}
+ \else\if r\cr@pmark
+ \put(241,0){\line(1,0){5}}
+ \put(241,120){\line(1,0){5}}
+ \else\if b\cr@pmark
+ \put(0,-1){\line(0,-1){5}}
+ \put(240,-1){\line(0,-1){5}}
+ \put(120,-1){\line(0,-1){1}}
+ \put(120,-3){\line(0,-1){1}}
+ \put(120,-5){\line(0,-1){1}}
+ \else\if t\cr@pmark
+ \put(0,121){\line(0,1){5}}
+ \put(240,121){\line(0,1){5}}
+ \put(120,121){\line(0,1){1}}
+ \put(120,123){\line(0,1){1}}
+ \put(120,125){\line(0,1){1}}
+ \else\if c\cr@pmark
+ \put(0,0){\line(1,0){240}}
+ \put(0,0){\line(0,1){120}}
+ \put(120,0){\line(0,1){120}}
+ \put(0,120){\line(1,0){240}}
+ \put(240,0){\line(0,1){120}}
+ \fi\fi\fi\fi\fi
+ }
+
+ \put(12,10){%
+ \begin{picture}(100,100)
+ \put(0,80){%
+ \makebox(100,30)[\@lignback]{%
+ \parbox{10.1cm}{%
+ \raggedright\backf@nt
+ \ifx\b@cktext\undefined
+ \ifx\c@vergraphics\@empty\else\c@vertext\fi
+ \else
+ \b@cktext
+ \fi
+ \alignt@baseline
+ }%
+ }%
+ }
+
+ \put(0,15){%
+ \makebox(47,60)[tl]{%
+ \begin{minipage}{\wtr@cklist}%
+ \lineskip=.5pt\lineskiplimit=1pt\raggedright
+ \tracklistf@nt\lefttr@cklist
+ \end{minipage}%
+ }%
+ }
+
+ \put(55,15){%
+ \makebox(47,60)[tl]{%
+ \begin{minipage}{\wtr@cklist}%
+ \lineskip=.5pt\lineskiplimit=1pt\raggedright
+ \tracklistf@nt\righttr@cklist
+ \end{minipage}%
+ }%
+ }
+
+ \put(0,0){%
+ \makebox(0,0)[bl]{%
+ \parbox{\winf@}{%
+ \raggedright\infof@nt\leftinf@\alignt@baseline
+ }%
+ }%
+ }
+
+ \put(55,0){%
+ \makebox(0,0)[bl]{%
+ \parbox{\winf@}{%
+ \raggedright\infof@nt\rightinf@\alignt@baseline
+ }%
+ }%
+ }
+
+ \end{picture}%
+ }
+ \ifx\c@vergraphics\@empty
+ \put(120,0){%
+ \makebox(120,120)[\@ligncover]{%
+ \parbox{12cm}{%
+ \raggedright\coverf@nt\c@vertext\alignt@baseline
+ }%
+ }%
+ }
+ \else
+ \put(130,10){%
+ \makebox(100,100)[\@ligncover]{%
+ \parbox{10cm}{%
+ \raggedright\coverf@nt\c@vertext\alignt@baseline
+ }%
+ }%
+ }
+ \fi
+\end{picture}%
+\end{rotate}%
+}
+\DeclareRobustCommand*{\@skCDfile}[1]{%
\def\CDname{#1}%
\ifx\CDname\@empty
- \IfFileExists{CD.dat}{%
- \def\CDname{CD.dat}%
+ \IfFileExists{\jobname.dat}{%
+ \def\CDname{\jobname.dat}%
}{%
\typein[\CDname]{Please insert CD data file name:}%
}%
@@ -433,7 +584,14 @@
\ClassError{cd}{CD data file (\CDname.dat or \CDname) not found}{}%
}
}%
-\makecover\par\makeback\par
+}
+
+\DeclareRobustCommand*{\makeCD}[1][]{%
+\@skCDfile{#1}\makecover\par\makeback\par
+}
+
+\DeclareRobustCommand*{\makeslimCD}[1][]{%
+\@skCDfile{#1}\makeslimcover\par
}
\newread\CDlist
@@ -443,13 +601,13 @@
\newif\ifne@f
-\DeclareRobustCommand*{\makelist}[1][]{%
+\DeclareRobustCommand*{\@sklistfile}[1]{%
\def\CDlistname{#1}%
\ifx\CDlistname\@empty
- \IfFileExists{CD.lst}{%
- \def\CDlistname{CD.lst}%
+ \IfFileExists{\jobname.lst}{%
+ \def\CDlistname{\jobname.lst}%
}{%
- \typein[\CDlistname]{Please insert CD list file name:}
+ \typein[\CDlistname]{Please insert CD list file name:}
}%
\fi
\IfFileExists{\CDlistname.lst}{%
@@ -462,6 +620,10 @@
}
}
\ne@ftrue
+}
+
+\DeclareRobustCommand*{\makelist}[1][]{%
+\@sklistfile{#1}%
\advance\endlinechar\@M
\immediate\read\CDlist to \CDname
\advance\endlinechar-\@M
@@ -487,6 +649,30 @@
\addtocounter{@cd}{1}%
}
}
+
+\DeclareRobustCommand*{\makeslimlist}[1][]{%
+\@sklistfile{#1}%
+\advance\endlinechar\@M
+\immediate\read\CDlist to \CDname
+\advance\endlinechar-\@M
+\ifeof\CDlist\ne@ffalse\fi
+\@whilesw \ifne@f \fi {%
+ \newcd
+ \InputIfFileExists{\CDname.dat}{%
+ }{%
+ \InputIfFileExists{\CDname}{%
+ }{%
+ \ClassError{cd}{CD data file (\CDname.dat or \CDname) not found}{}%
+ }%
+ }%
+ \advance\endlinechar\@M
+ \immediate\read\CDlist to \CDname
+ \advance\endlinechar-\@M
+ \ifeof\CDlist\ne@ffalse\fi
+ \makeslimcover\par
+}
+}
+
\endinput
%%
%% End of file `cd.cls'.