# customization of references

Im working with a tex document with a lot of references. Im using:

\usepackage{hyperref}

\usepackage{varioref}

\usepackage{cleveref}



Even so every reference has figure/table etc. in front of the numbering, by my professor thinks the references are too identical. Is there any way i can customize the references so \cref{fig:1} becomes figure 1.1 in blue, tables references becomes red, algorithm becomes bold algorithm 1.1 equation becomes with [ ], and a final reference uses a different **textsize/style**?

How to customize the references depended on what you are referring to?

• Possibly irrelevant, but varioref should go before hyperref. Nov 15 '16 at 23:04

I would suggest using the \creflabelformat and \crefname definitions:

\documentclass{article}

\usepackage{cleveref}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{graphicx}

\creflabelformat{figure}{\color{red} \textbf{#1#2#3}}
\crefname{figure}{\color{blue} figure}{figures}
\creflabelformat{equation}{[#1#2#3]}
\crefname{equation}{equation}{equations}
\crefrangeformat{equation}{eqs. #3[#1]#4--#5[#2]#6}

\begin{document}
\lipsum[1]

\begin{figure}[h]

\centering\includegraphics[width=0.5\textwidth]{example-image-a}
\caption{Example image A\label{fig:fig1}}
\end{figure}
\lipsum[2]
\cref{fig:fig1}

$$\label{eq:eq1} a^2 + b^2 = c^2$$

\cref{eq:eq1}
\end{document}


Here I only changed the figure and equation, I leave the table and algorithm as an exercise for you :) . More about this in section 4 of the cleverref user guide.