The cd-cover package

Christian Holm

97/12/24

Abstract

This package is intended for typesetting covers for CD (Compact Discs). Now that CD–burners are largely avaliable, I believ a packae like this is in order, to make nice covers in the L^{A}TEX–way.

Contents

1 Introduction 1

2 Use 1

3 implementation 3 3.1 Identification and Dependencies . . . . . . . . . . . . . . . . . . . . 3 3.2 Initialzation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.3 The Booklet Sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.4 The back page of the cover . . . . . . . . . . . . . . . . . . . . . . 4 3.5 Signing Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1 Introduction

This package is for typesetting CD covers. It provides three new environments:

rightpagebooklet, leftpagebooklet and backpage, each designed to meet the

restrictions the CD covers imposes on format etc.

2 Use

Notice, the left side of booklet pages is supposed to be a later page if the right hand side is to be the front page, or a page facing in the same direction as the front page. Otherwise, the left side is supposed to be a later page, then the right side. Notice, this way of putting the pages together means, you should specify the contents of the pages in the order of binding.

Now what does order of binding means? Well, since the front page should be on the same sheet and same side of the sheet, as the back page^{1}, and on the opposite side of of the sheet should be the page just after the front page, and the page just before the back page, you would have to specify the contents of the front page as the first argument to \bookletsheet, then the back page as the second argument to \bookletsheet. Then you should proceed to specify the contents of page immidate after the frontpage as the second argument to \bookletsheet and the page just before the back page as the first bookletsheet, and so on.

1of the booklet, not the cover.

To put it more mathematically: Suppose your booklet contains N pages. Then we name the first page as 1, and the back page as N. Then the order of specification of contents should follow the follwing lines:

leftbookletpage = N
rightbookletpage = 1
leftbookletpage = 2
rightbookletpage = N − 1
leftbookletpage = N − 2
rightbookletpage = 3
leftbookletpage = 4
rightbookletpage = N − 3
…
leftbookletpage = \frac{N}{2} + 2
rightbookletpage = \frac{N}{2} − 2
leftbookletpage = \frac{N}{2} − 1
rightbookletpage = \frac{N}{2} − 2

These equations imply that N is divisable by 4 (your booklet contains 4, 8, 16, 20, … pages). This may seem as a complication, but you can easile specify empty page by saying either:

   \begin{leftbookletpage}
   \end{leftbookletpage}

or

   \begin{rightbookletpage}
   \end{rightbookletpage}

whatever is suitable for your booklet. Of course, if your booklet only contains a frontpage and a (possibly empty) backpage, you only have to specify those two.

No matter how many pages you’ve got, it is imperativ you specify them in the order leftbookletpage rightbookletpage, otherwise, the pages will come out in the completly wrong order!

To recap, you should have a minimum file containg:

   \documentclass[landscape]{article}
   \usepackage{cd-cover}
     ...

     Any other preamble commands you like
     ...
   \begin{document}
   \bookletsheet{
       ...
       What ever you want on the back of the booklet
       ...
     }{
       ...
       What ever you need on the front of the booklet
       ...
     }

Repeat the two enviroments above as many times as you want, to produce more pages for the booklet. If your dvips is set up right, you can make doublepage printing, and get a need output. Finally you should make the back of the cover:

   \backpagesheet{titles-on-the-sides-of-the-cover}{
     ...
     What ever you want on the back of the cover
     ...
   }
   \end{document}

Please notice, you can not use floats (table, figure) on the cover, and if you want a tabular environment, do not use the optional placement argument. You can, however, include Postscript pictures, L^{A}TEX pictures etc, through the prober use of the relevant commands and packages.

Enjoy, Christian Holm.

3 implementation

Here is the code used in this package, commented and explained.

3.1 Identification and Dependencies

 1 \NeedsTeXFormat{LaTeX2e}
 2 \def\fileversion{v1.0}
 3 \def\filedate{97/12/24}
 4 \ProvidesPackage{cd-cover}[\filedate\space\fileversion\space cd-cover
 5  package.]
 6 % Booklet is (120 x 120)mm^2
 7 % Backcover is (118 x (7 + 137 + 7))mm^2

Package rotating is needed for the titles on the back of the cover. This means you will see something wrong, when you preview the .dvi file, but if you view the PostScript file it should look correctly. This is a bug of rotating not cd-cover, I’m sorry!

 8 \RequirePackage{rotating}

No page numbers is needed.

 9 \pagestyle{empty}

3.2 Initialzation

The \unitlenght is set to 1mm. Notice this means you have to give the dimensions of the booklet and backpage in terms of milimeters. Margins is set to insure everything can fit into the paper.

10 \oddsidemargin  0.55in
11 \evensidemargin 0.55in
12 \setlength{\unitlength}{1mm}

3.3 The Booklet Sheets

\bookletsheet This is the command that produces the sheets for the booklet. It takes two arguments: the left and right side contens.

13 \newcommand{\bookletsheet}[2]{%

We put everything inside a picture, so that the placements is perfectly controled.

14 \noindent
15 \begin{center}
16 \begin{picture}(240,120)

Next we draw a frame around the page, so that it is easily cut out.

17  \put(0,0){\line(1,0){240}}
18  \put(0,0){\line(0,1){120}}
19  \put(0,120){\line(1,0){240}}
20  \put(240,0){\line(0,1){120}}

Two marks are produced to indicate the folding line.

21  \put(120,0){\line(0,-1){5}}
22  \put(120,120){\line(0,1){5}}

The pages are put on the sheet. You may thin we take up a lot of TEX’s memory, by having long arguments to \bookletsheet,and you are right, we do, but proberly not more then usual, since the pages are rather small.

23  \put(5,60){\begin{minipage}{11cm}#1\end{minipage}}
24  \put(125,60){\begin{minipage}{11cm}#2\end{minipage}}
25 \end{picture}
26 \end{center}

27 }

3.4 The back page of the cover

\backsheet Just as above, we define a command to put everything on the sheet. This also produces a frame around the page, but now 4 folding marks are present.

28 \newcommand{\backsheet}[2]{%
29 \begin{picture}(151,118)
30  \put(0,0){\line(1,0){151}}
31  \put(0,0){\line(0,1){118}}
32  \put(151,0){\line(0,1){118}}
33  \put(0,118){\line(1,0){151}}

The folding marks.

34  \put(7,0){\line(0,-1){5}}
35  \put(7,118){\line(0,1){5}}
36  \put(144,0){\line(0,-1){5}}
37  \put(144,118){\line(0,1){5}}

Now for the slips.

38  \put(4,5){
39  \begin{rotate}{90}
40  #1
41  \end{rotate}

42 }

43  \put(144,113){
44  \begin{rotate}{-90}
45  #1
46  \end{rotate}

47 }

And then the main body

48  \put(12,59){
49  \begin{minipage}{12,7cm}
50  #2
51  \end{minipage}

52 }

53 \end{picture}

54 }

3.5 Signing Off

We remind the user of the landscape mode.

55 \AtEndDocument{
56 \typeout{
57  The dvi file should be processed by dvips with the '-t landscape' option

58 } 59 }

Index

Numbers written in italic refer to the page where the corresponding entry is described, the ones underlined to the code line of the definition, the rest to the code lines where the entry is used.

A

\AtEndDocument . . . . 55

B

\backsheet . . . . . . . \underline{28}
\bookletsheet . . . . . \underline{13}

E

\evensidemargin . . . 11

L \line . . . . . 17–22, 30–37

O

                          \oddsidemargin . . . . 10

P

                          \pagestyle . . . . . . . . 9

S

                                                   \setlength . . . . . . . 12

T \typeout . . . . . . . . . 56

U

                                                   \unitlength . . . . . . . 12

Change History

v1.0 General: The creation of cd-cover . 1