1

My experience with memoir class has been excellent thus far, but there are still a few peculiarities that baffle me. As the picture that is attached shows, there's no defined footer at the first page of ToC. But at the second one, did the job.

That's the default for memoir (or other document class), but i need to custom that.

Here is my MWE:

\documentclass[a5paper,openright]{memoir}
\usepackage{kantlipsum}
\usepackage{titlesec}

\makepagestyle{foostyle}
\makeevenfoot{foostyle}{\textnormal{\thepage\quad\textbar\quad{\footnotesize KANT SAMPLE}}}{}{}
\makeoddfoot{foostyle}{}{}{\textnormal{{\footnotesize \leftmark}\quad\textbar\quad\thepage}}
\def\tocmark{\markboth{\contentsname}{}}
\addtopsmarks{foostyle}{}{
    \createmark{chapter}{left}{nonumber}{}{}
}

\pagestyle{foostyle}

\begin{document}
    \frontmatter
    \tableofcontents
    \mainmatter
    \newcommand\Sample{
        \chapter{Chap}
        \kant[1]
        \section{Test}
        \kant[1]
        \subsection{Test}
        \kant[1]
    }
    
    \Sample\Sample\Sample
    \Sample\Sample\Sample
    \Sample\Sample\Sample
    \Sample\Sample\Sample 

\end{document}

First page of ToC

I think the first page of the table of contents is the ONLY page that deviates from the heading/footer arrangement.

How to solve this 1st page ToC's footer problem?

Thank you for your time and help.

3
  • The ToC's first page seems to have the same style as the first page of the chapters. Do you want to change the ToC's first page but leave the chapters as they are, or to change chapters' first page too? Oct 20, 2023 at 8:09
  • To apply your style to ToC's first page and to all chapter's first pages: \copypagestyle{chapter}{foostyle} Oct 20, 2023 at 8:23
  • @lacobus Glad to see your comment. I need to apply only for ToC, because I do have another treatment for first page of the chapters Oct 20, 2023 at 9:06

1 Answer 1

1

To apply foostyle pagestyle to the first page of toc, add

\addtocontents{toc}{\protect\thispagestyle{foostyle}}

just after \tableofcontents.

You must log in to answer this question.

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