In revised versions of a manuscript, we usually mark the new changes with colored text. This question is concerned about the different ways that this can be done for specific references in the .bib file. There are previous solutions about this but they are not satisfactory to me. This one just do the job for one reference. Here is the extension of the previous one for several references by using several nested ifstreqal. But this can get really useless when the number of colored references increases.
What I have in mind is to have a code, which gets all of the labels of colored references without getting the user involved in making nested structures.
Other new solutions are also welcomed.
Here is a MWE to start with.
\documentclass{article}
\usepackage{filecontents}
\usepackage{color}
\usepackage{etoolbox}
\begin{filecontents}{jobname.bib}
@article{greenwade93,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351"
}
@book{goossens93,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
@article{fuente,
author = "D. de la Fuente and J.G. Castaño and M. Morcillo",
title = "Long-term atmospheric corrosion of zinc",
journal = "Corrosion Science",
volume = "49",
year = "2007",
pages = "1420–1436",
}
@article{nature,
author = "Rosa Rademakers and Manuela Neumann and Ian R. Mackenzie",
title = "Advances in understanding the molecular basis of frontotemporal dementia - elongated title",
journal = "Nature Reviews Neurology",
volume = "8",
year = "2012",
pages = "423-434",
doi = "10.1038/nrneurol.2012.117",
}
}
\end{filecontents}
\let\mybibitem\bibitem
\renewcommand{\bibitem}[1]{%
\ifstrequal{#1}{greenwade93}
{\color{blue}\mybibitem{#1}}
{\color{black}\mybibitem{#1}}%
}
\begin{document}
This is my document \cite{fuente} and we have another \cite{nature}. We can speak also about \LaTeX! So two more reference are \cite{greenwade93} and \cite{goossens93}
\bibliographystyle{ieeetr}
\bibliography{jobname}
\end{document}
