1

I'm creating a document based on the Memoir class. My chapter titles have a custom style so that the chapter number and title are on one page, but the text begins on the next page. I would like the ToC entry to reference the first page of the chapter.

Here's a correct MWE with the ToC for Chapter 1 referencing page 2, using a manual page break after the chapter from here.

\documentclass[oneside]{memoir}
\makechapterstyle{customchapterstyle}{
    \chapterstyle{default}
    \renewcommand{\afterchaptertitle}{\vspace*{\fill}\par\pagebreak}
}

\begin{document}
\tableofcontents
%\chapterstyle{customchapterstyle}
\chapter{Foo}
\vspace*{\fill}\par\pagebreak   % Manual page break
This is some text.
\end{document}

But I would prefer putting it in the style and so it doesn't have to be done in every chapter. If I put the \pagebreak code in the \afterchaptertitle command and use \chapterstyle rather than the manual page break, the ToC entry says page 3 instead of 2. How can I modify the chapter style so that the entry in the ToC entry points to the chapter title page?

2

Update \mempostaddchaptertotochook instead:

enter image description here

\documentclass[oneside]{memoir}

\makechapterstyle{customchapterstyle}{
  \chapterstyle{default}
  \renewcommand{\mempostaddchaptertotochook}{\vspace*{\fill}\par\pagebreak}
}

\begin{document}
\tableofcontents

\chapterstyle{customchapterstyle}
\chapter{Foo}
This is some text.

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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