207

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:

\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{fancy}

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

\begin{document}
Foo Bar
\end{document}
0

1 Answer 1

244

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

\fancyhf{} % sets both header and footer to nothing
\renewcommand{\headrulewidth}{0pt}
% 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.

4
  • 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
    Commented Jun 8, 2012 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}? Commented Jan 17, 2013 at 15:16
  • 9
    @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
    Commented Jan 17, 2013 at 16:33
  • 17
    For completeness: \footrulewidth is the other macro. I hope to save someone else's time ;-) Commented Feb 7, 2013 at 16:33

You must log in to answer this question.