Change color of a single specific citation within \citep

Viewed 415

I have to submit a revised paper with several new references. Those must be highlighted in the color blue. What I want to accomplish is that only those citations are colored in blue in a \citep environment, for instance:

\citep{a, b, c}

Here I just want 'b' in the color blue. I tried with \color command, and the hyperref package, but it seems that they just effect global changes.

Is it possible to do this?

2 Answers

you can create a new command

\newcommand{\citeColored}[2]{\hypersetup{citecolor=#1}\cite{#2}\hypersetup{citecolor=blue}} 

and in your document, use it as

 \citeColored{yellow}{eg}

I encountered the exact same problem when I was working on a revised manuscript. One of the reviewers asked me to include more recent works along with another citation that I initially put there. To distinguish the ones I added later in the revision, I did the following:

  • Originial tex: some text \citep{a} and more text.
  • Revised tex: some text (\citealp{a}; \textcolor{orange}{\citealp{b,c,d}}) more text.
  1. The \citealp{a} does not show the parentheses, which allowed me to add them manually (before the original and after the new citations) to make all citations appear to be a single compound list of citations.
  2. The \textcolor{orange} is a standard function from xcolor. I used orange for all my revised text.
  3. Besides the paranetheses, I also manually inserted a semi-colon and a space between original and new citations to make them look consistent.
Related