# Tabular multicolumn in first row causes uneven horizontal division in following rows

I'm making a table in the tabular environment, and column width is doing something strange. In the example here, the first row uses multicolumn to merge cells by groups of 2. Then the next row has 2 separate cells. I would like it to divide these evenly below the first row of headers, rather than having a minimum width for the first entries (A) and filling the rest of the space with the second entries (B).

\begin{table}
\caption{Caption.}
\centering
\begin{tabular}{c|c|c|c|c|c}
\hline \hline
\hline
A & B & A & B & A & B \\
\hline \hline
\end{tabular}
\end{table}


You can use a centered version of tabularx's X column type:

\documentclass{article}

\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}

\begin{document}
\begin{table}
\caption{Caption.}
\centering
\begin{tabularx}{0.7\textwidth}{C|C|C|C|C|C}
\hline \hline
\hline
A & B & A & B & A & B \\
\hline \hline
\end{tabularx}
\end{table}
\end{document}


# Edit:

To make it work with different headers you have to inform tabularx that you are using \multicolumn:

\documentclass{article}

\usepackage{tabularx}

\newcolumntype{C}{>{\centering\arraybackslash}X}
% Number of multicolumns      here ↓   and ↓ here (source: https://tex.stackexchange.com/a/236156/134574)
\newcolumntype{D}{>{\hsize=\dimexpr2\hsize+2\tabcolsep+\arrayrulewidth\relax}C}

\begin{document}
\begin{table}
\caption{Caption.}
\centering
\begin{tabularx}{0.85\textwidth}{C|C|C|C|C|C}
\hline \hline
\multicolumn{2}{D|}{This is a very, very long Header 1} & \multicolumn{2}{D|}{Long Header 2} & \multicolumn{2}{D}{Long Header 3} \\
\hline
A & B & A & B & A & B \\
\hline \hline
\end{tabularx}
\end{table}
\end{document}


# Edit 2:

I'm not proud of this one...

If you insist in one line, a more hacky version can be done using two tabularx's in the same table. You read it right, Jimmy, two!

\documentclass{article}

\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcolumntype{D}{>{\hsize=\dimexpr2\hsize+2\tabcolsep+\arrayrulewidth\relax}C}

\begin{document}
\begin{table}
\caption{Caption.}
\centering
\begin{tabularx}{0.5\textwidth}{C|C|}
\hline \hline
\multicolumn{2}{D|}{This is a very, very long Header 1}\\
\hline
A & B\\
\hline \hline
\end{tabularx}%
\begin{tabularx}{0.5\textwidth}{C|C|C|C}
\hline \hline