Debian Codegraph @

texmf-dist/source/latex/papercdcase/papercdcase.dtx

raw
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% $Id: papercdcase.dtx 11 2006-08-07 11:54:04Z tdussa $
3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4 \def\SVNMisc$#1: #2 #3${#2}
5 \def\SVNDate$#1: #2-#3-#4 #5${#2/#3/#4}
6 \def\filename{papercdcase.dtx}
7 \xdef\fileversion{\SVNMisc$Revision: 11 $}
8 \xdef\filedate{\SVNDate$Date: 2006-08-07 13:54:04 +0200 (Mon, 07 Aug 2006) $}
9 \let\docversion=\fileversion
10 \let\docdate=\filedate
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 %\iffalse
13 \typeout{%
14 %% Purpose:
15 Package: papercdcase \filedate\space\fileversion\space
16 for typesetting paper CD cases.
17 }%
18 %%
19 %% Documentation:
20 %% The documentation can be generated from the original file
21 %% papercdcase.dtx with the doc style/package. LaTeX the file
22 %% papercdcase.dtx to get the full documentation in dvi format.
23 %%
24 %%
25 %% Author: Tobias Dussa
26 %% Im Schlossfeld 4
27 %% 77855 Achern
28 %% Mail: [email protected]
29 %%
30 %% Copyright (C) 2006 Tobias Dussa
31 %%
32 %% papercdcase.dtx is distributed in hopes that it will be useful,
33 %% but WITHOUT ANY WARRANTY. No author or distributor accepts
34 %% responsibility to anyone for the consequences of using it or for
35 %% whether it serves any particular purpose or works at all, unless
36 %% he says so in writing.
37 %%
38 %% Everyone is granted permission to copy, modify and redistribute
39 %% papercdcase.dtx, provided this copyright notice is preserved and
40 %% any modifications are indicated.
41 %%
42 %%
43 %% This style is still under development and may be replaced with a
44 %% new version which provides an enhanced functionality.
45 %%
46 %<*driver>
47 \documentclass{ltxdoc}
48 \EnableCrossrefs
49 \CodelineIndex
50 \RecordChanges
51 \setcounter{IndexColumns}2
52 \begin{document}
53 \DocInput{papercdcase.dtx}
54 \newpage
55 \PrintChanges
56 \end{document}
57 %</driver>
58 %\fi
59 %
60 % \title{A \LaTeX\ Package for Typesetting\\ Paper CD
61 % Cases\thanks{This file documents \filename\ version
62 % \fileversion\ as of \filedate.}}
63 % \author{Tobias Dussa\\
64 % Im Schlo\ss{}feld 4\\
65 % 77855 Achern (Germany)\\
66 % e-mail: \[email protected]~}
67 %
68 % \date{{\footnotesize Documentation date: \docdate}}
69 %
70 % \maketitle
71 %
72 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
73 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
74 %
75 % \DoNotIndex{\ ,\",\',\.,\[,\\,\],\^,\`,\~,\@,\@dottedtocline}
76 % \DoNotIndex{\@empty,\@nameuse,\advance,\begin,\begingroup}
77 % \DoNotIndex{\catcode,\def,\else,\end,\endgroup,\fi,\filedate}
78 % \DoNotIndex{\footnotesize,\framebox,\gdef,\hfill,\if,\ifx,\let,\makebox}
79 % \DoNotIndex{\mbox,\newcommand,\newcount,\newdimen,\newenvironment}
80 % \DoNotIndex{\newif,\noindent,\normalsize,\null,\par,\put}
81 % \DoNotIndex{\relax,\rm,\rule,\scriptsize,\sf,\textsf,\textwidth}
82 % \DoNotIndex{\the,\unitlength,\uppercase,\xdef,\ProvidesPackage}
83 %
84 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
85 %
86 % \changes{1.0}{2006/06/06}{First release.}
87 %
88 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
89 % \CheckSum{649}
90 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
91 %% \CharacterTable
92 %% {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
93 %% 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
94 %% Digits \0\1\2\3\4\5\6\7\8\9
95 %% Exclamation \! Double quote \" Hash (number) \#
96 %% Dollar \$ Percent \% Ampersand \&
97 %% Acute accent \' Left paren \( Right paren \)
98 %% Asterisk \* Plus \+ Comma \,
99 %% Minus \- Point \. Solidus \/
100 %% Colon \: Semicolon \; Less than \<
101 %% Equals \= Greater than \> Question mark \?
102 %% Commercial at \@ Left bracket \[ Backslash \\
103 %% Right bracket \] Circumflex \^ Underscore \_
104 %% Grave accent \` Left brace \{ Vertical bar \|
105 %% Right brace \} Tilde \~}
106 %%
107 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
108 % \MakeShortVerb{|}
109 %
110 % \begin{abstract}
111 % papercdcase.dtx provides a package to typeset paper CD cases.
112 % The paper CD cases are origami-style CD cases which, when
113 % properly folded, provided a simple, inexpensive, and readily
114 % reproducable CD protection. This package creates the proper
115 % folding lines on one hand, but on the other hand also provides
116 % a means of putting material like CD titles, CD track lists, and
117 % so on into the proper places so that it will come out just
118 % right when printed and folded.
119 %
120 % The package is based with friendly permission on the work of
121 % Thomas Hull (\verb!http://web.merrimack.edu/~thull!) as well
122 % as the project of the folks at \verb!http://www.papercdcase.com!.
123 %
124 % Any comments, corrections and so on are greatly appreciated.
125 % \end{abstract}
126 %
127 % \tableofcontents
128 % \newpage
129 %
130 % \section{About Paper CD Cases}
131 %
132 % Paper CD cases are a very convenient way to protect your CDs.
133 % While they are not as sturdy as plastic cases, they are
134 % inexpensive, simple, easily reproducable, yet astonishingly
135 % sturdy.
136 %
137 % The idea is based on origami, the Japanese art of paper folding,
138 % and has been developed by Thomas Hull
139 % (\verb!http://web.merrimack.edu/~thull!) and further elaborated
140 % on by the folks at \verb!http://www.papercdcase.com!. Many
141 % thanks to them all for their kind permission to use their work in
142 % this package.
143 %
144 % Obviously, the way a paper CD case needs to be folded is somewhat
145 % dependent on the actual physical size of the sheet of paper it is
146 % printed on. In general, there are two standard paper sizes that
147 % lend themselves for this purpose: A4 and letter.
148 %
149 % The problem is that for a paper CD case, the difference in paper
150 % height between a sheet of A4 paper ($296.9\,\hbox{mm}$) and a
151 % sheet of letter paper ($11''$) is actually significant. While it
152 % is possible to use the folding scheme designed for letter paper
153 % on an A4 sheet of paper, this does have some drawbacks: It is
154 % necessary to fold over a thin strip of paper just
155 % $17.5\,\hbox{mm}$ or about $\frac{11}{16}''$ wide, which turn out
156 % to be a bit difficult to fold. Furthermore, paper CD cases based
157 % on this folding scheme are a bit less sturdy than
158 % they could be.\\
159 % On the other hand, a folding scheme that makes optimal use of an
160 % entire A4 sheet of paper cannot be used on letter paper, because
161 % letter paper is too short.
162 %
163 % For these reasons, two folding schemes are provided: A universal
164 % scheme that fits both on letter and on A4 paper, if somewhat
165 % imperfectly on the latter, and a specialized folding scheme that
166 % perfectly fits on A4 paper.
167 %
168 % The general paper CD cases that are produced are carefully sized
169 % so that they fit on a (hypothetical) piece of paper
170 % $210\,\hbox{mm}$ wide (A4 width) and $11''$ tall (letter height).
171 % In other words, the smaller edges of both paper sizes have been
172 % used to target the size of the paper case. This means that on
173 % either paper, there will be some excess space along one of the
174 % axes.
175 %
176 % \section{What the Package Provides}
177 %
178 % In creating paper CD cases, there are three things of interest:
179 % \begin{enumerate}
180 % \item the folding scheme (the paper case itself, if you will),
181 % \item textual information that may or may not be desired on the
182 % finished case, and
183 % \item the placement of both of the above elements on the physical
184 % piece of paper.
185 % \end{enumerate}
186 %
187 % This package provides means to generate the proper folding scheme
188 % as well as provisions for some useful text boxes that are placed
189 % correctly within the folding layout so that their contents appear
190 % in the proper places when the paper case is folded.
191 %
192 % This package does \emph{not} provide an automatism to place the
193 % folding scheme and the text boxes on the physical page. While
194 % the text boxes \emph{are} placed properly by the package, this
195 % placement is merely relative to the folding scheme. It is up to
196 % the user to decide on what paper she wants to actually print the
197 % paper case. This means in particular that the user is
198 % responsible for centering the paper case on the sheet if this is
199 % desired, and that things like page numbers and so on must be
200 % dealt with by the user.
201 %
202 % However, this offers some flexibility that is worth the minor
203 % overhead nuisance of centering a box on a page.
204 %
205 % \subsection{The Folding Scheme}\label{sec:scheme}
206 %
207 % \DescribeMacro{\papercdcase}%
208 % Typesetting the folding scheme itself is fairly straightforward:
209 % Simply issue the proper command:
210 % \begin{verbatim}
211 % \papercdcase
212 % \end{verbatim}
213 % This command will produce the folding scheme, consisting of
214 % \begin{itemize}
215 % \item solid lines,
216 % \item dashed lines, and
217 % \item numbers.
218 % \end{itemize}
219 % The numbers define the \emph{sequence} in which the folding steps
220 % should be carried out, while the types of lines specify
221 % \emph{how} the paper should be folded. More details on the
222 % folding procedure can be found in section~\ref{sec:folding}.
223 %
224 % \DescribeMacro{\papercdcase[]}
225 % The folding scheme is conveniently sized so that the finished
226 % paper case will hold a standard $120\,\hbox{mm}$ CD. However,
227 % there are also smaller $80\,\hbox{mm}$ so-called Maxi CDs. In
228 % order to create a folding scheme that is scaled so that the
229 % folded case will hold a small, $80\,\hbox{mm}$ CD, just add a
230 % parameter to the command above, specifying that you would like a
231 % folding scheme for an $80\,\hbox{mm}$ CD case by use of the
232 % optional size parameter:
233 % \begin{verbatim}
234 % \papercdcase[80]
235 % \end{verbatim}
236 % In fact, you can scale the folding scheme to any size you want,
237 % measured in whole millimeters, by replacing the \texttt{80} in
238 % the call above by the desired design size in millimeters.
239 %
240 % \DescribeMacro{\papercdcase*}
241 % As mentioned in the introduction, there are two kinds of folding
242 % schemes: One that is designed to fit both A4 and letter sheets of
243 % paper, and one that is designed to fit A4 paper perfectly. The
244 % commands above all produce the general version. If you are using
245 % A4 paper are would like to use the A4-optimized folding scheme,
246 % use the starred version of the command instead:
247 % \begin{verbatim}
248 % \papercdcase*
249 % \papercdcase*[80]
250 % \end{verbatim}
251 %
252 % \subsection{The Text Boxes}\label{sec:boxes}
253 %
254 % This package offers four boxes that are put into predefined
255 % places:
256 % \begin{itemize}
257 % \item A spine matter box,
258 % \item a latch matter box,
259 % \item a back matter box, and
260 % \item a pouch matter box.
261 % \end{itemize}
262 %
263 % The spine matter box is centered horizontally and vertically on
264 % the spine of the CD case. Typically, this box holds the CD title
265 % and the artist for an audio CD.
266 %
267 % The latch matter box is printed in the top left-hand corner of
268 % the CD case latch. Again, this box typically contains the CD
269 % title.
270 %
271 % The back matter box is printed in the top left-hand corner of the
272 % back of the CD case. A typical use for this box is the track
273 % list of an audio CD.
274 %
275 % Finally, the pouch matter box is printed in the top left-hand
276 % corner of the CD case pouch, just below the latch. This box is
277 % typically unused, but may be useful for some additional
278 % information.
279 %
280 % \DescribeMacro{\setcdlatchmatter}
281 % \DescribeMacro{\setcdpouchmatter}
282 % \DescribeMacro{\setcdbackmatter}
283 % \DescribeMacro{\setcdspinematter}
284 % In order to fill the boxes, use these commands:
285 % \begin{itemize}
286 % \item |\setcdlatchmatter|
287 % \item |\setcdpouchmatter|
288 % \item |\setcdbackmatter|
289 % \item |\setcdspinematter|
290 % \end{itemize}
291 %
292 % As an example, a typical use of the above commands might look
293 % like this:
294 % \begin{verbatim}
295 % \setcdlatchmatter{\textbf{\LARGE Jean Michel Jarre\\[0.25\baselineskip]
296 % In Concert: Houston--Lyon}}
297 %
298 % \setcdpouchmatter{Live recordings from the legendary concerts in
299 % Houston and Lyon 1986}
300 %
301 % \setcdbackmatter{\textbf{\LARGE Jean Michel Jarre\\[0.25\baselineskip]
302 % In Concert: Houston--Lyon}
303 % \begin{enumerate}
304 % \item Oxygene V
305 % \item Ethnicolor
306 % \item Magnetic Fields I
307 % \item Souvenir (Of China)
308 % \item Equinoxe V
309 % \item Rendez-Vous III (Laser Harp)
310 % \item Rendez-Vous II
311 % \item Ron's Piece
312 % \item Rendez-Vous IV
313 % \end{enumerate}}
314 %
315 % \setcdspinematter{\textbf{\Large Jean Michel Jarre/In Concert:
316 % Houston--Lyon}}
317 % \end{verbatim}
318 %
319 % Be aware that the text boxes must be filled with the above
320 % commands \emph{before} the folding scheme is typeset with the
321 % \verb~\papercdcase~ command.
322 %
323 % \subsection{The Placement on Physical Paper}\label{sec:placement}
324 %
325 % As mentioned before, there is no automatic procedure provided by
326 % the package that automatically places the folding scheme and the
327 % boxes on a physical sheet of paper. This is a conscious design
328 % decision with the aim to maintain a maximum of flexibility.
329 %
330 % Actually positioning the folding scheme on paper is very easy,
331 % though. If you are using either A4 or letter paper, which is
332 % probably the case is more than 99\,\% of all cases, there are
333 % three things to worry about:
334 % \begin{itemize}
335 % \item All margins should be set to zero size,
336 % \item headlines and footlines should be empty, and
337 % \item the folding scheme should be centered horizontally.
338 % Vertical alignment is not as important, because the universal
339 % folding scheme fills up an entire letter-sized page, while the
340 % A4 folding scheme fills up an entire A4 page. Thus, no
341 % vertical adjustments need to be done in these cases.\\
342 % If the general folding scheme is used on A4 paper, then
343 % obviously, the page is not entirely filled. However, even in
344 % this case, I recommend \emph{not} to do any vertical
345 % adjustments, but rather to leave the top of the folding scheme
346 % aligned with the page edge. This saves one folding
347 % operation. (One might put a \verb~\vspace*{\fill}~ or so at
348 % the beginning of the page, of course, so the bottom of the
349 % folding scheme is flush with the paper edge instead of the top,
350 % but this does not really make a difference in practice.)
351 % \end{itemize}
352 % All of the above points are addressed in this little document,
353 % for instance. This example serves well if letter-sized paper is
354 % used.
355 % \begin{verbatim}
356 % \documentclass{article}
357 % \usepackage[margin=0pt]{geometry}
358 % \usepackage{papercdcase}
359 % \pagestyle{empty}
360 % \begin{document}
361 % \setcdlatchmatter{Latch}
362 % \setcdspinematter{Spine}
363 % \setcdpouchmatter{Pouch}
364 % \setcdbackmatter{Back}
365 % \centering\papercdcase
366 % \end{document}
367 % \end{verbatim}
368 % For A4 paper, the above code also works, but it is necessary to
369 % tell \LaTeX{} to use A4 paper, of course. This may be done by
370 % changing \verb~\usepackage[margin=0pt]{geometry}~ to
371 % \verb~\usepackage[a4paper, margin=0pt]{geometry}~, for example.
372 % Also, it might be desirable to use \verb~\papercdcase*~ instead
373 % of \verb~\papercdcase~.
374 %
375 % \section{Folding the Paper CD Case}\label{sec:folding}
376 %
377 % Folding the printed paper CD case is quite simple, but requires a
378 % bit of practice. In principle, all necessary information is
379 % provided on the printout.
380 %
381 % In general, the numbers next to the lines specify the sequence in
382 % which the folding should take place. If a number is next to a
383 % \emph{solid} line, fold \emph{along} the line so that the crease
384 % runs along and over the line. If a number is next to a
385 % \emph{dashed} line, however, turn the sheet so that the number is
386 % the right way up, then fold the sheet so that the paper edge
387 % closest to you ends up aligned with the dashed line. Think of
388 % the dashed line as a folding ``target''.
389 %
390 % Be aware that the first few folds might be unnecessary. This is
391 % the case whenever a folding line is aligned with a paper edge
392 % already. This will happen every time the folding scheme fills
393 % out the entire sheet, in other words, whenever the universal
394 % folding scheme is printed on letter paper or the A4 folding
395 % scheme is printed on A4 paper. However, even if the universal
396 % folding scheme is printed on A4 paper, one edge of the scheme may
397 % well already be aligned with the corresponding paper edge. This
398 % is no problem, but it means that neither the folding line(s) nor
399 % the corresponding sequence number(s) will be there, so you might
400 % have to start the folding sequence with step number~2 or~3
401 % or even start with step number~1 and skip step number~2!\\
402 % Generally, start with the lowest number found on the printout and
403 % work your way up the numbers that are present.
404 %
405 % The tricky folds are steps number~8 and~9 as well as numbers~10
406 % and~11. You will need to fold little triangular ears towards you
407 % so the pouch is formed and stabilized. I am afraid that accurately
408 % describing exactly how the folding works in an appropriate amount
409 % of words is beyond me, so please refer to
410 % \verb!http://web.merrimack.edu/~thull! and/or
411 % \verb!http://www.papercdcase.com! for more detailed, excellent
412 % instruction on how to fold a paper CD case. In particular, a PDF
413 % with graphical instructions can be found at
414 % \verb!http://kahuna.merrimack.edu/~thull/CDcase/cd.pdf!.
415 %
416 %
417 % \section{Example Files}
418 %
419 % I have included some example files with this package that hopefully
420 % give an insight into how this package may be used. In particular,
421 % I included a minimal example showing just the very basics in this
422 % documentation, a little interactive example that lets you create CD
423 % cases on the fly, and a more elaborate example which is pretty much
424 % what I am using right now for my own purposes. Maybe some of the
425 % included files will provide clues on how to use this package.
426 %
427 % \StopEventually{}
428 % \newpage
429 %
430 %
431 % \section{The Implementation}
432 %
433 % The folding scheme is basically implemented with the \LaTeX{}
434 % picture environment. This gives us enough flexibility and
435 % provides an high enough abraction such that we do not have to
436 % fiddle around with to many low level details.
437 %
438 % Additional functionality is required for rotating the label
439 % boxes; thus, the \verb~graphicx~ package is included.
440 %
441 % \subsection{Basic Definitions and Parameters}
442 %
443 % First we identify this package and make sure we are talking
444 % \LaTeX2e{}. Furthermore, we load the \verb~graphicx~ and
445 % \verb~calc~ packages and make the \verb~@~ character available
446 % for internal command definitions.
447 %
448 % \begin{macrocode}
449 \ProvidesPackage{papercdcase}[\filedate v.\fileversion{} Paper CD Case Style (TD)]
450 \NeedsTeXFormat{LaTeX2e}
451
452 \RequirePackage{graphicx}
453 \RequirePackage{calc}
454
455 \makeatletter
456
457 % \end{macrocode}
458 %
459 % \subsection{User Interface Functions}
460 %
461 % The actual text boxes that are typeset on the latch, on the
462 % spine, on the back and on the pouch of the CD case are kept in
463 % internal macros.
464 % \begin{macrocode}
465 \newcommand{\@PCDC@Latch@Matter}{}
466 \newcommand{\@PCDC@Pouch@Matter}{}
467 \newcommand{\@PCDC@Back@Matter}{}
468 \newcommand{\@PCDC@Spine@Matter}{}
469
470 % \end{macrocode}
471 %
472 % Four functions which basically put their argument into the
473 % appropriate internal box definition.
474 % \begin{macro}{\setcdlatchmatter}
475 % Interface function for the latch matter:
476 % \begin{macrocode}
477 \newcommand{\setcdlatchmatter}[1]{\renewcommand{\@PCDC@Latch@Matter}{#1}}
478 % \end{macrocode}
479 % \end{macro}
480 %
481 % \begin{macro}{\setcdpouchmatter}
482 % Interface function for the pouch matter:
483 % \begin{macrocode}
484 \newcommand{\setcdpouchmatter}[1]{\renewcommand{\@PCDC@Pouch@Matter}{#1}}
485 % \end{macrocode}
486 % \end{macro}
487 %
488 % \begin{macro}{\setcdpouchmatter}
489 % Interface function for the back matter:
490 % \begin{macrocode}
491 \newcommand{\setcdbackmatter}[1]{\renewcommand{\@PCDC@Back@Matter}{#1}}
492 % \end{macrocode}
493 % \end{macro}
494 %
495 % \begin{macro}{\setcdpouchmatter}
496 % Interface function for the spine matter:
497 % \begin{macrocode}
498 \newcommand{\setcdspinematter}[1]{\renewcommand{\@PCDC@Spine@Matter}{#1}}
499
500 % \end{macrocode}
501 % \end{macro}
502 %
503 % \begin{macro}{\papercdcase}
504 % The macro |\papercdcase| is the main command provided by the
505 % package. The macro typesets the actual folding scheme, complete
506 % with all specified text boxes. It is defined so that if its
507 % starred version |\papercdcase*| is invoked, the folding scheme is
508 % adjusted for A4 paper; otherwise, letter paper is designed for.
509 % (The adjustments of the folding scheme are done by resetting the
510 % relevant counters, |@PCDC@Design@Height| and |@PCDC@Pouch@Height|.)
511 % \begin{macrocode}
512 % Main user macro; actually typesets the paper CD case.
513 \DeclareRobustCommand{\papercdcase}{%
514 \@ifstar%
515 {\setcounter{@PCDC@Design@Height}{297}\setcounter{@PCDC@Pouch@Height}{75}\@PCDC@Typeset@Scheme}%
516 {\setcounter{@PCDC@Design@Height}{279}\setcounter{@PCDC@Pouch@Height}{64}\@PCDC@Typeset@Scheme}}
517
518 % \end{macrocode}
519 % \end{macro}
520 %
521 % \subsection{Counters}
522 %
523 % Throughout the package, counters are used to compute the correct
524 % locations of the various folding marks, boxes and so on. Some of
525 % these counters control the exact layout of the folding scheme,
526 % while all the others depend on the values of the control
527 % counters. Consequently, all counters can be defined right away,
528 % but most of the counters cannot sensibly be set at this point.
529 %
530 % For readability and conciseness of the code, several
531 % abbreviations are used with the counter names:
532 % \begin{itemize}
533 % \item The letters \verb~A~ through \verb~M~ are used to designate
534 % the fold numbers 1 through 13.
535 % \item \verb~Btm~ is used for \verb~Bottom~.
536 % \item \verb~Lft~ and \verb~Rgt~ are used for \verb~Left~ and
537 % \verb~Right~, respectively.
538 % \item \verb~Upr~ and \verb~Lwr~ are used for \verb~Upper~ and
539 % \verb~Lower~, respectively.
540 % \end{itemize}
541 % These abbreviations make the code easier to read, IMHO, because
542 % they allow many sequences of commands to be aligned horizontally,
543 % making structures much easier to recognize.
544 %
545 % \subsubsection{Control Counters}
546 %
547 % There are eight counters that control the design of the folding
548 % scheme. These eight counters are defined first.
549 % \begin{macrocode}
550 %% Control counters.
551 %% Overall height of the folding scheme.
552 \newcounter{@PCDC@Design@Height}
553 %% Height of the CD pouch.
554 \newcounter{@PCDC@Pouch@Height}
555 %% Height (and width) of the folded paper CD case.
556 \newcounter{@PCDC@Back@Height}
557 %% Height of the CD case spine.
558 \newcounter{@PCDC@Spine@Height}
559 %% Margin between the text boxes and the edge of the CD case.
560 \newcounter{@PCDC@Text@Margin}
561 %% Length of regular fold marks.
562 \newcounter{@PCDC@Fold@Length}
563 %% Length of short fold marks.
564 \newcounter{@PCDC@Fold@Short@Length}
565 %% Space between fold marks and their labels.
566 \newcounter{@PCDC@Label@Sep}
567
568 % \end{macrocode}
569 %
570 % We also set these counters to some sensible values right away.
571 % \begin{macrocode}
572 \setcounter{@PCDC@Design@Height}{279}
573 \setcounter{@PCDC@Pouch@Height}{64}
574 \setcounter{@PCDC@Back@Height}{125}
575 \setcounter{@PCDC@Spine@Height}{8}
576 \setcounter{@PCDC@Text@Margin}{5}
577 \setcounter{@PCDC@Fold@Length}{25}
578 \setcounter{@PCDC@Fold@Short@Length}{20}
579 \setcounter{@PCDC@Label@Sep}{1}
580
581 % \end{macrocode}
582 %
583 % \subsubsection{General Coordinate Counters}
584 %
585 % Some of the other counters are used to hold coordinates that are
586 % shared by many fold marks so that is seems worth while to keep
587 % them in their own counters.
588 % \begin{macrocode}
589 %% Common counters.
590 \newcounter{@PCDC@Design@width}
591 \newcounter{@PCDC@Top@Lft@Fold}
592 \newcounter{@PCDC@Top@Rgt@Fold}
593 \newcounter{@PCDC@Bot@Lft@Fold}
594 \newcounter{@PCDC@Bot@Rgt@Fold}
595 \newcounter{@PCDC@Lwr@Top@Fold}
596 \newcounter{@PCDC@Upr@Top@Fold}
597 \newcounter{@PCDC@Bot@Fold}
598 \newcounter{@PCDC@Text@width}
599 \newcounter{@PCDC@Fold@Dash@Number}
600
601 % \end{macrocode}
602 %
603 % \subsubsection{Folding Mark Coordinate Counters}
604 %
605 % In this section, we define the counters for the actual
606 % coordinates of the folding marks.
607 % \begin{macrocode}
608 %% Counters with the actual coordinates of the folding marks.
609 \newcounter{@PCDC@Fold@A@Lft@X}
610 \newcounter{@PCDC@Fold@A@Lft@Y}
611 \newcounter{@PCDC@Fold@A@Rgt@X}
612 \newcounter{@PCDC@Fold@A@Rgt@Y}
613 \newcounter{@PCDC@Fold@B@Lft@X}
614 \newcounter{@PCDC@Fold@B@Lft@Y}
615 \newcounter{@PCDC@Fold@B@Rgt@X}
616 \newcounter{@PCDC@Fold@B@Rgt@Y}
617 \newcounter{@PCDC@Fold@C@Top@X}
618 \newcounter{@PCDC@Fold@C@Top@Y}
619 \newcounter{@PCDC@Fold@C@Bot@X}
620 \newcounter{@PCDC@Fold@C@Bot@Y}
621 \newcounter{@PCDC@Fold@D@Top@X}
622 \newcounter{@PCDC@Fold@D@Top@Y}
623 \newcounter{@PCDC@Fold@D@Bot@X}
624 \newcounter{@PCDC@Fold@D@Bot@Y}
625 \newcounter{@PCDC@Fold@E@Lft@X}
626 \newcounter{@PCDC@Fold@E@Lft@Y}
627 \newcounter{@PCDC@Fold@E@Rgt@X}
628 \newcounter{@PCDC@Fold@E@Rgt@Y}
629 \newcounter{@PCDC@Fold@F@Lft@X}
630 \newcounter{@PCDC@Fold@F@Lft@Y}
631 \newcounter{@PCDC@Fold@F@Rgt@X}
632 \newcounter{@PCDC@Fold@F@Rgt@Y}
633 \newcounter{@PCDC@Fold@G@Lft@X}
634 \newcounter{@PCDC@Fold@G@Lft@Y}
635 \newcounter{@PCDC@Fold@G@Rgt@X}
636 \newcounter{@PCDC@Fold@G@Rgt@Y}
637 \newcounter{@PCDC@Fold@H@X}
638 \newcounter{@PCDC@Fold@H@Y}
639 \newcounter{@PCDC@Fold@I@X}
640 \newcounter{@PCDC@Fold@I@Y}
641 \newcounter{@PCDC@Fold@J@X}
642 \newcounter{@PCDC@Fold@J@Y}
643 \newcounter{@PCDC@Fold@K@X}
644 \newcounter{@PCDC@Fold@K@Y}
645 \newcounter{@PCDC@Fold@L@X}
646 \newcounter{@PCDC@Fold@L@Y}
647 \newcounter{@PCDC@Fold@M@X}
648 \newcounter{@PCDC@Fold@M@Y}
649
650 % \end{macrocode}
651 %
652 % \subsubsection{Folding Mark Label Coordinate Counters}
653 %
654 % We now define the counters for the actual coordinates of the
655 % folding mark labels.
656 % \begin{macrocode}
657 %% Counters with the actual coordinates of the text boxes.
658 \newcounter{@PCDC@Fold@A@Lft@Label@X}
659 \newcounter{@PCDC@Fold@A@Lft@Label@Y}
660 \newcounter{@PCDC@Fold@A@Rgt@Label@X}
661 \newcounter{@PCDC@Fold@A@Rgt@Label@Y}
662 \newcounter{@PCDC@Fold@B@Lft@Label@X}
663 \newcounter{@PCDC@Fold@B@Lft@Label@Y}
664 \newcounter{@PCDC@Fold@B@Rgt@Label@X}
665 \newcounter{@PCDC@Fold@B@Rgt@Label@Y}
666 \newcounter{@PCDC@Fold@C@Top@Label@X}
667 \newcounter{@PCDC@Fold@C@Top@Label@Y}
668 \newcounter{@PCDC@Fold@C@Bot@Label@X}
669 \newcounter{@PCDC@Fold@C@Bot@Label@Y}
670 \newcounter{@PCDC@Fold@D@Top@Label@X}
671 \newcounter{@PCDC@Fold@D@Top@Label@Y}
672 \newcounter{@PCDC@Fold@D@Bot@Label@X}
673 \newcounter{@PCDC@Fold@D@Bot@Label@Y}
674 \newcounter{@PCDC@Fold@E@Lft@Label@X}
675 \newcounter{@PCDC@Fold@E@Lft@Label@Y}
676 \newcounter{@PCDC@Fold@E@Rgt@Label@X}
677 \newcounter{@PCDC@Fold@E@Rgt@Label@Y}
678 \newcounter{@PCDC@Fold@F@Lft@Label@X}
679 \newcounter{@PCDC@Fold@F@Lft@Label@Y}
680 \newcounter{@PCDC@Fold@F@Rgt@Label@X}
681 \newcounter{@PCDC@Fold@F@Rgt@Label@Y}
682 \newcounter{@PCDC@Fold@G@Lft@Label@X}
683 \newcounter{@PCDC@Fold@G@Lft@Label@Y}
684 \newcounter{@PCDC@Fold@G@Rgt@Label@X}
685 \newcounter{@PCDC@Fold@G@Rgt@Label@Y}
686 \newcounter{@PCDC@Fold@H@Label@X}
687 \newcounter{@PCDC@Fold@H@Label@Y}
688 \newcounter{@PCDC@Fold@I@Label@X}
689 \newcounter{@PCDC@Fold@I@Label@Y}
690 \newcounter{@PCDC@Fold@J@Label@X}
691 \newcounter{@PCDC@Fold@J@Label@Y}
692 \newcounter{@PCDC@Fold@K@Label@X}
693 \newcounter{@PCDC@Fold@K@Label@Y}
694 \newcounter{@PCDC@Fold@L@Label@X}
695 \newcounter{@PCDC@Fold@L@Label@Y}
696 \newcounter{@PCDC@Fold@M@Label@X}
697 \newcounter{@PCDC@Fold@M@Label@Y}
698
699 % \end{macrocode}
700 %
701 % \subsubsection{Text Box Coordinate Counters}
702 %
703 % As the last counters to be defined, here come the coordinate
704 % counters for the text boxes provided to the user.
705 % \begin{macrocode}
706 %% Counters with the actual coordinates of the text boxes.
707 \newcounter{@PCDC@Pouch@Matter@X}
708 \newcounter{@PCDC@Pouch@Matter@Y}
709 \newcounter{@PCDC@Back@Matter@X}
710 \newcounter{@PCDC@Back@Matter@Y}
711 \newcounter{@PCDC@Spine@Matter@X}
712 \newcounter{@PCDC@Spine@Matter@Y}
713 \newcounter{@PCDC@Latch@Matter@X}
714 \newcounter{@PCDC@Latch@Matter@Y}
715
716 % \end{macrocode}
717 %
718 % \subsection{Folding Scheme Implementation}
719 %
720 % We now turn to the implementation of the actual folding scheme
721 % typesetting macro. The macro takes an optional parameter that
722 % allows for scaling. The parameter is supposed to contain the
723 % diameter in millimeters of the CD that the CD case is to be
724 % printed for. Therefore, the default value is set to 120, which
725 % is the diameter in millimeters of a normal CD. Another common CD
726 % size is 80 millimeters, which is a maxi CD.
727 %
728 % The macro can broadly be broken into three parts:
729 % \begin{enumerate}
730 % \item The entire scheme is scaled according to the optional CD
731 % size parameter.
732 % \item The actual coordinates are computed and stored in the
733 % proper counters.
734 % \item The folding scheme is typeset and output is generated.
735 % \end{enumerate}
736 % \begin{macrocode}
737 %% The actual output function.
738 \newcommand{\@PCDC@Typeset@Scheme}[1][120]{%
739 %% Scale the output.
740 \setlength{\unitlength}{1mm}
741 \multiply\unitlength by #1
742 \divide\unitlength by 120
743 %%
744 %% Compute the actual coordinates.
745 %% Common coordinates.
746 \setcounter{@PCDC@Design@width}{\value{@PCDC@Back@Height}+2*\value{@PCDC@Fold@Length}}
747 \setcounter{@PCDC@Top@Lft@Fold}{\value{@PCDC@Fold@Length}+1}
748 \setcounter{@PCDC@Top@Rgt@Fold}{\value{@PCDC@Fold@Length}+\value{@PCDC@Back@Height}}
749 \setcounter{@PCDC@Bot@Lft@Fold}{\value{@PCDC@Fold@Length}+1}
750 \setcounter{@PCDC@Bot@Rgt@Fold}{\value{@PCDC@Fold@Length}+\value{@PCDC@Back@Height}}
751 \setcounter{@PCDC@Lwr@Top@Fold}{2*\value{@PCDC@Pouch@Height}+2*\value{@PCDC@Back@Height}-\value{@PCDC@Design@Height}}
752 \setcounter{@PCDC@Upr@Top@Fold}{\value{@PCDC@Lwr@Top@Fold}+2*\value{@PCDC@Spine@Height}}
753 \setcounter{@PCDC@Bot@Fold}{2*\value{@PCDC@Pouch@Height}}
754 \setcounter{@PCDC@Text@width}{\value{@PCDC@Back@Height}-2*\value{@PCDC@Text@Margin}}
755 \setcounter{@PCDC@Fold@Dash@Number}{\value{@PCDC@Fold@Length}/2}
756 %%
757 %% Fold mark coordinates.
758 \setcounter{@PCDC@Fold@A@Lft@X}{\value{@PCDC@Top@Lft@Fold}}
759 \setcounter{@PCDC@Fold@A@Lft@Y}{\value{@PCDC@Design@Height}}
760 \setcounter{@PCDC@Fold@A@Rgt@X}{\value{@PCDC@Top@Rgt@Fold}}
761 \setcounter{@PCDC@Fold@A@Rgt@Y}{\value{@PCDC@Design@Height}}
762 \setcounter{@PCDC@Fold@B@Lft@X}{\value{@PCDC@Bot@Lft@Fold}}
763 \setcounter{@PCDC@Fold@B@Lft@Y}{0}
764 \setcounter{@PCDC@Fold@B@Rgt@X}{\value{@PCDC@Bot@Rgt@Fold}}
765 \setcounter{@PCDC@Fold@B@Rgt@Y}{0}
766 \setcounter{@PCDC@Fold@C@Top@X}{\value{@PCDC@Top@Rgt@Fold}}
767 \setcounter{@PCDC@Fold@C@Top@Y}{\value{@PCDC@Design@Height}}
768 \setcounter{@PCDC@Fold@C@Bot@X}{\value{@PCDC@Bot@Rgt@Fold}}
769 \setcounter{@PCDC@Fold@C@Bot@Y}{0}
770 \setcounter{@PCDC@Fold@D@Top@X}{\value{@PCDC@Top@Lft@Fold}}
771 \setcounter{@PCDC@Fold@D@Top@Y}{\value{@PCDC@Design@Height}}
772 \setcounter{@PCDC@Fold@D@Bot@X}{\value{@PCDC@Bot@Lft@Fold}}
773 \setcounter{@PCDC@Fold@D@Bot@Y}{0}
774 \setcounter{@PCDC@Fold@E@Lft@X}{\value{@PCDC@Bot@Lft@Fold}}
775 \setcounter{@PCDC@Fold@E@Lft@Y}{\value{@PCDC@Bot@Fold}}
776 \setcounter{@PCDC@Fold@E@Rgt@X}{\value{@PCDC@Bot@Rgt@Fold}}
777 \setcounter{@PCDC@Fold@E@Rgt@Y}{\value{@PCDC@Bot@Fold}}
778 \setcounter{@PCDC@Fold@F@Lft@X}{\value{@PCDC@Bot@Lft@Fold}}
779 \setcounter{@PCDC@Fold@F@Lft@Y}{\value{@PCDC@Lwr@Top@Fold}}
780 \setcounter{@PCDC@Fold@F@Rgt@X}{\value{@PCDC@Bot@Rgt@Fold}}
781 \setcounter{@PCDC@Fold@F@Rgt@Y}{\value{@PCDC@Lwr@Top@Fold}}
782 \setcounter{@PCDC@Fold@G@Lft@X}{\value{@PCDC@Bot@Lft@Fold}}
783 \setcounter{@PCDC@Fold@G@Lft@Y}{\value{@PCDC@Upr@Top@Fold}}
784 \setcounter{@PCDC@Fold@G@Rgt@X}{\value{@PCDC@Bot@Rgt@Fold}}
785 \setcounter{@PCDC@Fold@G@Rgt@Y}{\value{@PCDC@Upr@Top@Fold}}
786 \setcounter{@PCDC@Fold@H@X}{\value{@PCDC@Bot@Rgt@Fold}}
787 \setcounter{@PCDC@Fold@H@Y}{\value{@PCDC@Pouch@Height}}
788 \setcounter{@PCDC@Fold@I@X}{\value{@PCDC@Bot@Rgt@Fold}}
789 \setcounter{@PCDC@Fold@I@Y}{\value{@PCDC@Pouch@Height}}
790 \setcounter{@PCDC@Fold@J@X}{\value{@PCDC@Bot@Lft@Fold}}
791 \setcounter{@PCDC@Fold@J@Y}{\value{@PCDC@Pouch@Height}}
792 \setcounter{@PCDC@Fold@K@X}{\value{@PCDC@Bot@Lft@Fold}}
793 \setcounter{@PCDC@Fold@K@Y}{\value{@PCDC@Pouch@Height}}
794 \setcounter{@PCDC@Fold@L@X}{\value{@PCDC@Top@Rgt@Fold}}
795 \setcounter{@PCDC@Fold@L@Y}{\value{@PCDC@Design@Height}-\value{@PCDC@Fold@Short@Length}}
796 \setcounter{@PCDC@Fold@M@X}{\value{@PCDC@Top@Lft@Fold}}
797 \setcounter{@PCDC@Fold@M@Y}{\value{@PCDC@Design@Height}-\value{@PCDC@Fold@Short@Length}}
798 %%
799 %% Fold mark label coordinates.
800 \setcounter{@PCDC@Fold@A@Lft@Label@X}{\value{@PCDC@Fold@A@Lft@X}-\value{@PCDC@Label@Sep}}
801 \setcounter{@PCDC@Fold@A@Lft@Label@Y}{\value{@PCDC@Fold@A@Lft@Y}+\value{@PCDC@Label@Sep}}
802 \setcounter{@PCDC@Fold@A@Rgt@Label@X}{\value{@PCDC@Fold@A@Rgt@X}+\value{@PCDC@Label@Sep}}
803 \setcounter{@PCDC@Fold@A@Rgt@Label@Y}{\value{@PCDC@Fold@A@Rgt@Y}+\value{@PCDC@Label@Sep}}
804 \setcounter{@PCDC@Fold@B@Lft@Label@X}{\value{@PCDC@Fold@B@Lft@X}-\value{@PCDC@Label@Sep}}
805 \setcounter{@PCDC@Fold@B@Lft@Label@Y}{\value{@PCDC@Fold@B@Lft@Y}-\value{@PCDC@Label@Sep}}
806 \setcounter{@PCDC@Fold@B@Rgt@Label@X}{\value{@PCDC@Fold@B@Rgt@X}+\value{@PCDC@Label@Sep}}
807 \setcounter{@PCDC@Fold@B@Rgt@Label@Y}{\value{@PCDC@Fold@B@Rgt@Y}-\value{@PCDC@Label@Sep}}
808 \setcounter{@PCDC@Fold@C@Top@Label@X}{\value{@PCDC@Fold@C@Top@X}+\value{@PCDC@Label@Sep}}
809 \setcounter{@PCDC@Fold@C@Top@Label@Y}{\value{@PCDC@Fold@C@Top@Y}-\value{@PCDC@Fold@Length}+\value{@PCDC@Label@Sep}}
810 \setcounter{@PCDC@Fold@C@Bot@Label@X}{\value{@PCDC@Fold@C@Bot@X}+\value{@PCDC@Label@Sep}}
811 \setcounter{@PCDC@Fold@C@Bot@Label@Y}{\value{@PCDC@Fold@C@Bot@Y}+\value{@PCDC@Fold@Length}-\value{@PCDC@Label@Sep}}
812 \setcounter{@PCDC@Fold@D@Top@Label@X}{\value{@PCDC@Fold@D@Top@X}-\value{@PCDC@Label@Sep}}
813 \setcounter{@PCDC@Fold@D@Top@Label@Y}{\value{@PCDC@Fold@D@Top@Y}-\value{@PCDC@Fold@Length}+\value{@PCDC@Label@Sep}}
814 \setcounter{@PCDC@Fold@D@Bot@Label@X}{\value{@PCDC@Fold@D@Bot@X}-\value{@PCDC@Label@Sep}}
815 \setcounter{@PCDC@Fold@D@Bot@Label@Y}{\value{@PCDC@Fold@D@Bot@Y}+\value{@PCDC@Fold@Length}-\value{@PCDC@Label@Sep}}
816 \setcounter{@PCDC@Fold@E@Lft@Label@X}{\value{@PCDC@Fold@E@Lft@X}-\value{@PCDC@Label@Sep}}
817 \setcounter{@PCDC@Fold@E@Lft@Label@Y}{\value{@PCDC@Fold@E@Lft@Y}-\value{@PCDC@Label@Sep}}
818 \setcounter{@PCDC@Fold@E@Rgt@Label@X}{\value{@PCDC@Fold@E@Rgt@X}+\value{@PCDC@Label@Sep}}
819 \setcounter{@PCDC@Fold@E@Rgt@Label@Y}{\value{@PCDC@Fold@E@Rgt@Y}-\value{@PCDC@Label@Sep}}
820 \setcounter{@PCDC@Fold@F@Lft@Label@X}{\value{@PCDC@Fold@F@Lft@X}-\value{@PCDC@Label@Sep}}
821 \setcounter{@PCDC@Fold@F@Lft@Label@Y}{\value{@PCDC@Fold@F@Lft@Y}+\value{@PCDC@Label@Sep}}
822 \setcounter{@PCDC@Fold@F@Rgt@Label@X}{\value{@PCDC@Fold@F@Rgt@X}+\value{@PCDC@Label@Sep}}
823 \setcounter{@PCDC@Fold@F@Rgt@Label@Y}{\value{@PCDC@Fold@F@Rgt@Y}+\value{@PCDC@Label@Sep}}
824 \setcounter{@PCDC@Fold@G@Lft@Label@X}{\value{@PCDC@Fold@G@Lft@X}-\value{@PCDC@Label@Sep}}
825 \setcounter{@PCDC@Fold@G@Lft@Label@Y}{\value{@PCDC@Fold@G@Lft@Y}+\value{@PCDC@Label@Sep}}
826 \setcounter{@PCDC@Fold@G@Rgt@Label@X}{\value{@PCDC@Fold@G@Rgt@X}+\value{@PCDC@Label@Sep}}
827 \setcounter{@PCDC@Fold@G@Rgt@Label@Y}{\value{@PCDC@Fold@G@Rgt@Y}+\value{@PCDC@Label@Sep}}
828 \setcounter{@PCDC@Fold@H@Label@X}{\value{@PCDC@Fold@H@X}+5*\value{@PCDC@Label@Sep}}
829 \setcounter{@PCDC@Fold@H@Label@Y}{\value{@PCDC@Fold@H@Y}+4*\value{@PCDC@Label@Sep}}
830 \setcounter{@PCDC@Fold@I@Label@X}{\value{@PCDC@Fold@I@X}+5*\value{@PCDC@Label@Sep}}
831 \setcounter{@PCDC@Fold@I@Label@Y}{\value{@PCDC@Fold@I@Y}-6*\value{@PCDC@Label@Sep}}
832 \setcounter{@PCDC@Fold@J@Label@X}{\value{@PCDC@Fold@J@X}-5*\value{@PCDC@Label@Sep}}
833 \setcounter{@PCDC@Fold@J@Label@Y}{\value{@PCDC@Fold@J@Y}+4*\value{@PCDC@Label@Sep}}
834 \setcounter{@PCDC@Fold@K@Label@X}{\value{@PCDC@Fold@K@X}-5*\value{@PCDC@Label@Sep}}
835 \setcounter{@PCDC@Fold@K@Label@Y}{\value{@PCDC@Fold@K@Y}-6*\value{@PCDC@Label@Sep}}
836 \setcounter{@PCDC@Fold@L@Label@X}{\value{@PCDC@Fold@L@X}+5*\value{@PCDC@Label@Sep}}
837 \setcounter{@PCDC@Fold@L@Label@Y}{\value{@PCDC@Fold@L@Y}+4*\value{@PCDC@Label@Sep}}
838 \setcounter{@PCDC@Fold@M@Label@X}{\value{@PCDC@Fold@M@X}-5*\value{@PCDC@Label@Sep}}
839 \setcounter{@PCDC@Fold@M@Label@Y}{\value{@PCDC@Fold@M@Y}+4*\value{@PCDC@Label@Sep}}
840 %%
841 %% Text box coordinates.
842 \setcounter{@PCDC@Pouch@Matter@X}{\value{@PCDC@Fold@Length}+\value{@PCDC@Text@Margin}}
843 \setcounter{@PCDC@Pouch@Matter@Y}{\value{@PCDC@Text@Margin}}
844 \setcounter{@PCDC@Back@Matter@X}{\value{@PCDC@Fold@Length}+\value{@PCDC@Text@Margin}}
845 \setcounter{@PCDC@Back@Matter@Y}{\value{@PCDC@Pouch@Height}+\value{@PCDC@Back@Height}-\value{@PCDC@Text@Margin}}
846 \setcounter{@PCDC@Spine@Matter@X}{\value{@PCDC@Fold@Length}+\value{@PCDC@Back@Height}/2}
847 \setcounter{@PCDC@Spine@Matter@Y}{\value{@PCDC@Back@Matter@Y}+\value{@PCDC@Spine@Height}/2+\value{@PCDC@Text@Margin}}
848 \setcounter{@PCDC@Latch@Matter@X}{\value{@PCDC@Fold@Length}+\value{@PCDC@Text@Margin}}
849 \setcounter{@PCDC@Latch@Matter@Y}{\value{@PCDC@Spine@Matter@Y}+\value{@PCDC@Spine@Height}/2+\value{@PCDC@Text@Margin}}
850 %%
851 %% Typeset the folding scheme
852 \begin{picture}(\value{@PCDC@Design@width}, \value{@PCDC@Design@Height})
853 %% Fold mark 1, left
854 \put(\value{@PCDC@Fold@A@Lft@X}, \value{@PCDC@Fold@A@Lft@Y}){\line(-1, 0){\value{@PCDC@Fold@Length}}}
855 \put(\value{@PCDC@Fold@A@Lft@Label@X}, \value{@PCDC@Fold@A@Lft@Label@Y}){\makebox(0, 0)[br]{\rotatebox{180}{1}}}
856 %%
857 %% Fold mark 1, right
858 \put(\value{@PCDC@Fold@A@Rgt@X}, \value{@PCDC@Fold@A@Rgt@Y}){\line(1, 0){\value{@PCDC@Fold@Length}}}
859 \put(\value{@PCDC@Fold@A@Rgt@Label@X}, \value{@PCDC@Fold@A@Rgt@Label@Y}){\makebox(0, 0)[bl]{\rotatebox{180}{1}}}
860 %%
861 %% Fold mark 2, left
862 \put(\value{@PCDC@Fold@B@Lft@X}, \value{@PCDC@Fold@B@Lft@Y}){\line(-1, 0){\value{@PCDC@Fold@Length}}}
863 \put(\value{@PCDC@Fold@B@Lft@Label@X}, \value{@PCDC@Fold@B@Lft@Label@Y}){\makebox(0, 0)[tr]{2}}
864 %%
865 %% Fold mark 2, right
866 \put(\value{@PCDC@Fold@B@Rgt@X}, \value{@PCDC@Fold@B@Rgt@Y}){\line(1, 0){\value{@PCDC@Fold@Length}}}
867 \put(\value{@PCDC@Fold@B@Rgt@Label@X}, \value{@PCDC@Fold@B@Rgt@Label@Y}){\makebox(0, 0)[tl]{2}}
868 %%
869 %% Fold mark 3, top
870 \put(\value{@PCDC@Fold@C@Top@X}, \value{@PCDC@Fold@C@Top@Y}){\line(0, -1){\value{@PCDC@Fold@Length}}}
871 \put(\value{@PCDC@Fold@C@Top@Label@X}, \value{@PCDC@Fold@C@Top@Label@Y}){\makebox(0, 0)[bl]{\rotatebox{90}{3}}}
872 %%
873 %% Fold mark 3, bottom
874 \put(\value{@PCDC@Fold@C@Bot@X}, \value{@PCDC@Fold@C@Bot@Y}){\line(0, 1){\value{@PCDC@Fold@Length}}}
875 \put(\value{@PCDC@Fold@C@Bot@Label@X}, \value{@PCDC@Fold@C@Bot@Label@Y}){\makebox(0, 0)[tl]{\rotatebox{90}{3}}}
876 %%
877 %% Fold mark 4, top
878 \put(\value{@PCDC@Fold@D@Top@X}, \value{@PCDC@Fold@D@Top@Y}){\line(0, -1){\value{@PCDC@Fold@Length}}}
879 \put(\value{@PCDC@Fold@D@Top@Label@X}, \value{@PCDC@Fold@D@Top@Label@Y}){\makebox(0, 0)[br]{\rotatebox{270}{4}}}
880 %%
881 %% Fold mark 4, bottom
882 \put(\value{@PCDC@Fold@D@Bot@X}, \value{@PCDC@Fold@D@Bot@Y}){\line(0, 1){\value{@PCDC@Fold@Length}}}
883 \put(\value{@PCDC@Fold@D@Bot@Label@X}, \value{@PCDC@Fold@D@Bot@Label@Y}){\makebox(0, 0)[tr]{\rotatebox{270}{4}}}
884 %%
885 %% Fold mark 5, left
886 \multiput(\value{@PCDC@Fold@E@Lft@X}, \value{@PCDC@Fold@E@Lft@Y})(-2, 0){\value{@PCDC@Fold@Dash@Number}}{\line(-1, 0){1}}
887 \put(\value{@PCDC@Fold@E@Lft@Label@X}, \value{@PCDC@Fold@E@Lft@Label@Y}){\makebox(0, 0)[tr]{5 (bottom)}}
888 %%
889 %% Fold mark 5, right
890 \multiput(\value{@PCDC@Fold@E@Rgt@X}, \value{@PCDC@Fold@E@Rgt@Y})(2, 0){\value{@PCDC@Fold@Dash@Number}}{\line(1, 0){1}}
891 \put(\value{@PCDC@Fold@E@Rgt@Label@X}, \value{@PCDC@Fold@E@Rgt@Label@Y}){\makebox(0, 0)[tl]{5 (bottom)}}
892 %%
893 %% Fold mark 6, left
894 \multiput(\value{@PCDC@Fold@F@Lft@X}, \value{@PCDC@Fold@F@Lft@Y})(-2, 0){\value{@PCDC@Fold@Dash@Number}}{\line(-1, 0){1}}
895 \put(\value{@PCDC@Fold@F@Lft@Label@X}, \value{@PCDC@Fold@F@Lft@Label@Y}){\makebox(0, 0)[br]{\rotatebox{180}{6 (top)}}}
896 %%
897 %% Fold mark 6, right
898 \multiput(\value{@PCDC@Fold@F@Rgt@X}, \value{@PCDC@Fold@F@Rgt@Y})(2, 0){\value{@PCDC@Fold@Dash@Number}}{\line(1, 0){1}}
899 \put(\value{@PCDC@Fold@F@Rgt@Label@X}, \value{@PCDC@Fold@F@Rgt@Label@Y}){\makebox(0, 0)[bl]{\rotatebox{180}{6 (top)}}}
900 %%
901 %% Fold mark 7, left
902 \multiput(\value{@PCDC@Fold@G@Lft@X}, \value{@PCDC@Fold@G@Lft@Y})(-2, 0){\value{@PCDC@Fold@Dash@Number}}{\line(-1, 0){1}}
903 \put(\value{@PCDC@Fold@G@Lft@Label@X}, \value{@PCDC@Fold@G@Lft@Label@Y}){\makebox(0, 0)[br]{\rotatebox{180}{7 (top)}}}
904 %%
905 %% Fold mark 7, right
906 \multiput(\value{@PCDC@Fold@G@Rgt@X}, \value{@PCDC@Fold@G@Rgt@Y})(2, 0){\value{@PCDC@Fold@Dash@Number}}{\line(1, 0){1}}
907 \put(\value{@PCDC@Fold@G@Rgt@Label@X}, \value{@PCDC@Fold@G@Rgt@Label@Y}){\makebox(0, 0)[bl]{\rotatebox{180}{7 (top)}}}
908 %%
909 %% Fold mark 8
910 \put(\value{@PCDC@Fold@H@X}, \value{@PCDC@Fold@H@Y}){\line(1, 1){\value{@PCDC@Fold@Length}}}
911 \put(\value{@PCDC@Fold@H@Label@X}, \value{@PCDC@Fold@H@Label@Y}){\makebox(0, 0)[tl]{\rotatebox{ 45}{8}}}
912 %%
913 %% Fold mark 9
914 \put(\value{@PCDC@Fold@I@X}, \value{@PCDC@Fold@I@Y}){\line(1, -1){\value{@PCDC@Fold@Length}}}
915 \put(\value{@PCDC@Fold@I@Label@X}, \value{@PCDC@Fold@I@Label@Y}){\makebox(0, 0)[tr]{\rotatebox{315}{9}}}
916 %%
917 %% Fold mark 10
918 \put(\value{@PCDC@Fold@J@X}, \value{@PCDC@Fold@J@Y}){\line(-1, 1){\value{@PCDC@Fold@Length}}}
919 \put(\value{@PCDC@Fold@J@Label@X}, \value{@PCDC@Fold@J@Label@Y}){\makebox(0, 0)[tr]{\rotatebox{315}{10}}}
920 %%
921 %% Fold mark 11
922 \put(\value{@PCDC@Fold@K@X}, \value{@PCDC@Fold@K@Y}){\line(-1, -1){\value{@PCDC@Fold@Length}}}
923 \put(\value{@PCDC@Fold@K@Label@X}, \value{@PCDC@Fold@K@Label@Y}){\makebox(0, 0)[tl]{\rotatebox{ 45}{11}}}
924 %%
925 %% Fold mark 12
926 \put(\value{@PCDC@Fold@L@X}, \value{@PCDC@Fold@L@Y}){\line(1, 1){\value{@PCDC@Fold@Short@Length}}}
927 \put(\value{@PCDC@Fold@L@Label@X}, \value{@PCDC@Fold@L@Label@Y}){\makebox(0, 0)[tl]{\rotatebox{ 45}{12}}}
928 %%
929 %% Fold mark 13
930 \put(\value{@PCDC@Fold@M@X}, \value{@PCDC@Fold@M@Y}){\line(-1, 1){\value{@PCDC@Fold@Short@Length}}}
931 \put(\value{@PCDC@Fold@M@Label@X}, \value{@PCDC@Fold@M@Label@Y}){\makebox(0, 0)[tr]{\rotatebox{315}{13}}}
932 %%
933 %% Latch matter
934 \put(\value{@PCDC@Latch@Matter@X}, \value{@PCDC@Latch@Matter@Y}){\makebox(0, 0)[bl]{\rotatebox{180}{\parbox{\value{@PCDC@Text@width}\unitlength}{\@PCDC@Latch@Matter}}}}
935 %%
936 %% Spine matter
937 \put(\value{@PCDC@Spine@Matter@X}, \value{@PCDC@Spine@Matter@Y}){\makebox(0, 0)[cc]{\@PCDC@Spine@Matter}}
938 %%
939 %% Back matter
940 \put(\value{@PCDC@Back@Matter@X}, \value{@PCDC@Back@Matter@Y}){\makebox(0, 0)[tl]{\parbox{\value{@PCDC@Text@width}\unitlength}{\@PCDC@Back@Matter}}}
941 %%
942 %% Pouch matter
943 \put(\value{@PCDC@Pouch@Matter@X}, \value{@PCDC@Pouch@Matter@Y}){\makebox(0, 0)[bl]{\rotatebox{180}{\parbox{\value{@PCDC@Text@width}\unitlength}{\@PCDC@Pouch@Matter}}}}
944 \end{picture}}
945
946 % \end{macrocode}
947 %
948 % \subsection{Clean Up}
949 %
950 % And finally, we do some housekeeping.
951 % \begin{macrocode}
952 \makeatother
953 % \end{macrocode}
954 %
955 % That's all.
956 %
957 % \PrintChanges
958 % \newpage
959 % \PrintIndex
960 %
961 % \Finale
962 %
963 \endinput
964 %
965 % Local Variables:
966 % mode: latex
967 % TeX-master: t
968 % End: