# How to link a figure without subsection?

I have many figures in my text, and they get numbers (in the first Section) 1.1, 1.2 etc. So just the number of section and then the number of Figure.

But when I try to link the figures, they get out as 1.1.2, 1.2.1 etc.(as second figure in Section 1 Subsection 1 or first figure in Section 1 Subection 2).

How I could make this live together ?

Either Figures should get names with subsection names or the links should give the numbers as the names are. I think I would prefer the first option (this is my Thesis and it is a big document so probably listing a number of Subsection is a good idea). But how can I do it ?

Thank you!

PS. Let me explain better: in general, I just do not understand how linking of the figures works in my document. I have many figures in my text, and they are not linked properly, I actually thought I figured out the algorithm how the linking was done but now I feel I do not know....

First thing to remark -- the names of the figures have two digits divided by a point, and the links to them - three digits. After, at some moment I have to different references that get written as the SAME number. This is completely crazy.

So for example these are two Figures in the text with names 1.2 and 1.3

When I try to link to them, it gives Figure 1.1.3 for BOTH of them !

Here is the relevant piece of code:

 .... can be seen on Figure \ref{fig:arnoldtonguesstandart}.

....is a Cantor staircase, see Figure \ref{fig:cantor}. But, contrary...

\begin{figure}
\begin{center}
\includegraphics[scale=0.5]{arnoldtonguesstandart.png}
\caption{Arnold tongues for a classical family \eqref{eq:arnoldfamily} on the plane of parameters $(a,\varepsilon)$}
\end{center}
\label{fig:arnoldtonguesstandart}
\end{figure}

\begin{figure}
\begin{center}
\includegraphics[scale=0.5]{cantor.png}
\caption{A Cantor staircase for a standard Arnold family of circle diffeomorphisms \eqref{eq:arnoldfamily}: the graph is a section of picture on Figure \ref{fig:arnoldtonguesstandart} by a line $\varepsilon = \const$}
\end{center}
\label{fig:cantor}
\end{figure}


Can somebody tell me what is happening ? The package I use is big and complicated and it is not me who created it so I do not know it by heart...

You have the \label command in the wrong place: when the center environment is closed, LaTeX won't remember the number assigned to the caption, so your label will refer to something earlier.

However, also using center is wrong:

\begin{figure}
\centering

\includegraphics[scale=0.5]{arnoldtonguesstandart.png}

\caption{Arnold tongues for a classical family \eqref{eq:arnoldfamily} on the plane of parameters $(a,\varepsilon)$}
\label{fig:arnoldtonguesstandart}

\end{figure}


Do like this and your cross references will be right.

• Wow ! Thank you so much. Genius things are simple :) It's funny, I have already seen somewhere this discussion about \centering instead of center environment but I couldn't imagine that this was doing my references as crazy so I didn't even consider this option. Great ! Thank you A LOT ! – Olga Apr 11 '16 at 17:53