3

I am trying to entirely fill a 5.5'' x 8.5'' book cover with color.

But, there is a vertical white strip, which for some reason, I have not been able to fill.

Consider the code

\documentclass[12pt]{book}
\usepackage[hmargin=0in,vmargin=0in,paperwidth=5.5in,paperheight=8.5in]{geometry}
\usepackage{color}
\usepackage{pstricks,psvectorian}
\definecolor{Blue}{RGB}{33,41,88}
\definecolor{Gold}{RGB}{228,168,73}

% Overlay Title
\newcommand{\mytitle}[1]% #1 = title
{\bgroup
  \Huge
  \sbox0{\parbox{\columnwidth}{\centering\textbf{\color{black}#1}}}%
  \sbox1{\parbox{\columnwidth}{\centering\textbf{\color{Gold}#1}}}%
  \usebox0\llap{\raisebox{1.37pt}{\usebox1}}
\egroup}

\begin{document}
\thispagestyle{empty}

\begin{pspicture}[showgrid](-6.985,0)(6.985,21.59)%
\renewcommand*{\psvectorianDefaultColor}{Gold}%
\psframe[fillcolor=Blue,fillstyle=solid](-6.985,0)(6.985,21.59)%
\psframe[linecolor=Blue](-6.985,0)(6.985,21.59)% draws frame.

\rput(0,15){\mytitle{My Book Cover}}
\end{pspicture}
\end{document}

which produces the output

enter image description here

I compile with xelatex

QUESTION: Can anyone see what I might be doing wrong? Perhaps there is a problem with my specifications when calling in the geometry package or in the way I am defining the pspicture?

Thank you.

12
  • unrelated but use boxes 0 and 2 not 0 and 1 Jan 4 at 1:56
  • @DavidCarlisle The \sbox0 and \sbox1? For, when I change the 1 to a 2, I get black instead of gold. Jan 4 at 2:03
  • never use odd numbered scratch registers for local assignments so sbox2 and usebox2 Jan 4 at 2:05
  • @DavidCarlisle As so: \sbox0{\parbox{\columnwidth}{\centering\textbf{\color{black}#1}}}% \sbox2{\parbox{\columnwidth}{\centering\textbf{\color{Gold}#1}}}% \usebox0\llap{\raisebox{1.37pt}{\usebox2}} ?? (This does seem to work.) Jan 4 at 2:09
  • 1
    Off topic, but printed covers are usually done on larger paper and cut to size. Jan 4 at 4:34

1 Answer 1

6

Try this code.

The pspicture environment starts a new (indented) paragraph. To suppress it add \noindent before.

a

\documentclass[12pt]{book}
\usepackage[hmargin=0in,vmargin=0in,paperwidth=5.5in,paperheight=8.5in]{geometry}
\usepackage{color}
\usepackage{pstricks,psvectorian}
\definecolor{Blue}{RGB}{33,41,88}
\definecolor{Gold}{RGB}{228,168,73}

% Overlay Title
\newcommand{\mytitle}[1]% #1 = title
{\bgroup
    \Huge
    \sbox0{\parbox{\columnwidth}{\centering\textbf{\color{black}#1}}}%
    \sbox2{\parbox{\columnwidth}{\centering\textbf{\color{Gold}#1}}}%
    \usebox0\llap{\raisebox{1.37pt}{\usebox2}}
    \egroup}

\begin{document}
    \thispagestyle{empty}
    
\noindent\begin{pspicture}[showgrid](-6.985,0)(6.985,21.59)%
    \renewcommand*{\psvectorianDefaultColor}{Gold}%
    \noindent\psframe[fillcolor=Blue,fillstyle=solid](-6.985,0)(6.985,21.59)% changed <<<<<<
    \psframe[linecolor=Blue](-6.985,0)(6.985,21.59)% draws frame.   
    \rput(0,15){\mytitle{My Book Cover}}
    \end{pspicture}
\end{document}
3
  • Many thanks Simon Dispa. Jan 4 at 14:29
  • If you have time, you may want to post the output as well, so that other viewers can see how nicely the answer works. Thanks again. Jan 4 at 14:35
  • @mlchristians Done! Thank you for your feedback!! Jan 4 at 14:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .