In a previous question, TKO successfully formatted memoir \frontmatter \chapters (in this case Foreword and Abstract) differently to \mainmatter items in a \tableofcontents:
\documentclass{memoir}
\setlength{\cftbeforechapterskip}{4pt}
\renewcommand*{\cftchapterfont}{\itshape}
\cftinsertcode{SPECIALTOC}{%
\renewcommand*{\cftchapterfont}{\bfseries}%
\setlength{\cftbeforechapterskip}{16pt}%
}
\begin{document}
\tableofcontents
\chapter*{Foreword}
\addcontentsline{toc}{chapter}{Foreword}
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}
\cftinserthook{toc}{SPECIALTOC}
\chapter{Chapter One}
\section{Section One One}
\section{Section One Two}
\chapter{Chapter Two}
\section{Section Two One}
\chapter{Chapter Three}
\section{Section Three One}
\section{Section Three Two}
\section{Section Three Three}
\end{document}
But how can we apply this to other \frontmatter items (such as \tableofcontents, \listoffigures or \listoftables) and to \backmatter items (such as \printpagenotes, \printbibliography or \printindex)?
\documentclass{memoir}
\setlength{\cftbeforechapterskip}{4pt}
\renewcommand*{\cftchapterfont}{\itshape}
\cftinsertcode{SPECIALTOC}{%
\renewcommand*{\cftchapterfont}{\bfseries}%
\setlength{\cftbeforechapterskip}{16pt}%
}
\begin{document}
\tableofcontents
\frontmatter
\tableofcontents % apply to this toc entry
\listoffigures % apply to this toc entry
\listoftables % apply to this toc entry
\chapter*{Foreword} % apply to this toc entry
\addcontentsline{toc}{chapter}{Foreword}
\chapter*{Abstract} % apply to this toc entry
\addcontentsline{toc}{chapter}{Abstract}
\cftinserthook{toc}{SPECIALTOC}
\mainmatter
\chapter{Chapter One}
\section{Section One One}
\section{Section One Two}
\chapter{Chapter Two}
\section{Section Two One}
\chapter{Chapter Three}
\section{Section Three One}
\section{Section Three Two}
\section{Section Three Three}
\backmatter
\printpagenotes % apply to this toc entry
\printbibliography % apply to this toc entry
\printindex % apply to this toc entry
\end{document}
\frontmatterthere is no need for the\chapter*+\addcontentslinecombo, as that it de default for\chapterunder\frontmatter. You just need more\cftinserthook{toc}{NAME}'s have a look in the.tocfile then you'll have a better idea of what it is doing. Also, are you sure you want the toc in the toc? I'd just use\tableofcontents*– daleif Mar 31 '20 at 11:10