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.

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."

share|improve this question
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

1 Answer 1

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

share|improve this answer
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

 
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.