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."
\endnote
level to\footnote
? (Yes, that works.)