Creating book cover with PSTricks


I don’t know, maybe since was triggered by Lian’s post, I decided to try creating my book cover as well. I always wanted to write some books since I think always need of extra money hehe. Note that the example above is using wallpapers from an open source project, while the following bird is from my own photo collections.

The following codes actually were modified from here [PDF] . At first I thought by modifying few stuffs I can straight away used to code.. but maybe because of different configuration that I have (I’m using Ubuntu 9.04 with the default TexLive).. I met several issues. I’m using pdflatex by the way.. perhaps that caused the problem.

\documentclass[12pt]{article}
% load the necessary packages
\usepackage[paperheight=9in,paperwidth=13.24in,margin=0in]{geometry}
\usepackage[dvipsnames,prologue,table]{pstricks}
\usepackage{pst-all}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{rotating}
\usepackage{color}
\usepackage[ISBN=978-80-85955-35-4]{ean13isbn}
%\EANisbn[SC4]
% begin the document and suppress page numbers
\begin{document}
\pagecolor{Maroon}
\pagestyle{empty}
% create the box with the front cover picture
\newsavebox\IBox
\sbox\IBox{\includegraphics[height=9in]{itik2.png}}
% set up the picture environment
\psset{unit=1in}
\begin{pspicture}(13.24in,9in)
% set up the fonts we use
\DeclareFixedFont{\PT}{T1}{ppl}{b}{it}{0.5in}
\DeclareFixedFont{\PTsmall}{T1}{ppl}{b}{it}{0.4in}
\DeclareFixedFont{\PTsmallest}{T1}{ppl}{b}{it}{0.3in}
\DeclareFixedFont{\PTtext}{T1}{ppl}{b}{it}{11pt}
\DeclareFixedFont{\Logo}{T1}{pbk}{m}{n}{0.3in}
% place the front cover picture
\rput[lb](7.24,0){\usebox\IBox}
% put the text on the front cover
\rput[lb](8,7){\PTsmall \color{white}{Anak Itik yang Sombong}}
\rput[lb](8.94,6.5){\PTsmallest \color{white}{Najmi Zabidi}}
\rput[lb](9.04,0.8){\PTsmallest \color{white}{Fesbuk Press}}
% put the text on the spine (note the rotation over 270 degrees)
%\rput[b](6.62,8,0.75){\PTsmallest \color{black}

\rput[b](6.62,3,0.75)
{
\begin{turn} {-90}
{
\PTsmallest \color{white}Anak Itik yang Sombong
}
\end{turn}
}

% put the publisher’s logo on the spine
\rput[b](6.62,0.75){\color{white}{\fbox{\Logo FP}}}
% Create a Box containing the text for the back cover
\newsavebox\Blurbbox
\sbox\Blurbbox{\begin{minipage}{4.5in}
\textcolor{white}{\lipsum[1]}
\end{minipage}}
% And position the box
\rput[tl](1,8){\usebox\Blurbbox}
% Then we close all open environments

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5

\newsavebox\Authorbox
\sbox\Authorbox{\includegraphics[width=.75in]{najmi-pass.png}}
%\psframe[fillstyle=solid,fillcolor=white](1,4)(1.7,4.95)
% now place the picture
\rput[lb](1.1,4.1){\usebox\Authorbox}
% create a savebx for the biography. The width has been adjusted so
% that the right margin matches with that of the book blurb
\newsavebox\Biobox
\sbox\Biobox{\begin{minipage}{3.6in}
\textcolor{white}{Najmi Zabidi is toying around with \LaTeX{}. Contact him
by at bla@bla.com}
\end{minipage}}
% and put it where it belongs
\rput[tl](1.9,4.95){\usebox\Biobox}

\rput(4.5,1.2){
\colorbox{white}{\EANisbn[SC1]}}

\rput[lb](1,1.2){\color{white}{\fbox{\Logo FP}{\PTsmallest { Fesbuk Press}}}}
\rput[lb](1,1){\PTtext \color{white}{Kuala Lumpur — MY}}
\rput[lb](1,0.8){\PTtext \color{white}{http://www.latex-my.blogspot.com}}
\end{pspicture}

\end{document}

Front and Back Covers (and ISBN Bar Codes)

Sorry this post is so late after the last one, it was hard finding time to write between work and a toddler. We’re drawing to a close for this bookdesign series now… just as we’re starting a new year.

I’m not very imaginative, nor am I a graphic designer. So for my book cover, I go for a huge title across the top, a background illustration, and author/editor and publisher information at the bottom. Yes, very boring, but playing it safe — I think with a careful choice of fonts, colours and illustration, the end result wouldn’t look too bad at all. 🙂 I personally find the wallpaper package very handy for the cover page. So it might go something like this:

%% No header nor footer on the cover
\thispagestyle{empty}

%% Cover illustration
\ThisLLCornerWallPaper{1}{grapes-in-my-studio-little-too-much-dust}

%% Bar across the top
\tikz[remember picture,overlay]%
\node[fill=Sienna,text=white,font=\LARGE\bfseries,
text=Cornsilk,minimum width=\paperwidth,
minimum height=5em,anchor=north]%
at (current page.north){Exercises in \LaTeX};

\vspace*{2\baselineskip}

{\bfseries\itshape\color{LightGoldenrod!50!Gold}
\fontsize{36pt}{46pt}\selectfont
The Wonderful Calmness\par
of Still Life Photos\par}

\vspace*{2\baselineskip}

{\LARGE\color{LightGoldenrod}
A small dummy example book by
\scshape{Curutari}\par
}

\tikz[remember picture,overlay]%
\node[fill=Sienna,font=\LARGE\bfseries,
text=Cornsilk,minimum width=\paperwidth,
minimum height=3em,anchor=south]%
at (current page.south) {Malaysian \LaTeX\ User Group};

\begin{center}
\LARGE\bfseries\color{SaddleBrown!30!black}

\end{center}

%% Clear to next odd page
\cleardoublepage

Then comes the back cover. Now if the book is published with an ISBN, you’d want to put a bar code for it. I was wondering where I could get a free bar code generator, when a gut instinct told me to look around CTAN for a LaTeX solution. And sure enough, the ean13isbn package does the trick without any hassle:

%% In preamble
\usepackage[ISBN=978-80-85955-35-4]{ean13isbn}

%% Print the ISBN bar code
%% See the documentation for other sizes e.g. SC0, SC1…
\EANisbn[SC4]

So here’s the code for my backcover:

%% Temporarily enlarge this page to push
%% down the bottom margin
\enlargethispage{3\baselineskip}
\thispagestyle{empty}
\pagecolor[HTML]{0E0407}

\begin{center}
\begin{minipage}{.8\textwidth}
\color{Cornsilk}\Large\bfseries
\lipsum[1]

\begin{center}
\huge\bfseries\sffamily\color{lime}`So Calming.’
\end{center}

\lipsum[2]

\end{minipage}
\end{center}

\vspace*{\stretch{1}}

\begin{center}
\colorbox{white}{\EANisbn[SC4]}

\vspace*{\baselineskip}

\textbf{\textcolor{LightGoldenrod!50!Gold}{Malaysian \LaTeX\ User Group \textbullet\ \texttt{http://latex-my.blogspot.com}}}

\textbf{\textcolor{LightGoldenrod}{Cover Illustration by Dusan Bicanski \textbullet\ \texttt{http://www.public-domain-image.com}}}
\end{center}

I’ve also added a table of contents with a simple \tableofcontents. The ToC heading is printed as a chapter heading, so I created a fancy style for it, without the chapter number and background picture, by modifying our fancy chapter code from earlier.

All in all, here’s what our sample book now looks like (empty pages omitted):



Download links of the LaTeX code producing the above:

Illustrations courtesy of PublicDomainImage.com here, here and here; OpenClipart Project here.

Epilogue

Well it’s been fun writing this series. It sure took me some time to prepare the sample code, search for appropriate illustrations and write up the posts, but I’m glad I documented how I achieved some of the effects in that Grid Computing Cluster book. Many thanks to all the readers and especially those who kept the comments section lively. You sure motivated me to finish writing this series! 😀