First of all: You should never use
center
to center floats like
table
or
figure
, because
center
is a
trivlist
environment and so adds extra vertical space. Usually use
\centering
switch to center inside floats. However in this case this wouldn't be enough, because the
tabularx
would be still to wide and a centering will be done
inside the text area. The only LaTeX centering command's, that allow to exceed the text area are
\centerline
or
\makebox
. However, also using
\centerline
the
tabularx
would be to wide, because the sum of the widths of all
X[latex]-columns would be wider than [latex]\paperwidth
. Here we have the case: You cannot take an elephant on the bus.
A suggestion would be to use the natural width of every column (here given by the colum heads). But I would not use
l
-,
c
-, or
r
-columns. For numbers the (configurable)
S
-columns of
siunitx are recommended. See the manual for more information.
Code: Select all
\documentclass{article}
\usepackage{multirow}
\usepackage{siunitx}
\begin{document}
\begin{table}
\centerline{%
\begin{tabular}{|l|*8{S|}}
\hline
\multirow{2}{*}{Sample} & \multicolumn{2}{l|}{Month 1} & \multicolumn{2}{l|}{Month 2} & \multicolumn{2}{l|}{Month 3} & \multicolumn{2}{l|}{Month 4} \\
\cline{2 - 9}
& {Control} & {(Vermiaqua)} & {Control} & {(Vermiaqua)} & {Control} & {(Vermiaqua)} & {Control} & {(Vermiaqua)} \\
\hline
1 & 0.9 & 1.0 & 2.4 & 2.5 & 2.4 & 4.2 & 4.1 & 5.5 \\
\hline
2 & 0.8 & 1.5 & 2.3 & 2.4 & 2.5 & 4.0 & 4.3 & 5.2 \\
\hline
3 & 1.0 & 1.5 & 2.5 & 2.5 & 2.4 & 3.9 & 4.2 & 5.0 \\
\hline
4 & 1.2 & 1.0 & 2.4 & 2.3 & 2.6 & 3.9 & 4.0 & 5.3 \\
\hline
5 & 1.1 & 1.5 & 2.4 & 2.6 & 2.5 & 3.8 & 4.0 & 5.1 \\
\hline
6 & 0.7 & 1.4 & 2.4 & 2.7 & 2.6 & 3.8 & 4.0 & 5.1 \\
\hline
7 & 0.9 & 1.3 & 2.2 & 2.8 & 2.4 & 4.1 & 4.1 & 5.4 \\
\hline
8 & 1.0 & 1.2 & 2.3 & 2.5 & 2.6 & 4.0 & 4.2 & 5.3 \\
\hline
9 & 0.8 & 1.3 & 2.5 & 2.5 & 2.6 & 4.3 & 4.1 & 5.0 \\
\hline
10 & 0.9 & 1.0 & 2.4 & 2.4 & 2.5 & 4.0 & 4.1 & 5.0 \\
\hline
\textit{Total} & 9.3 & 12.7 & 23.8 & 25.2 & 25.1 & 40.0 & 41.1 & 51.9 \\
\hline
\textit{Average} & 0.93 & 1.27 & 2.38 & 2.52 & 2.51 & 4.00 & 4.11 & 5.19 \\
\hline
\end{tabular}%
}
\caption{Height of Sample Plants}
\label{PlantHeight}
\end{table}
\end{document}
BTW: Vertikal rules in tabulars are evil. So I would also suggest to remove them:
Code: Select all
\documentclass{article}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{siunitx}
\begin{document}
\begin{table}
\centerline{%
\begin{tabular}{l*8{S}}
\toprule
\multirow{2}{*}{Sample} & \multicolumn{2}{l}{Month 1} & \multicolumn{2}{l}{Month 2} & \multicolumn{2}{l}{Month 3} & \multicolumn{2}{l}{Month 4} \\
\cmidrule(r){2-3}
\cmidrule(r){4-5}
\cmidrule(r){6-7}
\cmidrule{8-9}
& {Control} & {(Vermiaqua)} & {Control} & {(Vermiaqua)} & {Control} & {(Vermiaqua)} & {Control} & {(Vermiaqua)} \\
\midrule
1 & 0.9 & 1.0 & 2.4 & 2.5 & 2.4 & 4.2 & 4.1 & 5.5 \\
2 & 0.8 & 1.5 & 2.3 & 2.4 & 2.5 & 4.0 & 4.3 & 5.2 \\
3 & 1.0 & 1.5 & 2.5 & 2.5 & 2.4 & 3.9 & 4.2 & 5.0 \\
4 & 1.2 & 1.0 & 2.4 & 2.3 & 2.6 & 3.9 & 4.0 & 5.3 \\
5 & 1.1 & 1.5 & 2.4 & 2.6 & 2.5 & 3.8 & 4.0 & 5.1 \\
6 & 0.7 & 1.4 & 2.4 & 2.7 & 2.6 & 3.8 & 4.0 & 5.1 \\
7 & 0.9 & 1.3 & 2.2 & 2.8 & 2.4 & 4.1 & 4.1 & 5.4 \\
8 & 1.0 & 1.2 & 2.3 & 2.5 & 2.6 & 4.0 & 4.2 & 5.3 \\
9 & 0.8 & 1.3 & 2.5 & 2.5 & 2.6 & 4.3 & 4.1 & 5.0 \\
10 & 0.9 & 1.0 & 2.4 & 2.4 & 2.5 & 4.0 & 4.1 & 5.0 \\
\midrule
\textit{Total} & 9.3 & 12.7 & 23.8 & 25.2 & 25.1 & 40.0 & 41.1 & 51.9 \\
\textit{Average} & 0.93 & 1.27 & 2.38 & 2.52 & 2.51 & 4.00 & 4.11 & 5.19 \\
\bottomrule
\end{tabular}%
}
\caption{Height of Sample Plants}
\label{PlantHeight}
\end{table}
\end{document}
An alternative suggestion would be to rotate the table:
Code: Select all
\documentclass{article}
\usepackage[anticlockwise]{rotating}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{siunitx}
\begin{document}
\begin{sidewaystable}
\centering
\begin{tabular}{l*8{S}}
\toprule
\multirow{2}{*}{Sample} & \multicolumn{2}{l}{Month 1} & \multicolumn{2}{l}{Month 2} & \multicolumn{2}{l}{Month 3} & \multicolumn{2}{l}{Month 4} \\
\cmidrule(r){2-3}
\cmidrule(r){4-5}
\cmidrule(r){6-7}
\cmidrule{8-9}
& {Control} & {(Vermiaqua)} & {Control} & {(Vermiaqua)} & {Control} & {(Vermiaqua)} & {Control} & {(Vermiaqua)} \\
\midrule
1 & 0.9 & 1.0 & 2.4 & 2.5 & 2.4 & 4.2 & 4.1 & 5.5 \\
2 & 0.8 & 1.5 & 2.3 & 2.4 & 2.5 & 4.0 & 4.3 & 5.2 \\
3 & 1.0 & 1.5 & 2.5 & 2.5 & 2.4 & 3.9 & 4.2 & 5.0 \\
4 & 1.2 & 1.0 & 2.4 & 2.3 & 2.6 & 3.9 & 4.0 & 5.3 \\
5 & 1.1 & 1.5 & 2.4 & 2.6 & 2.5 & 3.8 & 4.0 & 5.1 \\
6 & 0.7 & 1.4 & 2.4 & 2.7 & 2.6 & 3.8 & 4.0 & 5.1 \\
7 & 0.9 & 1.3 & 2.2 & 2.8 & 2.4 & 4.1 & 4.1 & 5.4 \\
8 & 1.0 & 1.2 & 2.3 & 2.5 & 2.6 & 4.0 & 4.2 & 5.3 \\
9 & 0.8 & 1.3 & 2.5 & 2.5 & 2.6 & 4.3 & 4.1 & 5.0 \\
10 & 0.9 & 1.0 & 2.4 & 2.4 & 2.5 & 4.0 & 4.1 & 5.0 \\
\midrule
\textit{Total} & 9.3 & 12.7 & 23.8 & 25.2 & 25.1 & 40.0 & 41.1 & 51.9 \\
\textit{Average} & 0.93 & 1.27 & 2.38 & 2.52 & 2.51 & 4.00 & 4.11 & 5.19 \\
\bottomrule
\end{tabular}%
\caption{Height of Sample Plants}
\label{PlantHeight}
\end{sidewaystable}
\end{document}