diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/cd/CD.dvi | bin | 2052 -> 0 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/cd/CD.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cd/CDlist.tex (renamed from Master/texmf-dist/doc/latex/cd/CDList.tex) | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cd/README | 12 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cd/cd.pdf | bin | 91772 -> 112963 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/cd/parsecd.rb | 54 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cd/slimCD.tex | 11 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/cd/slimCDlist.tex | 11 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/cd/cd.dtx | 356 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/cd/cd.ins | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/cd/cd.cls | 248 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 |
12 files changed, 593 insertions, 111 deletions
diff --git a/Master/texmf-dist/doc/latex/cd/CD.dvi b/Master/texmf-dist/doc/latex/cd/CD.dvi Binary files differdeleted file mode 100644 index 4225d3e1184..00000000000 --- a/Master/texmf-dist/doc/latex/cd/CD.dvi +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/cd/CD.tex b/Master/texmf-dist/doc/latex/cd/CD.tex index 0c115e899eb..f2f502caf81 100644 --- a/Master/texmf-dist/doc/latex/cd/CD.tex +++ b/Master/texmf-dist/doc/latex/cd/CD.tex @@ -9,7 +9,3 @@ \makeCD \end{document} -%%% Local Variables: -%%% mode: latex -%%% TeX-master: t -%%% End: diff --git a/Master/texmf-dist/doc/latex/cd/CDList.tex b/Master/texmf-dist/doc/latex/cd/CDlist.tex index e388790fc3a..357ea17319d 100644 --- a/Master/texmf-dist/doc/latex/cd/CDList.tex +++ b/Master/texmf-dist/doc/latex/cd/CDlist.tex @@ -9,7 +9,3 @@ \makelist \end{document} -%%% Local Variables: -%%% mode: latex -%%% TeX-master: t -%%% End: diff --git a/Master/texmf-dist/doc/latex/cd/README b/Master/texmf-dist/doc/latex/cd/README index b80180fc52c..9970a2940f3 100644 --- a/Master/texmf-dist/doc/latex/cd/README +++ b/Master/texmf-dist/doc/latex/cd/README @@ -5,6 +5,7 @@ requirements includes eternal durability of covers (I do not want to throw away my precious covers because of an upgrade), easy batch printing with crop marks, full typographical control, extended foreign language support, fully open text-based format for easy copy-and-modify operations, and so on. +Since version 1.1, slim CD are supported. As usual, the package is provided by means of a .dtx source that a .ins driver will convert into a class (.cls) file. Of course, compiling the .dtx @@ -33,3 +34,14 @@ The Artist\\ Then, by using the provided driver files you can easily generate one or more covers. Note that the class uses heavily the rotating package, so you must convert the resulting dvi file into PostScript®, or use directly pdflatex. + +If you're really lazy... + +...there is a Ruby script (parsecd.rb) that, provided with information from +freedb.org, will generate automatically a data file. For instance, + + wget -O- http://www.freedb.org/freedb/jazz/380a0a05 | ./parsecd.rb + +will generate a cover for Monk's "Brilliant Corners". You can search for your +record on freedb.org, and then simply use the links provided under the label +"ids". diff --git a/Master/texmf-dist/doc/latex/cd/cd.pdf b/Master/texmf-dist/doc/latex/cd/cd.pdf Binary files differindex 164b497b8ad..6d93da31fe2 100644 --- a/Master/texmf-dist/doc/latex/cd/cd.pdf +++ b/Master/texmf-dist/doc/latex/cd/cd.pdf diff --git a/Master/texmf-dist/doc/latex/cd/parsecd.rb b/Master/texmf-dist/doc/latex/cd/parsecd.rb new file mode 100644 index 00000000000..6f7f02580b1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/cd/parsecd.rb @@ -0,0 +1,54 @@ +#!/usr/bin/ruby + +# +# This script generates a data file using data from freedb.org. +# +# Typical usage: +# +# wget -O- http://www.freedb.org/freedb/jazz/380a0a05 | ./parsecd.rb +# + +track = [] + +class String + def tex + return sub(/&/, "\\\\&").sub(/%/, "\\\\%").sub(/#/, "\\\\#") + end +end + +$stdin.each_line do |line| + name, content = line.split("=") + name.strip! if name + content.strip! if content + + if name == "DTITLE" then + author, title = content.split("/") + author = "" if ! author + title = "" if ! title + author.strip! + title.strip! + author_cap = [] + author.each(" ") { |word| author_cap << word.strip.capitalize.tex } + print "\\covertext{\n", author_cap.join(" "), "\\\\\n", "\\bfseries ", title.strip.tex, "\n}\n\n" + + print "\\leftspine{", author.upcase.tex, "}\n\n" + print "\\centerspine{", title.upcase.tex, "}\n\n" + + end + + if name.strip =~ /TTITLE.*/ then + track << content + end +end + +print "\\lefttracklist{\n" + +if track.size < 16 then track.each { |x| print "\\track ", x.tex, "\n" } +else + track[0,(track.size/2)+1].each { |x| print "\\track ", x.tex, "\n" } + print "}\n\n\\righttracklist{\n" + track[(track.size/2)+1,track.size].each { |x| print "\\track ", x.tex, "\n" } +end + + +print "}\n" diff --git a/Master/texmf-dist/doc/latex/cd/slimCD.tex b/Master/texmf-dist/doc/latex/cd/slimCD.tex new file mode 100644 index 00000000000..689d53cbbb8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/cd/slimCD.tex @@ -0,0 +1,11 @@ +\documentclass[a4paper]{cd} +\usepackage[latin1]{inputenc} +\usepackage{avant} +\renewcommand\rmdefault{\sfdefault} +\onecorrection{.2} + +\begin{document} + +\makeslimCD + +\end{document} diff --git a/Master/texmf-dist/doc/latex/cd/slimCDlist.tex b/Master/texmf-dist/doc/latex/cd/slimCDlist.tex new file mode 100644 index 00000000000..77864f8c48b --- /dev/null +++ b/Master/texmf-dist/doc/latex/cd/slimCDlist.tex @@ -0,0 +1,11 @@ +\documentclass[a4paper]{cd} +\usepackage[latin1]{inputenc} +\usepackage{avant,amstext} +\renewcommand\rmdefault{\sfdefault} +\onecorrection{.2} + +\begin{document} + +\makeslimlist + +\end{document} diff --git a/Master/texmf-dist/source/latex/cd/cd.dtx b/Master/texmf-dist/source/latex/cd/cd.dtx index 626fa5b7995..32f26fea610 100644 --- a/Master/texmf-dist/source/latex/cd/cd.dtx +++ b/Master/texmf-dist/source/latex/cd/cd.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% File: cd.dtx Copyright (C) 1998-2002 Sebastiano Vigna +% File: cd.dtx Copyright (C) 1998-2007 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 @@ -19,7 +19,7 @@ % % \fi % -% \CheckSum{735} +% \CheckSum{1028} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -39,7 +39,7 @@ % \iffalse % %<class>\NeedsTeXFormat{LaTeX2e} -%<class>\ProvidesClass{cd}[2002/01/10 v1.0 CD Cover Class] +%<class>\ProvidesClass{cd}[2007/10/12 v1.3 CD Cover Class] % %<*driver> \documentclass{ltxdoc} @@ -59,13 +59,16 @@ % \changes{v0.0}{1998/06/04}{Created file.} % \changes{v0.1}{1998/06/15}{New macros for data file handling.} % \changes{v1.0}{2002/01/10}{Bumped revision number 8^).} +% \changes{v1.1}{2005/09/08}{Added support for slim cases. Better positioning, too.} +% \changes{v1.3}{2007/10/12}{Implemented covergraphics, etc. and .dat/.lst filename from job name} % % % \section{Introduction} % % The purpose of this class is to print CD covers. The main design line % is allowing the creation of labels with minimum effort, without restraining the -% freedom to customize. There is also some support for multiple cover printing. +% freedom to customise. There is also some support for multiple cover printing. +% Since version 1.1, slim CD boxes are supported. % % Each CD cover is created by a number of commands which set the content % of the front cover, back cover, track lists etc. After everything is ready, @@ -95,9 +98,12 @@ % \end{document} % \end{verbatim} % By compiling the file above, you will obtain your first CD cover. +% Using |\makeslimcover| instead of |\makecover| and |\makeback|, you +% will obtain a single cover for a slim CD box. +% % Equivalently, you can create a file |CD.dat| containing the lines between % |\begin{document}| and |\makecover| and compile with -% \LaTeX\ the file |CD.tex|. This is a better mechanism---each CD should +% \LaTeX\ the file |CD.tex| (or |slimCD.tex|). This is a better mechanism---each CD should % have its own data (|.dat|) file, which is run through the driver file % |CD.tex| or the more powerful list mechanism described below. % This also allows to set some parameters one for all (for instance, @@ -129,10 +135,11 @@ % The content of a CD cover are set using the self-explaining % |\covertext|, |\backtext|, |\insidetext|, |\leftspine|, |\centerspine|, % |\rightspine|, -% |\leftracklist|, |\leftracklist|, |\leftinfo| -% and |\rightinfo| commands. Note that by default the material contained in +% |\lefttracklist|, |\righttracklist|, |\leftinfo| +% and |\rightinfo| commands (|\insidetext|, |\leftspine|, |\centerspine| and +% |\rightspine| are ignored for slim covers). Note that by default the material contained in % |\covertext|, |\backtext| and |\insidetext| is bottom-aligned, and -% the the arguments of the spine commands must not contain line breaks. The left +% the arguments of the spine commands must not contain line breaks. The left % and right track lists should use the |\track| command, which inserts a % |\par| and an automatically numbered box with the track number. Should you % need to set manually the track number, use |\setindex|\marg{n}. The text @@ -148,6 +155,13 @@ % and |\rightspinebis| commands allows you to insert different content into the % ``back'' spine. % +% \section{The Graphic Commands} +% +% In the case you want to fill the cover or the inside of your CD with a picture, +% the commands |\covergraphics| and |\insidegraphics| work like |\covertext| +% and |\insidetext|, but they create no border (as opposed to the standard 1\,cm border +% for text). +% % \section{The Font Commands} % % The |CD| class provides some simple commands for switching the font @@ -172,46 +186,52 @@ % Before setting the content of the cover, the |\newcd| command takes care % of resetting everything to default values. In particular, |\backtext| % is the same as |\covertext| (unless you change it -% explicitly), so usually you do not need to set the former. +% explicitly), so usually you do not need to set the former (note +% that, of course, this does \emph{not} happen with |\covergraphics|). % Analogously, |\backfont| is the same as |\coverfont|. % % Once everything is set up, the |\makecover| and |\makeback| commands will -% create a cover and a back cover using the data set so far. Both command have -% an optional argument that can contain any of the letters |lrtbc| (left, -% right, top, bottom, contour). The first four letter create the respective -% crop marks. The last letter is mainly for ``debugging'' purposes, and makes -% evident the contour of the various parts of the cover. The default value is -% |lrtb|. The possibility of partially eliminating crop marks is particularly +% create a cover and a back cover using the data set so far, whereas the +% |\makeslimcover| will create a slim cover. Both command have +% an optional argument that can contain any of the letters |lrtb| (left, +% right, top, bottom), which create the respective +% crop marks (note that the argument must be enclosed in brackets). The default value is |lrtb|. +% The possibility of partially eliminating crop marks is particularly % useful when stacking several covers in the same sheet. % -% While it is possible to create a single \LaTeX\ document containing a CD -% cover, it is usually more useful to create a data file containing all +% It is possible to create a single \LaTeX\ document containing a CD +% cover, but it is usually more useful to create a data file containing all % |CD|-specific command, and include it from a ``driver'' file, containing -% the |\makeCD| command. With no argument, it checks for the existence -% of a |CD.dat| file. If it exists, it is input and then the CD cover is +% the |\makeCD| or the |\makeslimCD| command. With no argument, it checks for the existence +% of a \textit{jobname}|.dat| file (where \textit{jobname} is the root of the +% \LaTeX file under compilation---e.g., |CD.dat| when compiling |CD.tex|). +% If such a file exists, it is input and then the (slim) CD cover is % generated. Otherwise, the user is asked for a data file name (the |CD| class % will try automatically to append the |.dat| extension to the name), which -% is read and processed. Of course, the optional argument can be used to -% specify a data file name. +% is read and processed. Of course, the optional argument (which, note again, +% must be enclosed in brackets) can be used to specify a data file name. % -% Having a database of data files is particularly useful when using the |\makelist| command, which -% processes an entire list of CDs, printing one cover or two -% back covers per page; the crop marks are suitably aligned so to minimize +% Having a database of data files is particularly useful when using the |\makelist| or the +% |\makeslimlist| commands, which +% process an entire list of CDs, printing one cover (or two +% back covers) per page; the crop marks are suitably aligned so to minimise % the cutting effort. The CD list must be contained in a list file, one -% data file name per line. With no argument, |\makelist| checks for the existence +% data file name per line. With no argument, |\makelist| and |\makeslimlist| check for the existence % of a |CD.lst| file. If it exists, it is input; otherwise, the user is asked % for a list file name (the |CD| class % will try automatically to append the |.lst| extension to the name), which % is read and processed. Again, the optional argument can be used to % specify a list file name. % -% \section{The options} +% \section{The Options} % You can pass to the |CD| class all the options of the |article| % class (e.g., paper size). Moreover, there are options |aligncovertop|, -% |aligninsidetop|, |alignbacktop| and |aligntop| (the last one resumes the fisrt +% |aligninsidetop|, |alignbacktop| and |aligntop| (the last one resumes the first % three ones), and analogously |aligncovercenter|, etc.~that allow to change -% the default alignment behaviour. Finally, the |alignspine| option forces -% vertical centering of the spine text +% the default alignment behaviour. The |covergraphics| option lets you use +% the entire cover area (instead of a centered 10\,cm$\times$10\,cm square). +% Finally, the |alignspine| option forces +% vertical centring of the spine text % on the ``real'' height of the box involved, % rather than on the height of a generic upper case character. This is not usually what you % want, since, e.g., accents can lead to ugly results. Experiment. @@ -252,6 +272,8 @@ \DeclareOption{aligninsidetop}{\def\@ligninside{t}} \DeclareOption{alignbacktop}{\def\@lignback{t}} +\DeclareOption{covergraphics}{\def\@lignback{t}} + \DeclareOption{aligntop}% {\ExecuteOptions{aligncovertop,aligninsidetop,alignbacktop}} @@ -279,9 +301,7 @@ \onecorrection{0} % \end{macrocode} % Now we have all the font and text declaration commands. They -% just define a certain macro to be their argument. This ``double indirection'' -% allows for default text definition, e.g., the back text and font is equal -% the cover ones unless otherwise specified. +% just define a certain macro to be their argument. % \begin{macrocode} \DeclareRobustCommand*\coverfont[1]{\def\coverf@nt{#1}} \DeclareRobustCommand*\backfont[1]{\def\backf@nt{#1}} @@ -299,6 +319,9 @@ \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}} @@ -306,22 +329,20 @@ \DeclareRobustCommand*{\centerspinebis}[1]{\def\centerspin@bis{#1}} \DeclareRobustCommand*{\rightspinebis}[1]{\def\rightspin@bis{#1}} % \end{macrocode} -% We set exactly $1.5$cm of margin around the page. We do not want -% any |lineskip|, as stacked covers should not be separated by any -% space. Analogously, we want no indentation or hyphens. +% We do not want any |lineskip|, as stacked covers should not be separated by any +% space. Analogously, we want no margins, no indentation and no hyphens. Offsets +% will be set command by each command. % \begin{macrocode} -\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 +%\advance\textwidth by -3cm \textheight=\paperheight -\advance\textheight by -3cm +%\advance\textheight by -3cm \lineskip=0pt \lineskiplimit=0pt @@ -413,7 +434,6 @@ \lefttracklist{}% \righttracklist{}% \covertext{}% - \backtext{\c@vertext}% \insidetext{}% \leftspine{}% \centerspine{}% @@ -457,6 +477,7 @@ % matter of laying out the material, and print the requested crop marks. % \begin{macrocode} \DeclareRobustCommand*{\makecover}[1][lrtb]{% +\voffset=0in \begin{picture}(120,240) \end{picture}% \begin{rotate}{90}% @@ -489,20 +510,40 @@ \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}% } @@ -510,9 +551,11 @@ % The |\makeback| command is slightly more complicated, as it must % set up come values for the |\track| command to work. Moreover, it % has to check for empty right information or tracklist minipages, as -% in this case the left ones must be enlarged. +% in this case the left ones must be enlarged, and it must try to use +% the text from the cover page if no back text has been specified. % \begin{macrocode} \DeclareRobustCommand*{\makeback}[1][lrtb]{% +\voffset=-.5in \setindex{1}% \settowidth{\squ@re}{\indexf@nt00}% \settoheight{\@temp}{\indexf@nt0}% @@ -634,7 +677,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 }% }% } @@ -679,22 +728,154 @@ \end{picture}% } % \end{macrocode} +% The |\makeslimcover| command is essentially a mix of the previous two, as a single slim +% cover must contain the front matter and the track lists. Note that we have much less space. +% \begin{macrocode} +\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}% +} +% \end{macrocode} % Finally, we have the high-level commands that allow to produce -% one or several CD from data files, |\makeCD| and |\makelist|. -% Both have an additional argument for the file name, defaulting -% to |CD.dat| and |CD.lst|, respectively. In case the requested -% file does not exist, the user is asked for a manual input. +% one or several CD from data files, |\makeCD|, |\makelist|, |\makeslimCD| and |\makeslimlist|. +% All have an additional argument for the file name, defaulting +% to |\jobname.dat| or |\jobname.lst|. +% +% Two separate commands factor out the checks and the user interaction in case the file +% is not specified or does not exist. % % A data file must contain only text declaration commands from the % |CD| class. All \LaTeX{} stuff (preamble, etc.) and cover generation % commands are handled automatically. A list file must contain a number % of lines, each containing a data file name. % \begin{macrocode} -\DeclareRobustCommand*{\makeCD}[1][]{% +\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:}% }% @@ -706,7 +887,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 @@ -716,13 +904,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}{% @@ -735,7 +923,10 @@ } } \ne@ftrue -% +} + +\DeclareRobustCommand*{\makelist}[1][]{% +\@sklistfile{#1}% \advance\endlinechar\@M \immediate\read\CDlist to \CDname \advance\endlinechar-\@M @@ -762,6 +953,31 @@ \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 +} +} + %</class> % \end{macrocode} % \Finale diff --git a/Master/texmf-dist/source/latex/cd/cd.ins b/Master/texmf-dist/source/latex/cd/cd.ins index a6ee74002f3..6409ce7fd60 100644 --- a/Master/texmf-dist/source/latex/cd/cd.ins +++ b/Master/texmf-dist/source/latex/cd/cd.ins @@ -2,7 +2,7 @@ \input docstrip.tex \preamble -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 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'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 6481dd2961b..a3c05d6cdbb 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -38,7 +38,7 @@ my @WorkingTLP = qw( bookest booklet bophook boxhandler bpchem breakurl bullcntr bussproofs bytefield captcont caption carlisle catechis carolmin-ps - cbcoptic cbfonts-all ccaption cclicenses cdpbundl cellspace + cbcoptic cbfonts-all ccaption cclicenses cd cdpbundl cellspace changebar changepage changes chappg chem-journal chemcompounds chemscheme chemstyle cherokee chessboard chessfss circ |