2

I am writing a scientific book for the general public and would like to have chapter notes that appear at the end of the book, organized by chapter and page number. (I also have footnotes, the chapter notes would be for longer or more technical comments.)

I am familiar with the endnotes package which almost provides me with what I want but the output is too simple. What I would like is the Notes section at the back of the book to list each chapter by number and title, then the notes to appear under each chapter, and, if possible, to indicate the page in the book where the endnote was written so that someone flipping through the notes can easily locate the relevant page in the book. So something like this for the output of the Notes section:

 Chapter 1
 ...
 Chapter 2
 ...

 Notes

 Chapter 1  What is life?
 1. (page 37) First note in this chapter.
 2. (page 38) Second note in this chapter.
 ...

 Chapter 2 Properties of life
 1. (page 45) First note in second chapter.
 2. (page 45) Second note in second chapter.
 3. (page 48) Third note in second chapter.

and so on. Even better would be if the page reference numbers in the notes can be active links in a PDF file or e-book so that clicking on the page number in the Notes section takes one to the corresponding page. And it would be nice for the endnote reference to also be an active link that takes one right to the corresponding note at the back of the book.

Is anything like this available?

1

2 Answers 2

1

Use the memoir class (a superset of book and report) and its endnotes capabilities. I think that they will do everything you asked for. Read section 12.6 Endnotes in the manual (texdoc memoir).

I hope that the following code helps you.

% memendnotesprob.tex  SE 543306

\documentclass{memoir}
\usepackage{lipsum}
\makepagenote
\notepageref
\renewcommand*{\notenumintext}[1]{\textsuperscript{#1} } % put a space after this
\begin{document}
\chapter{One}
Some text \pagenote{An end note.} and more text.

\lipsum[1]

followed by even more \pagenote{Fascinating information.} until it gets boring.

\chapter{Last} %chapter 9
\lipsum

After the start of the chapter text \pagenote{Another note.} % 30th note
and a bit more text.

\renewcommand*{\notedivision}{\chapter*{\notesname}}
\printpagenotes

\end{document}

If you want more help then the current maintainer may be able to help, his email address is on page xxxii of the manual.

6
  • I just looked at the 615-page memman.pdf file and do not see a section 17.4, did you mean Section 12.6 on Endnotes? Or am I looking at the wrong document? Commented May 11, 2020 at 15:40
  • Is the right way to extract a page number for a given pagenote by creating a label for each \pagenote, so I should write something like: ... some text \pagenote{(page \pageref{pnote-label} page note text here} \label{pnote-label} more text... I could not figure out how to extract a pagenote pagenumber from the memman.pdf file. Commented May 11, 2020 at 15:40
  • And a big thanks for creating the memoir class, quite impressive although intimidating to understand because of all it can do. Commented May 11, 2020 at 18:25
  • @hsgreenside My apologies and thank you for the correction pointing at Section 12.6. I have kept my printed version of the manual dated 2009 as I find it easier to use a printed-on-paper version than reading from the screen. I hadn't realised that it had changed significantly. I really didn't realise that I had handed over memoir a decade ago! Commented May 11, 2020 at 19:28
  • @hsgreenside I have added some example code to my original answer in the hope that it might help you. The current memoir container is usually very ready to help. Commented May 11, 2020 at 19:39
0

Based on Peter's helpful comments, I found that I was able to answer my own original intent, which was how to place a note number in the margin of a book page so that someone would be aware of the presence of the note and not confuse the reader with the existence of footnote numbers and pagenote numbers in the same paragraph since I am using both. Hyperref works nicely so that one can jump to the note from the margin note number and jump backwards from the note to the page of context.

\documentclass{memoir}

\usepackage{hyperref}
\hypersetup{
  colorlinks=true,
  linkcolor=blue,
  filecolor=magenta,
  urlcolor=blue
}

\renewcommand*{\notenumintext}[1]{#1}  % show note number directly, no superscript
\newcommand{\marginpagenote}[1]{\marginpar{Note~\arabic{chapter}.\pagenote{#1}}}

\makepagenote

\notepageref

\begin{document}

\chapter{Introduction}

Some text and more text.  \marginpagenote{An endnote.}

\vspace{.7in} etc \vspace{.7in}

More text and a second page note. \marginpagenote{Fascinating
  information, a second endnote...}

\chapter{Conclusions}

Several conclusions and another enddnote. \marginpagenote{A third
  endnote but first in second chapter.}

\renewcommand*{\notedivision}{\chapter*{\notesname}}

\printpagenotes

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .