I would like to change the colour of the horizontal line directly above the footer. I have referenced this question and copied the relevant code below. This successfully changes the color of the horizontal line at the bottom of the header. However, I am unable to manipulate it to change the color of the line at the top of the footer.

  \renewcommand{\headrule}{\hbox to\headwidth{\color{mycustomcolor}\leaders\hrule height \headrulewidth\hfill}}

I tried changing the \headrule to \footrule in the second line but it did not work and I do not have a solid understanding of how to make the correct changes to apply it to the footer.

Any help is greatly appreciated, thanks.

  • Using the code in Werner's answer to the linked question and changing \headrule to \footrule works for me – user31729 Jun 15 '17 at 14:41

This works....


\renewcommand{\headrule}{\hbox to\headwidth{\color{red}\leaders\hrule height \headrulewidth\hfill}}
\renewcommand{\footrule}{\hbox to\headwidth{\color{red}\leaders\hrule height \footrulewidth\hfill}}

|improve this answer|||||
  • 1
    This seems to change the position of the separator, though? (the vertical space between the header and the line is larger) – Rastapopoulos Mar 14 '19 at 17:52
  • @Rastapopoulos yes you are right, please how to decrease the vertical space between line-header? – Gallagher Nov 16 '19 at 20:27

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.