tags:

views:

742

answers:

1

I am using the natbib and hyperref package in conjunction with my latex document. I would like to change to the color of my hyppereferenced citations (the box around the citation) from the ugly baseline green to a more muted (violet or navy blue). However, in using the suggested code to do this, I can not get the citation link colors to change. My code is as follows

\usepackage[usenames,dvipsnames]{color}
\usepackage[round]{natbib}
\usepackage[hyperfootnotes=false]{hyperref}
\usepackage[hyperfootnotes=false]{hyperref}
\hypersetup{
 colorlinks=false,
 citecolor=Violet,
 linkcolor=Red,
 urlcolor=Blue}

 \begin{document}

 \bibliographystyle{apsr}
 \bibliography{exp_final}
 \end{document}

However, when I compile (I compiled multiple times to make sure) this my pdf file looks the same as if I had excluded the formatting in the hypersetup (still the same ugly green). I would also like to box the footnote citations as well. Any ideas or help would be much appreciated.

Thanks, Thomas

+2  A: 

Actually the sample code you provided deactivate the link colorisation with the option colorlinks=false. You should use the following hyperref setup command that actually change links color.

\hypersetup{
  colorlinks,
  citecolor=Violet,
  linkcolor=Red,
  urlcolor=Blue}

To change box color around the links and citations, you have these other options :

\hypersetup{
  citebordercolor=Violet,
  filebordercolor=Red,
  linkbordercolor=Blue
}

Box appearance are controlled by the pdfborder option. If the colorlinks option is set, boxes are deactivated (see the hyperref manual for more information).

Lohrun
Lohrun, Thanks for your help. Maybe I was not clear, but I want to change the colors on the box around the citations. I do not want the actual letters to be colored, just the hyperlinked boxed. Any ideas?
Thomas
I edited my answer to show the `*bordercolor` options.
Lohrun
I forgot to mention some weirdness about these options. I remember deactivating boxes (by setting the border width to 0) and it worked but only using Acrobat Reader (any OS). The boxes were still visible when using xpdf or evince as I usually do.
Lohrun
Lohrun,Thanks!However, I found that the color format should be RGB: so it should be \hypersetup{ citebordercolor=.1 .1 1, linkbordercolor=0 0 1, urlbordercolor=.9 .1 0, }Thanks though!Thomas
Thomas