0

I have a figure with many subplots created and labeled in Matlab. In the text of the tex file, I need to refer to each subplot separately e.g. 1a) 1b)..., nevertheless I can obviously link only the entire figure e.g. 1 in the text. How can I include the letters in the link? So far I have only changed the color of the letters manually, but I would also like to have the link if I go with the cursor above the letter.

For example I have a figure with three subplots and I need to discuss the first one:

\documentclass[%
reprint,
superscriptaddress,
amsmath,amssymb,
aps,
prb,
]{revtex4-2}

\hypersetup{
        colorlinks   = true,
        citecolor    = blue,
        linkcolor    = blue}

\begin{document} 


\begin{figure}[t]
 \centering
 \includegraphics[width=1\textwidth]{img.eps}
 \caption{(a) subplot1 (b) subplot2  (c) subplot3}
 \label{fig:figure}
 \end{figure}

Figure \ref{fig:figure}{\color{blue}{(a)}

\end{document}

Thank you!

7
  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – DG'
    Nov 7, 2019 at 18:12
  • 1
    Hi, welcome. The subcaption package has a \phantomsubcaption command that can be used for such things. See an example at tex.stackexchange.com/a/497598 Nov 7, 2019 at 18:12
  • Welcome to TeX.SE! You should provide a minimal working example for us to copy and paste; it makes it much easier to help you. Remember the draft option if your problem includes images. Nov 7, 2019 at 18:13
  • My personal style (determined after hundreds of such cases) is to always create the smallest component figures separately and use tabular to lay them out, along with individual captions. Nov 8, 2019 at 4:39
  • \phantomsubcaption works fine for my problem. Nevertheless I am using floatrow package that does not cooperate with subcaption package. I do not know how to create sidecaption in the subcaption environment..
    – mickeymar
    Nov 8, 2019 at 8:46

0

You must log in to answer this question.

Browse other questions tagged .