0

I need to have subfigures with proper labels to cross refer, but doesn't need any caption for them. How can this be done?

\begin{figure}[h]
    \centering
    \begin{subfigure}[t]{0.49\textwidth}
        \centering
        \includegraphics[angle=0,width=0.8\textwidth]{sig.png}
        \label{sig}
    \end{subfigure}
\hfill
\begin{subfigure}[t]{0.49\textwidth}
\centering
\includegraphics[angle=0,width=\textwidth]{sigdc.png}
\label{sigdc}
\end{subfigure}
\caption{ (a) A common caption to all figures}
\end{figure}
  • What exactly is the \ref supposed to show? If you want normal labels without actual captions, just use \refstepcounter{subfigure}. – John Kormylo Jun 20 at 3:39
  • . Thank you very much for the replies. I want to refer the subfigures somewhere in the text body for which I am using \ref{given label} – user191351 Jun 20 at 4:20
  • This generates ?? instead of figure number. – user191351 Jun 20 at 4:30
  • 1
    you cannot refer images without caption. If you like to have only subcaption labels as (a), (b) etc, than just write \caption{} inside subfigure environment. – Zarko Jun 20 at 6:59
  • 1
    In the subcaption package documentation therre is section 6.3 "Referencing sub-figures without sub-captions" (using \phantomcaption) – Axel Sommerfeldt Jun 20 at 7:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.