[texhax] can't control page size - why? (the real problem)

Tom Schneider toms at ncifcrf.gov
Tue Apr 25 17:47:16 CEST 2006

Hi

Sorry for the blank email.  I thought I had solved this problem, and
sent that inadvertantly.  Then I discovered that it is not solved.

I'm unable to control the page height and width in the following:

\documentclass{article}
% Boil down a page control example
\textheight 17.0cm % this doesn't work for some reason
\textwidth  16.0cm % this doesn't work for some reason
% If I put in the above commands, the page gets LONGER in the final PDF.
\topmargin -0.8in % shifts the whole thing up, no top edge
\oddsidemargin -1.2in % eliminates left edge
\begin{document}
\pagestyle{empty}%
\newcommand{\boxsize}{16cm} % box dimension
\newcommand{\figcenter}{8cm} % box dimension
\newcommand{\boxheight}{\boxsize} % height of box
\newcommand{\boxwidth}{\boxsize} % width  of box
\fbox{%
\parbox[l][\boxheight][t]{\boxwidth}{%
\vspace{\figcenter}\hspace{\figcenter} % a centered location
say something here
}%
}
\end{document}

Could someone tell me how to get textheight and textwidth to work
please?  I have done this before but for some reason it's not
happening in this case.  The postscript and the pdf have extra
material around the fbox that I don't want.

If I make

\textheight 16.0cm

then I get an EXTRA page before my box, and it ends up on the next page.

LaTeX seems to think that the fbox is slightly bigger than 16cm, which
is ok, but the mysterious part is that the first page has WAY more
space than 16 cm!

How do I get full control of the actual page dimensions?

I THOUGHT I could get full control using the geometry package:

http://www.ctan.org/tex-archive/macros/latex/contrib/geometry/

This package claims to give full control over the page but it doesn't
happen.  For example, these all fail to change the bounding box in
postscript:

\usepackage[total={16cm,16cm},margin=0cm]{geometry}
%%BoundingBox: 0 0 595 842

\usepackage[a2paper,papersize=17.0cm,margin=0.1cm]{geometry}
%%BoundingBox: 0 0 595 842

\usepackage[screen,papersize=17.0cm,margin=0.1cm]{geometry}
%%BoundingBox: 0 0 595 842

\usepackage[screen,papersize=8.0cm,margin=3.0cm]{geometry}
%%BoundingBox: 0 0 595 842

where the resulting bounding box line is given.

What I want to do:  Create a square page of a given size, probably
with no margins, so that I can use the resulting postscript or pdf as
a figure.

Help!

Thanks!

Tom

Dr. Thomas D. Schneider
National Institutes of Health
National Cancer Institute
Center for Cancer Research Nanobiology Program
Molecular Information Theory Group
Frederick, Maryland  21702-1201
toms at ncifcrf.gov
permanent email: toms at alum.mit.edu (use only if first address fails)
http://www.ccrnp.ncifcrf.gov/~toms/

http://en.wikipedia.org/wiki/Top-posting
http://www.uwasa.fi/~ts/http/quote.html

Note:  saying 'the geometry package' is not so helpful to people,
especially beginners (!).  It is much nicer to give an *exact* url so
people have no doubt.