4

I want to create a book cover and for a start I want to add color to my page.

The problem is that when I add the given geometry page and write down the \psframe, the result I get is a page with colour on some of it, that means, 3/4 of the page is colored and some left blank. Can you help me fix it?

Here is the code:

\documentclass[12pt]{article}

\usepackage[paperwidth=36cm,paperheight=24cm,margin=0cm]{geometry}
\usepackage{pst-all}
\usepackage{pstricks-add}
\begin{document}
\thispagestyle{empty}
\psset{unit=1cm}

\begin{pspicture}(36cm,24cm)

\psset{fillstyle=gradient,linestyle=none,gradbegin=blue,
gradend=yellow,gradangle=45,gradlines=1048}
\psframe(0,0)(36,24)
\end{pspicture}
\end{document}
  • 1
    Here, if I convert the ps to pdf using dvips and ps2pdfand view it, everything is quite fine. – Denis Mar 5 '15 at 15:11
4

The pspicture environment sets a block of given dimensions, very similar to what a single letter would do (in this case, just a very big character of width 36cm and height 24cm). So, similar to a single letter starting a paragraph that has a given \parindent, your pspicture does the same. Therefore, add

\noindent

before your pspicture environment so there is no indent set. Alternatively, add \setlength{\parindent}{0pt} to your preamble for a global removal of the paragraph indent. Since geometry has margins set to 0cm, the size of the pspicture should fill the entire page.

| improve this answer | |
  • Thank you so much both for your answers. Everything now works! – George Mar 5 '15 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.