views:

290

answers:

1

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?

+3  A: 

You're looking for \texorpdfstring{texString}{pdfString}, which you can supply as an alternate to plaintext as an argument to \section. This should work:

\section{\texorpdfstring{\color{Section1}Intro}{Intro}}
Domenic
It worked, but please change your example so that people realize that that should be placed inside \section{} which I didn't realize at first :P Thanks.
Nazgulled