将表格适合单列并显示错误消息

将表格适合单列并显示错误消息

已编辑表格,现在为 25/12-2014,

\documentclass[fleqn,10pt,twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,array,graphicx,siunitx}

\usepackage{dcolumn,booktabs}

\begin{document}

\begin{table}[htbp]
\centering
\caption{Average measures of strains' halos during the first five days}

% computed dividing the overfull by the available spaces
\addtolength{\tabcolsep}{-1.85pt}

\begin{tabular}{c c c c c c}

\toprule
 Day & \multicolumn{4}{c}{Average mycelial growth diameter (mm) F} \\
 \cmidrule(l){2-6} % used for mid-rules that span specified columns
&

 \emph{$\Delta$Ayg1} &
 \emph{$\Delta$Ayg1} &
 \emph{$\Delta$Ayg1} &
 \emph{$\Delta$Ayg1} &
 \emph{WT5010}
 \\
 & {``1''} & {``2''} & {``4''} & {``6''} &
 \\
 \midrule
 0 &  0.0 $\pm$ 0.0 &  0.0 $\pm$ 0.0 &  0.0 $\pm$ 0.0 &  0.0 $\pm$ 0.0 &  0.0 $\pm$ 0.0    \\
 1 & 10.0 $\pm$ 0.2 & 10.2 $\pm$ 0.5 & 10.5 $\pm$ 1.0 &  9.8 $\pm$ 0.4 & 10.0 $\pm$ 0.1 \\
 2 & 27.9 $\pm$ 0.9 & 26.6 $\pm$ 0.9 & 25.9 $\pm$ 1.8 & 25.8 $\pm$ 1.5 & 25.6 $\pm$ 0.3 \\
 3 & 41.9 $\pm$ 1.0 & 38.3 $\pm$ 0.9 & 38.1 $\pm$ 0.8 & 38.4 $\pm$ 1.0 & 36.8 $\pm$ 0.9 \\
 4 & 58.8 $\pm$ 2.5 & 53.1 $\pm$ 1.7 & 51.0 $\pm$ 0.9 & 51.9 $\pm$ 1.0 & 50.7 $\pm$ 1.8 \\
 5 & 73.4 $\pm$ 2.5 & 62.7 $\pm$ 1.3 & 60.6 $\pm$ 1.2 & 66.3 $\pm$ 1.4 & 59.2 $\pm$ 1.4 \\
 \bottomrule
 \end{tabular}
 \end{table}
 \label{tab:radialgrowth}


 \end{document}

答案1

在此处输入图片描述

\documentclass[fleqn,10pt,twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,array,graphicx}

\usepackage{dcolumn,booktabs}

\begin{document}

\begin{table}[tbp]\centering
\caption{Average measures of strains’ halos during the first five days}

\noindent X\dotfill X

\small
\setlength\tabcolsep{3pt}
\begin{tabular}{@{}r *{5}{D..{2.1}@{$\pm$}D..{1.1}}@{}}
\toprule
\multicolumn{11}{c}{Average mycelial growth diameter (mm) F}\\
\midrule
\multicolumn{1}{c}{Day}&
\multicolumn{8}{c}{\emph{$\Delta$Ayg1}}&
\multicolumn{2}{c}{\emph{WT5010}}\\
&
\multicolumn{2}{c}{ ``1''}&
\multicolumn{2}{c}{ ``4''}&
\multicolumn{2}{c}{ ``5''}&
\multicolumn{2}{c}{ ``6''}&
\multicolumn{2}{c}{}
\\
\midrule
 0 &   0.0 & 0   &  0.0 &   0  &  0.0 &   0 & 0.0  &  0  &  0.0 & 0\\
 1 &  10.0 & 0.2 & 10.2 &  0.5 & 10.5 & 1.0 & 9.8  & 0.4 & 10.0 & 0.1\\
 2 &  27.9 & 0.9 & 26.6 &  0.9 & 25.9 & 1.8 & 25.8 & 1.5 & 25.6 & 0.3\\
 3 &  41.9 & 1.0 & 38.3 &  0.9 & 38.1 & 0.8 & 38.4 & 1.0 & 36.8 & 0.9 \\
 4 &  58.8 & 2.5 & 53.1 &  1.7 & 51.0 & 0.9 & 51.9 & 1.0 & 50.7 & 1.8\\
 5 &  73.4 & 2.5 & 62.7 &  1.3 & 60.6 & 1.2 & 66.3 & 1.4 & 59.2 & 1.4\\
 \bottomrule
\end{tabular}
\label{tab:radialgrowth}
\end{table}
\end{document}

答案2

对于数字表,您应该考虑siunitx

\documentclass[fleqn,10pt,twocolumn]{article}

\usepackage{siunitx,booktabs,caption}
\usepackage{lipsum} % just for the example

\sisetup{
  input-uncertainty-signs=\pm,
  separate-uncertainty,
}

\begin{document}

\lipsum[2]

\begin{table}[htbp]
\centering
\caption{Average measures of strains' halos during the first five days}
\label{tab:radialgrowth}

\footnotesize

% computed dividing the overfull by the available spaces
\addtolength{\tabcolsep}{-1.85pt}

\begin{tabular}{
  @{}
  l@{}
  *{5}{S[table-format=2.1(2)]}
  @{}
}
\toprule
Day & \multicolumn{4}{c}{Average mycelial growth diameter (\si{mm}) F} & {WT5010}\\
\cmidrule(r){2-5}
&
{$\Delta\mathit{Ayg}1$} &
{$\Delta\mathit{Ayg}1$} &
{$\Delta\mathit{Ayg}1$} &
{$\Delta\mathit{Ayg}1$} &
\\
& {``1''} & {``2''} & {``4''} & {``6''} &
\\
\midrule
 0 &  0.0 \pm 0.0 &  0.0 \pm 0.0 &  0.0 \pm 0.0 &  0.0 \pm 0.0 &  0.0 \pm 0.0 \\
 1 & 10.0 \pm 0.2 & 10.2 \pm 0.5 & 10.5 \pm 1.0 &  9.8 \pm 0.4 & 10.0 \pm 0.1 \\
 2 & 27.9 \pm 0.9 & 26.6 \pm 0.9 & 25.9 \pm 1.8 & 25.8 \pm 1.5 & 25.6 \pm 0.3 \\
 3 & 41.9 \pm 1.0 & 38.3 \pm 0.9 & 38.1 \pm 0.8 & 38.4 \pm 1.0 & 36.8 \pm 0.9 \\
 4 & 58.8 \pm 2.5 & 53.1 \pm 1.7 & 51.0 \pm 0.9 & 51.9 \pm 1.0 & 50.7 \pm 1.8 \\
 5 & 73.4 \pm 2.5 & 62.7 \pm 1.3 & 60.6 \pm 1.2 & 66.3 \pm 1.4 & 59.2 \pm 1.4 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}

在此处输入图片描述

相关内容