[Tex/LaTex] Multicolumn in table not centered

horizontal alignmenttables

I have some issues with the usage of \multicolumn. As can be seen on the screenshot below, the words 'Classical' and 'Squared' are correctly aligned in the centre of the column. The word 'Exponential' however is not centered properly.

enter image description here

The code is:

\begin{table}[]
\setlength{\tabcolsep}{12pt}
\centering
\begin{tabular}{l c c c c c c}
\hline\hline
\\\\[-4.3\medskipamount]
 & \multicolumn{2}{c}{Classic} & \multicolumn{2}{c}{Squared} & \multicolumn{2}{c}{Exponential} \\
\textit{a} & 70 & 30 & 70 & 30 & 70 & 30 \\ [0.5ex]
\hline
\\\\[-3.9\medskipamount]
S100 & 91 & 31 & 71 & 01 & 21 & 41 \\
S100 & 91 & 31 & 71 & 01 & 21 & 41 \\
S100 & 91 & 31 & 71 & 01 & 21 & 41 \\
[1ex] \hline
\end{tabular}
\end{table}

I would prefer to keep using the tabular package in the solution. Thank you in advance!

Best Answer

The reason is that this word is a bit too long. Of course, you can increase the value of \tabcolsep. Another solution uses a \makebox[0pt], which allows the word to overlap slightly into the inter-column space, symmetrically.

Other than that,I recommend using the rules from booktabs, which have a variable thickness, and add some vertical padding around the rules. This will save you from adjusting by hand through spacing:

\documentclass{article}
\usepackage{booktabs} 

\begin{document}

\begin{table}[]
\setlength{\tabcolsep}{12pt}
\centering
\begin{tabular}{l c c c c c c}
\toprule\midrule
 & \multicolumn{2}{c}{Classic} & \multicolumn{2}{c}{Squared} & \multicolumn{2}{c}{\makebox[0pt]{Exponential}} \\
\textit{a} & 70 & 30 & 70 & 30 & 70 & 30 \\ [0.5ex]
\midrule
\\\\[-3.9\medskipamount]
S100 & 91 & 31 & 71 & 01 & 21 & 41 \\
S100 & 91 & 31 & 71 & 01 & 21 & 41 \\
S100 & 91 & 31 & 71 & 01 & 21 & 41 \\
\bottomrule
\end{tabular}
\end{table}

\end{document} 

enter image description here

Related Question