I am trying to mark changes to a LaTeX document in a specific color, and hence need certain references in color as well. I have no idea how to achieve this, other than editing specific entries in my .bib file. This is undesirable, as I might need to use the same .bib file without this requirement in the future.

Here is what my .tex file looks like


I want citations `\cite{R1}`, `\cite{R2}`, and `\cite{R3}` such that `\cite{R2}` is in `\mychange{blue}`.


The corresponding main.bib file looks like

  Title                    = {My first reference},
  Author                   = {Author1},
  Journal                  = {Journal1},
  Year                     = {2017},
  Title                    = {My second reference in blue},
  Author                   = {Author2 and Author3},
  Journal                  = {Journal2},
  Year                     = {2000},
  Title                    = {My last reference},
  Author                   = {Author4},
  Journal                  = {Journal1},
  Year                     = {2010},

The desired output is

Desired output

I compile this using the sequence latex->bibtex->latex->latex->dvips->ps2pdf to generate the pdf.

Any ideas on how to achieve this? If at all possible, I would like to consistently use the defined \mychange{} command. I am limited to document class revtex4-1 due to requirements of the journal involved.

Note that the answer to Different style/color for some specific references using natbib compiles but does not show the required color when I remove \bibliographystyle{dcu} (and remove \usepackage{natbib}). The answer to color text in bibliography text also fails to compile when the bibtex key has numbers involved (e.g., changing the key nature to nature1980). Also, Different style/color for some specific references using Bibtex only changes the label, and not the entry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.