I've checked through the documentation on TeX and LaTeX, but so far
haven't been able to find what I need to know. Does anyone have a
solution?
Please email me, as I don't read this newsgroup regularly.
Thanks...Dan
--
Dan Charrois - University of Alberta, Electrical Engineering
INTERNET: cha...@eigen.ee.ualberta.ca
How does one change the default margin settings in TeX?
In Plain TeX, you use \hoffset and \voffset (qq.v.) to set the margins
at the left and right of the page. The parameters \hsize and \vsize
control the size of the chunk of text on the page.
Here's one way to set the margins for a plain TeX document:
% choose some margins:
\newdimen\sidemargin \sidemargin=20mm
\newdimen\topmargin \topmargin=\sidemargin
\newdimen\botmargin \botmargin=1.25\topmargin
% calculate size and offset parameters:
\hsize=210mm \advance\hsize-2\sidemargin
\vsize=297mm \advance\vsize-\topmargin \advance\vsize-\botmargin
\hoffset=\sidemargin \advance\hoffset-1in
\voffset=\topmargin \advance\voffset-1in
This example gives an A4 page (210mm * 297mm) with 20-mm margins at the
top and sides and a slightly larger margin at the bottom. You might
want to change the assignments to \hsize and \vsize to 8.5in and 11in
(or whatever).
The above code has the flaw that it does not set \vsize to a multiple of
\baselineskip (which is important of you have \parskip=0pt and so very
little vertical glue).
In LaTeX you should in theory have style option files to do this for
you. In practice you have to translate the above into LaTeX's
terminology and put it in your document preamble. I think the following
is approximately right:
\setlength{\oddsidemargin}{20mm}
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\topmargin}{\sidemargin}
\newlength{\botmargin} \setlength{\botmargin}{1.25\topmargin}
\addtolength{\oddsidemargin}{-1in}
\addtolength{\evensidemargin}{-1in}
\addtolength{\topmargin}{-1in}
\addtolength{\botmargin}{-1in}
\setlength{\textwidth}{210mm}
\addtolength{\textwidth}{-\oddsidemargin}
\addtolength{\textwidth}{-\evensidemargin}
\addtolength{\textwidth}{-2in}
\setlength{\textwidth}{297mm}
\addtolength{\textwidth}{-\topmargin}
\addtolength{\textwidth}{-\botmargin}
\addtolength{\textwidth}{-2in}
LaTeX has built-in parameters \evensidemargin, \oddsidemargin and
\topmargin, all of which are set to be one inch less than you want the
margins to be. The above code creates a new parameter \botmargin with
the same conventions.
Hope this helps
Damian