0

I am using the llncs document class and I found this answer matching my required task. However, I use cross-referencing very often in my document, and I noticed this the table number cross-referenced does not match the actual table.

I reduce the code (from said answer here):

\documentclass[runningheads]{llncs}
\usepackage{booktabs,siunitx}

\begin{document}

\section{Main Section}

\subsection{Sub-section I} Checking cross-reference for Table \ref{tab:abc}

\title{Paper Title}

\begin{table}[htp] \label{tab:abc} % <- added by me \caption{Classification results of imbalance techniques} \setlength{\tabcolsep}{0pt}

\begin{tabular*}{\textwidth}{
    @{\extracolsep{\fill}}
    l
    @{\hskip 1ex}
    *{5}{S[table-format=1.2]}
    @{\hskip 1ex}
    *{5}{S[table-format=1.2]}
    @{\hskip 1ex}
    *{5}{S[table-format=1.2]}
    @{}
  }
  \toprule
  TM &amp;
  \multicolumn{5}{c}{Precision} &amp;
  \multicolumn{5}{c}{Recall} &amp;
  \multicolumn{5}{c}{F1-Score} \\
  \cmidrule(r{1ex}){2-6} \cmidrule(r{1ex}){7-11} \cmidrule{12-16}
  &amp; {R} &amp; {S} &amp; {A} &amp; {B} &amp; {D}   &amp; {R} &amp; {S} &amp; {A} &amp; {B} &amp; {D}   &amp; {R} &amp; {S} &amp; {A} &amp; {B} &amp; {D}\\
  \midrule
  Walk &amp; 0.88 &amp; 0.78 &amp; 0.65 &amp; 0.59 &amp; 0.45 &amp; 0.38 &amp; 0.73 &amp; 0.95 &amp; 0.83 &amp; 0.57 &amp; 0.52 &amp; 0.07 &amp; 0.22 &amp; 0.66 &amp; 0.88 \\
  Bike &amp; 0.88 &amp; 0.78 &amp; 0.65 &amp; 0.59 &amp; 0.45 &amp; 0.38 &amp; 0.73 &amp; 0.95 &amp; 0.83 &amp; 0.57 &amp; 0.52 &amp; 0.07 &amp; 0.22 &amp; 0.66 &amp; 0.88 \\
  \bottomrule
\end{tabular*}

\medskip

TM: Transportation mode

R: RF; S: RF-SMOTEd; A: AdaBoost; B: SMOTEBoost; D: DECOC

\end{table} \end{document}

Output:

enter image description here

I want it to be (just) like this:

Checking cross-reference for Table 1.
yarinya
  • 23
  • 2
    label has to be after caption – David Carlisle Mar 17 '23 at 01:02
  • 1
    Unrelated: I'd recommend to use a protected space: Table~\ref{...}. Loosely related: I'd even more recommend to use the cleveref package. With it you would have noticed that you don't reference the table but the subsection. – Οὖτις Mar 17 '23 at 08:09

0 Answers0