Improve intercolumn spacing of this table

\documentclass{article}

\usepackage{array,booktabs,ragged2e}
\newcommand\MC[1]{\multicolumn{2}{@{}l}{\textbf{#1}}}

\def\SP{\hspace{15mm}}
\begin{document}

\begin{tabular}{@{} rl @{\SP} rl @{\SP} rl @{\SP} rl@{}}\toprule
\MC{Word C}  &\MC{Char C}  &\MC{Chess}    &\MC{Matching}\\
\MC{9 trials}&\MC{9 trials}&\MC{12 trials}&\MC{12 trials}\\
$N$&$V$&$N$&$V$&$N$&$V$&$N$&$V$\\\midrule
 10 &  1 & 12 &  3 & 16 &  3 & 4 & 0 \\
 10 &  1 & 12 &  6 & 16 &  3 & 4 & 0 \\
 10 &  1 & 12 &  9 & 16 &  5 & 4 & 1 \\
 10 &  2 & 24 &  6 & 16 &  5 & 4 & 1 \\
% ... many more rows ...
\bottomrule
\end{tabular}

\end{document}

enter image description here


Here is a Plain version, you can change the \groupheadingskip and \columnsepskip to your liking:

\documentclass{article}
\newskip\groupheadingskip \groupheadingskip=2em
\newskip\columnsepskip    \columnsepskip=1em
\newskip\rowsepskip       \rowsepskip=3pt
\def\header#1{\multispan2\hidewidth\bf#1\hidewidth}
\begin{document}
\begin{table}
\vbox{\openup\rowsepskip\hrule height 1pt \medskip
  \divide\groupheadingskip by 2
  \halign{&\tabskip\columnsepskip\hskip\groupheadingskip\hfil$#$&
    \hfil$#$\hskip\groupheadingskip\cr
    \header{Word C}&  \header{Char C}&  \header{Chess}&    \header{Matching}\cr
    \header{9 trials}&\header{9 trials}&\header{12 trials}&\header{12 trials}\cr
    N&V&   N&V&   N&V&   N&V\cr
    \noalign{\smallskip\hrule\medskip}
    10&1&  12&3&  16&3&  4&0\cr
    10&1&  12&6&  16&3&  4&0\cr
    10&1&  12&9&  16&5&  4&1\cr
  }
  \medskip \hrule height 1pt
}
\end{table}
\end{document}

output of code


Unsurprisingly (as I write it), I'd use siunitx for a table of numbers like this. For me

\documentclass{article}
\usepackage{booktabs,siunitx}
\begin{document}
\sisetup{table-format=2.0}
\begin{tabular}{SSSSSSSS}
\toprule
\multicolumn{2}{c}{\textbf{Word C}}&
\multicolumn{2}{c}{\textbf{Char C}}&
\multicolumn{2}{c}{\textbf{Chess}}&
\multicolumn{2}{c}{\textbf{Matching}}\\
\multicolumn{2}{c}{\textbf{9 trials}}&
\multicolumn{2}{c}{\textbf{9 trials}}&
\multicolumn{2}{c}{\textbf{12 trials}}&
\multicolumn{2}{c}{\textbf{12 trials}}\\   $N$&$V$&$N$&$V$&$N$&$V$&$N$&$V$\\
\midrule
10 &  1 & 12 &  3 & 16 &  3 & 4 & 0 \\
10 &  1 & 12 &  6 & 16 &  3 & 4 & 0 \\
10 &  1 & 12 &  9 & 16 &  5 & 4 & 1 \\
10 &  2 & 24 &  6 & 16 &  5 & 4 & 1 \\    % ... many more rows ...
\bottomrule
\end{tabular}

\end{document}

looks fine. I'm not entirely clear what you mean about the spacing: LaTeX includes some inter-column space as standard, and to me the table looks readable without additional space being added.

For reference, what I get is Table using siunitx

Tags:

Spacing

Tables