# How to create a Book Cover with pdfpages

i know there are many questions on how to create a book cover, but my questions seems to be a bit different.

I create a frontpage, a backpage and the spine for my cover

Frontpage:

\documentclass{scrartcl}
\usepackage{geometry}
\geometry{
a5paper
}
\usepackage{blindtext}
%
\pagestyle{empty}
\begin{document}

{\Large Front}
\vspace*{4cm}

\blindtext
\end{document}


Backpage:

\documentclass{scrartcl}
\usepackage{geometry}
\geometry{
a5paper
}
\usepackage{blindtext}
%
\pagestyle{empty}
\begin{document}

{\Large Back}
\vspace*{4cm}

\blindtext
\end{document}


Spine:

\documentclass[border=0pt]{standalone}
%
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
\usetikzlibrary{patterns}
%
\begin{document}
\begin{tikzpicture}

\node[rotate=90] (a1) at (0,0){Lorem ipsum};
\node[rotate=90] (a1) at (-0.2,10){Etiam lobortis facilisis sem.};
\node[rotate=90] (a1) at (0.2,10){Nullam nec mi et neque pharetra sollicitudin.};

\end{tikzpicture}
\end{document}


And putting all together in the cover:

\documentclass{scrartcl}
\usepackage{geometry}
\geometry{papersize={307mm,210mm}}
\usepackage{pdfpages}

\begin{document}
\includepdfmerge[nup=3x1]{back,spine,front}
\end{document}


The front and back pages are Din A5, so the cover has the papersice Din A4, which is 297 mm x 210, so i added 10 mm for the spine, which results in 307 mm.

Unfortunately there is to much whitespace added, i played around with some options of includepdfmerge, but i didn't get it work.

Can you help me?

The reason for the white space added with \includepdfmerge[nup=3x1]{back,spine,front} can be understood reading next paragraph from pdfpages documentation:

As can be seen, although spine has different size from front and back covers, pdfpages uses back.pdf size as template and spine.pdf is centered inside a A5 rectangle.

With next cover.tex

\documentclass[border=0pt]{standalone}
\usepackage{graphicx}

\begin{document}
\includegraphics{BackPage}\includegraphics{Spine}\includegraphics{FrontPage}
\end{document}


the result is

2nd version

The first version didn't considered the real size of spine. Next spine.tex produces a 10mm x 210mm spine.pdf with its contains centered which can be easily aligned with Front and Back covers.

Spine.tex:

\documentclass[border=0pt,tikz]{standalone}
%
\usetikzlibrary{fit}
%
\begin{document}
\begin{tikzpicture}

\node[rotate=90] (a1) at (0,0){Lorem ipsum};
\node[rotate=90] (a2) at (-0.2,10){Etiam lobortis facilisis sem.};
\node[rotate=90] (a3) at (0.2,10){Nullam nec mi et neque pharetra sollicitudin.};

\node[fit=(a1) (a2) (a3), anchor=center, minimum width=10mm,
minimum height=21cm, inner sep=0pt] (spine) {};

%\draw (spine.south west) rectangle ++(1,21);

\end{tikzpicture}
\end{document}


The cover looks like:

• Shouldn't Front and Back positions be exchanged? ;) – s__C Oct 24 '14 at 10:48
• Or just switched? – cfr Oct 24 '14 at 10:51
• Thank you very much! One little point, i wanted the format 307 mm x 210 mm (the spine should be 10 mm), with this soulution the format results in 305 mm x 210 mm. But i would be reasonable to create the spine with 10 mm. – wittmaan Oct 24 '14 at 11:10
• Is it further possible to vertically center the spine? – wittmaan Oct 24 '14 at 11:19
• @user2143654 I've updated the answer. Is it correct now? – Ignasi Oct 24 '14 at 15:11

Some days ago a new package was added to CTAN: bookcover. With this name you can image its main goal, producing bookcovers and dustcovers. You can watch two layout examples in What are the available “documentclass” types and their uses?.

Using this package it's not necessary to edit, front, back and spine parts and join them with pdfpages, everything can be declared and composed into a unique text file.

Next code shows how to produce a book cover with more or less like OP wanted. I couldn't resit to use Paulo's duck

\documentclass[marklength=0mm,
coverwidth=148.5mm,
coverheight=210mm,
bleedwidth=0mm,
spinewidth=10mm]{bookcover}

\usepackage{blindtext}
\usepackage{duck}

\begin{document}

%back cover
\setbookcover{bgcolor}{back}{%
color=yellow!20,
}

\setbookcover{fgsecond}{back}{%
\vspace{2.5cm}
\centering
\scalebox{3.5}{\drawflower}
\vfill
}

\setbookcover{fgfirst}{back}{%
\centering
\begin{minipage}[c]{.7\textwidth}
{
\vspace*{4cm}
\Large Back}
\vspace*{4cm}

\blindtext
\end{minipage}
}

%front cover
\setbookcover{bgcolor}{front}{%
color=yellow!20,
}

\setbookcover{fgsecond}{front}{%
\vspace{3cm}
\centering
\scalebox{3.5}{\drawduck}
\vfill
}

\setbookcover{fgfirst}{front}{%
\centering
\begin{minipage}[c]{.7\textwidth}
{
\vspace*{4cm}
\Large Front}
\vspace*{4cm}

\blindtext
\end{minipage}
}

%spine
\setbookcover{bgcolor}{spine}{%
color=yellow!50,
}

\setbookcover{fgfirst}{spine}{
\vfill
\centering
\rotatebox[origin=c]{90}{Lorem ipsum\hspace{5cm}
\begin{tabular}{c}
Etiam lobortis facilisis sem.\\
Nullam nec mi et neque pharetra sollicitudin.
\end{tabular}}
\vfill}

\makebookcover
\end{document}


You can draw every thing in one tikz picture.

\documentclass[border=0pt]{standalone}
\usepackage{kantlipsum}
\usepackage{tikz}
\usetikzlibrary{patterns,calc}
%
\begin{document}
\begin{tikzpicture}
\node[minimum height=210mm,minimum width=148.5mm,outer sep=0pt] (a)
{};
\node[anchor=north west,text width=98.5mm,align=justify] at ($(a.north west) +(25mm,-25mm)$){\kant[1]};
\node[anchor=north west,rotate=90,minimum height=10mm,outer sep=0pt,inner xsep=5mm] (a1) at (a.south east){Lorem ipsum};
\node[anchor=north east,rotate=90,minimum height=10mm,outer sep=0pt,align=center,inner xsep=5mm] (a2) at (a.north east){Etiam lobortis facilisis sem. \\Nullam nec mi et neque pharetra sollicitudin.};
\node[minimum height=210mm,minimum width=148.5mm,outer sep=0pt,anchor=north west] (b) at (a2.south east)
{};
\node[anchor=north west,text width=98.5mm,align=justify] at ($(b.north west) +(25mm,-25mm)$){\kant[1]};

%% following is for just demo
\draw (a.south east) rectangle (b.north west);
\draw[red] (a.south east) rectangle +(10mm,210mm);
\end{tikzpicture}
\end{document}


For spine, adjust inner xsep suitably. Last two lines of code are just for demo to visualize the width of spine. Remove them.

• Thank you very much, this looks really good. For me the first answer is better because i have a front and back pdf page which i want put together in one cover. The lorem ipsum test is just an example for this. – wittmaan Oct 24 '14 at 17:56