I am writing a short note. I would like to include a graphics file with a logo in the header of all pages including the front page. The logo is roughly the size of the box generated in the example below.

I am trying to use the fancyhdr package. There are (at least) two problems:

  1. Too little space between the logo and the title on the front page
  2. The page margin at the bottom of page 2 and subsequent pages is too small and moreover different from the bottom margin of the front page.

I realize that something has to give. Any suggestions? If I can use/tweak my headings as an alternative that would be fine too.



\chead{\rule{360pt}{70pt}} % instead of \chead{\includegraphics{top.jpg}}

\title{Title here} 
\date{November 2011}
\author{Jesper Jensen}


3 Answers 3


After compiling your document you will receive the following warning:

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

To correct \headheight, add the following line to the preamble:


Another option would be to use the background package to add the image at the desired position:


\SetBgContents{\rule{360pt}{70pt}}% \includegraphics would be here
\SetBgPosition{current page.north}

\title{Title here} 
\date{November 2011}
\author{Jesper Jensen}



You've to add the necessary height to \headheight: fancyhdr suggests to make it 74.08003pt, that is, 62.1 more than the default of 12pt.

However, this would push too low the text block, so we have to reduce the text height. The baseline skip at 11pt size is 13.6pt, and the nearest integer multiple to 62 of it is 68:

\setlength{\headheight}{75pt}    % round to the point
\addtolength{\textheight}{-68pt} % -5\baselineskip to avoid a too low text block

You might consider also reducing the top margin, say

\setlength{\headheight}{75pt}    % round to the point

so as to avoid shortening the text height too much. It mostly depends on your top page logo.

  • I'm trying to figure out what \addtolength{\textheight}{} should be when I have \setlength\headheight{42.5pt} and a font size of 12pt. Am I right in using \addtolength{\textheight}{-29pt}? (I think that -29pt is equal to -2\baselineskip.) Commented Nov 6, 2013 at 3:54
  • 1
    @SvendTveskæg Yes, at 12pt the baselineskip is 14.5pt; but \headheight depends on the material you want to put in the header. Let fancyhdr make the computation: just look at the warning message and act consequently.
    – egreg
    Commented Nov 6, 2013 at 7:33

Beside adjusting the headheight, you can also set the height and depth of the graphics to zero with the option arguments of \raisebox and – if you want – raise the graphics with the mandatory argument.

 %               ^^^ change to raise. 

You must log in to answer this question.

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