I have a document with a cover page and foonote. I would like to add a rule above the foonote. What is the way to do this?





To your document preamble, add

\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox

This removes the line that clears the \footnoterule from \maketitle. If you're using hyperref, you have two options:

  1. Either load hyperref after performing the patch and you're good-to-go; or
  2. (if loading hyperref before this patch) patch \HyOrg@maketitle which contains the original pre-hyperref \maketitle information. Remember to brace the patch with a \makeatletter-\makeatother pair, since you're working with macros containing @. See What do \makeatletter and \makeatother do?

etoolbox's \patchcmd has the following interface:


where it searches for <search> in <cmd> and replaces it with <replace>. If the replacement is successful, it executes <success>, otherwise <failure>. Therefore, the above patch searches for \let\footnoterule\relax and removes it (replaces it with an empty group {}. Since it works in the default article document class, no <success> or <failure> executions are necessary, although you could add them yourself.

  • 1
    awesome, thanks. could you just explain what was going on? i couldn't figure it out – Alex Apr 2 '13 at 1:08
  • For some reason this stopped working. When I do the tracing in etoolbox i get: [debug] -- search pattern not found in replacement text – Alex Sep 17 '13 at 4:37
  • the issue is i started using the hyperref package which seems to conflict with this... – Alex Sep 17 '13 at 4:49
  • 1
    @Alex: I've added your options when loading hyperref also. Since \maketitle may contain footnotes, hyperref intervenes, causing the "search pattern not found" with etoolbox's \patchcmd. Easiest is to load hyperref after \patchcmd. – Werner Sep 17 '13 at 5:24
  • much appreciated. – Alex Sep 17 '13 at 15:03

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.