The code below shows in the caption "table 1", which is correct, but in the text reference, it shows "table 2". How can I fix that?
\documentclass[]{article}
\begin{document}
\section{Description}
\section{Measurements}
\label{sec:measx}
Table \ref{tab:meas}
\begin{table}[ht]
\label{tab:meas}
\begin{tabular}{|c|c|}
\hline
A & B \\ \hline
\end{tabular}
\caption {Measurements}
\end{table}
\end{document}



\labelin or after\caption. – Aug 24 '18 at 04:15\labelto the line after\captionmakes no difference. Moving\labelinside\caption{\label{} Measurements}does not make any difference either. Removing the previous\sectionworks. It seems to mixup\sectionand\tableenumerations. – Fabio Aug 24 '18 at 04:23\captionthe wrong label (the\label{sec:measx}one). It work, thanks. – Fabio Aug 24 '18 at 06:13