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 am trying to convert all footnotes and footnotemarks in a large document to endnotes. While the footnotes can be readily converted using \let\footnote=\endnote, I am not able to convert footnotemarks to endnotemarks. I am using footnotemarks within footnotes to circumvent LaTeX restrictions on nested footnotes.

Here is an example showing proper conversion of footnotes, but not footnotemarks, to endnotes:

enter image description here

\documentclass{article}
\usepackage{endnotes}
\let\footnote=\endnote
\begin{document}
Here is a footnote%
\footnote{That contains two nested footnotes\footnotemark\footnotemark.}.%
\footnotetext{The nested footnote is not automatically converted to an endnote.}
\footnotetext{Likewise.}
\theendnotes
\end{document}
share|improve this question

1 Answer 1

If you only have a single \footnotemarks inside \footnotes, then the following should work:

enter image description here

\documentclass{article}
\usepackage{endnotes}% http://ctan.org/pkg/endnotes
\let\footnote\endnote
\def\footnotetext{\endnotetext[\number\numexpr\value{endnote}+1]}
\let\footnotemark\endnotemark
\begin{document}
Here is a footnote%
\footnote{That contains a nested footnote\footnotemark.}.%
\footnotetext{The nested footnote is not automatically converted to an endnote.}
\theendnotes
\end{document}
share|improve this answer
    
Thanks, Werner. Unfortunately, I also have footnotes that contain multiple footnotemarks. –  user001 May 1 '12 at 4:30

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.