Longtable and modified \footnoterule [duplicate]

Possible Duplicate:
How can I change the footnote line (thickness, length)

I want to modify the \footnoterule and still be able to use longtable but the following code doesn't compile:

\documentclass{article}
\usepackage{lipsum}
\usepackage{longtable}
\renewcommand{\footnoterule}{\vspace*{0.3cm}\noindent\rule{2.5cm}{0.4pt}\vspace*{0.3cm}}
\begin{document}
\lipsum[1-4]
Text\footnote{Footnote}
\begin{longtable}{c}
N.\\1\\2\\3\\4\\5\\6\\7\\8\\9\\10\\
\end{longtable}
\end{document}

-

marked as duplicate by egreg, lockstep, Joseph Wright♦Dec 12 '11 at 18:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

use this definition:

\renewcommand\footnoterule{\vspace*{0.3cm}\hrule width 2.5cm\vspace*{0.3cm}}

-

If you're just after shortening the horizontal length (actually, the rule width) of \footnoterule, here's how;

\documentclass{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{longtable}% http://ctan.org/pkg/longtable
\makeatletter
\renewcommand\footnoterule{%
\kern-3\p@
\hrule\@width2.5cm
\kern2.6\p@}
\makeatother
\begin{document}
\lipsum[1-4]
Text\footnote{Footnote}
\begin{longtable}{c}
N.\\1\\2\\3\\4\\5\\6\\7\\8\\9\\10\\
\end{longtable}
\end{document}


The definition of \footnoterule was taken directly from the article document class, which defines it as

\renewcommand\footnoterule{%
\kern-3\p@
\hrule\@width.4\columnwidth
\kern2.6\p@}

-