# Cross-reference to a portion of a figure

In my document there is a "Figure 1" for which I have manually labeled parts "(a)" and "(b)" using the \put(x,y){(a) Some text description here.} commands [for both (a) and (b)].

I am using the \label{label name here} command inside the caption of "Figure 1" alongside the \ref{label name here} to produce the desired effect except for one thing. As it stands, I have in my text

... are shown in Figure 1(a).

However, only the "1" is the 'link' and not the "(a)". I realise that I currently do not have the code set up for this effect; this is what I am seeking help on.

Note: I am currently using

\usepackage[usenames,dvipsnames]{color}
\usepackage{natbib}


========================

# Edited to provide a MWE

\documentclass[10pt]{article}
\usepackage{graphicx}
\usepackage{amsmath}

\usepackage{amssymb}
\usepackage[a4paper]{geometry}
\geometry{top=1.0in, bottom=1.2in, left=1.2in, right=1.2in}

\usepackage{epstopdf}

\usepackage[usenames,dvipsnames]{color}
\usepackage{natbib}

\begin{document}

\noindent Some text here to talk about the first part of the figure followed by a reference to see Figure \ref{Figure1}(a). Some text here to talk about the second part of the figure followed by a reference to see Figure \ref{Figure1}(b).

\begin{figure}[h]
\centering
\setlength{\unitlength}{0.1\textwidth}
\vspace{0.7in}
\setlength{\unitlength}{0.1\textwidth}
\begin{picture}(5.5,4.5)
\put(-1,0){\includegraphics[width=4cm]{Figure1Name.eps}}
\put(-1,2.65){\footnotesize{(a) Some text describing the first part.}}
\put(-1,-0.45){\footnotesize{(b)Some text describing the second part.}}
\end{picture}
\parbox{5.4in}{\vspace{0.5in}\caption{\normalsize{The caption for Figure 1 goes here. Both parts of Figure 1 are described. \label{Figure1}}}}
\end{figure}

\end{document}


========================

# Output

-
Please provide a minimum working example (MWE) that generates the problem you're encountering and trying to solve. As a general matter, in order to create a hyperlink to an entity named "Figure 1(a)" -- as opposed to, say, "Figure 1" (your current state) -- LaTeX/hyperref needs to be given a \label instruction somewhere nearby the subfigure, so that a unique hook can be created. A \put statement will not generate the required label. Have a look at the subfigure and subcaption packages for ways to create separate subfloats (which can then be given hooks). –  Mico Aug 13 '12 at 11:00
Assuming you're using the graphicx package, you could load it with the demo option. That way, you can construct an MWE without having to post the pdf file you use to create the figure. –  Mico Aug 13 '12 at 11:29
As I am unfamiliar with the \demo option, I have uploaded the PDF for the time being. –  user16307 Aug 13 '12 at 11:32

I suggest you replace the picture environment inside the figure environment with a couple of subfigure environments. (The subfigure environment is made available by loading the subcaption package.) That way, you can generate labels for each subfigure separately -- as well as for the figure as a whole -- letting you then cross-reference each of these entities individually. The command \captionsetup lets you customize virtually every aspect of the appearance of the captions, including their font size.

The following, modified form of your MWE shows how this might be done. It has three \caption and three \label directives, one each for the subfigures and the overall figure.

\documentclass[10pt]{article}
\usepackage[demo]{graphicx} % remove demo option for real program
\usepackage{amsmath,amssymb}
\usepackage[a4paper]{geometry}
\geometry{top=1.0in, bottom=1.2in, left=1.2in, right=1.2in}
\usepackage{subcaption}
\captionsetup[sub]{size=footnotesize} % optional
\usepackage{epstopdf}

\usepackage[usenames,dvipsnames]{color}
\usepackage{natbib}

\begin{document}

Some text here to talk about the first part of the figure followed by a
reference to Figure~\ref{fig:1a}. Some text here to talk about the second
part of the figure followed by a reference to Figure~\ref{fig:1b}.

\begin{figure}[h]
\centering

\begin{subfigure}{0.5\textwidth} % or whatever dimension is desired
\centering
\includegraphics[width=4cm]{spiral.eps}
\caption{Some text describing the first part.}
\label{fig:1a}
\end{subfigure}

\bigskip
\begin{subfigure}{0.5\textwidth}
\centering
\includegraphics[width=\columnwidth]{redsquare.pdf}
\caption{Some text describing the second part.}
\label{fig:1b}
\end{subfigure}

\caption{The caption for Figure 1 goes here. Both parts of Figure 1 are described.}
\label{Figure1}
\end{figure}

\end{document}


-
Excellent answer Mico! Thank you. –  user16307 Aug 13 '12 at 14:41
@Jordan -- Glad you found my answer useful. Incidentally, I've taken the liberty of editing the question's title as its subject is not so much hyperref but cross-referencing in general. –  Mico Aug 13 '12 at 15:09