4

Possible duplicate here My requirements are as follows:

  • I use a separate .bib file that contains all the entries.
  • I use \cite{CiteKey1,CiteKey2,CiteKey3}. I want to highlight \citecolor{CiteKey2} in different color (say blue) in the reference section. I don't know how to define \citecolor.
  • I want to highlight for several references.
\documentclass[journal]{IEEEtran}  
\usepackage{xcolor,cite}
\begin{document}
 I use~\cite{CiteKey1,CiteKey2,CiteKey3}`. I want to highlight~\citecolor{CiteKey2}` in different color (say blue) in the reference section.
\bibliographystyle{IEEEtran}
\bibliography{MBibliography}
\end{document}

MBibliography.bib contains

@ARTICLE{CiteKey1, 
author={Author 1}, 
journal={Journal Name1}, 
title={Title}, 
year={2010},
}

@ARTICLE{CiteKey2, 
author={Author 2}, 
journal={Journal Name2}, 
title={Title}, 
year={2010},
}

@ARTICLE{CiteKey3, 
author={Author3}, 
journal={Journal Name3}, 
title={Title}, 
year={2010},
}

enter image description here

Mithun
  • 491

1 Answers1

12

With biblatex it would be easier ... but you can try it like this

\documentclass[journal]{IEEEtran}
\usepackage{xcolor,cite,etoolbox}
\makeatletter 
\pretocmd\@bibitem{\color{black}\csname keycolor#1\endcsname}{}{\fail}
\newcommand\citecolor[1]{\@namedef{keycolor#1}{\color{blue}}}
\makeatother
\citecolor{CiteKey2}
\begin{document}
I use~\cite{CiteKey1,CiteKey2,CiteKey3}`. I want to highlight in different color (say blue) in the reference section.
\bibliographystyle{IEEEtran}
\bibliography{test}
\end{document}

enter image description here

Ulrike Fischer
  • 327,261