0

I inserted an image inside an ordered lists like

      Plan
      1. Separate the samples 
           (figure 1 )
      2. Clean the samples as shown in (cross-ref of figure 1).

I labeled the image as \label{fig:1} and then, I used \ref{fig:1} to make a cross-reference.

But it shows ...as shown in 1 (which is from 1. Separate the sample). How do I refer to figure 1 not 1?

  • 1
    Welcome! Did you add the \caption before the \label inside the figure environment? Please provide a proper minimal document rather than pseudo-code as all we can do right now is guess what's wrong. – cfr Feb 22 '16 at 3:31
1

Impossible to say what's wrong without a minimal example, but the usual code would be something like this:

   \begin{enumerate}
      \item\label{enum:something}Something (see \ref{fig:stuff}
        \begin{figure}
          Stuff
          \caption{Stuff}\label{fig:stuff}
        \end{figure}
       \item\label{enum:somethingelse}Something else
    \end{enumerate}

Note that \caption must come before \label in the figure environment.

1

I think you've simply missed writing 'Figure' before your \ref command. Your code should be:

Clean the samples as shown in Figure~\ref{fig:1}.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.