Text FormattingLocal Change of Font Color for particular Citations

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
marto1980
Posts: 10
Joined: Sun Apr 11, 2010 8:51 am

Local Change of Font Color for particular Citations

Post by marto1980 »

Dear LaTeX users,

I'm revising a manuscript and I need to highlight all changes to the original in red. For normal text things are simple.

Code: Select all

\textcolor{red}{some text}
The problem arises with citations in the text. I am using author-year citations with the natbib and hyperref packages. I have loaded the hyperref package with the option allcolors=black as I want all citations to appear black. But now for the revision I need to color the citations appearing in revised text in red. So I need to be able to change the citation color locally, i.e. example in the \citep or \citet command.

Is it possible somehow?

Best regards,
Martin
Last edited by marto1980 on Tue Nov 12, 2013 10:12 am, 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.

marto1980
Posts: 10
Joined: Sun Apr 11, 2010 8:51 am

Local Change of Font Color for particular Citations

Post by marto1980 »

Answered by Heiko Oberdiek.

Code: Select all

\hypersetup{citecolor=red}
... revised text
\hypersetup{citecolor=black}
With many thanks!
Post Reply