[OS X TeX] centering a resized text field
Bruno Voisin
bvoisin at mac.com
Mon Oct 3 10:09:46 CEST 2005
Le 3 oct. 05 à 09:22, Ewan Delanoy a écrit :
> \topmargin+\textheight+\footskip= total height of the page
Not quite:
\topmargin+\headheight+\headsep+\textheight+\footskip=total page height
There's also a default one-inch margin at the top of the page, before
\topmargin.
The LaTeX manual (2nd edition) has a drawing of this (inconvenient)
page design on p. 182.
Personally, to get one-inch margin on all sides of the page (top,
bottom, left, right) without any header, I'm using the following code:
\setlength{\oddsidemargin}{0pt}
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-2in}
\setlength{\topmargin}{0pt}
%\setlength{\headheight}{0pt}
%\setlength{\headsep}{0pt}
\setlength{\textheight}{\paperheight}
\addtolength{\textheight}{-2in}
\addtolength{\textheight}{-\headheight}
\addtolength{\textheight}{-\headsep}
\addtolength{\textheight}{-\topskip}
\addtolength{\textheight}{-\footskip}
\divide\textheight by\baselineskip
\newcounter{tempcounter}
\setcounter{tempcounter}{\textheight}
\setlength{\textheight}{\value{tempcounter}\baselineskip}
\addtolength{\textheight}{\topskip}
But a better solution seems to be the geometry package. I haven't
tried it myself (lack of time for experimentation), but many people
swear by it.
Bruno Voisin
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the macostex-archives
mailing list