The memoir class has a very handy option for endnotes (\notepageref), whereby instead of an endnote number, the note can be keyed to a lemma of text and also to the page number on which the lemma occurs. (The Memoir Class manual, p. 245)
In the endnotes, it seems that the lemma must always precede the page number, because \idinnotes is always called before \pageinnotes (manual p. 248), which necessarily generates results like the following minimal working example:
\documentclass{memoir}
\makepagenote
\notepageref
\begin{document}
\chapter{A numbered chapter}
Some text that is going to require an endnote keyed to
a lemma in the text, namely the following: `The doctrine,
or belief, that everything is beautiful, including what
is ugly, everything good, especially the bad, and everything
right that is wrong.'\pagenote[The doctrine or belief]{Ambrose
Bierce, \emph{The Devil's Dictionary}, s.v.\ `Optimism'.}
\printpagenotes
\end{document}
This what I get in the endnotes section:
What I would like, though, is to be able to call the page number of the lemma first, so that the reader can quickly identify the notes for a particular page. (It would also be wonderful to have the page number occur only with the first lemma of several on any one page.)
Ideally, I'd like to have endnotes that looked something like the following (taken from the endnotes of Judith McClure and Roger Collins (eds.), Bede: The Ecclesiastical History of the English People (Oxford World's Classics, 1999), p. 375):
Suggestions for a solution would be much appreciated.


