# Problem with converting footnotes into endnotes

I'm using endnotes package to create endnotes, and since my existing body of text already contains lots of footnotes, I use \let\footnote=\endnote to convert footnotes into endnotes.

    \documentclass{article}
\usepackage{endnotes}
\usepackage{hyperref}
\let\footnote=\endnote
\begin{document}
Sample text.\footnote{Sample footnote}.
\theendnotes
\end{document}


But while the original footnotes were nicely cross-referenced, the conversion doesn't preserve that. Is there a way to make a conversion while preserving the cross-referencing?

• What do you mean? The question is unclear to me. – karlkoeller Feb 15 '15 at 18:34
• Normally, the footnote number in the body of the text just takes you to the text in the footnote. That's not preserved with the conversion to the endnotes I provide above (the endnote no. doesn't take you to the endnote text). – bozidarka Feb 15 '15 at 18:36
• The default latex footnotes are not hyperlinked, you might ne used to hyperref? – David Carlisle Feb 15 '15 at 18:38
• Thanks. I am using hyperref to get the footnotes be cross-referenced in the first place. But not sure how to modify when converting to endnotes. – bozidarka Feb 15 '15 at 18:39
• See if this helps: tex.stackexchange.com/q/8452/27635 – karlkoeller Feb 15 '15 at 18:57

In order to make hyperref work with endnotes, you could use enotez. All you have to do is load enotez instead of endnotes and use \printendnotes instead of \theendnotes:

\documentclass{article}
\usepackage[backref]{enotez}      % <-- instead of \usepackage{endnotes}
\usepackage{hyperref}
\let\footnote=\endnote

\begin{document}
Sample text.\footnote{Sample footnote}.
\printendnotes           % <-- instead of \theendnotes
\end{document}


Edit: If you want back references from the notes to the mark in the text, then use the option backref

• That works, but I do get an error message ("LaTeX error:"kernel/command-already-defined" "control sequence !\endnote already defined.") This happens regardless of whether I just replace all instances of \footnote with \endnote or if I do it via \let\footnote=\endnote. – bozidarka Feb 15 '15 at 19:19
• Clearly, it must be due to some other package I'm loading but not sure which one is to blame. – bozidarka Feb 15 '15 at 19:25
• Looks like it's due to mdwlist but I have no idea why. – bozidarka Feb 15 '15 at 19:30
• mdwlist is rather old . . . is there any particular reason why you are using it and not enumitem? – DG' Feb 15 '15 at 19:36
• I want to be able to use \resume{enumerate} \suspend{enumerate} sequencing to coordinate numbered lists. This breaks down with enumitem – bozidarka Feb 15 '15 at 19:46