I am trying to reference multiple tables in a latex text document. I am trying to have two table numbered and within the text can reference the table number so if they are ever rearranged/reordered the text in the table would reference the correct table. I noticed that the two function used for referencing
\ref{table:somename}
and
\label{table:somename}
My question: How do I designate in the function which reference\ref{table:somename} refers to in the table?
\begin{table}
\centering%
\begin{tabular}{ll}
Some & text
\end{tabular}
\caption{The caption of the table 1}\label{table:somename}
\end{table}
In text, I can reference the first Table~\ref{table:somename} like this.
\begin{table}
\centering%
\begin{tabular}{ll}
Some & text
\end{tabular}
\caption{The caption of the table 2 }\label{table:somename}
\end{table}
In text, I can reference the second Table~\ref{table:somename} like this.