1

I want to change the color of citation brackets from black to blue. I have used

\usepackage{hyperref}
\usepackage{cite}
\renewcommand{\citeleft}{\textcolor{red}{[}}
\renewcommand{\citeright}{\textcolor{red}{]}} 

but all vain.

\documentclass[preprint,3p,twocolumn]{elsarticle}
\usepackage{amsmath,amsfonts,amssymb,amscd,amsthm,xspace}
\usepackage{epstopdf}
\usepackage{lineno}
\usepackage{pifont}
\usepackage{natbib}
\usepackage{graphicx}
\usepackage[nodots,nocompress]{numcompress}
\usepackage{setspace}
\usepackage{color}

\usepackage[pdfpagemode={UseOutlines},bookmarks=false,bookmarksopen=false,bookmarksopenlevel=0,
            bookmarksnumbered=true,hypertexnames=true,colorlinks=true,linkcolor={blue},citecolor={blue},         urlcolor={blue},pdfstartview={FitH},unicode,breaklinks={true},citebordercolor={0 0 1}]{hyperref}

\biboptions{numbers,sort&compress,square,comma}
\journal{Computer Networks}
\begin{document}
\begin{frontmatter}
\title{Wireless Sensor Networks Routing: A Comprehensive Survey}

\author[a]{Palvinder Singh Mann\corref{cor1}}
\ead{psmaan@hotmail.com}
\author[b]{Satvir Singh}
\ead{satvir15@gmail.com}
\cortext[cor1]{Corresponding author.Tel.:+91-9888395367 fax:+91-0181-2205852}

\address[a]{Department of Information Technology, DAV Institute of Engineering and Technology, Jalandhar,Punjab,India.144008.}
\address[b]{Department of Electronics and Communication Engineering, Saheed Bhagat Singh State Technical Campus, Ferozepur, Punjab, India.152004.}

\begin{abstract}
\end{abstract}

\begin{keyword}
\end{keyword}

\end{frontmatter}

\linenumbers
%% main text
\section{Introduction}

Wireless Sensor Networks (WSNs) contain self-configured,
distributed, autonomous and resource empowered sensor nodes
that monitor physical or environmental activities, such as
humidity, temperature, sound, vibration or pollutants in a
specific area of operation\cite{yick2008wireless}. 

\subsection{Subsection One}

\section{References}

\bibliographystyle{model1-num-names}
\bibliography{Ref}

\end{document}




\documentclass[preprint,3p,twocolumn]{elsarticle}

\usepackage{amsmath,amsfonts,amssymb,amscd,amsthm,xspace}
\usepackage{epstopdf}
\usepackage{lineno}
\usepackage{pifont}
\usepackage{natbib}
\usepackage{graphicx}
\usepackage[nodots,nocompress]{numcompress}
\usepackage{setspace}
\usepackage{color}

\usepackage[pdfpagemode={UseOutlines},bookmarks=false,bookmarksopen=false,bookmarksopenlevel=0,
            bookmarksnumbered=true,hypertexnames=true,colorlinks=true,linkcolor={blue},citecolor={blue},         urlcolor={blue},pdfstartview={FitH},unicode,breaklinks={true},citebordercolor={0 0 1}]{hyperref}




\biboptions{numbers,sort&compress,square,comma}




\journal{Computer Networks}


\begin{document}

\begin{frontmatter}



\title{Wireless Sensor Networks Routing: A Comprehensive Survey}


\author[a]{Palvinder Singh Mann\corref{cor1}}
\ead{psmaan@hotmail.com}
\author[b]{Satvir Singh}
\ead{satvir15@gmail.com}
\cortext[cor1]{Corresponding author.Tel.:+91-9888395367 fax:+91-0181-2205852}

\address[a]{Department of Information Technology, DAV Institute of Engineering and Technology, Jalandhar,Punjab,India.144008.}
\address[b]{Department of Electronics and Communication Engineering, Saheed Bhagat Singh State Technical Campus, Ferozepur, Punjab, India.152004.}

\begin{abstract}

\end{abstract}

\begin{keyword}



\end{keyword}

\end{frontmatter}

\linenumbers

%% main text

\section{Introduction}


Wireless Sensor Networks (WSNs) contain self-configured, distributed, autonomous and resource empowered sensor nodes that monitor physical or environmental activities, such as humidity, temperature, sound, vibration or pollutants in a specific area of operation\cite{yick2008wireless}. 

\subsection{Subsection One}


\section{References}


\bibliographystyle{model1-num-names}
\bibliography{Ref}


\end{document}
  • 1
    Welcome to TeX.SE! Please edit your code to make it compilable without too much guesswork. – Mico Nov 27 '13 at 6:27
2

Possible, thogh not recomended.

psmaanCiteBorder

\documentclass{article}
\usepackage{etoolbox}
\usepackage[numbers,sort&compress,square,comma]{natbib}
\usepackage[colorlinks,citecolor=blue]{hyperref}
\makeatletter
\pretocmd{\NAT@open}{\begingroup\color{\@citecolor}}{}{}
\apptocmd{\NAT@close}{\endgroup}{}{}
\makeatother

\begin{document}
\cite{aristotle:physics}\par
\cite{companion,aristotle:physics}
\bibliographystyle{plain}
\bibliography{biblatex-examples}
\end{document}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.