[Tex/LaTex] How to add a footnote separator rule

footnotesieeetranrules

I'm using \documentclass{IEEEtran}. I've tried the following but it doesn't work.

\usepackage{fancyhdr}
\renewcommand{\footrulewidth}{0.4pt}    

Best Answer

According to the IEEEtran class file IEEEtran.cls,

IEEE uses a footnote rule only for \thanks [using] a "one-shot" system [...]

Additionally, this is only active with the compsoc document class option. Under that option, \footnoterule - the macro responsible for inserting the footnote rule (only when using \thanks, remember) resembles:

\makeatletter
\def\footnoterule{\relax%
  \kern-5pt
  \hbox to \columnwidth{\hfill\vrule width 0.5\columnwidth height 0.4pt\hfill}
  \kern4.6pt}
\makeatother

The above \footnoterule matches the original class-version exactly, except for the conditionals that prevent setting it outside of compsoc, as well as the \thanks-only restriction. Additionally, it's obvious that it centres the horizontal line. Here's a minimal example showing the output:

enter image description here

\documentclass{IEEEtran}

\usepackage{lipsum}
\makeatletter
\def\footnoterule{\relax%
  \kern-5pt
  \hbox to \columnwidth{\hfill\vrule width 0.5\columnwidth height 0.4pt\hfill}
  \kern4.6pt}
\makeatother

\begin{document}

Some text\footnote{\lipsum[2]}.

\end{document}