How to colorize section headings in LaTeX like this?

Posted by Nazgulled on Stack Overflow See other posts from Stack Overflow or by Nazgulled
Published on 2010-04-26T01:07:33Z Indexed on 2010/04/26 1:13 UTC
Read the original article Hit count: 321

Filed under:
|
|
|

Hi,

Accidently I created this nice colored effect on my LaTeX TOC: http://i43.tinypic.com/o5aptl.png

Which I like and want to keep, I created this effect like this:

\definecolor{Section1}{rgb}{0.09,0.21,0.36}
\section{\color{Section1}Introdução}

However, as you can see on the TOC sidebar, there was a nasty side effect.

I tried to fix it like this:

\section[Introdução]{\color{Section1}Introdução}

But didn't work, the sidebar TOC was fixed but on the TOC list, the blue color was gone and was now red instead (default for clickable TOC heading links)

I also tried:

{\color{Section1}\section{Introdução}}

But the effect was the same, fixed TOC but no color on the TOC list.

Any suggestions?

© Stack Overflow or respective owner

Related posts about heading

Related posts about section