Debian Codegraph @

texmf-dist/source/latex/cd-cover/cd-cover.dtx

raw
1 %\iffalse % -*- mode: latex -*-
2 %
3 %
4 % $Id: cd-cover.dtx,v 1.6 2002/01/28 14:30:44 cholm Exp $
5 %
6 %<*driver>
7 {\makeatother
8 \gdef\CVSKeyword$#1 ${\expandafter\cCVSKeyword#1\endcCVSKeyword\relax}
9 \gdef\cCVSKeyword#1: #2\endcCVSKeyword{%
10 \expandafter\gdef\csname CVS#1\endcsname{#2}}
11 }
12 \CVSKeyword$Date: 2002/01/28 14:30:44 $
13 \CVSKeyword$Revision: 1.6 $
14 \CVSKeyword$Id: cd-cover.dtx,v 1.6 2002/01/28 14:30:44 cholm Exp $
15 \CVSKeyword$Author: cholm $
16 \def\docdate{\CVSDate} % Format is YYYY/MM/DD
17 \def\fileversion{v1.4 Beta} % Remember to update in class too
18 \def\filedate{\CVSDate} % around ProvideClass
19 \documentclass{ltxdoc}
20 \usepackage{rotating}
21 \title{The \textsf{cd-cover} class\thanks{Previously a package}\\
22 Version \fileversion\\[-1ex]
23 {\small CVS Revision: \CVSRevision}}
24 \author{Christian Holm\thanks{E--mail: \texttt{[email protected]}}}
25 \date{\docdate\\
26 {\small CVS Date: \CVSDate}}
27 \AlsoImplementation
28 \CodelineIndex
29 \EnableCrossrefs
30 \RecordChanges
31 \parindent=0pt
32 \parskip=1ex
33 \begin{document}
34 \maketitle
35 \tableofcontents
36 \DocInput{cd-cover.dtx}
37 \PrintIndex
38 \end{document}
39 %</driver>
40 %\fi
41 % \CharacterTable
42 % {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
43 % 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
44 % Digits \0\1\2\3\4\5\6\7\8\9
45 % Exclamation \! Double quote \" Hash (number) \#
46 % Dollar \$ Percent \% Ampersand \&
47 % Acute accent \' Left paren \( Right paren \)
48 % Asterisk \* Plus \+ Comma \,
49 % Minus \- Point \. Solidus \/
50 % Colon \: Semicolon \; Less than \<
51 % Equals \= Greater than \> Question mark \?
52 % Commercial at \@ Left bracket \[ Backslash \\
53 % Right bracket \] Circumflex \^ Underscore \_
54 % Grave accent \` Left brace \{ Vertical bar \|
55 % Right brace \} Tilde \~}
56 %
57 % \section{Introduction}
58 %
59 % This is an $\beta$ release of the \textsf{cd-cover} class. This was
60 % previously a package, but since a class is actually more appropiate
61 % for the commands and macros herein, this new version switches to a
62 % class implementation.
63 %
64 % A number of improvements has been made in this release. The whole
65 % scheme of things has taken a drastic turn, providing many new
66 % advantages (see also section~\ref{sec:psscheme}).
67 %
68 % Bug reports, suggestions, praises, but not flames should be sent to
69 % \texttt{[email protected]}. Please submit changes in form of patches to
70 % the most recent \texttt{cd-cover.dtx} file\footnote{Avaliable from
71 % CTAN in \texttt{macros/latex/contrib/other/cd-cover}.}. Patches are
72 % easily generated with
73 % \begin{quote}
74 % {\ttfamily
75 % diff -c \meta{original-file} \meta{new-file} >
76 % \meta{patch-file}}
77 % \end{quote}
78 % on any reasonable system. This makes merging changes into the class
79 % much eaiser, and the changes will more like be included in the
80 % normal distribution.
81 %
82 % \section{Usage}
83 %
84 % In this release four environments are provided:
85 % \begin{itemize}
86 % \item \textsf{bookletsheets} is for typesetting booklet pages for
87 % normal CD covers (plastic cover).
88 % \item \textsf{backssheet} is for typesetting the back side for
89 % normal CD covers.
90 % \item \textsf{backssheet*} Special version of the above, that
91 % rotates the back title the other way. Useful for typesetting
92 % double jewelcase covers, and for some nationalities (e.g., German)
93 % that like the title to run opposite to that of English.
94 % \item \textsf{sleevesheet} is for typesetting paper sleeves for CDs,
95 % for example if you lost the plastic one, or don't like the space
96 % they take up, or whatever.
97 % \item \textsf{singlesheet} is for typeseting covers for plastic
98 % single CD covers.
99 % \end{itemize}
100 %
101 % \subsection{Syntax}
102 %
103 % The syntax of these environments is:
104 % \begin{quote}
105 % |\begin{bookletsheets}|\meta{your text}|\end{bookletsheets}|\\
106 % |\begin{backsheet}|\marg{title}\meta{your text}|\end{backsheet}|\\
107 % |\begin{backsheet*}|\marg{title}\meta{your text}|\end{backsheet*}|\\
108 % |\begin{sleevesheet}|\meta{your text}|\end{sleevesheet}|\\
109 % |\begin{singlesheet}|\marg{title}\marg{slip text}\meta{your text}
110 % |\end{singlesheet}|
111 % \end{quote}
112 %
113 % Here \marg{title} is the title on the back of the covers, \marg{slip
114 % text} is the text that should go on the back slip of the single type
115 % cover.
116 %
117 % In figure~\ref{fig:exa:booklet} to~\ref{fig:exa:single} there
118 % are some examples of these environments.
119 %
120 % \begin{figure}[htbp]
121 % \setlength{\unitlength}{.5mm}%
122 % \begin{picture}(240,120)(0,-120)%
123 % \put(0,0){\line(1,0){240}}%
124 % \put(0,0){\line(0,-1){120}}%
125 % \put(0,-120){\line(1,0){240}}%
126 % \put(240,0){\line(0,-1){120}}%
127 % \put(120,0){\line(0,1){5}}%
128 % \put(120,-120){\line(0,-1){5}}%
129 % \multiput(120,-1)(0,-5){24}{\line(0, -1){3}} %
130 % \put(110,2){\vector(1,0){10}}%
131 % \put(75,1){Fold here}%
132 % \put(125,-10){Hello World}
133 % \put(5,-10){Hello World Again}
134 % \end{picture}
135 % \caption{Example of \textsf{bookletsheets} output}
136 % \label{fig:exa:booklet}
137 % \end{figure}
138 %
139 % \begin{figure}[htbp]
140 % \setlength{\unitlength}{.5mm}%
141 % \begin{picture}(151,118)(0,-118)%
142 % \put(0,0){\line(1,0){151}}%
143 % \put(0,-118){\line(1,0){151}}%
144 % \put(0,0){\line(0,-1){118}}%
145 % \put(151,0){\line(0,-1){118}}%
146 % \put(7,0){\line(0,1){5}}%
147 % \put(7,-118){\line(0,-1){5}}%
148 % \multiput(7,-1)(0,-5){24}{\line(0, -1){3}}
149 % \put(144,0){\line(0,1){5}}
150 % \put(144,-118){\line(0,-1){5}}
151 % \multiput(144,-1)(0,-5){24}{\line(0, -1){3}}
152 % \put(17,2){\vector(-1,0){10}}%
153 % \put(17,1){Fold here}%
154 % \put(134,2){\vector(1,0){10}}%
155 % \put(99,1){Fold here}%
156 % \put(6,-118){\begin{rotate}{90}Hello World\end{rotate}}%
157 % \put(145,0){\begin{rotate}{-90}Hello World\end{rotate}}%
158 % \put(13,-10){Hello World Again}%
159 % \end{picture}
160 % \caption{Example of \textsf{backsheet} output}
161 % \label{fig:exa:back}
162 % \end{figure}
163 %
164 % \begin{figure}[htbp]
165 % \setlength{\unitlength}{.5mm}%
166 % \begin{picture}(266,123)(0,-123)%
167 % \put(0,0){\line(3,4){6}}%
168 % \put(6,8){\line(1,0){121}}%
169 % \put(133,0){\line(-3,4){6}}%
170 % \multiput(130,-1)(0,-5){24}{\line(0, -1){3}} %
171 % \put(50,1){Fold and clue}%
172 % \put(0,-123){\line(3,-4){6}}%
173 % \put(6,-131){\line(1,0){121}}%
174 % \put(133,-123){\line(-3,-4){6}}%
175 % \put(50,-127){Fold and clue}%
176 % \put(0,0){\line(1,0){266}}%
177 % \put(0,0){\line(0,-1){123}}%
178 % \put(0,-123){\line(1,0){266}}%
179 % \put(266,0){\line(0,-1){123}}%
180 % \end{picture}
181 % \caption{Example of \textsf{sleevesheet} output}
182 % \label{fig:exa:sleeve}
183 % \end{figure}
184 %
185 % \begin{figure}[htbp]
186 % \setlength{\unitlength}{.5mm}%
187 % \begin{picture}(137,120)(0,-120)%
188 % \put(0,0){\line(0,-1){116}}%
189 % \put(0,0){\line(1,0){36}}%
190 % \put(36,0){\line(0,1){2}}%
191 % \put(15,0){\line(0,1){5}}%
192 % \multiput(15,-1)(0,-5){24}{\line(0, -1){3}} %
193 % \put(18,0){\line(0,1){5}}%
194 % \multiput(18,-1)(0,-5){24}{\line(0, -1){3}} %
195 % \put(36,2){\line(1,0){119}}%
196 % \put(155,2){\line(0,-1){120}}%
197 % \put(0,-116){\line(1,0){36}}%
198 % \put(36,-116){\line(0,-1){2}}%
199 % \put(15,-116){\line(0,-1){5}}%
200 % \put(18,-116){\line(0,-1){5}}%
201 % \put(36,-118){\line(1,0){119}}%
202 % \put(5,4){\vector(1,0){10}}%
203 % \put(28,4){\vector(-1,0){10}}%
204 % \put(28,3){Fold here}%
205 % \put(0,0){\begin{rotate}{-90}Hello World\end{rotate}}%
206 % \put(15,0){\begin{rotate}{-90}Hello World Again\end{rotate}}%
207 % \end{picture}
208 % \caption{Example of \textsf{singlesheet} output}
209 % \label{fig:exa:single}
210 % \end{figure}
211 % \subsection{User setup}
212 %
213 % For each of the four environments, two user configurable lengths are
214 % defined. One is |\CD|\meta{type}|TopMargin|, which determins the
215 % vertical space from the cover border to \meta{your text}. The other
216 % is |\CD|\meta{type}|Margin| which determins the horizontal space
217 % between the border and \\meta{your text}. The default values for
218 % these lengths are 5mm.
219 %
220 % Here is the complete list of the lengths
221 %
222 % \DeleteShortVerb{\|}
223 % \begin{tabular}{|ll|}
224 % \hline
225 % \MakeShortVerb{\|}%
226 % |\CDbookletTopMargin|& |\CDbackTopMargin| \\
227 % |\CDbookletMargin| & |\CDbackMargin| \\
228 % |\CDsleeveTopMargin| & |\CDsingleTopMargin|\\
229 % |\CDsleeveMargin| & |\CDsingleMargin| \\
230 % \hline
231 % \end{tabular}
232 %
233 % For example, if you want to put a picture that fills out a
234 % complete page of the booklets, you can set |\CDbookletTopMargin| and
235 % |\CDbookletMargin| to |0pt|. For example
236 % \begin{verbatim}
237 % \documentclass{cd-cover}
238 % \usepackage{epsfig}
239 % \begin{document}
240 % \parindent=0pt
241 % \parskip=0pt
242 % \CDbookletTopMargin=0pt
243 % \CDbookletMargin=0pt
244 % \begin{bookletsheets}
245 % \vspace{5mm} % These are specific for the file rh61img.ps
246 % \hspace{5mm}
247 % \begin{center}
248 % {\LARGE Debian GNU/Linux 2.2r5 --- potato}
249 % \end{center}
250 % \epsfig{file=rh61img.ps,width=11.99cm}
251 % \end{bookletsheets}
252 % \end{document}
253 % \end{verbatim}
254 %
255 % Note that the graphics should not be 12cm exactly, but rahter
256 % slightly less, say 11.99cm like above. This is to make sure that it
257 % only takes up one page, so that \LaTeX{} will not start a new page.
258 %
259 % \section{Credits}
260 %
261 % Many people have come up with suggestions, bugs, improvements to the
262 % first package version of \textsf{cd-cover}, and I'd like to thank
263 % them, especially for thier patience in me, for not getting this out
264 % sooner. So thanks to
265 % James A.\ Bednar,
266 % Steven Buehler,
267 % Patrik Carlsson,
268 % Jim Clark,
269 % Lionel Cons,
270 % Joerg Desch,
271 % Stefan A.\ Deutscher,
272 % Holger Dewes,
273 % Stephen Gildea,
274 % Anders Bruun Olsen,
275 % Rolf Niepraschk,
276 % Mark Peade,
277 % Dominik Roettsches,
278 % Carsten Sch\"afer,
279 % C.\ J.\ Walker,
280 % and
281 % Rainer Wiener.
282 % I may have forgotten some, for which I apologize.
283 %
284 % And of course thanks to Donald E.\ Knuth for \TeX, Leslie Lamport
285 % for \LaTeX, Robin Fairbairns for CTAN and being very patient with
286 % me.
287 %
288 % \section{Copyright}
289 %
290 % \LaTeXe{} class \textsf{cd-cover} for typesetting a variaty of cd
291 % covers Copyright \copyright 1999 Christian Holm |<[email protected]>|
292 %
293 % This class is free software; you can redistribute it and/or modify
294 % it under the terms of the GNU General Public License as published by
295 % the Free Software Foundation; either version 2 of the License, or
296 % (at your option) any later version.
297 %
298 % This program is distributed in the hope that it will be useful,
299 % but WITHOUT ANY WARRANTY; without even the implied warranty of
300 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
301 % GNU General Public License for more details.
302 %
303 % You should have received a copy of the GNU General Public License
304 % along with this program; if not, write to the
305 % \begin{quote}
306 % Free Software Foundation, Inc.\\
307 % 675 Mass Ave\\
308 % Cambridge\\
309 % MA 02139\\
310 % USA
311 % \end{quote}
312 %
313 % \section{Implementation}
314 %
315 %\iffalse
316 %<*class>
317 %\fi
318 %
319 % \subsection{Initializing}
320 %
321 % \subsubsection*{Identification}
322 %
323 % First we must, as any good package or class should, identify
324 % ourselves, and tell what format we need. In this case it is ofcourse
325 % \LaTeXe{}.
326 %
327 % \begin{macrocode}
328 \NeedsTeXFormat{LaTeX2e}
329 \def\fileversion{v1.4}
330 \def\filedate{2002/01/28} % Format is YYYY/MM/DD
331 \ProvidesClass{cd-cover}[\filedate\space\fileversion
332 \space cd-cover class.]
333 % \end{macrocode}
334 %
335 % \subsubsection*{Lengths or dimensions}
336 %
337 % The next thing is to setup some lengths (dimensions) we need for
338 % various purposes. There is two temporary lengths |\temp@length| and
339 % |\temp@@length|, for use in variuos calculations; along width margin
340 % lengths, two for each type of environment, one for the odd pages
341 % |\booklet@odd@margins|, |\back@odd@margins|, |\sleeve@odd@margins|,
342 % and |\single@odd@margins|, and ofcourse the corrosponding for the
343 % even pages |\booklet@even@margins|, |\back@even@margins|,
344 % |\sleeve@even@margins|, and |\single@even@margins|. These margin
345 % lengths is used so that we may do two--sided printing where the
346 % various covers align.
347 % \begin{macrocode}
348 \newlength{\temp@length}
349 \newlength{\temp@@length}
350 \newlength{\booklet@even@margins}
351 \newlength{\booklet@odd@margins}
352 \newlength{\back@even@margins}
353 \newlength{\back@odd@margins}
354 \newlength{\sleeve@even@margins}
355 \newlength{\sleeve@odd@margins}
356 \newlength{\single@even@margins}
357 \newlength{\single@odd@margins}
358 % \end{macrocode}
359 %
360 % \subsubsection*{Options}
361 %
362 % \begin{macro}{\cd@cover@setup@margins}
363 % This command sets up a number of dimensions, so that when doing
364 % two--side printing, the covers will be align on each side of the
365 % paper, and can neatly be cut out to provide a double--sided booklet,
366 % sleeve or cover. This is not implemeted fully yet. What is here is
367 % good for the booklet, but doesn't work for single other types of
368 % covers. It's mainly the horizontal alignment that's the problem.
369 % \begin{macrocode}
370 \def\cd@cover@setup@margins{
371 % This is some old stuff, that I'm not sure is needed, but I leave it
372 % \global\paperheight=\temp@length
373 % \global\paperwidth=\temp@@length
374 \advance\temp@length-\booklet@height
375 \divide\temp@length2
376 \advance\temp@length-1in
377 \advance\temp@length-\headheight
378 \global\topmargin=\temp@length
379 \advance\temp@@length-\booklet@width
380 \divide\temp@@length2
381 \advance\temp@@length-1in
382 \oddsidemargin=\temp@@length}
383 \AtBeginDocument{\cd@cover@setup@margins}
384 % \end{macrocode}
385 % \end{macro}
386 % We also provide a number of options, to specify the papersize.
387 % Notice, that since the \textsf{article} class will set the paper
388 % size, we use temporary local variables to hold the information, and
389 % then in |\cd@cover@setup@margins| we set the right dimensions.
390 % \begin{macrocode}
391 \DeclareOption{a4paper}{
392 \global\temp@length=210mm
393 \global\temp@@length=297mm}
394 \DeclareOption{letterpaper}{
395 \global\temp@length=8.5in
396 \global\temp@@length=11in}
397 \DeclareOption{legalpapar}{
398 \setlength\temp@length{8.5in}
399 \setlength\temp@@length{14in}}
400 \DeclareOption{executivepaper}{
401 \setlength\temp@length{7.25in}
402 \setlength\temp@@length{10.5in}}
403 % \end{macrocode}
404 % Notice, that some standard papersizes produces an error message, as
405 % they will be too small to hold the covers.
406 % \begin{macrocode}
407 \DeclareOption{a5paper}{\cd@cover@paper@error{a5paper}}
408 \DeclareOption{b5paper}{\cd@cover@paper@error{b5paper}}
409 % \end{macrocode}
410 % Also, all papersizes are already in `landscape'
411 % version\footnote{compared to the normal defintions in
412 % \texttt{article.cls}.} so the \textsf{landscape} option is redundent
413 % with this class.
414 % \begin{macrocode}
415 \DeclareOption{landscape}{
416 \ClassWarning{cd-cover}{Option `landscape' redundant to this %
417 class.}}
418 % \end{macrocode}
419 % Add an option to avoid foldlines
420 % \begin{macrocode}
421 \newif\ifcd@cover@foldlines\cd@cover@foldlinestrue
422 \DeclareOption{nofoldlines}{\cd@cover@foldlinesfalse}
423 \DeclareOption{foldlines}{\cd@cover@foldlinestrue}
424 % \end{macrocode}
425 % All other options are passed on to the standard \textsf{article}
426 % class, as expected. `letterpaper' is then the default paper size,
427 % and we finally execute the options.
428 % \begin{macrocode}
429 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
430 \ExecuteOptions{letterpaper}
431 \ProcessOptions\relax
432 % \end{macrocode}
433 % \begin{macro}{\cd@cover@paper@error}
434 % This is just an error message, so that the user doesn't try to use a
435 % paper size that is too small to hold some of the covers.
436 % \begin{macrocode}
437 \def\cd@cover@paper@error#1{
438 \ClassError{cd-cover}{^^J%
439 Paper format `#1' is too small for the covers}{^^J%
440 You have given the option `#1' to this class.^^J%
441 However, that paper size is too small to hold^^J%
442 the covers.^^J%
443 Please change the paper size option to another^^J%
444 format that CAN hold the covers (e.g., `a4paper',^^J%
445 `letterpaper', etc.)}}
446 % \end{macrocode}
447 % \end{macro}
448 %
449 % \subsubsection*{Class and package loading}
450 %
451 % First we load the standard \LaTeXe{} class \textsf{article} with
452 % what ever options was passed from above. This provides the user with
453 % the standard envrionments and sectioning commands, and is therefore
454 % desired. The \textsf{article} class is chosen, since the sectioning
455 % commands of this class is appropiate for cd--covers. The package
456 % \textsf{rotating} is then loaded. This package facilitates rotation
457 % of text, using |\special| commands. This means, that this class may
458 % be sensible to the users \textsf{PostScript} driver. Also, as I
459 % myself suspected, and as others have confirmed, this package is
460 % flawed, meaning, that this class isn't as stable as it should
461 % be. However, the \textsf{rotating} package is the best avaliable for
462 % the job, and hence used here\footnote{I'm sorry I don't have the
463 % time, or expertice, to write a new package, but that's life for
464 % you.}.
465 %
466 % After loading the class, we set the paper height and width.
467 % \begin{macrocode}
468 \LoadClass{article}
469 \paperheight=\temp@length
470 \paperwidth=\temp@@length
471 \RequirePackage{rotating}
472 % \end{macrocode}
473 %
474 % \subsubsection*{Setting up fixed lengths}
475 %
476 % Next on the agenda is to define and setup some fixed lengths. These
477 % are the dimensions of the various cover styles. The really isn't
478 % much to say about these. I obtained these numbers by simple
479 % meassuring some of my own (pre--printed) covers, with, as you can
480 % see, a metric meter stick.
481 % \begin{macrocode}
482 \newlength{\booklet@width} \setlength{\booklet@width}{240mm}
483 \newlength{\booklet@height} \setlength{\booklet@height}{120mm}
484 \newlength{\back@width} \setlength{\back@width}{137mm}
485 \newlength{\back@height} \setlength{\back@height}{118mm}
486 \newlength{\back@slip@width} \setlength{\back@slip@width}{7mm}
487 \newlength{\sleeve@height} \setlength{\sleeve@height}{128mm}
488 \newlength{\sleeve@width} \setlength{\sleeve@width}{266mm}
489 \newlength{\single@height} \setlength{\single@height}{120mm}
490 \newlength{\single@width} \setlength{\single@width}{137mm}
491 \newlength{\single@slip@width} \setlength{\single@slip@width}{15mm}
492 \newlength{\single@back@width} \setlength{\single@back@width}{3mm}
493 % \end{macrocode}
494 %
495 % \subsubsection*{Setting up user lengths}
496 %
497 % The user also has some control of the page dimensions of the various
498 % cover types. These are provided via the below lengths. What the do
499 % should be obvious from the names\footnote{Otherwise, refer to the
500 % documentation part of this document.}. We also set the default
501 % values of these lengths here.
502 % \begin{macrocode}
503 \newlength{\CDbookletTopMargin} \setlength{\CDbookletTopMargin}{5mm}
504 \newlength{\CDbookletMargin} \setlength{\CDbookletMargin}{5mm}
505 \newlength{\CDbackTopMargin} \setlength{\CDbackTopMargin}{5mm}
506 \newlength{\CDbackMargin} \setlength{\CDbackMargin}{5mm}
507 \newlength{\CDsleeveTopMargin} \setlength{\CDsleeveTopMargin}{5mm}
508 \newlength{\CDsleeveMargin} \setlength{\CDsleeveMargin}{5mm}
509 \newlength{\CDsingleTopMargin} \setlength{\CDsingleTopMargin}{5mm}
510 \newlength{\CDsingleMargin} \setlength{\CDsingleMargin}{5mm}
511 % \end{macrocode}
512 %
513 % Finally we set the default page style to \textsf{empty}.
514 % \begin{macrocode}
515 \pagestyle{empty}
516 % \end{macrocode}
517 %
518 % \subsection{The various cover types}\label{sec:psscheme}
519 %
520 % The changing form one type of cover to the other is implemented
521 % using `page styles'. So each type of cover has it's own page
522 % style. This has several advantages.
523 %
524 % To those of you familiar with the first two (or was it three --- I
525 % can't remember) versions, this is where you really will note the
526 % difference. In version v1.0 from 1998/10/04, the interface was
527 % driven via commands. This limited a number of things, most noticably
528 % the text length. You had to manually break each page up, which
529 % ofcourse is very non--\TeX{}--like. Secondly it limited the use of
530 % `floats' such as \textsf{tables} and \textsf{figures}.
531 %
532 % Well, in the \emph{new} scheme, this is all changed. Since the
533 % pagestyle doesn't effect the way pages are broken by \TeX, one no
534 % longer has to break up the pages manually! You can put as much text
535 % as you like into the pages, \LaTeX{} will just produce more pages as
536 % the text growes in length. Though page styles has \emph{some} effect
537 % on the \LaTeXe{} output routine and hence on floats, it is very
538 % minimal, and floats can be use extensively under this scheme.
539 %
540 % Another advantage of the new scheme, is the use of user
541 % \emph{configurable dimensions}. If all the boundary dimensions are
542 % set to zero, you can effectually fill out the whole cover with
543 % text. Though this doesn't seem usefull, consider the the case where
544 % you want to fill out your cover with some marvelous picture you have
545 % created in \textsf{Gimp}, \textsf{PhotoShop}, or just downloaded
546 % form the internet!
547 %
548 % \subsubsection{The booklet type}
549 %
550 % Let me just say a few words on page styles. Every page style defines
551 % the commands |\@oddhead|, |\@evenhead|, |\@oddfoot|, and
552 % |\@evenfoot| to be some command containg some text\footnote{In
553 % \TeX{} terms this means \emph{horizontal mode stuff}.}. There
554 % \emph{must} be some text present, or othetwise \TeX{} will respond
555 % with a \texttt{Underfull \string\hbox ... while output is active},
556 % wich is quite enyoing. For this reason all the \emph{border} macros
557 % contains a |\hfill| as the very last thing. Also, \LaTeX{} assumes,
558 % that the four macros above are no wider then |\textwidth| and no
559 % taller then |\headheight| or |\footskip|, whatever appropiate.
560 %
561 % For the page styles at hand, I decided to |\let| the above two
562 % |\@...head| commands to the \emph{border} commands below, and the
563 % two |\@...foot| to |\@empty|. Now these \emph{border} commands are
564 % apparently \emph{much} taller then |\headheight|, but if one takes a
565 % closer look, they actually aren't.
566 %
567 % The first part of every one of them is one ore more
568 % |\kern|s. |\kern|s in \TeX{} mind\footnote{Or mouth or stomach, I
569 % don't remember wich one it is, as Donald E.\ Knuth calls it in the
570 % \TeX{}book.} doesn't take up space in anyway, so these commands are
571 % \emph{invisble} in that sense. The next thing is a \textsf{picture}
572 % environment, and this is defined in \LaTeXe{} so that it does't take
573 % up any space in the previous sense. Finishing of the macros is a
574 % |\hfill|, wich is there for reasons explained above. So the only
575 % command that is `space visible' in the \emph{border} commands, is
576 % the |\hfill|! Now if that isn't neat, I don't know what is. That
577 % said, I won't comment anymore on the page style definitons and move
578 % straight on to the rest of the macros and commands.
579 % \begin{macro}{\ps@bookletsheet}
580 % \begin{macrocode}
581 \def\ps@bookletsheets{
582 \let\@oddhead\booklet@border\let\@evenhead\@oddhead
583 \let\@oddfoot\@empty\let\@evenfoot\@oddfoot}
584 % \end{macrocode}
585 % \end{macro}
586 %
587 % \begin{macro}{\init@booklet}
588 % We need to do some manipulation of the dimensions |\textheight|,
589 % |\textwidth|, |\headsep| and since the booklet pages are set in
590 % double column mode, also on |\columnsep| and |\@colht|.
591 % \begin{macrocode}
592 \def\init@booklet{
593 % \end{macrocode}
594 % What we do is to set the text height limit to the proper value for
595 % the booklet --- as defined in |\booklet@height| --- then correct for
596 % the space wanted above and below the text --- as defined in
597 % |\CDbookletTopMargin|. This ofcourse only sets the \emph{lower}
598 % margin, and has absolutly nothing to do with the upper margin. To do
599 % that we fix the value of |\headsep| to |\CDbookletTopMargin|.
600 % \begin{macrocode}
601 \temp@length=\booklet@height
602 \advance\temp@length-2\CDbookletTopMargin
603 \global\textheight=\temp@length
604 \global\headsep=\CDbookletTopMargin
605 % \end{macrocode}
606 % The next thing is to set the text width. This limit is again set to
607 % it's appropiate value for this type of cover --- defined in
608 % |\booklet@width| --- and then corrected for for the wanted margin
609 % width --- taken from |\CDbookletMargin|.
610 % \begin{macrocode}
611 \temp@length=\booklet@width
612 \advance\temp@length-2\CDbookletMargin
613 \global\textwidth=\temp@length
614 % \end{macrocode}
615 % A little extra care is needed since we type set in two column
616 % mode. We In the case, that the first page contains this sort of
617 % cover, we \emph{have to} set |\@colht| equal to |\textheight|
618 % manually.
619 %
620 % The reason is a bit complicated, and I will not go into
621 % much detail about it. The point is, that \LaTeX{} uses |\@colht| as
622 % the limit for the height of the columns. Now, when constructing the
623 % first column, |\@colht| still has the old value of |\textheight|, as
624 % set in the begining of the document, and this is properly not what
625 % we want. \emph{After} making the first column, it sets |\@colht| to
626 % the present value of |\textheight|, which is what we want, but then
627 % it is too late. The \emph{only} way to get around this
628 % problem\footnote{Or is ts a bug in \LaTeXe.}, is to manually set
629 % |\@colht|. One should not be conserned on that this dimension is
630 % hand--set on subsequent pages.
631 %
632 % The second thing to do, is to set |\columnsep| to whatever value the
633 % margins should have --- as defined in |\CDbookletMargin|.
634 % \begin{macrocode}
635 \global\@colht=\textheight
636 \global\columnsep=2\CDbookletMargin}
637 % \end{macrocode}
638 % \end{macro}
639 %
640 % \begin{environment}{bookletsheets}
641 % Now for the environment it self. We start off with initializing the
642 % dimensions as outlined above, and then we start the two column
643 % mode and set the page style to \textsf{bookletsheets}. To finish of
644 % the the environment, we make sure that the last page has a border by
645 % calling |\clearpage|, and revert to the default page style.
646 % \begin{macrocode}
647 \newenvironment{bookletsheets}{
648 \init@booklet\twocolumn\pagestyle{bookletsheets}}{
649 \clearpage\pagestyle{empty}}
650 % \end{macrocode}
651 % \end{environment}
652 %
653 % \begin{macro}{\booklet@border}
654 % First we want to back up the margin width (|\CDbookletMargin|), so
655 % that the border will be properly spaced from the text. Secondly we
656 % want to draw the border.
657 %
658 % This border isn't very complex. It's just a retangular with to small
659 % lines indicating a folding line. For the users convinience, we put
660 % an arrow an some text next to the folding line.
661 %
662 % As explained above this command is `space invisible', execpt for the
663 % final |\hfill|, which is exactly what we want.
664 % \begin{macrocode}
665 \def\booklet@border{%
666 \kern-\CDbookletMargin%
667 \setlength{\unitlength}{1mm}%
668 \begin{picture}(100,1)%
669 \put(0,0){\line(1,0){240}}% Top most horizontal line
670 \put(0,0){\line(0,-1){120}}% Left most vertical line
671 \put(0,-120){\line(1,0){240}}% Bottom most horizontal line
672 \put(240,0){\line(0,-1){120}}% Right most vertical line
673 \put(120,0){\line(0,1){5}}% Top folding mark
674 \put(120,-120){\line(0,-1){5}}% Bottom folding mark
675 \ifcd@cover@foldlines
676 \multiput(120,-1)(0,-5){24}{\line(0, -1){3}} % Fold line
677 \fi
678 \put(110,2){\vector(1,0){10}}% Arrow
679 \put(95,1){Fold here}% Helping text
680 \end{picture}\hfill}
681 % \end{macrocode}
682 % \end{macro}
683 %
684 % \subsubsection{The back type}
685 %
686 % One could argue, that the page style scheme outlined on page
687 % \pageref{sec:psscheme} really isn't that advantages in this case,
688 % and that a \textsf{minipage}--like solution would be better, since
689 % the text in this environment shouldn't be more then \emph{one} page,
690 % since there is only room for one back sheet on a normal
691 % cd-cover. While this is true, I decided, that it should be up to the
692 % user to restain him/her--self from putting tom much text into these
693 % kinds of pages.
694 %
695 % \begin{macro}{\ps@backsheet}
696 % Page style for the backpage.
697 % \begin{macrocode}
698 \def\ps@backsheet{
699 \let\@oddhead\back@border\let\@evenhead\@oddhead
700 \let\@oddfoot\@empty\let\@evenfoot\@empty}
701 % \end{macrocode}
702 % \end{macro}
703 %
704 % \begin{macro}{\init@back}
705 % This macro is similar to |\init@booklet| comment above, so I will
706 % suffice to say the instead of |\CDbooklet...| above read
707 % |\CDback...|, and the two--column notes are irrelevant.
708 % \begin{macrocode}
709 \def\init@back{
710 \temp@length=\back@height
711 \advance\temp@length-2\CDbackTopMargin
712 \global\textheight=\temp@length
713 \temp@length=\back@width
714 \advance\temp@length-2\CDbackMargin
715 \global\textwidth=\temp@length
716 \global\headsep=\CDbackTopMargin}
717 % \end{macrocode}
718 % \end{macro}
719 %
720 % \begin{macro}{\back@title}
721 % This is a save box for the title on the back of the cover. See more
722 % below.
723 % \begin{macrocode}
724 \newsavebox{\back@title}
725 % \end{macrocode}
726 % \end{macro}
727 %
728 % \begin{environment}{backsheet}
729 % \begin{environment}{backsheet*}
730 % This environment should take one argument, the title on the back of
731 % the cover. This will be type set two times; one on each end of the
732 % cover, rotated as to give the proper reading when your CD is put on
733 % the shelf. The argument is put into a |\parbox|, so that we may
734 % control the size of the text, and then put into a save box for later
735 % use (in |\back@border|).
736 %
737 % The star'ed version \textsf{backsheet*} turns the back title
738 % opposite to the non--star'ed version. This is useful if one want's
739 % to typeset covers for double jewel cases. Also, in some countries,
740 % like Germany, they like having the text run the opposite direction,
741 % so for those users, that environment may be more appropiate.
742 %
743 % \begin{macro}{\ifback@anglereverse}
744 % To help distingish between the two ways of rotation the back title,
745 % we have the macro |\ifback@anglereverse|, which is set to |\relax| if
746 % we're using the regular non--star'ed version.
747 % \begin{macrocode}
748 \newif\ifback@anglereverse\back@anglereversefalse
749 % \end{macrocode}
750 % \end{macro}
751 %
752 % As in \textsf{bookletsheets} environment, we call the initializing
753 % macro, make sure we are in one--cloumn mode, and set the page
754 % style. When finishing of the environment, we clear the page, to
755 % insure the last page style, and revert to the default page style.
756 % \begin{macrocode}
757 \newenvironment{backsheet}[1]{
758 \back@anglereversefalse%
759 \init@back%
760 \savebox{\back@title}[\textheight]{%
761 \parbox[t][6mm]{\textheight}{#1}}
762 \onecolumn\pagestyle{backsheet}
763 \clearpage}{\clearpage\pagestyle{empty}}
764 \newenvironment{backsheet*}[1]{
765 \back@anglereversetrue%
766 \init@back%
767 \savebox{\back@title}[\textheight]{%
768 \parbox[t][6mm]{\textheight}{#1}}
769 \onecolumn\pagestyle{backsheet}
770 \clearpage}{\clearpage\pagestyle{empty}}
771 % \end{macrocode}
772 % \end{environment}
773 % \end{environment}
774 %
775 % \begin{macro}{\back@border}
776 % First we back up, just as in |\booklet@border|, but we also have to
777 % back up the length (height) of the slips, unlike above. Then the
778 % border is drawn with folding marks, and some help text and arrows.
779 % \begin{macrocode}
780 \def\back@border{%
781 \kern-\CDbackMargin%
782 \kern-\back@slip@width%
783 \setlength{\unitlength}{1mm}%
784 \begin{picture}(0,0)%
785 \put(0,0){\line(1,0){151}}% Top most horizontal line
786 \put(0,-118){\line(1,0){151}}% Bottom most horizontal line
787 \put(0,0){\line(0,-1){118}}% Left most vertical line
788 \put(151,0){\line(0,-1){118}}% Right most vertical line
789 \put(7,0){\line(0,1){5}}% Left top folding mark
790 \put(7,-118){\line(0,-1){5}}% Left bottom folding mark
791 \ifcd@cover@foldlines
792 \multiput(7,-1)(0,-5){24}{\line(0, -1){3}} % Fold line
793 \fi
794 \put(144,0){\line(0,1){5}}% Right top folding mark
795 \put(144,-118){\line(0,-1){5}}% Right bottom folding mark
796 \ifcd@cover@foldlines
797 \multiput(144,-1)(0,-5){24}{\line(0, -1){3}} % Fold line
798 \fi
799 \put(17,2){\vector(-1,0){10}}% Left help arrow
800 \put(17,1){Fold here}% Left help text
801 \put(134,2){\vector(1,0){10}}% Right help arrow
802 \put(119,1){Fold here}% Right help text
803 % \end{macrocode}
804 % We finshes off with drawing the rotated titles. Please notice, that
805 % the left one, is the one closest to the opening of the CD
806 % cover. This should explain the somewhat strange rotating values.
807 %
808 % Also, notice that we can rotate one or the other way, as explained
809 % above, conditionally on |\ifback@anglereverse{1}|.
810 % \begin{macrocode}
811 \ifback@anglereverse%
812 \put(1,0){\begin{rotate}{-90}\usebox{\back@title}\end{rotate}}%
813 \put(150,-118){\begin{rotate}{90}\usebox{\back@title}\end{rotate}}%
814 \else%
815 \put(6,-118){\begin{rotate}{90}\usebox{\back@title}\end{rotate}}%
816 \put(145,0){\begin{rotate}{-90}\usebox{\back@title}\end{rotate}}%
817 \fi%
818 %\put(3,-118){\begin{rotate}{90}\usebox{\back@title}\end{rotate}}%
819 %\put(148,0){\begin{rotate}{-90}\usebox{\back@title}\end{rotate}}%
820 \end{picture}\hfill}
821 % \end{macrocode}
822 % \end{macro}
823 %
824 % \subsubsection{The sleeve type}
825 %
826 % This type showes how you can juggle around with \LaTeX{} and get it
827 % to do almost everything you want\footnote{I don't want to sound
828 % pretentious, but I was surprised how easily it all turned out to
829 % be.}. By altering a bit in the way |\LaTeXe| output two--column
830 % pages, I could get it to swap the columns, so that the last entered
831 % would come out first, and vice versa. This is exactly what we want
832 % for this page style, which is obvious when you see the finished
833 % output.
834 %
835 % \begin{macro}{\ps@sleevesheet}
836 % \begin{macrocode}
837 \def\ps@sleevesheet{%
838 \let\@oddhead\sleeve@border\let\@evenhead\@oddhead
839 \let\@oddfoot\@empty\let\@evenfoot\@oddfoot}
840 % \end{macrocode}
841 % \end{macro}
842 %
843 % \begin{macro}{\init@sleeve}
844 % What I said about |\init@booklet| goes here with the exchange of
845 % |\CDsleeve...| for |\CDbooklet...|.
846 % \begin{macrocode}
847 \def\init@sleeve{
848 \temp@length=\sleeve@height
849 \advance\temp@length-2\CDsleeveTopMargin
850 \global\textheight=\temp@length
851 \global\@colht=\textheight
852 \temp@length=\sleeve@width
853 \advance\temp@length-2\CDsleeveMargin
854 \global\textwidth=\temp@length
855 \global\headsep=\CDsleeveTopMargin
856 \global\columnsep=2\CDsleeveMargin}
857 % \end{macrocode}
858 % \end{macro}
859 %
860 % \begin{environment}{sleevesheet}
861 % Again we initialize, make sure we are in two column mode, and set
862 % the page style. The only thing to notice here, is we |\let|
863 % |\@outputdblcol| to |\sleeve@outputdblcol|, and when the environment
864 % ends, change back to the usual definition saved in
865 % |\ltx@outputdblcol|. It is important that the last change comes
866 % \emph{after} the |\clearpage|, since otherwise, the last page will
867 % be output with the wrong output routine. Notice, that it doesn't
868 % make sense to make two--side prinint for this kind of cover, so the
869 % scheme works on \emph{any} page. Ofcourse, you should make the
870 % following page blank, by putting |\vfill\clearpage| after the
871 % environment.
872 % \begin{macrocode}
873 \newenvironment{sleevesheet}{%
874 \init@sleeve
875 \twocolumn\pagestyle{sleevesheet}
876 \global\let\@outputdblcol\sleeve@outputdblcol}{
877 \clearpage\pagestyle{empty}
878 \global\let\@outputdblcol\ltx@outputdblcol}
879 % \end{macrocode}
880 % \end{environment}
881 %
882 % \begin{macro}{\sleeve@border}
883 % Two flaps is outlined for clueing.
884 % \begin{macrocode}
885 \def\sleeve@border{%
886 \kern-\CDsleeveMargin%
887 \setlength{\unitlength}{1mm}%
888 \begin{picture}(100,1)%
889 \put(0,0){\line(3,4){6}}% Top flap
890 \put(6,8){\line(1,0){121}}%
891 \put(133,0){\line(-3,4){6}}%
892 \ifcd@cover@foldlines
893 \multiput(133,-1)(0,-5){25}{\line(0, -1){3}} % Fold line
894 \fi
895 \put(50,1){Fold and clue}% Help text in top flap
896 \put(0,-123){\line(3,-4){6}}% Bottom flap
897 \put(6,-131){\line(1,0){121}}%
898 \put(133,-123){\line(-3,-4){6}}%
899 \put(50,-131){Fold and clue}% Help text in bottom flap
900 \put(0,0){\line(1,0){266}}% Top most horizontal line
901 \put(0,0){\line(0,-1){123}}% Left most vertical line
902 \put(0,-123){\line(1,0){266}}% Bottom most horizontal line
903 \put(266,0){\line(0,-1){123}}% Right most vertical line
904 \end{picture}\hfill}
905 % \end{macrocode}
906 % \end{macro}
907 %
908 % \subsubsection{The single type}
909 %
910 % \begin{macro}{\ps@singlesheet}
911 % To facilitate two side printing, we have to have two kinds of
912 % borders, since the border outline is asymmetric along a vertical
913 % line, hence |\@oddhead| and |\@evenhead| has different values.
914 % \begin{macrocode}
915 \def\ps@singlesheet{
916 \let\@oddhead\odd@single@border
917 \let\@evenhead\even@single@border
918 \let\@oddfoot\@empty\let\@evenfoot\@oddfoot}
919 % \end{macrocode}
920 % \end{macro}
921 %
922 % \begin{macro}{\single@title}
923 % \begin{macro}{\single@slip}
924 % These two save boxes are used below.
925 % \begin{macrocode}
926 \newsavebox{\single@title}
927 \newsavebox{\single@slip}
928 % \end{macrocode}
929 % \end{macro}
930 % \end{macro}
931 %
932 % \begin{macro}{\init@single}
933 % Again exchnage |\CDsingle...| with |\CDback...| in the description
934 % of |\init@back|, and there you have it.
935 % \begin{macrocode}
936 \def\init@single{
937 \temp@length=\single@height
938 \advance\temp@length-2\CDsingleTopMargin
939 \advance\temp@length-4mm
940 \global\textheight=\temp@length
941 \temp@length=\single@width
942 \advance\temp@length-2\CDsingleMargin
943 \global\textwidth=\temp@length
944 \global\headsep=\CDsingleTopMargin}
945 % \end{macrocode}
946 % \end{macro}
947 %
948 % \begin{environment}{singlesheet}
949 % As in the \textsf{backsheet} environment, we save the arguments in
950 % |\parbox|'es to control the size, and put all that into save boxes,
951 % wich are used in |\odd@single@border|. Everything else is as above.
952 % \begin{macrocode}
953 \newenvironment{singlesheet}[2]{
954 \init@single
955 \savebox{\single@title}[\textwidth]{%
956 \parbox[t][3mm]{\textwidth}{#1}}
957 \savebox{\single@slip}[\textwidth]{%
958 \parbox[t][\single@slip@width]{\textwidth}{#2}}
959 \onecolumn\pagestyle{singlesheet}
960 \clearpage}{\clearpage\pagestyle{empty}}
961 % \end{macrocode}
962 % \end{environment}
963 %
964 % \begin{macro}{\odd@single@border}
965 % We define two border for the reasons stated above. The differ in
966 % that they are mirror reflections of each other, and the back title
967 % and slip text isn't put on even sides.
968 % \begin{macrocode}
969 \def\odd@single@border{
970 \kern-\CDsingleMargin%
971 \kern-\single@slip@width%
972 \kern-\single@back@width%
973 \setlength{\unitlength}{1mm}%
974 \begin{picture}(0,0)%
975 \put(0,0){\line(0,-1){116}}% Left most vertical line
976 \put(0,0){\line(1,0){36}}% First top horizontal line
977 \put(36,0){\line(0,1){2}}% Jump
978 \put(15,0){\line(0,1){5}}% Fold mark
979 \ifcd@cover@foldlines
980 \multiput(15,-1)(0,-5){24}{\line(0, -1){3}} % Fold line
981 \fi
982 \put(18,0){\line(0,1){5}}% Fold mark
983 \ifcd@cover@foldlines
984 \multiput(18,-1)(0,-5){24}{\line(0, -1){3}} % Fold line
985 \fi
986 \put(36,2){\line(1,0){119}}% Second top line
987 \put(155,2){\line(0,-1){120}}% Right most vertical line
988 \put(0,-116){\line(1,0){36}}% First bottom line
989 \put(36,-116){\line(0,-1){2}}% Jump
990 \put(15,-116){\line(0,-1){5}}% Fold Mark
991 \put(18,-116){\line(0,-1){5}}% Fold Mark
992 \put(36,-118){\line(1,0){119}}% Second bottom line
993 \put(5,4){\vector(1,0){10}}% Arrows
994 \put(28,4){\vector(-1,0){10}}% Arrows
995 \put(28,3){Fold here}% Help text
996 \put(0,0){\begin{rotate}{-90}\usebox{\single@title}\end{rotate}}%
997 \put(15,0){\begin{rotate}{-90}\usebox{\single@slip}\end{rotate}}%
998 \end{picture}\hfill}
999 % \end{macrocode}
1000 % \end{macro}
1001 %
1002 % \begin{macro}{\even@single@border}
1003 % \begin{macrocode}
1004 \def\even@single@border{
1005 \kern-\CDsingleMargin%
1006 \setlength{\unitlength}{1mm}%
1007 \begin{picture}(0,0)%
1008 \put(0,2){\line(0,-1){120}}% 1st left vert line
1009 \put(119,0){\line(1,0){36}}% 2nd top horiz line
1010 \put(119,0){\line(0,1){2}}% 2nd top right vert line
1011 \put(137,0){\line(0,1){5}}% 1st top fold mark
1012 \put(140,0){\line(0,1){5}}% 2nd top fold mark
1013 \put(0,2){\line(1,0){119}}% 1st top horiz line
1014 \put(155,0){\line(0,-1){116}}% 1st right vert line
1015 \put(119,-116){\line(1,0){36}}% 2nd bototm horiz line
1016 \put(119,-116){\line(0,-1){2}}% 2nd bottom right vert line
1017 \put(137,-116){\line(0,-1){5}}% 1st bottom fold mark
1018 \put(140,-116){\line(0,-1){5}}% 2nd bottom fold mark
1019 \put(0,-118){\line(1,0){119}}% 1st bottom horiz line
1020 \put(127,4){\vector(1,0){10}}% 1st help arrow
1021 \put(150,4){\vector(-1,0){10}}% 2nd help arrow
1022 \put(112,3){Fold here}% Help text
1023 \end{picture}\hfill}
1024 % \end{macrocode}
1025 % \end{macro}
1026 %
1027 % \subsection{Modified output routines}\label{sec:modout}
1028 %
1029 % Here are some modifications to the \LaTeXe{} output routine to
1030 % \emph{invert} the page orders in some of the environments, such as
1031 % \textsf{sleeve}. First we save the old definition in
1032 % |\ltx@outputdblcol|.
1033 % \begin{macrocode}
1034 \let\ltx@outputdblcol\@outputdblcol
1035 % \end{macrocode}
1036 %
1037 % \begin{macro}{\sleeve@outputdblcol}
1038 % Then we go on to define |\sleeve@outputdblcol|, changing the order
1039 % of column output.
1040 %
1041 % The first part os the same as in \texttt{ltoutput.dtx}, so no need
1042 % to comment on that here.
1043 % \begin{macrocode}
1044 \def\sleeve@outputdblcol{%
1045 \if@firstcolumn
1046 \global\@firstcolumnfalse
1047 \global\setbox\@leftcolumn\box\@outputbox
1048 \else
1049 \global\@firstcolumntrue
1050 % \end{macrocode}
1051 % Now for the building of the actual output box, we \emph{interchange}
1052 % the order of |\@leftcolumn| and |\@outputbox| in the body definition
1053 % of |\@outputbox|, tricky isn't it!
1054 % \begin{macrocode}
1055 \setbox\@outputbox\vbox{%
1056 \hb@xt@\textwidth{%
1057 \hb@xt@\columnwidth{%
1058 \box\@outputbox\hss}% \@leftcolumn changed to \@outputbox
1059 \hfil\vrule\@width\columnseprule\hfil
1060 \hb@xt@\columnwidth{%
1061 \box\@leftcolumn\hss}}}% \@outputbox changed to \@leftcolumn
1062 \@combinedblfloats
1063 \@outputpage
1064 \begingroup
1065 \@dblfloatplacement
1066 \@startdblcolumn
1067 \@whilesw\if@fcolmade\fi
1068 {\@outputpage
1069 \@startdblcolumn}%
1070 \endgroup
1071 \fi
1072 }
1073 % \end{macrocode}
1074 % \end{macro}
1075 %
1076 % \subsection{The final stuff}
1077 %
1078 % If we can figure out the graphics driver automatically, then we emit
1079 % a |\special| or equivilant command to the output file. If we can
1080 % not find the driver, we warn the user that the printing should be
1081 % done in landscape mode.
1082 % \begin{macrocode}
1083 \def\cdcover@endmessage{cd-cover class: Remember that this document is
1084 type set in landscape^^J mode, and therefore dvips should be
1085 passed the `-t landscape' option.}
1086 \@ifundefined{Gin@driver}{%
1087 \AtEndDocument{\typeout{\cdcover@endmessage}}}{%
1088 \filename@parse{\Gin@driver}%
1089 \def\reserved@a{dvips}%
1090 \ifx\filename@base\reserved@a\relax%
1091 \message{DVIPS driver found}
1092 \AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}%
1093 \AtBeginDvi{\special{papersize=\the\paperheight,\the\paperwidth}}%
1094 \else
1095 \def\reserved@a{pdftex}\relax%
1096 \ifx\filename@base\reserved@a
1097 \message{PDF driver found}
1098 \pdfpagewidth=\the\paperwidth\pdfpageheight=\the\paperheight%
1099 \else
1100 \def\reserved@a{vtex}\relax%
1101 \ifx\filename@base\reserved@a
1102 \message{VTeX driver found}
1103 \mediawidth=\the\paperwidth\mediaheight=\the\paperheight%
1104 \else
1105 \AtEndDocument{\typeout{\cdcover@endmessage}}
1106 \fi
1107 \fi
1108 \fi}
1109 % \end{macrocode}
1110 %
1111 %\iffalse
1112 %</class>
1113 %\fi