TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I try to set up the left and right margins to 1 inch, top and bottom margins to 0.5 inch. The following is my code:

% Setup the margin
\usepackage[centering, margin={1in, 0.5in}, includeheadfoot]{geometry}
\setlength{\headheight}{0.6in} 
\setlength{\headsep}{25pt}
\setlength{\topmargin}{0pt}
\setlength{\footskip}{25pt}
\setlength{\marginparsep}{11pt}

But I don't know why the result doesn't show me the correct page setup.

enter image description here

As you can see, obviously the bottom margin is 0 and the footer is missing. That's not what I set up. Could anybody tell me what's wrong with my code? and how to fix it? Thank you very much.

share|improve this question
up vote 13 down vote accepted

Because you overrode the default settings defined by the geometry package (such as \footskip) then the last settings will be applied to take effect. You set \footskip to 25pt and that is too small!

I recommend that you use geometry's settings only rather than mixing them with native length macros. The following native length macros should not be used if you have already loaded the geometry package.

\setlength{\headheight}{0.6in} 
\setlength{\headsep}{25pt}
\setlength{\topmargin}{0pt}
\setlength{\footskip}{25pt}
\setlength{\marginparsep}{11pt}

The link How to avoid getting cropped marginpar? and the following code snippet may help you to understand how to set up the page layout.

\documentclass{article}
\usepackage
[
        a4paper,% other options: a3paper, a5paper, etc
        left=1cm,
        right=2cm,
        top=3cm,
        bottom=4cm,
        % use vmargin=2cm to make vertical margins equal to 2cm.
        % us  hmargin=3cm to make horizontal margins equal to 3cm.
        % use margin=3cm to make all margins  equal to 3cm.
]
{geometry}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\end{document}

If you need more, drop a comment.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.