Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
share|improve this question

migrated from stackoverflow.com Mar 19 '11 at 19:56

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

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.

share|improve this answer
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
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
@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
@AlanMunn Perfect explanation. Thanks. –  Jonathan Gleason Jan 17 '13 at 20:13
For completeness: \footrulewidth is the other macro. I hope to save someone else's time ;-) –  Frederick Nord Feb 7 '13 at 16:33
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.