I have found that for only one page (so far) the spacing between the header and content is different from the spacing on all the other pages. You can see this behavior in the images below (from pages 2 and 3 of the document):

correct spacing incorrect spacing

My .tex file contents are shown below.


\renewcommand{\chaptermark}[1]{\markboth{\thechapter. #1}{}}
\fancyhead[L]{\bfseries \leftmark}
\fancyhead[R]{\bfseries \rightmark}

\chapter{Version Control}

  • 1
    Your example tex does not produce the output in your pictures. It does not contain the text "Project Overview". It doesn't even compile because of the \My Subtitle.
    – Lev Bishop
    Aug 27 '10 at 3:04
  • 1
    For Lorem ipsum, I recommend the lipsum package. It makes minimal examples much smaller.
    – TH.
    Aug 27 '10 at 8:16
  • I sanitized the document before posting which caused the discrepancy in the images and the produced document. A typo caused it not to compile. I have fixed both issues and incorporated the excellent lipsum package into the example. Thanks for the tip! Aug 27 '10 at 12:17
  • I minimized your example a little bit. Hope you don’t mind.
    – Caramdir
    Aug 27 '10 at 12:43
  • I don't mind at all. A minimalist example that demonstrates the problem more clearly is a great thing. Thanks for the added clarity. Aug 27 '10 at 13:45

Compiling the document produces the following warning on page 2:

Package Fancyhdr Warning: \headheight is too small (0.0pt): Make it at least 12.0pt. We now make it that large for the rest of the document. This may cause the page layout to be inconsistent, however.

Doing what fancyhdn suggests, i.e. replacing \setlength{\headsep}{0.5cm} by \setlength{\headheight}{0.5cm} fixes the problem.

  • 1
    Excellent, this worked perfectly, thanks. I am not sure why I didn't see the warning. I'll take extra care to check what LaTex is telling me next time. Aug 27 '10 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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