1

I made a table and the codes is as follow:

\begin{table*}[t]
\resizebox{\textwidth}{!}{
\begin{tabular}{|l|l|l|l|l|l|l|l|l|l|l|l|l|}
\hline
 &
  \multicolumn{4}{c|}{TuckER} &
  \multicolumn{4}{c|}{TuckER-bk} &
  \multicolumn{4}{c|}{TuckER-bk-score} \\ \hline
 &
  Hits@10 &
  Hits@3 &
  Hits@1 &
  MRR &
  Hits@10 &
  Hits@3 &
  Hits@1 &
  MRR &
  Hits@10 &
  Hits@3 &
  Hits@1 &
  MRR \\ \hline
Symmetric &
  0.9588 &
  0.9570 &
  0.9453 &
  0.9512 &
  \cellcolor[HTML]{FE996B}0.9606 &
  \cellcolor[HTML]{F8A102}0.9588 &
  \cellcolor[HTML]{F56B00}0.9471 &
  \cellcolor[HTML]{CE6301}0.9530 &
  \cellcolor[HTML]{FFFFFF}0.9597 &
  0.9570 &
  0.9462 &
  0.9520 \\ \hline
Asymmetric &
  0.1658 &
  0.1340 &
  0.1022 &
  0.1238 &
  \cellcolor[HTML]{FE996B}0.1692 &
  \cellcolor[HTML]{F8A102}0.1358 &
  0.1055 &
  0.1270 &
  0.1691 &
  0.1357 &
  \cellcolor[HTML]{F56B00}0.1089 &
  \cellcolor[HTML]{CE6301}0.1284 \\ \hline
Both &
  0.6888 &
  \cellcolor[HTML]{F8A102}0.6766 &
  0.6527 &
  0.6670 &
  \cellcolor[HTML]{FE996B}0.6912 &
  0.6760 &
  \cellcolor[HTML]{F56B00}0.6544 &
  \cellcolor[HTML]{CE6301}0.6677 &
  0.6830 &
  0.6667 &
  0.6480 &
  0.6600 \\ \hline
\end{tabular}
}
\end{table*}

I want to be able to refer to it later on by writing: "referring to table ****" and I'm wondering how can i do?

user614287
  • 127
  • 1
  • 6
  • Welcome to TeX.SX! Can you please expand the code snippet that you have posted to a full minimal working example. It is much easier to help you if we can start with some compilable code that illustrates your problem. A MWE should start with a \documentclass command, include any necessary packages and be as small as possible to demonstrate your problem. At the moment we have to guess what packages etc you are using before we can compile your code. This said, try adding a \label{mytable} to table and a \ref{mytable} afterwards. –  May 08 '20 at 22:27
  • 3
    You will need a \caption before the \label will work. – John Kormylo May 08 '20 at 22:39

1 Answers1

1

You need add \label{tbl:...} inside your table like the code below

\begin{table*}[t]
\centering
\caption{Name of the Table here}
\label{tbl:name to use when you wants to refer}
\resizebox{\textwidth}{!}{
\begin{tabular}{|c|c|}
    \hline
    &  \\
    \hline
    &  \\
    \hline
\end{tabular}
}
\end{table*}

Then where do you want to refer include \ref{tbl:name to use when you wants to refer}

Table \ref{tbl:name to use when you wants to refer} show us a ....

Also this kind of referenciation works well with all object that starts with \begin

Pablo Díaz
  • 248
  • 1
  • 6