# How to change the formatting of chapter titles in the endnotes

I'm using pagenotes in the memoir class for a book. This is all the code I'm using that I think is relevant:

\let\pagenote=\endnote
\makeatletter
\renewcommand*\prenotetext{%
\list{}{%
\setlength\leftmargin{2.3em}%
\setlength\topsep{-\baselineskip}}
\item}
\renewcommand*\postnotetext{\endlist\bigskip\medskip}
\makeatother

\renewcommand*\idtextinnotes[1]{#1.\vspace*{-\baselineskip}}
\renewcommand*\notenuminnotes[1]{#1.\vspace*{-\baselineskip}}
\makepagenote

\mbox{}\par\vskip-\baselineskip}
\renewcommand\enoteformat{\noindent\theenmark.\hspace{5pt}}
\renewcommand\notesname{Notes}

% Section title
\usepackage{titlesec}
\titleformat{\section}{\large\uppercase}{\thesection}{1em}{}


Then, at the end, I add:

\printpagenotes*


Which prints out nicely a list of numbered nodes, correctly formatted, divided by chapter. Now my question is, how do I change the formatting of the chapter title in the endnotes?

For example, right now it shows: CHAPTER 1 UNEMPLOYMENT TODAY

I would like it to be: CHAPTER 1 - UNEMPLOYMENT TODAY

Thanks!

-
memoir is a class. –  Marc van Dongen Sep 27 '12 at 19:39

You can redefine \pagenotesubhead, for numbered chapters, as

\renewcommand*{\pagenotesubhead}[3]{\section*{#1 #2\ -\ #3}}


and \pagenotesubheadstarred, for unnumbered chapters, as

\renewcommand*{\pagenotesubheadstarred}[3]{\section*{#3}}


A complete example:

\documentclass{memoir}
\usepackage{endnotes}
\let\pagenote=\endnote
\makeatletter
\renewcommand*\prenotetext{%
\list{}{%
\setlength\leftmargin{2.3em}%
\setlength\topsep{-\baselineskip}}
\item}
\renewcommand*\postnotetext{\endlist\bigskip\medskip}
\makeatother

\renewcommand*\idtextinnotes[1]{#1.\vspace*{-\baselineskip}}
\renewcommand*\notenuminnotes[1]{#1.\vspace*{-\baselineskip}}
\makepagenote

\mbox{}\par\vskip-\baselineskip}
\renewcommand\enoteformat{\noindent\theenmark.\hspace{5pt}}
\renewcommand\notesname{Notes}

% Section title

\begin{document}

\chapter{Unemployment Today}
\pagenote[a]{test}
\chapter*{Unemployment Yesterday}
\pagenote[b]{test}

\printpagenotes*
\end{document}


By the way, it's not a good idea to use titlesec with memoir (see About memoir and titlesec incompatibility); memoir offers you build-in mechanisms to customize the sectional units formatting, so instead of

\usepackage{titlesec}
\titleformat{\section}{\large\uppercase}{\thesection}{1em}{}


it's better to use

\setsecheadstyle{\large\uppercase}


as I did in my example code.

-
Thank you, works fine. –  4v4l0n42 Sep 28 '12 at 1:03