Sunteți pe pagina 1din 22

Class for book covers and dust jackets

bookcover.cls
v1.1 (2016/05/01)
Tibor Tmcs
tomacs@ektf.hu

Contents
1 Book cover parts and
1.1 Sizes . . . . . . . .
1.2 Trimmed version .
1.3 Background parts .
1.4 Foreground parts .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

1
2
2
2
3

2 Description
2.1 Loading class . . . . . . . . . . .
2.2 Commands . . . . . . . . . . . .
2.2.1 Background colors . . . .
2.2.2 Background pictures . . .
2.2.3 Background Tik Z figures
2.2.4 First foreground . . . . .
2.2.5 Second foreground . . . .
2.2.6 Making book cover . . . .
2.3 Layers . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

4
4
4
5
5
5
6
6
7
7

3 Examples
3.1 A dust jacket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 A two-sided book cover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3 Drawing bar code by pst-barcode package . . . . . . . . . . . . . . . . . . . . . . . . . . .

7
7
9
12

4 Implementation

13

sizes
. . . .
. . . .
. . . .
. . . .

.
.
.
.

.
.
.
.

.
.
.
.

Book cover parts and sizes

In the following picture we can see a typical dust jacket. Its main parts are back flap, back, spine, front
and front flap. Typographically, a book cover is a dust jacket without flaps, the only difference is that
the book cover is a fixed part of the book, whereas the dust jacket is removable.
BACK

BACK FLAP

FRONT

SPINE

FRONT FLAP

When we prepare a cover for printing, some marks are needed to know where to trim or fold the paper.
These marks determine a special area of the sheet, which is called bleed (see the next figure). The
background will be expanded onto the bleed, taking account of slight inaccuracy when trimming.
1

BLEED

1
SPINE

BACK
FLAP

BACK

FRONT
FLAP

FRONT

1
1
1

1.1

: trim marks

: fold marks

: printed box

Sizes

We have to give the following sizes to prepare a cover: coverwidth, coverheight, spinewidth,
flapwidth, marklength, bleedwidth.
marklength
bleedwidth

SPINE

BACK
FLAP

BACK

FRONT

FRONT
FLAP

coverheight

bleedwidth
marklength
marklength
bleedwidth

flapwidth

coverwidth

spinewidth

coverwidth

flapwidth

bleedwidth
marklength

1.2

Trimmed version

After trimming we get the following result:

1.3

SPINE

BACK
FLAP

FRONT

FRONT
FLAP

spine

front

front
flap

BACK

Background parts

Important: The bleed is a part of the background!


In case flapwidth>0mm

back
flap

back

whole

whole without flaps

In case flapwidth=0mm

spine

back

front

whole = whole without flaps

1.4

Foreground parts

Important: The bleed is not part of the foreground!


In case flapwidth>0mm
above back

back
flap

back

above front

spine

below back

front

below front

front
flap

In case flapwidth=0mm
above back

back

above front

spine

below back

2
2.1

front

below front

Description
Loading class

The class bookcover requires the services of the class article and the following packages: kvoptions,
geometry, graphicx, calc, xcolor, ifthen, tikz, eso-pic, textpos.
Load the class as usual, with
\documentclass[hoptionsi]{bookcover}
book cover size options (see Subsection 1.1)
coverwidth=hlengthi
coverheight=hlengthi
spinewidth=hlengthi
flapwidth=hlengthi
marklength=hlengthi
bleedwidth=hlengthi
other options
markthick=hlengthi
markcolor=hcolor i
10pt
11pt
12pt
grid
bgtikznodes
bgtikzclip
trimmed

default values
170mm
240mm
5mm
0mm
10mm
5mm

Thickness of marks (default value: 0.4pt).


Color of marks (default value: red).
Normal font size is 10 pt (default).
Normal font size is 11 pt.
Normal font size is 12 pt.
Grid for checking sizes.
See Subsubsection 2.2.3.
See Subsubsection 2.2.3.
It shows trimmed version (see Subsection 1.2).

Example:
\documentclass[flapwidth=50mm,spinewidth=15mm]{bookcover}

2.2

Commands

This class defines two commands:


\setbookcover{hmain layer i}{hparti}{hcontenti}
hmain layer i (see the following subsubsections)
bgcolor, bgpic, bgtikz, fgfirst, fgsecond
The hparti and the hcontenti depend on the hmain layer i (see the following subsubsections).
\makebookcover

2.2.1

Background colors

\setbookcover{bgcolor}{hbackground parti}{hcolorsi}
hbackground parti (see Subsection 1.3)
back, front, spine, front flap, back flap, whole without flaps, whole
hcolorsi (options of command \fill of package tikz)
color=hcolor namei (See hcolor namei in the package xcolor.)
top color=hcolor namei
bottom color=hcolor namei
middle color=hcolor namei
inner color=hcolor namei
outer color=hcolor namei
ball color=hcolor namei
shading angle=hdegreesi (This rotates the shading by the given angle.)
Example:
\setbookcover{bgcolor}{whole without flaps}{
top color=white, bottom color=blue!50!black, shading angle=60}

2.2.2

Background pictures

\setbookcover{bgpic}{hbackground parti}{hpicture filei}


hbackground parti (see Subsection 1.3)
back, front, spine, front flap, back flap, whole without flaps, whole
The picture will be rescaled according to the sizes of the current background part.
Example:
\setbookcover{bgpic}{front flap}{fig.png}

2.2.3

Background Tik Z figures

\setbookcover{bgtikz}{hbackground parti}{htikz codei}


hbackground parti (see Subsection 1.3)
back, front, spine, front flap, back flap, whole without flaps, whole
The Tik Z figure will be placed to the upper left corner of the current background part, without resizeing.
Example:
\setbookcover{bgtikz}{back}{
\fill[blue] (0mm,250mm)--(100mm,250mm)--(100mm,245mm)--(0mm,110mm)--cycle;
\fill[yellow] (5mm,5mm)--(175mm,245mm)--(175mm,0mm)--(5mm,0mm)--cycle;}

Using the option bgtikznodes of the document class:


the origin moves to the lower left corner of the current background part;
two nodes come into being: current part and current trimmed part. (Thank Zunbeltz Izaola
for the idea.)
Example:
\setbookcover{bgtikz}{whole}{
\draw[blue] (current part.south west) rectangle (current part.north east);
\fill[gray](current trimmed part.south east) rectangle (current trimmed part.north west);
\fill[green] (0,0) circle [radius=2mm];}
\setbookcover{bgtikz}{spine}{
\fill[orange] (current part.center) circle [radius=8mm];}

The option bgtikzclip of the document class works like bgtikznodes, but it clips the current part. For
example, the result of the previous code with option bgtikzclip:

2.2.4

First foreground

\setbookcover{fgfirst}{hforeground parti}{hcontenti}
hforeground parti (see Subsection 1.4)
back, front, spine, front flap, back flap,
above front, below front, above back, below back
The first foreground is the top layer of the book cover (see Subsection 2.3).
Example:
\setbookcover{fgfirst}{spine}{
\vfill
\begin{center}
\rotatebox[origin=c]{90}{\bfseries Annales Mathematicae et Informaticae}
\end{center}
\vfill}

2.2.5

Second foreground

\setbookcover{fgsecond}{hforeground parti}{hcontenti}
hforeground parti (see Subsection 1.4)
back, front, spine, front flap, back flap
The second foreground is under the first foreground (see Subsection 2.3).
Example: The following code puts a picture behind the TEXT on the front cover:
\setbookcover{fgsecond}{front}{
\vfill
\begin{center}
\includegraphics[width=80mm]{pic.png}
\end{center}
\vfill}
\setbookcover{fgfirst}{front}{

\vfill
\begin{center}
TEXT
\end{center}
\vfill}

2.2.6

Making book cover

\makebookcover
This command makes the book cover by using contents of background and foreground.

2.3

Layers

In the following table we can see the hierarchy of the layers:

fgfirst
fgsecond
bgtikz

bgpic

bgcolor

above front, below front, above back, below back top layer
back, front, spine, front flap, back flap

back, front, spine, front flap, back flap

back, front, spine, front flap, back flap

whole without flaps

whole

back, front, spine, front flap, back flap

whole without flaps

whole

back, front, spine, front flap, back flap

whole without flaps

whole
bottom layer

For example, in case


\setbookcover{bgpic}{whole}{fig1.jpg}
\setbookcover{bgpic}{front}{fig2.jpg}
\setbookcover{fgsecond}{front}{fig3.jpg}
\setbookcover{fgfirst}{front}{TEXT}

the TEXT is above the fig3.jpg, the fig3.jpg is above the fig2.jpg and the fig2.jpg is above the
fig1.jpg.

3
3.1

Examples
A dust jacket

\documentclass[11pt,spinewidth=25mm,coverwidth=150mm,coverheight=200mm,flapwidth=60mm]{bookcover}
\usepackage{contour,lipsum}
\contourlength{1pt}
\definecolor{lightbrown}{RGB}{176,88,0}
\colorlet{title}{yellow!60!black}
\begin{document}
% Black background color on the whole cover
\setbookcover{bgcolor}{whole}{color=black}
% Brown background picture on the whole cover, without the flaps
\setbookcover{bgpic}{whole without flaps}{./figures/bg.jpg}
% Vertical light brown transparent trails on the back cover by a tikz code
\setbookcover{bgtikz}{back}{
\fill[opacity=0.3,color=lightbrown]

(0mm,0mm) rectangle (20mm,210mm) (100mm,0mm) rectangle (150mm,210mm);}


% Vertical light brown transparent trails on the front cover by a tikz code
\setbookcover{bgtikz}{front}{
\fill[opacity=0.3,color=lightbrown]
(0mm,0mm) rectangle (50mm,210mm) (130mm,0mm) rectangle (150mm,210mm);}
% Remark
\setbookcover{fgfirst}{above front}{\bfseries\color{blue}SAMPLE DUST JACKET}
% Text on the front cover
\setbookcover{fgfirst}{front}{
\centering
\vspace{60mm}
\color{title}\sffamily\bfseries
\resizebox*{50mm}{8mm}{\contour[120]{black}{Rose Taylor}}
\par
\vspace{20mm}
\resizebox*{90mm}{40mm}{\parbox{35mm}{
\centering
\contour[120]{black}{PROBABILITY}\\
\contour[120]{black}{THEORY}\\}}}
% Picture (cards.png) on the front, behind the title
\setbookcover{fgsecond}{front}{
\vspace{70mm}
\centering
\includegraphics[width=8cm]{./figures/cards.png}}
% Text on the spine
\setbookcover{fgfirst}{spine}{
\vfill
\centering
\rotatebox[origin=c]{90}{\contour[120]{black}{
\color{title}\huge\sffamily\bfseries
Rose Taylor -- Probability Theory}}
\vfill}
% Text on the back cover
\setbookcover{fgfirst}{back}{
\centering
\vspace{20mm}
\parbox{110mm}{\color{white}\lipsum[1]}}
% Text and picture (dice.png) on the front flap
\setbookcover{fgfirst}{front flap}{
\centering
\vspace{20mm}
\parbox{40mm}{\color{white}\lipsum[2]}
\vfill
\includegraphics[width=30mm]{./figures/dice.png}
\vspace{10mm}}
% Text on the back flap
\setbookcover{fgfirst}{back flap}{
\centering
\vspace{20mm}
\parbox{40mm}{\color{white}\lipsum[2]}}
% Making the dust jucket
\makebookcover
\end{document}

Nam dui ligula, fringilla


a, euismod sodales,
sollicitudin vel, wisi.
Morbi auctor lorem non
justo. Nam lacus libero,
pretium at, lobortis vitae, ultricies et, tellus.
Donec aliquet, tortor
sed accumsan bibendum, erat ligula aliquet
magna, vitae ornare
odio metus a mi. Morbi
ac orci et nisl hendrerit
mollis. Suspendisse ut
massa. Cras nec ante.
Pellentesque a nulla.
Cum sociis natoque
penatibus et magnis
dis parturient montes,
nascetur ridiculus mus.
Aliquam
tincidunt
urna. Nulla ullamcorper vestibulum turpis.
Pellentesque
cursus
luctus mauris.

3.2

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget,
consectetuer id, vulputate a, magna. Donec vehicula augue eu
neque. Pellentesque habitant morbi tristique senectus et netus et
malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra
metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer
sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent
eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur
auctor semper nulla. Donec varius orci eget risus. Duis nibh mi,
congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci
sit amet orci dignissim rutrum.

Rose Taylor Probability Theory

The result:

Rose
Rose
Taylor
Rose Taylor
Taylor

PROBABILITY
THEORY

A two-sided book cover

The outside and the inside are edited in the same document.
\documentclass[markcolor=black,spinewidth=15mm,bgtikznodes]{bookcover}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{url}
\definecolor{amiyellow}{cmyk}{0,0,.5,0}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The outside of the book cover
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Yellow triangle on the back cover by tikz code
\setbookcover{bgtikz}{back}{
\fill[color=amiyellow](.5,.5)--(17.5,24.5)--(17.5,0)--(.5,0)--cycle;}
% Yellow triangle on the front cover by tikz code
\setbookcover{bgtikz}{front}{
\fill[color=amiyellow](0,0)--(0,24.5)--(17,.5)--(17,0)--cycle;}
% Yellow background color on the spine
\setbookcover{bgcolor}{spine}{color=red!50}
% Remark
\setbookcover{fgfirst}{above front}{
\color{red}\textsc{Annales Mathematicae et Informaticae} book cover -- outside}
% Text on the spine
\setbookcover{fgfirst}{spine}{
\vfill
\centering
\rotatebox[origin=c]{270}{
\footnotesize\bfseries
ANNALES MATHEMATICAE ET INFORMATICAE 43.\ (2014)}
\vfill}
% Text and pictures (summa.pdf, ekflogo.pdf) on the front cover

Nam dui ligula, fringilla


a, euismod sodales,
sollicitudin vel, wisi.
Morbi auctor lorem non
justo. Nam lacus libero,
pretium at, lobortis vitae, ultricies et, tellus.
Donec aliquet, tortor
sed accumsan bibendum, erat ligula aliquet
magna, vitae ornare
odio metus a mi. Morbi
ac orci et nisl hendrerit
mollis. Suspendisse ut
massa. Cras nec ante.
Pellentesque a nulla.
Cum sociis natoque
penatibus et magnis
dis parturient montes,
nascetur ridiculus mus.
Aliquam
tincidunt
urna. Nulla ullamcorper vestibulum turpis.
Pellentesque
cursus
luctus mauris.

\setbookcover{fgfirst}{front}{
\vspace{30.5mm}
\centering
{\huge\bfseries ANNALES\\ MATHEMATICAE ET\\ INFORMATICAE\\[13mm]}
{\large\bfseries TOMUS 43.\ (2014)}\\[10mm]
\includegraphics{./figures/summa.pdf}\\[5mm]
{\large COMMISSIO REDACTORIUM}\\[3mm]
\parbox{123mm}{
\centering
Sndor Bcs (Debrecen), Sonja Gorjanc (Zagreb), Tibor Gyimthy (Szeged),\\
Mikls Hoffmann (Eger), Jzsef Holovcs (Eger), Lszl Kovcs (Miskolc),\\
Lszl Kozma (Budapest), Klmn Liptai (Eger), Florian Luca (Mexico),\\
Giuseppe Mastroianni (Potenza), Ferenc Mtys (Eger),\\
kos Pintr (Debrecen), Mikls Ront (Miskolc), Lszl Szalay (Sopron),\\
Jnos Sztrik (Debrecen), Gary Walsh (Ottawa)\par}
\vfill
\includegraphics[height=20mm]{./figures/ekflogo.pdf}
\vfill
{\large\bfseries HUNGARIA, EGER}
\vfill}
% Making the outside book cover
\makebookcover
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The inside of the book cover
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Remark
\setbookcover{fgfirst}{above front}{
\color{red}\textsc{Annales Mathematicae et Informaticae} book cover -- inside}
% Text on the front cover (it is back of the inside book cover!)
\setbookcover{fgfirst}{front}{
\vspace{27mm}
\begin{center}
\bfseries
ANNALES MATHEMATICAE ET INFORMATICAE\\[3mm]
International journal for mathematics and computer science\\[3mm]
Referred by\\
Zentralblatt fr Mathematik\\
and\\
Mathematical Reviews\\
\end{center}
\bigskip
\begin{center}
\parbox{126mm}{
The journal of the Institute of Mathematics and Informatics of
Eszterhzy Kroly College is open for scientific publications
in mathematics and computer science, where the field of number
theory, group theory, constructive and computer aided geometry
as well as theoretical and practical aspects of programming
languages receive particular emphasis. Methodological papers
are also welcome. Papers submitted to the journal should be
written in English. Only new and unpublished material can be
accepted.}
\end{center}}
% Making the inside book cover
\makebookcover
\end{document}

10

The result:

ANNALES
MATHEMATICAE ET
INFORMATICAE
ANNALES MATHEMATICAE ET INFORMATICAE 43. (2014)

TOMUS 43. (2014)

COMMISSIO REDACTORIUM
Sndor Bcs (Debrecen), Sonja Gorjanc (Zagreb), Tibor Gyimthy (Szeged),
Mikls Hoffmann (Eger), Jzsef Holovcs (Eger), Lszl Kovcs (Miskolc),
Lszl Kozma (Budapest), Klmn Liptai (Eger), Florian Luca (Mexico),
Giuseppe Mastroianni (Potenza), Ferenc Mtys (Eger),
kos Pintr (Debrecen), Mikls Ront (Miskolc), Lszl Szalay (Sopron),
Jnos Sztrik (Debrecen), Gary Walsh (Ottawa)

HUNGARIA, EGER

ANNALES MATHEMATICAE ET INFORMATICAE


International journal for mathematics and computer science
Referred by
Zentralblatt fr Mathematik
and
Mathematical Reviews

The journal of the Institute of Mathematics and Informatics of Eszterhzy Kroly


College is open for scientific publications in mathematics and computer science,
where the field of number theory, group theory, constructive and computer aided
geometry as well as theoretical and practical aspects of programming languages
receive particular emphasis. Methodological papers are also welcome. Papers submitted to the journal should be written in English. Only new and unpublished
material can be accepted.

11

3.3

Drawing bar code by pst-barcode package

\documentclass{bookcover}
\usepackage{pst-barcode}
\begin{document}
\setbookcover{fgfirst}{back}{
\vfill
\centering
\begin{pspicture}(1in,1.5in)
\psbarcode{1787-6117}{includetext height=1 width=1.5}{issn}
\end{pspicture}
\vspace{5mm}
}
\makebookcover
\end{document}

We can compile this file by latex.exe only. If you want to use another compiler, then choose the following
way:
\documentclass{bookcover}
\usepackage{filecontents}
\begin{filecontents*}{bar.tex}
\documentclass{article}
\usepackage{pst-barcode}
\pagestyle{empty}
\begin{document}
\begin{pspicture}(1in,1.5in)
\psbarcode{1787-6117}{includetext height=1 width=1.5}{issn}
\end{pspicture}
\end{document}
\end{filecontents*}
\immediate\write18{
latex bar.tex &&
dvips bar.dvi &&
ps2pdf bar.ps &&
pdfcrop -hires bar.pdf barcode.pdf}
\begin{document}
\setbookcover{fgfirst}{back}{
\vfill
\centering
\includegraphics{barcode}
\vspace{5mm}
}
\makebookcover
\end{document}

The command to compile this file is the following:


pdflatex -shell-escape filename

or
xelatex -shell-escape filename

or
lualatex -shell-escape filename

12

The result:

ISSN

1787-6117

771787 611000

Implementation

%%
%% OPTIONS
3 \RequirePackage{kvoptions}
4 \SetupKeyvalOptions{family=bookcover,prefix=bookcover@}
5 \DeclareVoidOption{10pt}{\PassOptionsToClass{10pt}{article}}
6 \DeclareVoidOption{11pt}{\PassOptionsToClass{11pt}{article}}
7 \DeclareVoidOption{12pt}{\PassOptionsToClass{12pt}{article}}
8 \DeclareVoidOption{grid}{\PassOptionsToPackage{grid}{eso-pic}}
9 \DeclareStringOption[170mm]{coverwidth}
10 \DeclareStringOption[240mm]{coverheight}
11 \DeclareStringOption[5mm]{spinewidth}
12 \DeclareStringOption[0mm]{flapwidth}
13 \DeclareStringOption[10mm]{marklength}
14 \DeclareStringOption[.4pt]{markthick}
15 \DeclareStringOption[5mm]{bleedwidth}
16 \DeclareStringOption[red]{markcolor}
17 \DeclareBoolOption[false]{trimmed}
18 \DeclareBoolOption[false]{bgtikznodes}
19 \DeclareBoolOption[false]{bgtikzclip}
20 \ProcessKeyvalOptions{bookcover}
1
2

21
22
23

%% LOADING CLASS
\LoadClass{article}

24

%% LOADING PACKAGES
\RequirePackage{geometry,graphicx,calc,xcolor,ifthen,tikz,eso-pic}
27 \RequirePackage[absolute]{textpos}
25
26
28
29
30

%% PAGE STYLE
\pagestyle{empty}

31

%% USER LENGTHS
\newlength{\coverwidth}
34 \newlength{\coverheight}
35 \newlength{\spinewidth}
36 \newlength{\flapwidth}
37 \newlength{\marklength}
32
33

13

38
39

\newlength{\markthick}
\newlength{\bleedwidth}

40

%% INTERNAL LENGTHS
\newlength{\bookcover@xpos@}
43 \newlength{\bookcover@ypos@}
44 \newlength{\bookcover@partwidth@}
45 \newlength{\bookcover@partheight@}
46 \newlength{\bookcover@bgtikz@trimmed@part@width@minus}
47 \newlength{\bookcover@bgtikz@trimmed@part@push@right}
41
42

48

%% USER LENGTHS SETTING


\setlength{\coverwidth}{\bookcover@coverwidth}
51 \setlength{\coverheight}{\bookcover@coverheight}
52 \setlength{\spinewidth}{\bookcover@spinewidth}
53 \setlength{\flapwidth}{\bookcover@flapwidth}
54 \setlength{\marklength}{\bookcover@marklength}
55 \setlength{\markthick}{\bookcover@markthick}
56 \setlength{\bleedwidth}{\bookcover@bleedwidth}
57 \setlength{\paperwidth}{2\marklength+2\bleedwidth+2\coverwidth+2\flapwidth+\spinewidth}
58 \setlength{\paperheight}{2\marklength+2\bleedwidth+\coverheight}
59 \setlength{\parindent}{0pt}
49
50

60

%% IF GRID
\ifESO@grid
63
\setlength{\markthick}{2pt}
64
\def\bookcover@markcolor{red}\fi
61
62

65

%% COMMANDS FOR INTERNAL LENGTHS SETTING


\def\bookcover@xpos#1{\setlength{\bookcover@xpos@}{#1}}
68 \def\bookcover@ypos#1{\setlength{\bookcover@ypos@}{#1}}
69 \def\bookcover@partwidth#1{\setlength{\bookcover@partwidth@}{#1}}
70 \def\bookcover@partheight#1{\setlength{\bookcover@partheight@}{#1}}
71 \def\bookcover@bgtikz@trimmed@part@param#1#2{%
72
\setlength{\bookcover@bgtikz@trimmed@part@width@minus}{#1}%
73
\setlength{\bookcover@bgtikz@trimmed@part@push@right}{#2}}
66
67

74

%% MACROS FOR OUTPUTS OF PARTS


%% bgcolor
77 \def\bookcover@bgcolor#1{
78
\begin{textblock*}{\bookcover@partwidth@}(\bookcover@xpos@,\bookcover@ypos@)
79
\tikz\expandafter\fill#1 (0,0) rectangle (\bookcover@partwidth@,\bookcover@partheight@);
80
\end{textblock*}}
81 %% bgpic
82 \def\bookcover@bgpic#1{
83
\begin{textblock*}{\bookcover@partwidth@}(\bookcover@xpos@,\bookcover@ypos@)
84
\includegraphics[width=\bookcover@partwidth@,height=\bookcover@partheight@]{#1}
85
\end{textblock*}}
86 %% bgtikz
87 \def\bookcover@bgtikz#1{
88
\begin{textblock*}{\bookcover@partwidth@}(\bookcover@xpos@,\bookcover@ypos@)
89
\ifbookcover@bgtikzclip\bookcover@bgtikznodestrue\fi
90
\ifbookcover@bgtikznodes
91
\begin{tikzpicture}[overlay,yshift=-\bookcover@partheight@]
92
\begin{scope}[transparent,line width=0pt]
93
\pgfset{minimum width=\bookcover@partwidth@,minimum height=\bookcover@partheight@}
94
\pgfnode{rectangle}{south west}{}{current part}{\pgfusepath{draw}}
95
\pgfset{minimum width=\bookcover@partwidth@-\bookcover@bgtikz@trimmed@part@width@minus,
96
minimum height=\bookcover@partheight@-2\bleedwidth}
97
\pgftransformshift{\pgfpoint{\bookcover@bgtikz@trimmed@part@push@right}{\bleedwidth}}
98
\pgfnode{rectangle}{south west}{}{current trimmed part}{\pgfusepath{draw}}
99
\end{scope}
100
\ifbookcover@bgtikzclip
75
76

14

\clip (current part.south west) rectangle (current part.north east);\fi


\else\begin{tikzpicture}\fi
103
#1
104
\end{tikzpicture}
105
\end{textblock*}}
106 %% fg
107 \def\bookcover@fg#1{
108
\begin{textblock*}{\bookcover@partwidth@}(\bookcover@xpos@,\bookcover@ypos@)
109
\parbox[t][\bookcover@partheight@][t]{\bookcover@partwidth@}{#1}
110
\end{textblock*}}
111 %% remark
112 \def\bookcover@remark#1{
113
\begin{textblock*}{\bookcover@partwidth@}(\bookcover@xpos@,\bookcover@ypos@)
114
\parbox[t][\bookcover@partheight@][c]{\bookcover@partwidth@}
115
{\centering#1\par}
116
\end{textblock*}}
101
102

117

%% MACROS FOR MARKS


%% vertical mark
120 \def\bookcover@vmark{
121
\begin{textblock*}{\bookcover@partwidth@}(\bookcover@xpos@,\bookcover@ypos@)
122
{\color{\bookcover@markcolor}\rule[0pt]{\markthick}{\marklength}}
123
\end{textblock*}}
124 %% horizontal mark
125 \def\bookcover@hmark{
126
\begin{textblock*}{\bookcover@partwidth@}(\bookcover@xpos@,\bookcover@ypos@)
127
{\color{\bookcover@markcolor}\rule[0pt]{\marklength}{\markthick}}
128
\end{textblock*}}
118
119

129

%% MACRO FOR TRIMMING


\def\bookcover@trimming{
132
\begin{textblock*}{\paperwidth}(0mm,0mm)
133
\begin{tikzpicture}
134
\begin{scope}[color=white]
135
\fill(0,0)-136
(\paperwidth,0)-137
(\paperwidth,\marklength+\bleedwidth)-138
(0,\marklength+\bleedwidth)--cycle;
139
\fill(0,\paperheight)-140
(\paperwidth,\paperheight)-141
(\paperwidth,\paperheight-\marklength-\bleedwidth)-142
(0,\paperheight-\marklength-\bleedwidth)--cycle;
143
\fill(0,0)-144
(\marklength+\bleedwidth,0)-145
(\marklength+\bleedwidth,\paperheight)-146
(0,\paperheight)--cycle;
147
\fill(\paperwidth-\marklength-\bleedwidth,0)-148
(\paperwidth,0)-149
(\paperwidth,\paperheight)-150
(\paperwidth-\marklength-\bleedwidth,\paperheight)--cycle;
151
\end{scope}
152
\draw[color=\bookcover@markcolor,line width=\markthick]
153
(\marklength+\bleedwidth,\marklength+\bleedwidth)-154
(\paperwidth-\marklength-\bleedwidth,\marklength+\bleedwidth)-155
(\paperwidth-\marklength-\bleedwidth,\paperheight-\marklength-\bleedwidth)-156
(\marklength+\bleedwidth,\paperheight-\marklength-\bleedwidth)--cycle;
157
\end{tikzpicture}
158
\end{textblock*}
159
\bookcover@ypos{\bleedwidth}
160
\bookcover@partwidth{\markthick}
161
\ifdim\flapwidth>0mm
162
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth-.5\markthick}
163
\bookcover@vmark
130
131

15

164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180

\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
\bookcover@vmark\fi
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth-.5\markthick}
\bookcover@vmark
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth-.5\markthick}
\bookcover@vmark
\bookcover@ypos{\paperheight-\marklength-\bleedwidth}
\bookcover@partwidth{\markthick}
\ifdim\flapwidth>0mm
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth-.5\markthick}
\bookcover@vmark
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
\bookcover@vmark\fi
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth-.5\markthick}
\bookcover@vmark
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth-.5\markthick}
\bookcover@vmark}

181

%% RESET DATAS
\def\bookcover@reset{
184
\def\bookcover@bgcolor@whole{}
185
\def\bookcover@bgcolor@wholewf{}
186
\def\bookcover@bgcolor@back{}
187
\def\bookcover@bgcolor@front{}
188
\def\bookcover@bgcolor@backflap{}
189
\def\bookcover@bgcolor@frontflap{}
190
\def\bookcover@bgcolor@spine{}
191
\def\bookcover@bgpic@whole{}
192
\def\bookcover@bgpic@wholewf{}
193
\def\bookcover@bgpic@back{}
194
\def\bookcover@bgpic@front{}
195
\def\bookcover@bgpic@backflap{}
196
\def\bookcover@bgpic@frontflap{}
197
\def\bookcover@bgpic@spine{}
198
\def\bookcover@bgtikz@whole{}
199
\def\bookcover@bgtikz@wholewf{}
200
\def\bookcover@bgtikz@back{}
201
\def\bookcover@bgtikz@front{}
202
\def\bookcover@bgtikz@backflap{}
203
\def\bookcover@bgtikz@frontflap{}
204
\def\bookcover@bgtikz@spine{}
205
\def\bookcover@fgfirst@back{}
206
\def\bookcover@fgfirst@front{}
207
\def\bookcover@fgfirst@spine{}
208
\def\bookcover@fgfirst@backflap{}
209
\def\bookcover@fgfirst@frontflap{}
210
\def\bookcover@fgfirst@abovefront{}
211
\def\bookcover@fgfirst@belowfront{}
212
\def\bookcover@fgfirst@aboveback{}
213
\def\bookcover@fgfirst@belowback{}
214
\def\bookcover@fgsecond@back{}
215
\def\bookcover@fgsecond@front{}
216
\def\bookcover@fgsecond@spine{}
217
\def\bookcover@fgsecond@backflap{}
218
\def\bookcover@fgsecond@frontflap{}}
219 \bookcover@reset
182
183

220

%% SETBOOKCOVER
\long\def\setbookcover#1#2#3{
223
\ifthenelse{\equal{#1}{bgcolor}}{
224
\ifthenelse{\equal{#2}{whole}}{\def\bookcover@bgcolor@whole{[#3]}}{}
225
\ifthenelse{\equal{#2}{whole without flaps}}{\def\bookcover@bgcolor@wholewf{[#3]}}{}
226
\ifthenelse{\equal{#2}{back}}{\def\bookcover@bgcolor@back{[#3]}}{}
221
222

16

227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263

\ifthenelse{\equal{#2}{front}}{\def\bookcover@bgcolor@front{[#3]}}{}
\ifthenelse{\equal{#2}{back flap}}{\def\bookcover@bgcolor@backflap{[#3]}}{}
\ifthenelse{\equal{#2}{front flap}}{\def\bookcover@bgcolor@frontflap{[#3]}}{}
\ifthenelse{\equal{#2}{spine}}{\def\bookcover@bgcolor@spine{[#3]}}{}}{}
\ifthenelse{\equal{#1}{bgpic}}{
\ifthenelse{\equal{#2}{whole}}{\def\bookcover@bgpic@whole{#3}}{}
\ifthenelse{\equal{#2}{whole without flaps}}{\def\bookcover@bgpic@wholewf{#3}}{}
\ifthenelse{\equal{#2}{back}}{\def\bookcover@bgpic@back{#3}}{}
\ifthenelse{\equal{#2}{front}}{\def\bookcover@bgpic@front{#3}}{}
\ifthenelse{\equal{#2}{back flap}}{\def\bookcover@bgpic@backflap{#3}}{}
\ifthenelse{\equal{#2}{front flap}}{\def\bookcover@bgpic@frontflap{#3}}{}
\ifthenelse{\equal{#2}{spine}}{\def\bookcover@bgpic@spine{#3}}{}}{}
\ifthenelse{\equal{#1}{bgtikz}}{
\ifthenelse{\equal{#2}{whole}}{\def\bookcover@bgtikz@whole{#3}}{}
\ifthenelse{\equal{#2}{whole without flaps}}{\def\bookcover@bgtikz@wholewf{#3}}{}
\ifthenelse{\equal{#2}{back}}{\def\bookcover@bgtikz@back{#3}}{}
\ifthenelse{\equal{#2}{front}}{\def\bookcover@bgtikz@front{#3}}{}
\ifthenelse{\equal{#2}{back flap}}{\def\bookcover@bgtikz@backflap{#3}}{}
\ifthenelse{\equal{#2}{front flap}}{\def\bookcover@bgtikz@frontflap{#3}}{}
\ifthenelse{\equal{#2}{spine}}{\def\bookcover@bgtikz@spine{#3}}{}}{}
\ifthenelse{\equal{#1}{fgfirst}}{
\ifthenelse{\equal{#2}{back}}{\def\bookcover@fgfirst@back{#3}}{}
\ifthenelse{\equal{#2}{front}}{\def\bookcover@fgfirst@front{#3}}{}
\ifthenelse{\equal{#2}{spine}}{\def\bookcover@fgfirst@spine{#3}}{}
\ifthenelse{\equal{#2}{back flap}}{\def\bookcover@fgfirst@backflap{#3}}{}
\ifthenelse{\equal{#2}{front flap}}{\def\bookcover@fgfirst@frontflap{#3}}{}
\ifthenelse{\equal{#2}{remark}}{\def\bookcover@fgfirst@abovefront{#3}}{}% for version 1.0
\ifthenelse{\equal{#2}{above front}}{\def\bookcover@fgfirst@abovefront{#3}}{}
\ifthenelse{\equal{#2}{below front}}{\def\bookcover@fgfirst@belowfront{#3}}{}
\ifthenelse{\equal{#2}{above back}}{\def\bookcover@fgfirst@aboveback{#3}}{}
\ifthenelse{\equal{#2}{below back}}{\def\bookcover@fgfirst@belowback{#3}}{}}{}
\ifthenelse{\equal{#1}{fgsecond}}{
\ifthenelse{\equal{#2}{back}}{\def\bookcover@fgsecond@back{#3}}{}
\ifthenelse{\equal{#2}{front}}{\def\bookcover@fgsecond@front{#3}}{}
\ifthenelse{\equal{#2}{spine}}{\def\bookcover@fgsecond@spine{#3}}{}
\ifthenelse{\equal{#2}{back flap}}{\def\bookcover@fgsecond@backflap{#3}}{}
\ifthenelse{\equal{#2}{front flap}}{\def\bookcover@fgsecond@frontflap{#3}}{}}{}}

264

%% MAKEBOOKCOVER
\def\makebookcover{
267 %% background parameters
268 \bookcover@ypos{\marklength}
269 \bookcover@partheight{\coverheight+2\bleedwidth}
270 %% {bgcolor}{whole}
271 \ifx\bookcover@bgcolor@whole\@empty\else
272
\bookcover@xpos{\marklength}
273
\bookcover@partwidth{2\coverwidth+2\bleedwidth+2\flapwidth+\spinewidth}
274
\bookcover@bgcolor{\bookcover@bgcolor@whole}\fi
275 %% {bgcolor}{whole without flaps}
276 \ifx\bookcover@bgcolor@wholewf\@empty\else
277
\ifdim\flapwidth>0mm
278
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth}
279
\bookcover@partwidth{2\coverwidth+\spinewidth}
280
\else
281
\bookcover@xpos{\marklength}
282
\bookcover@partwidth{2\coverwidth+2\bleedwidth+\spinewidth}\fi
283
\bookcover@bgcolor{\bookcover@bgcolor@wholewf}\fi
284 %% {bgcolor}{back flap}
285 \ifx\bookcover@bgcolor@backflap\@empty\else\ifdim\flapwidth>0mm
286
\bookcover@xpos{\marklength}
287
\bookcover@partwidth{\flapwidth+\bleedwidth}
288
\bookcover@bgcolor{\bookcover@bgcolor@backflap}\fi\fi
289 %% {bgcolor}{back}
265
266

17

\ifx\bookcover@bgcolor@back\@empty\else
\ifdim\flapwidth>0mm
292
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth}
293
\bookcover@partwidth{\coverwidth}
294
\else
295
\bookcover@xpos{\marklength}
296
\bookcover@partwidth{\coverwidth+\bleedwidth}\fi
297
\bookcover@bgcolor{\bookcover@bgcolor@back}\fi
298 %% {bgcolor}{spine}
299 \ifx\bookcover@bgcolor@spine\@empty\else
300
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
301
\bookcover@partwidth{\spinewidth}
302
\bookcover@bgcolor{\bookcover@bgcolor@spine}\fi
303 %% {bgcolor}{front}
304 \ifx\bookcover@bgcolor@front\@empty\else
305
\ifdim\flapwidth>0mm
306
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
307
\bookcover@partwidth{\coverwidth}
308
\else
309
\bookcover@xpos{\marklength+\bleedwidth+\coverwidth+\spinewidth}
310
\bookcover@partwidth{\coverwidth+\bleedwidth}\fi
311
\bookcover@bgcolor{\bookcover@bgcolor@front}\fi
312 %% {bgcolor}{front flap}
313 \ifx\bookcover@bgcolor@frontflap\@empty\else\ifdim\flapwidth>0mm
314
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth}
315
\bookcover@partwidth{\flapwidth+\bleedwidth}
316
\bookcover@bgcolor{\bookcover@bgcolor@frontflap}\fi\fi
317 %% {bgpic}{whole}
318 \ifx\bookcover@bgpic@whole\@empty\else
319
\bookcover@xpos{\marklength}
320
\bookcover@partwidth{2\coverwidth+2\bleedwidth+2\flapwidth+\spinewidth}
321
\bookcover@bgpic{\bookcover@bgpic@whole}\fi
322 %% {bgpic}{whole without flaps}
323 \ifx\bookcover@bgpic@wholewf\@empty\else
324
\ifdim\flapwidth>0mm
325
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth}
326
\bookcover@partwidth{2\coverwidth+\spinewidth}
327
\else
328
\bookcover@xpos{\marklength}
329
\bookcover@partwidth{2\coverwidth+2\bleedwidth+\spinewidth}\fi
330
\bookcover@bgpic{\bookcover@bgpic@wholewf}\fi
331 %% {bgpic}{back flap}
332 \ifx\bookcover@bgpic@backflap\@empty\else\ifdim\flapwidth>0mm
333
\bookcover@xpos{\marklength}
334
\bookcover@partwidth{\flapwidth+\bleedwidth}
335
\bookcover@bgpic{\bookcover@bgpic@backflap}\fi\fi
336 %% {bgpic}{back}
337 \ifx\bookcover@bgpic@back\@empty\else
338
\ifdim\flapwidth>0mm
339
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth}
340
\bookcover@partwidth{\coverwidth}
341
\else
342
\bookcover@xpos{\marklength}
343
\bookcover@partwidth{\coverwidth+\bleedwidth}\fi
344
\bookcover@bgpic{\bookcover@bgpic@back}\fi
345 %% {bgpic}{spine}
346 \ifx\bookcover@bgpic@spine\@empty\else
347
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
348
\bookcover@partwidth{\spinewidth}
349
\bookcover@bgpic{\bookcover@bgpic@spine}\fi
350 %% {bgpic}{front}
351 \ifx\bookcover@bgpic@front\@empty\else
352
\ifdim\flapwidth>0mm
290
291

18

\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
\bookcover@partwidth{\coverwidth}
355
\else
356
\bookcover@xpos{\marklength+\bleedwidth+\coverwidth+\spinewidth}
357
\bookcover@partwidth{\coverwidth+\bleedwidth}\fi
358
\bookcover@bgpic{\bookcover@bgpic@front}\fi
359 %% {bgpic}{front flap}
360 \ifx\bookcover@bgpic@frontflap\@empty\else\ifdim\flapwidth>0mm
361
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth}
362
\bookcover@partwidth{\flapwidth+\bleedwidth}
363
\bookcover@bgpic{\bookcover@bgpic@frontflap}\fi\fi
364 %% {bgtikz}{whole}
365 \ifx\bookcover@bgtikz@whole\@empty\else
366
\bookcover@xpos{\marklength}
367
\bookcover@partwidth{2\coverwidth+2\bleedwidth+2\flapwidth+\spinewidth}
368
\bookcover@bgtikz@trimmed@part@param{2\bleedwidth}{\bleedwidth}
369
\bookcover@bgtikz{\bookcover@bgtikz@whole}\fi
370 %% {bgtikz}{whole without flaps}
371 \ifx\bookcover@bgtikz@wholewf\@empty\else
372
\ifdim\flapwidth>0mm
373
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth}
374
\bookcover@partwidth{2\coverwidth+\spinewidth}
375
\bookcover@bgtikz@trimmed@part@param{0pt}{0pt}
376
\else
377
\bookcover@xpos{\marklength}
378
\bookcover@partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
379
\bookcover@bgtikz@trimmed@part@param{2\bleedwidth}{\bleedwidth}\fi
380
\bookcover@bgtikz{\bookcover@bgtikz@wholewf}\fi
381 %% {bgtikz}{back flap}
382 \ifx\bookcover@bgtikz@backflap\@empty\else\ifdim\flapwidth>0mm
383
\bookcover@xpos{\marklength}
384
\bookcover@partwidth{\flapwidth+\bleedwidth}
385
\bookcover@bgtikz@trimmed@part@param{\bleedwidth}{\bleedwidth}
386
\bookcover@bgtikz{\bookcover@bgtikz@backflap}\fi\fi
387 %% {bgtikz}{back}
388 \ifx\bookcover@bgtikz@back\@empty\else
389
\ifdim\flapwidth>0mm
390
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth}
391
\bookcover@partwidth{\coverwidth}
392
\bookcover@bgtikz@trimmed@part@param{0pt}{0pt}
393
\else
394
\bookcover@xpos{\marklength}
395
\bookcover@partwidth{\coverwidth+\bleedwidth}
396
\bookcover@bgtikz@trimmed@part@param{\bleedwidth}{\bleedwidth}\fi
397
\bookcover@bgtikz{\bookcover@bgtikz@back}\fi
398 %% {bgtikz}{spine}
399 \ifx\bookcover@bgtikz@spine\@empty\else
400
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
401
\bookcover@partwidth{\spinewidth}
402
\bookcover@bgtikz@trimmed@part@param{0pt}{0pt}
403
\bookcover@bgtikz{\bookcover@bgtikz@spine}\fi
404 %% {bgtikz}{front}
405 \ifx\bookcover@bgtikz@front\@empty\else
406
\ifdim\flapwidth>0mm
407
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
408
\bookcover@partwidth{\coverwidth}
409
\bookcover@bgtikz@trimmed@part@param{0pt}{0pt}
410
\else
411
\bookcover@xpos{\marklength+\bleedwidth+\coverwidth+\spinewidth}
412
\bookcover@partwidth{\coverwidth+\bleedwidth}
413
\bookcover@bgtikz@trimmed@part@param{\bleedwidth}{0pt}\fi
414
\bookcover@bgtikz{\bookcover@bgtikz@front}\fi
415 %% {bgtikz}{front flap}
353
354

19

\ifx\bookcover@bgtikz@frontflap\@empty\else\ifdim\flapwidth>0mm
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth}
418
\bookcover@partwidth{\flapwidth+\bleedwidth}
419
\bookcover@bgtikz@trimmed@part@param{\bleedwidth}{0pt}
420
\bookcover@bgtikz{\bookcover@bgtikz@frontflap}\fi\fi
421 %% foreground parameters
422 \bookcover@ypos{\marklength+\bleedwidth}
423 \bookcover@partheight{\coverheight}
424 %% {fgsecond}{back flap}
425 \ifx\bookcover@fgsecond@backflap\@empty\else\ifdim\flapwidth>0mm
426
\bookcover@xpos{\marklength+\bleedwidth}
427
\bookcover@partwidth{\flapwidth}
428
\bookcover@fg{\bookcover@fgsecond@backflap}\fi\fi
429 %% {fgsecond}{back}
430 \ifx\bookcover@fgsecond@back\@empty\else
431
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth}
432
\bookcover@partwidth{\coverwidth}
433
\bookcover@fg{\bookcover@fgsecond@back}\fi
434 %% {fgsecond}{spine}
435 \ifx\bookcover@fgsecond@spine\@empty\else
436
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
437
\bookcover@partwidth{\spinewidth}
438
\bookcover@fg{\bookcover@fgsecond@spine}\fi
439 %% {fgsecond}{front}
440 \ifx\bookcover@fgsecond@front\@empty\else
441
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
442
\bookcover@partwidth{\coverwidth}
443
\bookcover@fg{\bookcover@fgsecond@front}\fi
444 %% {fgsecond}{front flap}
445 \ifx\bookcover@fgsecond@frontflap\@empty\else\ifdim\flapwidth>0mm
446
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth}
447
\bookcover@partwidth{\flapwidth}
448
\bookcover@fg{\bookcover@fgsecond@frontflap}\fi\fi
449 %% {fgfirst}{back flap}
450 \ifx\bookcover@fgfirst@backflap\@empty\else\ifdim\flapwidth>0mm
451
\bookcover@xpos{\marklength+\bleedwidth}
452
\bookcover@partwidth{\flapwidth}
453
\bookcover@fg{\bookcover@fgfirst@backflap}\fi\fi
454 %% {fgfirst}{back}
455 \ifx\bookcover@fgfirst@back\@empty\else
456
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth}
457
\bookcover@partwidth{\coverwidth}
458
\bookcover@fg{\bookcover@fgfirst@back}\fi
459 %% {fgfirst}{spine}
460 \ifx\bookcover@fgfirst@spine\@empty\else
461
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
462
\bookcover@partwidth{\spinewidth}
463
\bookcover@fg{\bookcover@fgfirst@spine}\fi
464 %% {fgfirst}{front}
465 \ifx\bookcover@fgfirst@front\@empty\else
466
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
467
\bookcover@partwidth{\coverwidth}
468
\bookcover@fg{\bookcover@fgfirst@front}\fi
469 %% {fgfirst}{front flap}
470 \ifx\bookcover@fgfirst@frontflap\@empty\else\ifdim\flapwidth>0mm
471
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth}
472
\bookcover@partwidth{\flapwidth}
473
\bookcover@fg{\bookcover@fgfirst@frontflap}\fi\fi
474 %% {fgfirst}{above front} = {fgfirst}{remark} in version 1.0
475 \ifx\bookcover@fgfirst@abovefront\@empty\else\ifdim\marklength>0mm
476
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
477
\bookcover@ypos{0mm}
478
\bookcover@partwidth{\coverwidth}
416
417

20

\bookcover@partheight{\marklength}
\bookcover@remark{\bookcover@fgfirst@abovefront}\fi\fi
481 %% {fgfirst}{below front}
482 \ifx\bookcover@fgfirst@belowfront\@empty\else\ifdim\marklength>0mm
483
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
484
\bookcover@ypos{\marklength+2\bleedwidth+\coverheight}
485
\bookcover@partwidth{\coverwidth}
486
\bookcover@partheight{\marklength}
487
\bookcover@remark{\bookcover@fgfirst@belowfront}\fi\fi
488 %% {fgfirst}{above back}
489 \ifx\bookcover@fgfirst@aboveback\@empty\else\ifdim\marklength>0mm
490
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth}
491
\bookcover@ypos{0mm}
492
\bookcover@partwidth{\coverwidth}
493
\bookcover@partheight{\marklength}
494
\bookcover@remark{\bookcover@fgfirst@aboveback}\fi\fi
495 %% {fgfirst}{below back}
496 \ifx\bookcover@fgfirst@belowback\@empty\else\ifdim\marklength>0mm
497
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth}
498
\bookcover@ypos{\marklength+2\bleedwidth+\coverheight}
499
\bookcover@partwidth{\coverwidth}
500
\bookcover@partheight{\marklength}
501
\bookcover@remark{\bookcover@fgfirst@belowback}\fi\fi
502 %% mark top parameters
503 \bookcover@ypos{0mm}
504 \bookcover@partwidth{\markthick}
505 %% mark top 1
506 \bookcover@xpos{\marklength+\bleedwidth-.5\markthick}
507 \bookcover@vmark
508 %% mark top 2
509 \ifdim\flapwidth>0mm
510
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth-.5\markthick}
511
\bookcover@vmark\fi
512 %% mark top 3
513 \bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth-.5\markthick}
514 \bookcover@vmark
515 %% mark top 4
516 \bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth-.5\markthick}
517 \bookcover@vmark
518 %% mark top 5
519 \ifdim\flapwidth>0mm
520
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
521
\bookcover@vmark\fi
522 %% mark top 6
523 \bookcover@xpos{\marklength+\bleedwidth+2\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
524 \bookcover@vmark
525 %% mark bottom parameters
526 \bookcover@ypos{\paperheight-\marklength}
527 \bookcover@partwidth{\markthick}
528 %% mark bottom 1
529 \bookcover@xpos{\marklength+\bleedwidth-.5\markthick}
530 \bookcover@vmark
531 %% mark bottom 2
532 \ifdim\flapwidth>0mm
533
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth-.5\markthick}
534
\bookcover@vmark\fi
535 %% mark bottom 3
536 \bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth-.5\markthick}
537 \bookcover@vmark
538 %% mark bottom 4
539 \bookcover@xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth-.5\markthick}
540 \bookcover@vmark
541 %% mark bottom 5
479
480

21

\ifdim\flapwidth>0mm
\bookcover@xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
544
\bookcover@vmark\fi
545 %% mark bottom 6
546 \bookcover@xpos{\marklength+\bleedwidth+2\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
547 \bookcover@vmark
548 %% mark left parameters
549 \bookcover@xpos{0mm}
550 \bookcover@partwidth{\marklength}
551 %% mark left 1
552 \bookcover@ypos{\marklength+\bleedwidth-.5\markthick}
553 \bookcover@hmark
554 %% mark left 2
555 \bookcover@ypos{\marklength+\bleedwidth+\coverheight-.5\markthick}
556 \bookcover@hmark
557 %% mark right parameters
558 \bookcover@xpos{\paperwidth-\marklength}
559 \bookcover@partwidth{\marklength}
560 %% mark right 1
561 \bookcover@ypos{\marklength+\bleedwidth-.5\markthick}
562 \bookcover@hmark
563 %% mark right 2
564 \bookcover@ypos{\marklength+\bleedwidth+\coverheight-.5\markthick}
565 \bookcover@hmark
566 %% trimming
567 \ifbookcover@trimmed
568
\bookcover@trimming\fi
569 %% new book cover
570 \mbox{}
571 \newpage
572 \bookcover@reset}
542
543

22

S-ar putea să vă placă și