6

How can I make a nested multicolumn table span all its underlying columns such that 1 2 3 do not look squashed together but are rather distributed equally over the 2 cells?

\begin{tabular}{ c c }
  something long & here too \\
  \multicolumn{2}{c}{\begin{tabular}{ l c r } 1 2 3\end{tabular}} \\
\end{tabular}

1 Answer 1

6

You could simply insert \hfill for stretching:

\begin{tabular}{ c c }
  something long & here too \\
  \multicolumn{2}{c}{1 \hfill 2 \hfill 3} \\
\end{tabular}

table

or use it also at beginning and end, if necessary use \hspace*{\fill} instead:

\begin{tabular}{ c c }
  something long & here too \\
  \multicolumn{2}{c}{\hfill 1\hfill 2\hfill 3\hspace*{\fill}} \\
\end{tabular}

table

If you really wish to nest tables, you could use tabularx inside with X columns. For this you would need to know the cell width.

1
  • And how can one know the cell width?
    – leo
    Commented Apr 2, 2012 at 23:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .