summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/bookcover/bookcover-example1.tex
blob: 203c4a6fce97fdec48e8e5837955c86ffa5ddd9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
\documentclass[
    coverwidth=15cm,
    coverheight=20cm,
    spinewidth=25mm,
    flapwidth=6cm,
    wrapwidth=5mm,
    ]{bookcover}

\newbookcovercomponenttype{center rotate}{
    \vfill
    \centering
    \rotatebox[origin=c]{-90}{#1}
    \vfill}

\usepackage[outline]{contour}% It doesn't work with xelatex and lualatex
\contourlength{1pt}
\usepackage[english]{babel}
\usepackage{kantlipsum,microtype}

\begin{document}

\begin{bookcover}

% Remark
\begin{bookcoverelement}{center}{above front}
    \textcolor{blue}{A dust jacket example}
\end{bookcoverelement}

% Background color on the whole cover
\begin{bookcoverelement}{color}{bg whole}
    black
\end{bookcoverelement}

% Background picture on the whole cover without flaps
\begin{bookcoverelement}{picture}{bg whole without flaps}
    ./figures/bookcover-bg.jpg
\end{bookcoverelement}

% Transparent areas on the back cover
\begin{bookcoverelement}{tikz}{bg back and wrap}
    \fill[opacity=0.3,black!50] 
    (0,0) rectangle (25mm,\partheight) 
    (part.north east) rectangle ([xshift=-5cm]part.south east);
\end{bookcoverelement}

% Transparent areas on the front cover
\begin{bookcoverelement}{tikz}{bg front and wrap}
    \fill[opacity=0.3,black!50] 
    (0,0) rectangle (50mm,\partheight) 
    (part.north east) rectangle ([xshift=-25mm]part.south east);
\end{bookcoverelement}

% Picture on the front cover behind the title
\begin{bookcoverelement}{center}{front}
    \includegraphics{./figures/bookcover-cards.pdf}
\end{bookcoverelement}

% Author and title on the front cover
\begin{bookcoverelement}{normal}{front}[,,,5cm]
    \centering
    \color{yellow!60!black}\sffamily\bfseries
    \resizebox{!}{5mm}{\contour{black}{Rose Taylor}}\\[26mm]
    \resizebox{!}{7mm}{\contour{black}{GAMBLING SYSTEMS}}\\[8mm]
    \resizebox{!}{7mm}{\contour{black}{AND STRATEGIES}}\\
\end{bookcoverelement}

% Title on the spine
\begin{bookcoverelement}{center rotate}{spine}
    \color{yellow!60!black}\huge\sffamily\bfseries
    \contour{black}{Rose Taylor -- Gambling Systems and Strategies}
\end{bookcoverelement}

% Text on the back cover
\begin{bookcoverelement}{normal}{back}[2cm,2cm,2cm,2cm]
    \color{white}\kant[1]
\end{bookcoverelement}

% Text and picture on the front flap
\begin{bookcoverelement}{normal}{front flap}[1cm,1cm,1cm,2cm]
    \color{white}\kant[2]
    \vfill
    {\centering\includegraphics{./figures/bookcover-dice.pdf}\par}
\end{bookcoverelement}

% Text on the back flap
\begin{bookcoverelement}{normal}{back flap}[1cm,2cm,1cm,2cm]
    \color{white}\kant[3]
\end{bookcoverelement}

\end{bookcover}

\end{document}