[OS X TeX] Problem with geometry
Luis Sequeira
lfsequeira at gmail.com
Mon Jun 2 09:18:37 EDT 2008
>
> I like to plot some function graph on an landscape DIN A4 paper. No
> headers, footers, margins etc. are needed, I want to use the whole
> sheet for printig.
>
> I tried
>
> ---
> %!TEX TS-program = latex
> %LaTeX -> DVI -> PS -> PDF
> \documentclass[12pt,landscape,a4paper]{article}
> \usepackage[dvips,a4paper,landscape]{geometry}
>
> \usepackage{pstricks,pstricks-add,pst-math}
>
> \geometry{textwidth=27cm,top=0cm,textheight=20cm}
> \begin{document}
>
> \newcommand{\f}{1/400*x^3-3/20*x^2+3*x-8}
> \newcommand{\g}{1/400*x^3-3/20*x^2+3*x-22}
>
> \pagestyle{empty}
> \psset{algebraic=true}
>
> \begin{pspicture}(10,0)(35,20)
>
> \psplot{10}{30}{\f}%f
> \psplot{10}{30}{\g}
>
> \end{pspicture}
>
> \end{document}
> ---
>
> The problem is, that the picture does not start at the top of the page
> and the bottom of the picture is cut of at the bottom of the page.
>
> I tried several variation of the geometry setting, but nothing helped.
> In deed, I do not understand the concept of the geometry package.
>
> Can anyone help me?
>
> hs
>
Sorry to come in late on this discussion, but...
As someone has already pointed out, there is no problem with the use
of geometry here, it is just that you're not using the most convenient
coordinates for your pspicture environment - namely, the second graph
has points with negative y, and they are outside the frame you chose
for your pspicture environment.
A most useful pstricks command that nobody mentioned is \psgrid
Just include it inside your pspicture:
\begin{pspicture}(...)
\psgrid
....
\end{pspicture}
and will see that the picture DOES start at the top of the page.
Also, you get a clearer notion of where your graphs lie in the
coordinate plane.
Also, and although pdftricks does come in handy on occasion, this
seems clearly one case where you are much better off by running
latex+dvips+ps2pdf, as you were doing.
Luis Sequeira
More information about the MacOSX-TeX
mailing list