Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How do I make citation links green in Beamer? It seems that Beamer ignores the hyperref option citecolor. I tried using the linkcolor option instead, but that affects all links (such as the link to the next slide, see example below). I want to change only the citation color.

\documentclass{beamer}

\hypersetup{
  colorlinks = true,
% linkcolor = green,
  citecolor = green
}

\begin{document}

\begin{frame}
This is a great result~\cite{Paper}.
But this is a link to slide~\ref{Bib}.
\end{frame}

\begin{frame}{Bibliography}\label{Bib}
\begin{thebibliography}{}
  \bibitem[Author, 1942]{Paper}
    Author. B.
    \newblock The great result.
\end{thebibliography}
\end{frame}

\end{document}
share|improve this question
    
Weird: citecolor=green works in article, but not in Beamer. Someone else might know a work around. –  Jubobs Mar 26 '13 at 0:02

2 Answers 2

up vote 8 down vote accepted

You could redefine \@cite to locally change the link color:

\documentclass{beamer}

\hypersetup{
  colorlinks = true,
  linkcolor = red
}

\makeatletter
\let\@mycite\@cite
\def\@cite#1#2{{\hypersetup{linkcolor=green!60!black}[{#1\if@tempswa , #2\fi}]}}
\makeatother

\begin{document}

\begin{frame}
This is a great result~\cite{Paper}.
But this is a link to slide~\ref{Bib}.
\end{frame}

\begin{frame}{Bibliography}\label{Bib}
\begin{thebibliography}{}
  \bibitem[Author, 1942]{Paper}
    Author. B.
    \newblock The great result.
\end{thebibliography}
\end{frame}

\end{document}

enter image description here

share|improve this answer

The above solution did not work for me. But I was successful by putting the following line in the preamble:

\let\oldcite=\cite                                                              
\renewcommand{\cite}[1]{\textcolor[rgb]{.7,.7,.7}{\oldcite{#1}}}
share|improve this answer
    
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  Paul Gessler Mar 11 at 22:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.