[Tex/LaTex] Referencing sublabels without subfloats

cleverefsubcaptionsubfloats

Suppose that I have a figure with different panels and I want to use the command \cref to reference each one of the panels. A way to do this is to use the packages subfig, subfigure, or subcaption. However, what if the different panels in the figure are all together in a single file picture?

Is there a way to define a sublabel without define a subfloat or subfigure?

For example, consider the standard example:

\documentclass[11pt]{article}
\usepackage{subfig}

\begin{document}
  \begin{figure}
    \subfloat[\label{subfig-1}]{%
      \includegraphics[scale=1]{example-image-1}
    }
    \subfloat[\label{subfig-2}]{%
      \includegraphics[scale=1]{example-image-2}
    }
    \caption{blah blah}
    \label{fig:dummy}
  \end{figure}
\end{document}

Now, I dont't have example-image-1 and example-image-2 separately, but they are a single file example-image. What I am trying to do is to create a "phantom" subfloat in order to reference different parts of example-image as if they were two different and separate figures.

PS: I tried \phantomsubcaption from the package subcaption, as suggested here, but I have compatibility issues (I think it is revtex problem…).

IMPORTANT: Cutting the picture in two pieces is NOT an option.


A very quick and dirty solution is:

\documentclass[11pt]{article}
\usepackage{subfigure}
\begin{document}
 \begin{figure}
  \subfigure{\label{subfig-1}}
  \subfigure{\label{subfig-2}}
  \includegraphics[scale=1]{example-image}
  \caption{blah blah}
  \label{fig:dummy}
 \end{figure}
\end{document}

However, this introduces extra spaces in the figures, since it actually defines 2 empty subfloats.

I hope that someone will have a better idea.

Best Answer

\phantomsubcaption seems to work fine here.

enter image description here

\documentclass{revtex4-1}
\usepackage{subcaption}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering{\phantomsubcaption\label{sub1}\phantomsubcaption\label{sub2}}
\includegraphics[width=0.5\linewidth]{example-image-a}
\caption{\subref{sub1} shows this, \subref{sub2} shows that.}
\label{fig}
\end{figure}

Figure~\ref{fig} has subfigures \ref{sub1} and \ref{sub2}.
\end{document}