3

I am preparing an anthology that reprints and discusses over a hundred third-party poems. Much of the commentary will be in the main matter, but the more tangential comments will take the form of endnotes. The back matter needs to contain two separate lists, one that provides the endnotes and another that provides the reprint permissions/acknowledgments, in the same order in which the poems appear in the main matter. (I do not want to use footnotes.)

I could, of course, manually compile a monolithic permissions list in the back matter. But the order of the poems might change a lot as I write the main matter, and I don't want to have to manually re-order the permissions list. Is there a relatively simple way I can include the permission text near poem itself, with an endnote-like macro, and have LaTeX automatically generate two endnote-like lists in the back matter, one for the comments and the other for the permissions?

I'm using the memoir class, so any solution would need to be compatible with that.

Here's a MWE:

\documentclass{memoir}
\makepagenote

\begin{document} \chapter{Poems about animals} John Smith wrote the following poem, Fuzzies'', about ferrets: \pagenote{This note discusses some trivia about the poem.} % comment \pagenote{Fuzzies'' is reprinted with permission of…} % permission

\chapter{Poems about vehicles} Mary Smith once published a poem about her car: \pagenote{This note discusses some trivia about the poem.} % comment \pagenote{``My Honda'' is reprinted with permission of…} % permission

\backmatter\printpagenotes \end{document}

In the above example, memoir outputs a single back matter chapter called "Notes" which contains all the \pagenotes:

 

However, what I want are two separate back matter chapters, one for "comment" \pagenotes and one for "permission" \pagenotes:

 

Psychonaut
  • 3,142
  • 1
    The endfloat package can be set to ignore figures and tables and copy specific environments into files with different extensions. You can modify \efloatseparator to allow multiple "floats" per page. See pages 8-9 of the endfloat manual. – John Kormylo Sep 21 '23 at 17:19
  • Somewhat related: https://tex.stackexchange.com/questions/452596/auto-order-appendices/452623?r=SearchResults&s=7%7C28.1637#452623 – John Kormylo Sep 21 '23 at 17:25
  • what do you expect to happen in the main text? – Ulrike Fischer Sep 21 '23 at 17:30
  • @UlrikeFischer: For my own use case, nothing. I don't need any markers, if that's what you're asking. – Psychonaut Sep 21 '23 at 20:07
  • 1
    As far as I know, the only alternative for multiple series of endnotes is reledmac. But you might get away with it by using different endnotes packages for each of your needs (see https://tex.stackexchange.com/a/669532/105447 for alternatives). – gusbrs Sep 22 '23 at 10:24

1 Answers1

2

I came up with the following kludgy solution: it defines two wrapper macros for \pagenote, \commentnote and \permissionnote, that print their argument conditionally according to a boolean flag. The \printpagenotes is called once with the flag set to false and then again with the flag set to true. The solution works only if (as I prefer anyway) the notes are not enumerated.

\documentclass{memoir}
\makepagenote
\renewcommand*{\notenumintext}[1]{} % Disable numbered markers in text
\renewcommand*{\notenuminnotes}[1]{} % Disable numbered markers in endnote list

\newif\ifpermission \newcommand{\commentnote}[1]{\pagenote{\ifpermission\else #1\fi}} \newcommand{\permissionnote}[1]{\pagenote{\ifpermission #1\fi}}

\begin{document} \chapter{Poems about animals} John Smith wrote the following poem, Fuzzies'', about ferrets: \commentnote{This note discusses some trivia about the poem.} \permissionnote{Fuzzies'' is reprinted with permission of…}

\chapter{Poems about vehicles} Mary Smith once published a poem about her car: \commentnote{This note discusses some trivia about the poem.} \permissionnote{``My Honda'' is reprinted with permission of…}

\backmatter \printpagenotes % Print comment notes only

\renewcommand*{\notedivision}{\chapter{Permissions}} \permissiontrue \printpagenotes % Print permission notes only \end{document}

Psychonaut
  • 3,142