Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

1 Answer 1

up vote 6 down vote accepted

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.

share|improve this answer
    
And how can one know the cell width? –  leo Apr 2 '12 at 23:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.