[texhax] a4paper set margins

Steve Schwartz s.schwartz at imperial.ac.uk
Sun Oct 8 22:51:02 CEST 2006


On Sun, 2006-10-08 at 15:57 -0400, M.N.Smadi wrote:
> hi there;
> i have \documentclass[a4paper,12pt]{article} and the document shows up 
> with huge margins all around. I used:
> \textwidth 6.5in
> \textheight 9in
> it fixed the margins on the left and right side but not on the top. How 
> can i override the top margin in a4paper sheet?

The purist's answer is to look at the packages offered in the TeX FAQ:


but here's my minimal prescription, which you can either save as a .sty
file or put into your preamble:

--- snip ---

% a4sjs.sty
\typeout{a4sjs.sty has \headheight and \headsep = 0. Change these if
in preamble and subtract off of \textheight.}
\setlength\paperheight {297mm}%
\setlength\paperwidth  {210mm}

\oddsidemargin 0pt
\evensidemargin 0pt
\topmargin 0pt
\headheight 0pt
\headsep 0pt
\textwidth \paperwidth
\textheight \paperheight

--- snip ---

This gives 1 inch margins all around (the (La)TeX default page starts
1in down and 1in to the left of the top left corner) and no space for
headers or footers. You can set the header parameters (and the footer
ones \footskip and \footheight) and adjust \textheight accordingly. I
attach the output from layout.tex (an old latex 2.09 source) that shows
all the page layout parameters. Perhaps someone has an up-to-date
equivalent, but I find this helpful.


Professor Steven J Schwartz      Phone: +44-(0)20-7594-7660
Space and Atmospheric Physics    Fax:   +44-(0)20-7594-7772
The Blackett Laboratory          E-mail: s.schwartz at imperial.ac.uk
Imperial College London          Office: Huxley 6M70 
London SW7 2BW, U.K.             Web: http://www.sp.ph.ic.ac.uk/~sjs

-------------- next part --------------
A non-text attachment was scrubbed...
Name: layout.pdf
Type: application/pdf
Size: 55382 bytes
Desc: not available
Url : http://tug.org/pipermail/texhax/attachments/20061008/315c7af3/attachment-0001.pdf 

More information about the texhax mailing list