TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing on a larger probject and I want to have colored headings (the part title and the chapter title, but not the section and subsection and so on). In the toc, I also want the part and the chapter headings e.g. to be blue, but also not the section subsection and so on. I tried


And I read also something about manipulating the \titleformat command. But I did not get it how to get this running. Would be nice if you can help me.

Here is my code:

\geometry{left=4cm,right=3cm, top=2cm, bottom=2cm} 
\titleformat{\chapter}[display]{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
%  pdfauthor={},
  pdfsubject={Statistics Book}, 





\marginparsep = -4pt





\addcontentsline{toc}{part}{\"Uber den Autor}

Thanks a lot!

share|improve this question

closed as too localized by Marco Daniel, percusse, Claudio Fiandrino, Stefan Kottwitz Mar 3 '13 at 15:38

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

\addtomomafont needs a KOMA-Script class like scrbook. You have used book. – Kurt Sep 3 '12 at 13:12
Do you want just the titles to be colored or the complete heading (title and number and label i.e., the word "Kapitel")? – Gonzalo Medina Sep 3 '12 at 13:33
yeah, the complete heading! Thanks! – HFDuser Sep 3 '12 at 13:36
please, I really need this! – HFDuser Sep 3 '12 at 15:55