[Tex/LaTex] fancyhdr plus fontsize 12pt causes varying vertical alignment of sections

fancyhdrfontsizeheader-footersectioningvertical alignment

Looking at the example provided in Different headers for different chapters, I noticed something strange: The vertical alignment of sections is varying. I was able to strip the effect down to the following (hopefully minimal) example:

\documentclass[12pt]{report}

\usepackage{fancyhdr}
\pagestyle{fancy}

\begin{document}

\chapter{My First Chapter}
\clearpage
\section{Section 1}
\clearpage
\section{Section 2}
\clearpage
\section{Section 3}

\end{document}

If you look closely, the vertical alignment of "Section 1" differs from those of "Section 2" and "Section 3" (which are the same). The effect disappears if you either a) refrain from using the fancyhdr package and \pagestyle{fancy} or b) switch to the 10pt class option. What is causing this strange vertical alignment?

Best Answer

I think you can find in the log the complaint that due to insufficient \headheight the alignment might be uneven. Try to increase \headheight.