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.

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?

\documentclass[english,titlepage]{article}
\begin{document}

\title{ddd}


\author{ccc%
\thanks{bbb%
}}
\maketitle
\begin{abstract}
aaa
\end{abstract}
\maketitle

\end{document}
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

To your document preamble, add

\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\patchcmd{\maketitle}{\let\footnoterule\relax}{}{}{}

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:

\patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}

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.

share|improve this answer
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
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.