6

How can one include an endnote within another endnote? The desired output would be one endnote structure with all endnotes appearing in the order in which they are invoked (i.e., a nested [child] endnote would have a number preceding that of a non-nested endnote occurring subsequent to the parent endnote). The following syntax is not valid but may give an idea of the desired output. I imagine the solution may be similar to the use of the \footnotemark and \footnotetext commands for achieving nested footnotes.

\documentclass{article}
\usepackage{endnotes}
\begin{document}
Attempt to nest endnotes%
\endnote{First note\endnote{Second note.}\endnote{Third note.}.}.%
\theendnotes
\end{document}

The content of this question is similar to Converting footnotemarks to endnotes, the difference being that it seeks to directly nest endnotes rather than achieve the same effect via conversion from a document containing nested footnotes.

Ideally, a solution would be compatible with nesting of an arbitrary number of notes and to arbitrary depth of endnote "generation."

  • 1
    Have you considered to change the inner \endnote level to \footnote? (Yes, that works.) – lockstep May 3 '12 at 20:13
  • Thanks @lockstep. What you propose is a good idea, and one I will use if there turns out to be no simple means of nesting endnotes. The only problem is that I would like all the notes to appear in a single structure, rather than be spread across two structures. – user001 May 3 '12 at 20:21
  • Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – user36296 Jul 27 '18 at 19:14
5

Use \footnote instead of \endnote for the inner note level. To avoid mixing up end- and footnotes, consider also to use symbols for footnotes (and make the footnote "numbering" per-page).

\documentclass{article}
\usepackage{endnotes}
\usepackage{perpage}
\MakePerPage{footnote}
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}
\begin{document}
\null\vfill% just for the example
Attempt to nest endnotes%
\endnote{First note\footnote{Second note.}\footnote{Third note.}.}.%
\theendnotes
\end{document}

enter image description here

UPDATE: As egreg has pointed out, the recently released enotez package supports nested endnotes:

\documentclass{article}
\usepackage{enotez}
\begin{document}
\null\vfill% just for the example
Attempt to nest endnotes%
\endnote{First note\endnote{Second note.}\endnote{Third note.}.}.%
\printendnotes
\end{document}

enter image description here

  • 3
    Just today (2012-07-08) the new package enotez has been announced; it should allow nested endnotes. – egreg Jul 8 '12 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.