Graphics, Figures & TablesPSTricks to cover entire page

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Abdaxz
Posts: 3
Joined: Mon Jun 06, 2011 8:40 pm

PSTricks to cover entire page

Post by Abdaxz »

Hi,

I am trying to get PSTricks to cover an entire page. The objective in the long run is to create a presentation template so therefore I began using Beamer but since I ran into problems, I opted to do it using a standard article as basis but got the same result -- which I will explain now.

When I try to cover a page with PSTricks I do not get the PSTricks frame all the way to the left and top. The code I use is the following, in a sty-file:

Code: Select all

\ProvidesPackage{lnupres}
\NeedsTeXFormat{LaTeX2e}
\RequirePackage[
    latex={-interaction=nonstopmode},
    crop=off,runs=2
  ]{auto-pst-pdf}
\RequirePackage{geometry}
\geometry{paperwidth=12.8cm,paperheight=9.6cm,margin=0cm}
%\psset{unit=1mm}
\RequirePackage{graphicx}

\def\maintitle{
\pagestyle{empty}
\fbox{
 \begin{pspicture}(12.8cm, 9.6cm)
\psframe[fillstyle=solid,fillcolor=Maroon](0,0)(12.8cm, 9.6cm)
\pscircle*[linewidth=2pt](1.5,1.5){1.5}
\end{pspicture}
}
}
All the above is based on Robberts' guide for creating book covers.

In the tex-file I have the following code:

Code: Select all

\documentclass[10pt]{article}
\usepackage[swedish]{babel}
\usepackage[utf8]{inputenc}
\usepackage[dvipsnames,prologue,table]{pstricks}
\usepackage{pst-all}
\usepackage{lnupres}

%opening
\title{}
\author{}

\begin{document}
\thispagestyle{empty}

\maintitle

\end{document}
I would prefer to use Beamer, but anything that can help me to solve this would be nice.

Thanks for any help!

//Tobias

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

PSTricks to cover entire page

Post by CrazyHorse »

Code: Select all

\PassOptionsToPackage{svgnames,prologue,table}{xcolor}
\documentclass{beamer}
\usepackage{pstricks}
\begin{document}

\begin{frame}[plain]
\begin{pspicture}(\paperwidth, \paperheight)
\psframe[fillstyle=solid,fillcolor=Maroon](\paperwidth, \paperheight)
\pscircle*[linewidth=2pt](1.5,1.5){1.5}
\end{pspicture}
\end{frame}

\end{document}
Abdaxz
Posts: 3
Joined: Mon Jun 06, 2011 8:40 pm

Re: PSTricks to cover entire page

Post by Abdaxz »

Hi,

Thanks for the fast answer! It was really helpful, but not quite all the way...

When I try your code, I still don't get the entire page covered -- there are still a small white margin at the top and a rather wide margin to the left that is also white. I need it to cover the entire page...

As I did not get the example by Robberts to work entirely either, could there be something wrong with my LaTeX? Or am I missing something obvious?

Best regards,

Tobias
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

PSTricks to cover entire page

Post by CrazyHorse »

Abdaxz wrote: When I try your code, I still don't get the entire page covered -- there are still a small white margin at the top and a rather wide margin to the left that is also white. I need it to cover the entire page...
then set the left margin and footline to zero:

Code: Select all

\PassOptionsToPackage{svgnames,prologue,table}{xcolor}
\documentclass{beamer}
\usepackage{pstricks}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}{}
\setbeamersize{text margin left=0pt}
\begin{document}

\begin{frame}[plain]{}
\begin{pspicture}(\paperwidth, \paperheight)
\psframe[fillstyle=solid,fillcolor=Maroon](\paperwidth, \paperheight)
\pscircle*[linewidth=2pt](1.5,1.5){1.5}
\end{pspicture}
\end{frame}

\end{document}
Herbert
Abdaxz
Posts: 3
Joined: Mon Jun 06, 2011 8:40 pm

Re: PSTricks to cover entire page

Post by Abdaxz »

Hi Herbert and possibly others,

Almost there! The left margin is now gone, but there still is a small white stripe on the top... I have of course tried to set the top margin to zero, but to no effect.

Any ideas? I really appreciate your help!

//Tobias
Post Reply