I am writing a paper with the article document class. The first page contains a large footer than other pages. I want to make it filled with text like the other pages and contains the same footer. a minimal working code is:

\usepackage{graphicx} % for pdf, bitmapped graphics files
\usepackage{amsmath} % assumes amsmath package installed
\usepackage{amssymb}  % assumes amsmath package installed
%\usepackage{deleq} % to divide on equation
%\usepackage{bbm} % to represent the space dimension
%\usepackage{bbding} % to represent the space dimension
\usepackage{dsfont} %to represent the space dimension

%\setmainfont{Times New Roman}
\fancyfoot{} %\fancyfoot[LE,RO]{\thepage}
%\fancyhead[L] {\thepage\\}CO,CE
\fancyhead[le,ro]{\thepage\\ \it{LPVIOID-Toolbox .}}


\newcommand{\ParGraph}{\\ \indent}
\title{\bfseries \fontsize{13}{15}\selectfont
LPVIOID- toolbox}

\author[ ]{\bfseries \fontsize{11}{13}\selectfont Mustafa Rabeei}
\affil[ ]{\itshape \fontsize{10}{15}\selectfont Electrical Engineering Department.
 E-mails: {\tt eng.mustafa.rabeay@gmail. }}




\section{the first section}
\section{the second section}
  • Actually I did. Most of the code is a preamble containing the used packages. I leaved it since it affects the header, footer and titles. I want the solution not to make a conflict with any of the settings used. – user16558 Jun 29 '13 at 1:57
  • Yikes. Alrighty then. I can't be sure, but I think TeX has moved it up slightly to align with the bottom of the text rather than leave a small bit of whitespace there. Either leaving a fair amount of space or no space kind of thing. – Sean Allred Jun 29 '13 at 2:05
  • 1
    Duplicate of tex.stackexchange.com/questions/59988/… – mforbes Jun 29 '13 at 2:28

The problem is a duplicate of question: fancyhdr - anomalous behaviour on first page. You customize the header so that it has two lines (by including a line-break \\).

The solution is to manually set the \headheight to be large enough with a command like


or, as suggested in the documentation when including a multi-line header,


If you want a more complete solution that works automatically after several runs, look at heiko-oberdiek's answer to a related question.


The issue is that fancyhdr does not "look a head" to see what content will appear in the header on each page before it typesets it. This content is potentially dynamic, and can therefore have different heights, hence it simply checks to see if the current height will fit in the allocated \headheight space on each page. If not, it emits a warning with the current height of the header and suggests that you set the \headheight to a larger value.

See also the discussion in this answer.

Here is a minimal example demonstrating the problem.

  textheight=\the\textheight, voffset=\the\voffset,
  headheight=\the\headheight, headsep=\the\headsep}


%\setlength{\headheight}{26pt}  % Hack that fixes the problem.
\section{the first section}
\section{the second section}

On the first page \headheight=12pt while on the rest \headheight=25.2842pt. This value can be deduced from the warning message from latex the compile output and log:

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


| improve this answer | |

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.