I have a document using article class (please not ask me why don't use report class). The article has TOC, LOF, LOT and Nomenclature.

The MWE:

 \documentclass[12pt,a4paper,twoside] {article}

 \usepackage{kpfonts} %[uprightRoman, uprightgreeks]

   \setlength\cftbeforefigskip{1 ex} % list of figures
   \setlength\cftbeforetabskip{1 ex} % list of tables
   \setlength\cftbeforesecskip{1 em} % spacing before sec title
   \setlength\cftaftertoctitleskip{1.8 em} 
   \setlength\cftbeforetoctitleskip{4 cm} 
   \setlength{\nomitemsep}{0.5 ex} 

 \titleformat{\subsection} {\large \bfseries \color{RoyalBlue}} {\thesubsection}{1 ex}{}
 \titleformat{\subsubsection}  {\normalsize  \bfseries  \color{RoyalBlue}}       {\thesubsubsection}{1 ex}{}  %\slshape
 \setcounter{tocdepth}{3}   % table of content depth
\definecolor{RoyalBlue}{RGB}{0, 35, 102}

  Hello, world!
  \printnomenclature[2 cm]       
  \subsection{Math model}
  \subsubsection{Particle collision}
  \nomenclature{DEM}{Distinct Element Method}

The color of section headings and Nomenclature is changed as expected. However the color of Contents and List of Figures etc. remains black.

Having looked through article.cls, I tried

       \MakeUppercase \textcolor{RoyalBlue} {\contentsname} }{\MakeUppercase \textcolor{RoyalBlue}\contentsname}}%

However, it turned out not working. By the way, I used tocloft to define the LOF, LOT entries spacing, don't know whether it has some side-effect.

So how to figure this out?

Edit 1: Found out the problem lies with: \usepackage[subfigure]{tocloft} . But I need these packages! Or should I redefine the spacing without the tocloft package?

  • Your MWE does not compile for me, I get ! Undefined control sequence. <argument> \undefinedpagestyle. Instead of subfigure, try the subfig package, it is usually seen as superior. Most important however, load tocloft after subfigure. – mafp Jan 21 '13 at 23:55
  • MWE was edited, now should work. Loading subfigure before tocloft does not work. I suspect tocloft redefines the default commands \contentsname and \tableofcontents. – KOF Jan 22 '13 at 0:24



to change the color of the ToC to blue. Add other stuff like \Large\bfseries to it, to get bold large title text. Similarly, change \cftloftitlefont for the List of Figures.

  • Thanks, i just searched for the keywords color/colour in the tocloft RADEME, no words found. So I thought no option to change font color, LOL – KOF Jan 22 '13 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.