I want to know what are the packages that do the following. When I cross-reference an Assumption or Theorem or cite a bibliographic entry ... I want that it will be colored in blue. I will put images to explain more what i mean

- 177
2 Answers
I suggest you do the following to get all citation call-outs and all cross-references to items (including the names of the items) colored in blue:
Load the hyperref package with the options
colorlinks=trueandallcolors=blue. This will assure that citation call-outs are colored in blue.Load the cleveref package with the options
nameinlink,noabbrev, andcapitalize. (You can omit the latter two options if you're OK with abbreviated and lower-cased item names.)Use the macro
\crefto create cross-references to pages, sections, assumptions, equations, etc.
For (much) more on the subject of creating cross-references (including the cleveref package), I suggest reading the posting Cross-reference packages: which to use, which conflict?

\documentclass{article}
\usepackage[colorlinks=true,allcolors=blue]{hyperref}
\usepackage[nameinlink,noabbrev,capitalize]{cleveref}
\begin{document}
\section{Start} \label{sec:start}
\begin{equation}\label{eq:pyth}
a^2+b^2=c^2
\end{equation}
See \cref{sec:start} and \cref{eq:pyth}.
\end{document}
\documentclass[]{article}
\usepackage[colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue,pagebackref]{hyperref}
\begin{document}
\newcommand*{\myref}[1]{{\color{blue}\ref{#1}}}
\section{Hello}
\label{sec:hello}
See Section \ref{sec:hello}.
\begin{equation}\label{eq:albert}
E=mc^2
\end{equation}
See~(\ref{eq:albert}).
\end{document}
EDIT
Code improved as suggest by Mico.
- 1,943
-
The OP mentioned wanting all cross-references in blue. I thus wouldn't mention the option
urlcolor=black. The optionallcolors=bluemay be most appropriate for the OP's stated objective. – Mico Feb 07 '15 at 15:56 -
-
Hi, thank you Giacomo, in your example the numbers are colored it is OK but what I want is: when I refer as Equation~\ref{eq:albert}, I want that the word Equation will be colored also. Thank you – mathdatastatsml Feb 07 '15 at 16:15
-
That's strange -- the combination
colorlinks=true,allcolors=blueworks perfectly for me. – Mico Feb 07 '15 at 16:44 -
@Mico I work with MikTeX and Windows but... this do not must is a problem. – Giacomo Alessandroni Feb 07 '15 at 18:15
-
Please check if the code given in my answer (which also uses
allcolors=blue, on a MacBook running MacTeX2014) compiles on your system. I can see no reason why it shouldn't when run on a Windows system and MikTeX. – Mico Feb 07 '15 at 18:21
hyperrefwith optioncolorlinks. You can choose the color of links via the keylinkcolor=…– Bernard Feb 07 '15 at 15:24