I want to divide my thesis into two parts: a background part and the thesis part. In the table of contents, I want the formatting of the parts to differ from the rest: I want the parts to be bigger, both the Part itself and the name of the part, and to be PineGreen in color.

I have almost done this successfully, but the part titles are not affected by my codes. See the MWE. Does someone know how to get this correct?

\documentclass{memoir}

\usepackage[usenames,dvipsnames]{color}

\renewcommand*{\parttitlefont}{\normalfont\Huge\scshape\color{PineGreen}}
\renewcommand*{\partnamefont}{\normalfont\HUGE\scshape\color{PineGreen}}
\renewcommand*{\cftpartname}{\scshape\color{PineGreen}\Large Part }

\begin{document}

\tableofcontents

\part{Background}
\chapter{The problem with manganese}
\chapter{The risk assessment}

\part{Thesis}
\chapter{Introduction}
\chapter{Conclusion}

\end{document}

• What exactly does not work? When I compile the example, Part I and Part II in the toc are green, as are the two part title pages. – daleif Oct 17 '14 at 13:02
• Then the OP is doing it all wrong, \cftpartname should not really contain font settings, use \cftpartfont – daleif Oct 17 '14 at 13:13

It is correct to use \cftpartname to add "Part" before the names.

But one should use \cftpartfont to control font settings for the part lines in the table of contents. (These are described in the memoir manual, texdoc memoir, p. 151.)

It is also possible, if desired, to use \cftpartpagefont to apply the same color to the page number for each part.

\documentclass{memoir}

\usepackage[usenames,dvipsnames]{color}

\renewcommand*{\parttitlefont}{\normalfont\Huge\scshape\color{PineGreen}}
\renewcommand*{\partnamefont}{\normalfont\HUGE\scshape\color{PineGreen}}
\renewcommand*{\cftpartfont}{\scshape\color{PineGreen}\Large}
\renewcommand*{\cftpartname}{Part\space}
\renewcommand*{\cftpartpagefont}{\color{PineGreen}}

\begin{document}

\tableofcontents

\part{Background}
\chapter{The problem with manganese}
\chapter{The risk assessment}

\part{Thesis}
\chapter{Introduction}
\chapter{Conclusion}

\end{document}


It would be better to put the color in a macro so it can be redefined more easily.