Controlling page dimensions/length using Latex

By Alvin J. Alexander, devdaily.com

In the example below I'm showing how you can change a bunch of document length parameters. The values don't really make any sense -- I've just thrown some numbers in there. I just want to remember how to do this. (For what I'm trying to achieve today my goal was to get rid of all the margins on the left side of the page. Then I decided to throw in a few other values.)

Some of this stuff can be found on pp. 84-89 of The Latex Companion. With no more warning, here's the code.

%
% how to set page dimensions in latex
%

%
% a "typical" documentclass config
%
\documentclass[twoside,11pt]{article}

%
% mess with a bunch of length parameters
%
\setlength{\paperwidth}{4.0in} 
\setlength{\paperheight}{8.1in}
\setlength{\topmargin}{-1.5in}
\setlength{\hoffset}{-1.5in}
\setlength{\voffset}{-1.5in}
\setlength{\textheight}{3.3in}
\setlength{\textwidth}{4.5in}
\setlength{\oddsidemargin}{0.0in}
\begin{document}

%
% your document goes here ...
%

devdaily logo