Fixing Subfloat Image Labels in LaTeX Captions

  • Context: LaTeX 
  • Thread starter Thread starter ehrenfest
  • Start date Start date
  • Tags Tags
    Image Latex
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 38K views
ehrenfest
Messages
2,001
Reaction score
1
Hello,

I am using the subfloat package. I have several images in my figure and I wanted to have an (a), (b), (c) under them and then refer to them like that in the caption. However, when I do ref {image1a} in the caption it shows up as "1a" instead of "a". I don't want the "1" because this is the caption for figure 1. Is there any way to get rid of that?

Does this make sense?

Thanks.
 
Last edited:
Physics news on Phys.org
I want to something like this

Code:
\begin{figure}
  \centering
  \subfloat[A gull]{\label{fig:gull}\includegraphics[width=0.3\textwidth]{gull}}                
  \subfloat[A tiger]{\label{fig:tiger}\includegraphics[width=0.3\textwidth]{tiger}}
  \subfloat[A mouse]{\label{fig:mouse}\includegraphics[width=0.3\textwidth]{mouse}}
  \caption{Here we a gull \ref{fig:gull} and a tiger \ref{fig:tiger} and a mouse \ref{fig:mouse}}
  \label{fig:animals}
\end{figure}

except I want it to say (a) instead of (1a) where I put \ref{fig:gull}.
 
use \subref{reflabel} rather than \ref{...}