# Cross referencing the Fig.1 and Eq.(1) in blue color in \documentclass{elsarticle} [duplicate]

please tell me the necessary packages that I must use to get blue colored cross-referring to Fig.1 and Eq.(1). I want to change the color of Fig.1 from black to blue. Thank you very much in advance.

\documentclass[5p]{elsarticle}

\usepackage{lineno}
\modulolinenumbers[5]

\journal{Journal of \LaTeX\ Templates}

\usepackage{times}

\begin{document}

%\linenumbers

\section{Introduction}
Piezoelectric Fig.1 and Eq.(1) effect has been employed to a very great extent in many applications since its discovery by the Curie brothers.

\end{document}

• Hi, please tell me the necessary packages that I must use to get blue colored cross-referring to Fig.1 and Eq.(1). I want to change the color of Fig.1 from black to blue. Thank you very much in advance, Dec 15, 2017 at 10:04

## 1 Answer

you only need to add the hyperref package. The setup commands also needed are:

\usepackage{hyperref}
\hypersetup{
colorlinks   = true,
citecolor    = blue
}

• If I use this code, I get the blue colored number when I cross-refer the Figures and Tables but the word Fig. and Table. is still in black color. Thank you Dec 17, 2017 at 10:33
• Hi, @Prakash try using \autoref{} instead of \ref{}. So you do not need to put Fig. or Table. Dec 18, 2017 at 14:08