I have followed this thread to label a table as
\begin{center}
\begin{table}
\begin{tabular}{|c|}
\hline
contents of the table \\ [0.5ex]
\hline
\end{tabular}
\label{tab1:IFPositions}
\end{table}
\end{center}
However, if I then write \ref{tab1:IFPositions}, the resulting .pdf text returns ?? as the number of the reference, even if it redirects to the proper place. As far as I understand, this happens since there is no such thing as a table number, but I would like to know if there is a way for a table to be properly referenced instead of getting ?? as the number of reference.
\refstepcounter{table}if you don't want a\caption. – John Kormylo Mar 16 '22 at 15:06\begin{center}\begin{table} ... \end{table}\end{center}makes no sense. Use\begin{table}[htp] \centering ... \end{table}instead. Note that I added[htp]to\begin{table}you can also use[htbp]the default value in most classes are[tbp]– daleif Mar 16 '22 at 15:20