I want to generate a tabular that contains two header rows, the top row contains multicolumn's. I want to group certain columns with spacing between them, so I used @{\hskip}
. The problem though is this increases the width of the right most column in each multicolumn so the header is no longer centred over the columns it spans.
How do I fix the alignment in the example table below so that the Col C
header is in the middle of the four columns below it?
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{@{}ll@{\hskip6em}l@{\hskip6em}llll@{\hskip6em}llll@{}} \toprule
Col A &Col B & Col C & \multicolumn{4}{c}{Col D}& \multicolumn{4}{c}{Col E} \\
& & & i & ii & iii & iv & i & ii & iii & iv \\ \midrule
ex1 & 100 & 200 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\ \bottomrule
\end{tabular}
\end{document}