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?
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}}
精彩评论