# Get a line instead of “Notes” when using endnotes

I'm using the following code to generate an endnote section (instead of having footnotes pop up on every page they are referred to on.

\documentclass{article}
\usepackage{endnotes}
\let\footnote\endnote
\def\footnotetext{\endnotetext[\number\numexpr\value{endnote}+1]}
\let\footnotemark\endnotemark
\begin{document}
\footnote{This is a footnote}
\theendnotes
\end{document}


However, instead of the endnotes having the title "Notes", I would like there to only be a line above the text, just like with standard footnotes. How do I accomplish this?

-

The header of the endnotes are saved in the the command \enoteheading. Here the original definition.

\def\enoteheading{\section*{\notesname
\@mkboth{\MakeUppercase{\notesname}}{\MakeUppercase{\notesname}}}%
\mbox{}\par\vskip-\baselineskip}


To setup the rule you can use:

\def\enoteheading{\par\kern2\baselineskip%
\footnoterule%
\kern1\baselineskip}


Here the MWE:

\documentclass{article}
\usepackage{endnotes,showframe}
\let\footnote\endnote
\def\footnotetext{\endnotetext[\number\numexpr\value{endnote}+1]}
\let\footnotemark\endnotemark

\footnoterule%
\kern1\baselineskip}

\begin{document}
\footnote{This is a footnote}
\theendnotes
\end{document}

-
+1 for using \footnoterule. –  lockstep Jun 17 '12 at 11:49
@lockstep: I voted for "undelete" ;-) –  Marco Daniel Jun 17 '12 at 11:50
Thanks, but our answers are very similar. –  lockstep Jun 17 '12 at 11:57
The two \noindent aren't necessary, but you may want to say \kern2\baselineskip or any other spacing you like before \footnoterule (which issues \hrule and doesn't use \rule, so horizontal mode is never started). The \par after \footnoterule should be omitted. –  egreg Jun 17 '12 at 12:28
@egreg: Thanks. Done –  Marco Daniel Jun 17 '12 at 12:36