Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

\renewcommand\enoteheading{\chapter {\notesname}%
  \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!

share|improve this question
1  
memoir is a class. –  Marc van Dongen Sep 27 '12 at 19:39
add comment

1 Answer 1

up vote 4 down vote accepted

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

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

% Section title
\setsecheadstyle{\large\uppercase}

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

\begin{document}

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

\printpagenotes*
\end{document}

enter image description here

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.

share|improve this answer
    
Thank you, works fine. –  4v4l0n42 Sep 28 '12 at 1:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.