1
\begin{figure}[h]
\centering
\label{fig:serviceworker}
\includegraphics[width=\textwidth]{img/sw}
\caption{Service workers en HTTP Requests}
\end{figure}

In Figuur \ref{fig:serviceworker} wordt er getoond hoe de service worker als een brug functioneert tussen de website en de server waar de applicatie zijn data van haalt. Op deze manier kan de service worker toch nog informatie teruggeven aan de website als de verbinding met de server niet kan gemaakt worden. Dit zorgt er dus voor dat je de applicatie kan blijven gebruiken bij  geen of een slechte internetconnectie.

The problem is that the figure has number 3.1. But when I try to reference it in the text it shows as (Figure 3.2). What am I doing wrong here?

  • One of the most frequent errors: \label before \caption! Place your \label command after \caption, otherwise you're referencing the latest counter being used in \refstepcounter (e.g. a section etc. counter). You may benefit from the cleveref package as well in order to prevent the writing of Figuur etc. all the time when referring to it –  Apr 10 '17 at 17:07
  • I also used this in other figures and that worked? – Gaetano Herman Apr 10 '17 at 17:10
  • Only by chance, most likely or you didn't notice the error –  Apr 10 '17 at 17:12
  • Ok thanks for the comments, helped me out alot! – Gaetano Herman Apr 10 '17 at 17:17

0 Answers0