[OS X TeX] layout, margins, etc.
Claus Gerhardt
gerhardt at math.uni-heidelberg.de
Fri Oct 13 19:47:46 CEST 2006
After looking up margin in the index of the Latex Companion and being
referred to the Layout Section, I learnt of the layout package, which
after loading and entering the command \layout, shows you the actual
settings of your document in points.
Also shown is a layout scheme with the help of which changes to
settings can be easily arranged, e.g.,
\hoffset=-0.5in
will give you 1/2in margins, or at least what we laymen call margins.
The \textwidth has of course to be specified accordingly to get both
margins right, see below.
Since I consider the layout to be very sensitive, I would like to
have its settings under complete control, unless of course I have to
use a given setting. Therefore, instead of using the geometry
package, I prefer to arrange my settings according to the layout
scheme guided only by my taste.
Especially for a preprint I prefer to define the textheight and the
textwidth and have the body centered in the page regardless of the
dimensions of the page. This will be achieved by the definitions below.
Claus
\RequirePackage{calc}
\newlength{\oddsidemarginlength}
\newlength{\topmarginlength}
\hoffset=0pt
\voffset=0pt
\textwidth = 11.7cm
\setlength{\textheight}{18.93cm -\topskip}
\newcounter{numberoflines}
\newcounter{tempcc}
\setcounter{numberoflines}{\textheight}
\setcounter{tempcc}{\baselineskip}
\setcounter{numberoflines}{\value{numberoflines}/\value{tempcc}}
\setlength{\textheight}{\baselineskip*\value{numberoflines}+\topskip}
\setlength{\oddsidemarginlength}{(\paperwidth-\textwidth)/2-1in}
\setlength{\topmarginlength}{(\paperheight-\textheight)/2-1in}
\oddsidemargin=\oddsidemarginlength
\evensidemargin=\oddsidemargin
\topmargin=\topmarginlength
\headsep=20pt
------------------------- 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