LaTeX forum ⇒ GeneralSetting link colors with hyperref Topic is solved

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

Setting link colors with hyperref

Postby drpartha » Mon Jul 28, 2014 1:13 pm

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

\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.

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

Postby esdd » Mon Jul 28, 2014 3:09 pm

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

\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: 25
Joined: Wed Dec 02, 2009 1:41 am

Postby drpartha » Tue Jul 29, 2014 4:43 am

It worked ! Thank you

I should have been more careful.

partha


Return to “General”

Who is online

Users browsing this forum: No registered users and 7 guests