Graphics, Figures & Tables\multicolumn stretches last column on row below

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
crobar
Posts: 12
Joined: Mon Nov 16, 2009 4:41 pm

\multicolumn stretches last column on row below

Post by crobar »

Hello,

I want to make a table with a heading row which has two cells, one spanning one column, and the other spanning another four rows. The code for the table is shown below:

Code: Select all

Code, edit and compile here:
\documentclass{report}
\usepackage{booktabs}
\begin{document}
\begin{table}
%\begin{minipage}[b]{0.5\linewidth}%\centering
%\centering
\renewcommand\arraystretch{1.4}
%\scalebox{1.0}{
\begin{tabular}{l c c c c}
\toprule
\textbf {Group} & \multicolumn{4}{c}{\textbf {No. rabbits required for each implantation period}} \\
& 12 & 26 & 52 & 78 \\ \midrule
Test sample in bone & 12 & 12 & 12 & 12 \\
Control sample in bone & 12 & 12 & 12 & 12 \\
Test sample in muscle & 12 & 12 & 12 & 12 \\
Control sample in muscle & 12 & 12 & 12 & 12 \\\bottomrule
\end{tabular}
%}
\caption{insert caption}
\label{tab:examiner2assessment2}
\end{table}
\end{document}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
How do I get the four columns spanned by the multicolumn to be of equal width?

Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

\multicolumn stretches last column on row below

Post by Stefan Kottwitz »

Hi crobar,

you could use the tabularx package:

Code: Select all

Code, edit and compile here:
\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
...
\begin{tabularx}{\textwidth}{lCCCC}
...
\end{tabularx}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Here are also \multicolumn-Examples: Creating tables with LaTeX.

Viele Grüße,

Stefan
LaTeX.org admin
crobar
Posts: 12
Joined: Mon Nov 16, 2009 4:41 pm

Re: \multicolumn stretches last column on row below

Post by crobar »

That works perfectly, thanks!
Post Reply