I use @{\hskip 50pt}
to separate columns in my table. The problem which arises is that I add this extra space after a multicolumn
. This also moves the header row so that it is no longer centred. Is there any easy way to recenter the header name MC
? I thought about just adding some extra whitespace after it to move it but maybe there is a better way of doing it. However, I don't want to use X columns or a different table environment to achieve that. It took me 5 days now to add everything to the tables and to align and stretch them properly as I want them to be. Apparently, this is only a very simple example not containing all of the other things I have in my tables but I think the problem is still clear and I am sure it only depends on the multicolumn
and extra space issue:
\documentclass[10pt,DIV=12,a4paper,numbers=noenddot]{scrreprt}
\usepackage{tabu}
\usepackage{multicol}
\usepackage{multirow}
\begin{document}
\begin{table}
\begin{tabu}{rr@{\hskip 50pt}rr@{\hskip 50pt}r}
\multicolumn{2}{c}{MC} & bla\\
asdasdsad & asdasdada & adasdddddddd \\
asdasdsad & asdasdada & adasdddddddd \\
asdasdsad & asdasdada & adasdddddddd \\
\end{tabu}
\end{table}
\end{document}
Best Answer
When you do
\multicolumn{<number>}{<spec>}{<text>}
the<spec>
substitutes the whole block of thetabular
column specifications and the intercolumn material belongs the the preceding column.Exception: the material before the first column belongs to the first column.
So you have to respecify the intercolumn material if it's not the default; it would be just the same if you had rules instead of
@{...}
.So you have to do
and the result will be what you want.
Note that
\hspace{...}
is preferable to\hskip...
There's no way to do it automatically, as intercolumn material can be almost anything. Or, if there's a way, it's surely complicated, because it has to deal with many internals of
tabular
(and oftabu
, as you use this one).