2

Below is my Coding

\documentclass{article}

\usepackage[colorlinks]{hyperref}

\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}

\usepackage[colorlinks]{hyperref}

\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,

Thanks in Advance, please guide,

  • 1
    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
1

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

\documentclass{article}
\usepackage[colorlinks]{hyperref}

\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}

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.