# Custom Figure Citation Linking Text

Below is my Coding

\documentclass{article}

\begin{document}

To test whether Figure \ref{fig1} a suspicious URL is vulnerable, we utilize the URL to download a representative Figure \ref{fig2}

\begin{figure}
\caption{Sample Figure 1\label{fig1}}
\end{figure}

\begin{figure}
\caption{Sample Figure 2\label{fig2}}
\end{figure}

\end{document}


what i need to achieve is explained below,

\documentclass{article}

\begin{document}

To test whether \ref{fig1}{Figure 1} a suspicious URL is vulnerable, we utilize the URL to download a representative \ref{fig2}{Figure 2}

\begin{figure}
\caption{Sample Figure 1\label{fig1}}
\end{figure}

\begin{figure}
\caption{Sample Figure 2\label{fig2}}
\end{figure}

\end{document}


In figure citation, I want my custom text to be displayed \ref{fig1}{Figure 1} and i want to use the \ref{fig1} for just linking purpose,

• The cleveref package provides the \cref command that also includes the type of the label referred to. A more manual solution is explained in Cross-Reference with custom text. – moewe Sep 2 '15 at 13:01
• Another possibilty might be \autoref, which is defined by the already loaded package hyperref. – Faekynn Jan 1 '16 at 9:08

As @moewe suggested i have found a solution, thanks to him as well

\documentclass{article}

\begin{document}

To test whether \hyperref[fig1]{Figure 1} a suspicious URL is vulnerable, we utilize the URL to download a representative \hyperref[fig2]{Figure 2}

\begin{figure}
\caption{Sample Figure 1\label{fig1}}
\end{figure}

\begin{figure}
\caption{Sample Figure 2\label{fig2}}
\end{figure}

\end{document}