LaTeX技巧343:pstricks制作精美的书籍封面
近日看一些pstricks,有些作者制作了自己的封面,非常帅气和大家分享下。代码是我摘取的。
制作代码如下:
\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{xcolor}
\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]{duck}}
% 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{blue}{Donald Duck turns overs}}
\rput[lb](8.94,6.5){\PTsmallest \color{blue}{China\TeX blog}}
\rput[lb](9.04,0.8){\PTsmallest \color{blue}{China\TeX 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}Donald Duck turns overs
}
\end{turn}
}
% put the publisher’s logo on the spine
\rput[b](6.62,0.75){\color{white}{\fbox{\Logo CP}}}
% 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=0.75in]{lion}}
%\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}{No matter how often thwarted and how deeply humiliated, Donald Duck forges on. He turns 75 years old today.
latexstudio@hotmail.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 CP}{\PTsmallest {China\TeX Press}}}}
\rput[lb](1,1){\PTtext \color{white}{China\TeX --- MY}}
\rput[lb](1,0.8){\PTtext \color{white}{ http://blog.sina.com.cn/wangzhaoli11}}
\end{pspicture}
\end{document}
参考:
http://www.tug.org/pracjourn/2007-1/robbers/