I have customised my toc using tocloft
for everything from chapter
down to subsection
, but I cant work out how to change the color of the part font, how do you renew this command? I have read the tocloft
documentation and can't find anything. Thanks for any help!
MWE:
\documentclass[a4paper, 12pt, twopage]{scrreprt}
\usepackage[titles]{tocloft}
\usepackage{color}
\definecolor{RoyalRed}{RGB}{157,16, 45}
\newcommand{\partfont}{\renewcommand\cftpartfont{\color{RoyalRed}}}
\newenvironment{MainTOC}{\partfont}
\begin{document}
\begin{MainTOC}
\tableofcontents
\end{MainTOC}
\part{first part}
\chapter{First chapter}
\part{second part}
\chapter{second chapter}
\end{document}
Best Answer
You can use
\cftpartfont
for changing the font of part title and its number andcftpartpagefont
for changing the font for page.