GeneralSetting link colors with hyperref

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
drpartha
Posts: 43
Joined: Wed Dec 02, 2009 1:41 am

Setting link colors with hyperref

Post by drpartha »

I am trying to setup a hyperlinked pdf file using hyperref. I would like to set all the hyperlinks to a colour defined by me with xcolor, I am able to set all colors except the color of \cite links. cite links continue to be in the default green. How do I force citelinks to be also my wine red color ?

I enclose a copy of the preamble I use.

Thanks for any pointers ,

partha

Code: Select all

\documentclass[a4paper,12pt]{article}
\usepackage{hyperref}

%\hypersetup{
%   colorlinks=false,
%  pdfborder={0 0 0},
%}
\usepackage{hyperref,xcolor}% http://ctan.org/pkg/{hyperref,xcolor}
\usepackage{makeidx}
\definecolor{winered}{rgb}{0.5,0,0}
  
\hypersetup
{
    pdfauthor={Dr. Partha},
    pdfsubject={Hyperlinks in LaTeX},
    pdftitle={myhyper.tex},
    pdfkeywords={LaTeX, PDF, hyperlinks}
%    colorlinks=false,
    pdfborder={0 0 0},
%You can set individual colors for links as below:
colorlinks=true,
 linkcolor=winered,
urlcolor={winered},
filecolor={winered},
%citecolor={winered} %Gives errors when turned on
%allcolors={winered} %Gives errors when turned on
  linktoc=all,
}
\makeindex
\begin{document}
Lorem ipsum agfagfg afag agf aggf agfagfaga
\end{document}
Last edited by Stefan Kottwitz on Mon Jul 28, 2014 2:18 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm

Setting link colors with hyperref

Post by esdd »

Maybe there is only a missing coma behind citecolor={winered}?

Code: Select all

\hypersetup
{
    pdfauthor={Dr. Partha},
    pdfsubject={Hyperlinks in LaTeX},
    pdftitle={myhyper.tex},
    pdfkeywords={LaTeX, PDF, hyperlinks}
%    colorlinks=false,
    pdfborder={0 0 0},
%You can set individual colors for links as below:
colorlinks=true,
 linkcolor=winered,
urlcolor={winered},
filecolor={winered},
citecolor={winered},
allcolors={winered}
}
works for me.

Best regards
Elke
User avatar
drpartha
Posts: 43
Joined: Wed Dec 02, 2009 1:41 am

Re: Setting link colors with hyperref

Post by drpartha »

It worked ! Thank you

I should have been more careful.

partha
Post Reply