3

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:

Resultant endnote

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):

enter image description here

Suggestions for a solution would be much appreciated.

cfr
  • 198,882

2 Answers2

2

For the memoir class (contrary to the pagenote package), the correct way is to redefine the \startnoteentrystart macro.

\documentclass{memoir}

\makepagenote
\notepageref

\makeatletter
\renewcommand\startnoteentrystart[4]{%
  \prenoteinnotes%
  \pageinnotes{#3}% ADDED
  \noteidinnotes{#1}{#2}%
  \@ifmtarg{#2}{\def\@currentlabel{#1}}{}%
  \pagenoteanchor{#4}%
%  \pageinnotes{#3}% DELETED
  \prenotetext%
}
\makeatother

\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}

enter image description here

lockstep
  • 250,273
-1

This is untested but you could try something in your preamble along the lines of (less any of my typos):

\renewcommand{\noteentry}[4]{%
  \prenoteinnotes
  \pageinnotes{#4}\noteidinnotes{#1}{#2}\noteinnotes{#3}%
  \postnoteinnotes}

That is, swap the order of \noteidinnotes and \pageinnotes in \noteentry. You might need to adjust the printed spacing between the various elements of \noteenry

A more tedious solution might be to define a \mynoteentry as above and then redefine any macros that call \noteentry to use that.

Peter Wilson
  • 28,066
  • This may work with the pagenote package, but not with the memoir class which uses different macro names. – lockstep Oct 17 '15 at 11:18
  • 2
    It would have worked with the memoir class up until 2010. Having handed over the class maintenance I had not realised that the code had been revamped. – Peter Wilson Oct 19 '15 at 17:41
  • @PeterWilson it was needed to cater for several reported problems – daleif Nov 16 '15 at 11:20