I am using the titlesec
package to define a rather simplistic pagestyle for the first pages of my chapter and the regular pages within a chapter:
\newpagestyle{main}{
\headrule\sethead[\chaptername\ \thechapter:\ \chaptertitle][][]
{}{}{\thesection\ \sectiontitle}
\footrule\setfoot{}{\thepage}{}
}
\newpagestyle{chapter_first_page}{
\sethead[][][]{}{}{}
\footrule\setfoot{}{\thepage}{}
}
\assignpagestyle{\chapter}{chapter_first_page}
I am failing, however, to apply that very same pagestyle to the pages for the table of contents and the list of figures. The closest I have come is using this:
\renewcommand*{\printtoctitle}[1]{\chapter*{#1}}
\renewcommand*{\printloftitle}[1]{\chapter*{#1}}
\renewcommand*{\printlottitle}[1]{\chapter*{#1}}
to get the TOC, LOF and LOT first page to be treated as a chapter. However, the pages are still missing the \footrule
that should be part of the chapter_first_page
style.
Also, if for example the LOF is longer than just a single page, the subsequent pages are not simply using the main
pagestyle, but have "List of Figures" in both the header and the footer.
Any pointers regarding how to fix the problem and make the TOC / LOF / LOT pages fit in with the style of the rest of the document would be very much appreciated!
Edit: Here is a minimal working example that should illustrate the problem:
\documentclass[11pt, a4paper, twoside]{memoir}
\usepackage{lipsum}
\usepackage{microtype}
\usepackage[pagestyles, clearempty]{titlesec}
\usepackage[includefoot, includehead, bindingoffset=0cm,
left=3cm, right=3cm, top=2cm, bottom=2cm]{geometry}
% -----------------------------------------------------------------------------
\newpagestyle{main}{
\headrule\sethead[\chaptername\ \thechapter:\ \chaptertitle][][]
{}{}{\thesection\ \sectiontitle}
\footrule\setfoot{}{\thepage}{}
}
\pagestyle{main}
\newpagestyle{chapter_first_page}{
\sethead[][][]{}{}{}
\footrule\setfoot{}{\thepage}{}
}
\assignpagestyle{\chapter}{chapter_first_page}
\titleformat{\chapter}[display]{\centering\LARGE\bfseries}
{\centering\scshape
{---~\chaptertitlename~\thechapter~---}}
{-6pt}{\Huge}[]
\renewpagestyle{plain}{
\sethead[][][]{}{}{}
\footrule\setfoot{}{\thepage}{}
}
\renewcommand*{\printtoctitle}[1]{\chapter*{#1}}
% -----------------------------------------------------------------------------
\begin{document}
\thispagestyle{empty}
(Include some title page here)
\newpage
\thispagestyle{chapter_first_page}
\tableofcontents*
\chapter{Test Chapter 1}
\lipsum[23-42]
\chapter{Test Chapter 2}
\lipsum[23-42]
\end{document}