2

If I call a reference by \citet{xxx}, it appears in my document as Author [number], where the number appears in the color I defined in \hypersetup{citecolor=red} while Author and [] appear in black color. The natbib options I am using are:

\usepackage[square,colon,sort&compress,numbers]{natbib}

Would it be possible to make the entire reference (Author[number]) appears in red color? or at least the Author and the number?

MWE:

\documentclass[12pt]{article}
\usepackage{cite}
\usepackage{color}
\usepackage{hyperref}
\usepackage[square,colon,sort&compress,numbers,nonamebreak]{natbib}
\hypersetup{colorlinks,citecolor=red,linkcolor=red}

\begin{document}

blablabla \citet{Ref1} blabla.....

\newpage
\bibliographystyle{unsrtnat}
\bibliography{BibliographyFile}

\end{document}

@article{Ref1, 
author    = "Author1, A1. and Author2, A2.",
title     = "xxxxxxxxxxxxxxxx",
journal   = "xxxxxxxxxxxxxxxxxxxx",
volume    = "YY",
number    = "ZZ",
year      = "XXXX",
url={web},
pages     = "x-y",
} 

a MWE is:

\documentclass[12pt]{article}
\usepackage{cite}
\usepackage{color}
\usepackage{hyperref}
\usepackage[square,colon,sort&compress,numbers,nonamebreak]{natbib}
\hypersetup{colorlinks,citecolor=red,linkcolor=red}

\begin{document}

blablabla \citet{Ref1} blabla.....

\newpage
\bibliographystyle{unsrtnat}
\bibliography{BibliographyFile}

\end{document}

@article{Ref1, 
author    = "Author1, A1. and Author2, A2.",
title     = "xxxxxxxxxxxxxxxx",
journal   = "xxxxxxxxxxxxxxxxxxxx",
volume    = "YY",
number    = "ZZ",
year      = "XXXX",
url={web},
pages     = "x-y",
} 
  • Thank you for your question and welcome to the TeX.SX! Could you please add a fully compilable (minimum working) example (MWE), best with some bib file as well? It would help the solvers a lot. – Malipivo Apr 16 '14 at 16:11
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Heiko Oberdiek Apr 16 '14 at 16:32

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.