Document Classesbeamer | Change Appearance of Citations

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
Markus Schwarz
Posts: 3
Joined: Tue Sep 13, 2011 10:19 am

beamer | Change Appearance of Citations

Post by Markus Schwarz »

Hello all,

I have this simple question, but I haven't found an answer to it yet:
Using beamer, how do I change the way citations appear on the slides?

In particular, I want the reference cited with the author name in red text.

So far, I am using

Code: Select all

\documentclass[t]{beamer}
\beamertemplatenavigationsymbolsempty

\begin{frame}[allowframebreaks]{References}
\begin{thebibliography}{99}
  \bibitem[Herbst,Hofmann\,'04]{Herbst04}
  U.~Herbst, R.~Hofmann,
  \newblock Asymptotic freedom and compositeness
  \newblock [hep-th/0411214].
\end{frame}
When I use \cite{Herbst04} it is cited as "[Herbst,Hofmann\,'04]", but in normal text color. How do I change this to red? Using

Code: Select all

\bibitem[{\usebeamercolor[fg]{alerted text} Herbst,Hofmann 04}]{Herbst04}
produces a ton of error messages. I know I can change the color of the author name in the bibliography with

Code: Select all

\setbeamercolor{bibliography entry author}{fg=red}
at the top of the document. Is there a similar command for the cited text?

Thanks for your help!

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

beamer | Change Appearance of Citations

Post by Stefan Kottwitz »

Hi Markus,

welcome to the board!

Since beamer uses hyperref for generating hyperlinks for citations, you could use hyperref features:

Code: Select all

\hypersetup{colorlinks=true,citecolor=red}
Stefan
LaTeX.org admin
Markus Schwarz
Posts: 3
Joined: Tue Sep 13, 2011 10:19 am

Re: beamer | Change Appearance of Citations

Post by Markus Schwarz »

Thanks Stefan for your help and the warm welcome!

While your command did indeed cause all citations to appear red, it does so also for the ToC entries and referred equations. It appears that all are treated as links, and hence inherit the link color red. This could also be caused by a label command (beamer user guide p. 105). I didn't find any obvious way around it in either beamer's or hyperref's documentation.

Is there away to tell beamer that it should not treat sections and equations as links?
Post Reply