1

I am trying to insert a big header, but it pushes the text and footer.

With short header I get this:

Good

But when I increase header size the text and footer move.

Bad MWE:

\documentclass[headheight=24pt]{article}
\usepackage[showframe]{geometry}
\usepackage{fancyhdr}
\renewcommand{\headrule}{}
\pagestyle{fancy}
\fancyhf{}
\chead{
\vspace{.5cm}
Header
\vspace{.5cm}
}
\cfoot{
Footer
}
\begin{document}
First page text\footnote{first page footnote}
\newpage
\end{document}

1 Answer 1

1

From your MWE you should get two warning messages:

LaTeX Warning: Unused global option(s): [headheight=24pt].

Package Fancyhdr Warning: \headheight is too small (12.0pt): Make it at least 40.45273pt.

To resolve the first, remove the [headheight=24pt] option. It is not used and 24pt would nevertheless still be too small, as the second warnungs tells us. To remove the second warning, add \setlength{\headheight}{40.5pt} to your preamble.

enter image description here

Complete MWE:

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{fancyhdr}
\setlength{\headheight}{40.5pt}
\renewcommand{\headrule}{}
\pagestyle{fancy}
\fancyhf{}
\chead{
\vspace{.5cm}
Header
\vspace{.5cm}
}
\cfoot{
Footer
}
\begin{document}
First page text\footnote{first page footnote}
\newpage
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .