3

I'm using the pagenote package with memoir, but pagenote doesn't quite get the chapter numbering scheme from memoir. Frontmatter and backmatter don't get chapter numbers in memoir, but they are printed in the pagenotes, leading to strange situations in the Notes section.

MWE:

\documentclass{memoir}
\usepackage[T1]{fontenc}
\usepackage{pagenote}
\notepageref
\makepagenote
\begin{document}
\frontmatter*
\chapter{Introduction}
\pagenote[Mais alors sur quoi...]{Denn worauf gr\"{u}ndet...}
\mainmatter*
\chapter{The first}
\pagenote[Du moment o\`u nous ...]{Sobald wir uns...}
\backmatter
\chapter{Conclusion}
\pagenote[La science ne pense ...]{Die Wissenschaft denkt...}
\printpagenotes
\end{document}

Which yields:

Notes
Chapter 0 Introduction
[Mais alors sur quoi...] (page 1) Denn worauf gründet...
Chapter 1 The first
[Du moment où nous ...] (page 3) Sobald wir uns...
Chapter 1 Conclusion
[La science ne pense ...] (page 5) Die Wissenschaft denkt...

Where "Chapter 0" before "Introduction" and "Chapter 1" before "Conclusion" should be suppressed. Any ideas ?

1 Answer 1

1

You can redefine \pagenotesubhead to test whether its second argument has the same value as a newly defined counter, which is stepped otherwise.

\documentclass{memoir}
\usepackage[T1]{fontenc}
\usepackage{pagenote}
\notepageref
\makepagenote

\renewcommand{\pagenotesubhead}[3]{%
  \ifnum#2=0
    \section*{#3}%
  \else
    \section*{#1 #2 #3}%
  \fi
}

\begin{document}
\frontmatter*
\chapter{Introduction}
\pagenote[Mais alors sur quoi...]{Denn worauf gr\"{u}ndet...}
\mainmatter*
\chapter{The first}
\pagenote[Du moment o\`u nous ...]{Sobald wir uns...}
\backmatter
\chapter{Conclusion}
\pagenote[La science ne pense ...]{Die Wissenschaft denkt...}
\printpagenotes
\end{document}

enter image description here

8
  • Thanks, it works for the introduction, but it doesn't seem to work for the conclusion ; I still get "Chapter 1 Conclusion"... I copied your MWE to test. By the way, why do you get 2 notes for each pagenote ?
    – Jos
    Commented May 14, 2015 at 10:05
  • And copying your solution into my working document lead to "missing number" errors.
    – Jos
    Commented May 14, 2015 at 10:21
  • @Jos I added a couple of notes just for testing. Do you perhaps have appendices with notes?
    – egreg
    Commented May 14, 2015 at 10:34
  • No, I don't use appendices (no \appendix). Maybe memoir changed ? I'm using memoir 2013/05/30 v3.7b. It seems, by the way, that pagenote is emulated by memoir, so \usepackage{pagenote} is not necessary. But this doesn't change anything...
    – Jos
    Commented May 14, 2015 at 11:06
  • 1
    Nope... texlive is entirely updated, but I still get "Chapter 1 Conclusion". I copied your example and ran pdflatex on it... what could the difference be?
    – Jos
    Commented May 14, 2015 at 17:40

You must log in to answer this question.

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