1

I am using hyperref package for referencing but when i do references it gives me the chapter number instead of the label name and don't know why it is doing this as I am new to lateX. I searched a lots of example but nothing is working.

Here is my code

\begin{figure}
\includegraphics[width = 150mm]{flowChart.jpg}

\label{Figure:1}
\end{figure}

And for referencing

~\ref{Figure:1}

after this in PDF I am getting chapter number as 2.

Najam-us-Saqib
  • 195
  • 1
  • 6
  • 1
    You must place a \caption (before \label inside the figure environment) in order to have something to reference properly. How else should people know where to go and have a look at \ref{Figure:1}? – Werner Mar 04 '13 at 06:47
  • 3
    @Werner The reasoning behind your how else is not clear. Thousands of people have had the same problem with captions inside figures and tables. The mechanism just isn't clear and/or prone to errors. I always recommend the label should be defined inside the caption. That way it will still work if the caption is moved. –  Mar 04 '13 at 06:50
  • You may try the package 'cleverref'. – Sveinung Mar 04 '13 at 09:21
  • 3
    A figure environment, by itself, generates no number: you might have more than one figure together with its caption in it, for instance, that you want to keep together. So it's \caption that generates the number. – egreg Mar 04 '13 at 09:24
  • This comes down to the same issue as the question I've linked to: you need a \caption before the \label. – Joseph Wright Aug 09 '13 at 19:43

0 Answers0