I want to add a reference to an image or a table that is after the text but it seams that the compiler is not finding the label, giving me "??" as number, like the label is not existing. It works only if I put the image before the text. Why is it happening and how can I solve it?
as shown in figure \ref{text} ...
\begin{figure}[H] \centering \label{text}
{\includegraphics[width=0.48\textwidth, keepaspectratio]{figure/image}}
\caption[dsad]{dsad}
\end{figure}