In the vmargin package, the \setmarginsrb command sets margins, among other things, with this syntax:

\setmarginsrb{left margin}{top margin}{right margin}{bottom margin}%


The first four parameter set the width of the left margin, etc. What do parameters headheight, headsep, footheight, and footskip do? I gather that they have something to do with placement of headers and footers, but I'm having trouble finding documentation that explains this clearly. The vmargin documentation doesn't make it very clear, and I'd like to understand what I'm doing rather than experimenting until it looks right.

Feel free to send me to another question or an external a page that provides a good explanation.

• possible duplicate of Displaying page construction guides – Werner Sep 8 '13 at 4:28
• @Werner I think this question is related to the one you linked to, but it's not really a duplicate. The question here is about four specific dimensions and not about the general page layout. – Gonzalo Medina Sep 8 '13 at 4:39
• Right, I agree @GonzaloMedina, it's not a duplicate, as my comments to your answer indicate. The standard diagrams that are referenced in the other question's answers don't explain enough. – Mars Sep 8 '13 at 4:40
• Don't use vmargin: it's incompatible with packages such as ateveryshi that's used by eso-pic or others that try to place things in the background of a page. I think that geometry is much easier for setting the page parameters. – egreg Sep 8 '13 at 9:53

An image is worth a thousand words:

\documentclass{article}
\usepackage{layout}

\begin{document}

\layout

\end{document}


• \headheight is the height od the area reserved to typeset headers.

• \headsep is the vertical length between the header and the top of the text area.

• \footskip is the vertical length between the bottom of the text area and the bottom of the area reserved for footers.

• \footheight is a command not used anymore in LaTeX2e; it's there just for compatibility reasons. The vmargin documentation says about \footheight:

LaTeX2e (unless in compatibility mode) does not know \footheight any more. vmargin does not set this variable if it does not exist, and sets it if it does. As \footheight was not used by LaTeX 2.09 all this has little significance.

In the standard classes, the top of the text is at a distance of \voffset+1in+\topmargin+\headsep+\headheight from the upper border of the physical page (by dafault, \voffset=0pt).

I've never used the vmargin package. If you want to customize the page layout, popular packages are geometry and typearea. The documentation for geometry contains also useful explanations on the lengths used in the desaign of page layout.

• Sorry about commenting too fast, Gonzalo. I've deleted my first comment as it's no longer appropriate. OK, I'm still a little confused. What's the relationship between \headheight and \topmargin? Does the text start \headsep + \headheight + \topmarginbelow the top of the paper? – Mars Sep 8 '13 at 4:32
• @Mars in the standard classes, the top of the text is at a distance of \voofset+1in+\topmargin+\headsep+\headheight from the upper border of the physical page (by dafault, \voffset=0pt). – Gonzalo Medina Sep 8 '13 at 4:35
• @Mars I added my last comment to my answer. – Gonzalo Medina Sep 8 '13 at 4:46
• Thanks Gonzalo. The \layout diagram makes sense now. And I just looked at the geometry documentation and tried it for the first time. You're right--the diagrams are very clear, and I now have a simpler solution for dealing with my grant application's 1-inch margins requirement. – Mars Sep 8 '13 at 4:56
• @Mars You're welcome. Glad to hear the problem's been solved. – Gonzalo Medina Sep 8 '13 at 5:03