TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 am trying to create a page border that encapsulates the header and footer not just the body of a TeX document.

Here is what i've got:


\usepackage[a4paper,vmargin={20mm,20mm},hmargin={20mm,20mm}, includehead, includefoot]{geometry}



Document text goes here...


When I take out the includehead and includefoot tags the border stays at 2cm on all sides but page numbers are still on the outside of the border. When I include these tags page numbers stay on the outside and the border on top/bottom is no longer 20mm. I theorise that this is due to header/footer. Any pointers?

share|improve this question
up vote 2 down vote accepted

try this \fancypage{}{\fbox}

share|improve this answer
Excellent. thanks – klonq Jul 4 '11 at 14:15

Your Answer


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.