# Multicolumn centering and text wrap

I'm trying to make a table with some multicolumns that have wrapped text, but I also want them to be center justified. I have managed to get the text to wrap using advice from other questions, but it wont center and I don't know why.

\documentclass{article}

\usepackage{array}
\newcolumntype{D}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\begin{document}
\begin{table}[htbp]\centering
\begin{tabular}{l c c c c}
& \multicolumn{2}{D{2cm}}{\textbf{Some Big Words}} & \multicolumn{2}{D{2cm}}{\textbf{More Big Words}} \\
rowname & BlahBlah & BlahBlah & BlahBlah & BlahBlah \\
\end{tabular}
\end{table}
\end{document}


Notice how the multicolumns are not located in the center of the two columns they are supposed to span, but are off to the left. How do I center the multicolumns?

Your titles are centred in the specifed width of 2cm, it's possible to make a vertical stack with a tight box that is centred in a c multicolumn by using a nested tabular

\documentclass{article}

\newcommand\hd[2]{\multicolumn{2}{c}{\bfseries\begin{tabular}{@{}c@{}}#2\end{tabular}}}

\usepackage{array}

\begin{document}
\begin{table}[htbp]\centering
\begin{tabular}{l c c c c}
& \hd{2}{Some Big\\Words} & \hd{2}{More Big\\Words} \\
rowname & BlahBlah & BlahBlah & BlahBlah & BlahBlah \\
\end{tabular}
\end{table}
\end{document}


As I don't really understand why you should need a width of 2cm;, I propose a very simple solution based on the makecell package, and its \thead command, that allows for line breaks in cells and a common formatting of cells. Does this code produce what you want?

\documentclass{article}
\usepackage{makecell}

\usepackage{array}

\begin{document}

\begin{table}[htbp]
\centering
\begin{tabular}{l c c c c}