[Tex/LaTex] Numbers in bold inside a table

boldtables

I have a large table (59 rows and 11 columns) of accuracy results.
enter image description here

Observe that numbers in bold look a lot larger than regular ones. I want something like this:
enter image description here

Here is the code:

\documentclass{article}

\usepackage{tabularx}
\usepackage{booktabs}

\begin{document}
\begin{table}[!htbp]
  \scriptsize %\footnotesize
  \centering
    \caption{Summary of mean accuracy results of the second experiment.}
    \hspace*{-1cm} 
    \begin{tabularx}{1.15\linewidth}{Xlllllllll|l}
    \toprule
    Datasets  & {\sc Scg-$\kappa$} & {\sc Scg-mi} & {\sc Gasen} & {\sc Mdsq} & {\sc Re} & {\sc OO} & {\sc Kappa} & {\sc CC} & {\sc BB} & {\sc Bagging} \\
    \midrule
    Anneal & \textbf{83.54} & \textbf{83.54} & 82.78 & 82.78 & 82.78 & 79.11 & 78.33 & 82.34 & 78.35 & 82.78 \\
    Audiology & \textbf{47.17} & 47.08 & 46.46 & 46.46 & 46.46 & 46.46 & 46.46 & 46.46 & 46.46 & 46.46 \\
    Australian  & \textbf{85.51} & \textbf{85.51} & \textbf{85.51} & \textbf{85.51} & \textbf{85.51} & \textbf{85.51} & \textbf{85.51} & \textbf{85.51} & \textbf{85.51} & \textbf{85.51} \\
    \midrule
    \textbf{Average ranks} & \textbf{3.14} & \textbf{3.86} & \textbf{4.69} & \textbf{4.94} & \textbf{4.58} & \textbf{6.66} & \textbf{7.03} & \textbf{8.15} & \textbf{6.62} & \textbf{5.34} \\
    \bottomrule
    \end{tabularx}%
  \label{tab5_3}%
\end{table}%

\end{document}

Any suggestions?

Best Answer

You can use the method outlined in https://tex.stackexchange.com/a/334323/4427

\documentclass{article}

\usepackage{lmodern}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{etoolbox}

\begin{document}

\begin{table}[!htbp]
\small
%\scriptsize
%\footnotesize
\centering

\caption{Summary of mean accuracy results of the second experiment.}
\label{tab5_3}

%% local settings
\sisetup{detect-weight,mode=text}
% for avoiding siunitx using bold extended
\renewrobustcmd{\bfseries}{\fontseries{b}\selectfont}
\renewrobustcmd{\boldmath}{}
% abbreviation
\newrobustcmd{\B}{\bfseries}
% shorten the intercolumn spaces
\addtolength{\tabcolsep}{-4.1pt}

\begin{tabular}{ @{} l *{10}{S[table-format=2.2]} @{} }
\toprule
Datasets  &
  {\scshape Scg-$\kappa$} & {\scshape Scg-mi} &
  {\scshape Gasen} & {\scshape Mdsq} &
  {\scshape Re} & {\scshape OO} &
  {\scshape Kappa} & {\scshape CC} &
  {\scshape BB} & {\scshape Bagging} \\
\midrule
Anneal &
  \B 83.54 & \B 83.54 & 82.78 & 82.78 & 82.78 & 79.11 & 78.33 & 82.34 & 78.35 & 82.78 \\
Audiology &
  \B 47.17 & 47.08 & 46.46 & 46.46 & 46.46 & 46.46 & 46.46 & 46.46 & 46.46 & 46.46 \\
Australian &
  \B 85.51 & \B 85.51 & \B 85.51 & \B 85.51 & \B 85.51 & \B 85.51 & \B 85.51 & \B 85.51 & \B 85.51 & \B 85.51 \\
\midrule
\B Average ranks &
  \B 3.14 & \B 3.86 & \B 4.69 & \B 4.94 & \B 4.58 & \B 6.66 & \B 7.03 & \B 8.15 & \B 6.62 & \B 5.34 \\
\bottomrule
\end{tabular}

\end{table}

\end{document}

enter image description here

Related Question