ManticMoo.COM All Articles Jeff's Articles
Jeffrey P. Bigham

Setting Margins with LaTeX

Jeffrey P. Bigham

Related Ads

Setting margins with LaTeX is notoriously difficult. Not only do you have to find the commands to set the margins, but you have to worry about setting the width/height of the text areas too. Fortunately, the geometry package will do a lot of this for you, so to set your margins to 1in on all sides, you'd just do this:


\usepackage[margin=2cm]{geometry}

That works in most cases. Your other option is to manually mess with the various margins via commands like the following. These commands don't set the absolute value of the margins, but rather either add to or subtract from the starting value. The following attempts to set 1 inch margins all around. It usually fails :)


\addtolength{\oddsidemargin}{-0.875in}
\addtolength{\evensidemargin}{-0.875in}
\addtolength{\textwidth}{1.5in}

\addtolength{\topmargin}{-0.875in}
\addtolength{\textheight}{1.5in}

Jeffrey P. Bigham
ManticMoo.COM All Articles Jeff's Articles