When using fancyhdr, how do you remove the top horizontal rule? I do not want a header at all, just a footer.

This is what I do now:


\cfoot{text 2}
\rfoot{text 3}

Foo Bar

There are various examples in the fancyhdr documentation of redefining the \headrulewidth:

\fancyhf{} % sets both header and footer to nothing
% your new footer definitions here

will do what you want.

To learn more about fancyhdr, you could either look into its documentation or at the respective chapter in the Wikibook LaTeX.

  • 1
    I added a couple of resources from an answer I was going to give on a duplicate of this question, hope that's okay. – doncherry Jun 8 '12 at 8:16
  • 1
    I realize this question is quite old now, and this isn't exactly on topic, but I have a question regarding the use of \renewcommand. Is there any difference between what you wrote and \setlength{\headrulewidth}{0pt}? – Jonathan Gleason Jan 17 '13 at 15:16
  • 8
    @JonathanGleason Yes, there is a difference. fancyhdr implements these lengths as macros and not actual lengths, so \setlength simply won't work for them. Macros don't consume any of TeX's length registers, which is part of the motivation that the fancyhdr author gives for this implementation. It is, however, a bit unintuitive and non-standard. Generally lengths would be set using \setlength but in this case they are not actually lengths in the underlying coding. – Alan Munn Jan 17 '13 at 16:33
  • 13
    For completeness: \footrulewidth is the other macro. I hope to save someone else's time ;-) – Frederick Nord Feb 7 '13 at 16:33

Your Answer

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