我试图插入一个表格,但它给出了错误“过满”,我该如何修复它

我试图插入一个表格,但它给出了错误“过满”,我该如何修复它
\section{Results 1a - Measurements}
Before and during the lab experiment, the data was collected by all six lab groups.
    \begin{table}[]
    \begin{tabular}{|l|l|l|l|l|l|}
    \hline
    Property                                  & Unit             & Test 1 & Test 2 & Test 3 & Test 4 \\ \hline
    Blows (Number of Drops                    & {[}-{]}          & 30     & 17     & 22     & 15     \\ \hline
    Oven Can ID                               & {[}-{]}          & 1      & 2      & 3      & 4      \\ \hline
    Mass of Oven Can                          & {[}g{]} {[}lb{]} & 63.49  & 62.67  & 62.06  & 62.29  \\ \hline
    Mass of Oven Can Lid                      & {[}g{]} {[}lb{]} & 24.84  & 26.09  & 26.33  & 75.79  \\ \hline
    Mass of Oven Can, (Lid,) and Wet Soil     & {[}g{]} {[}lb{]} & 70.85  & 73.43  & 77.52  & 75.79  \\ \hline
    Mass of Oven Can and, (Lid,) and Dry Soil & {[}g{]} {[}lb{]} & 69.45  & 71.19  & 74.25  & 72.91  \\ \hline
    \end{tabular}
    \end{table}

答案1

以下布局之一可能适合您的需求。下表都完美适合标准article类的文本宽度(红线显示文本块的宽度):

在此处输入图片描述

\documentclass{article}
\usepackage{tabularx}
\usepackage{booktabs}

\begin{document}

\begin{table}
\begin{tabularx}{\textwidth}{|X|l|l|l|l|l|}
\hline
Property                                  & Unit             & Test 1 & Test 2 & Test 3 & Test 4 \\ \hline
Blows (Number of Drops                    & {[}-{]}          & 30     & 17     & 22     & 15     \\ \hline
Oven Can ID                               & {[}-{]}          & 1      & 2      & 3      & 4      \\ \hline
Mass of Oven Can                          & {[}g{]} {[}lb{]} & 63.49  & 62.67  & 62.06  & 62.29  \\ \hline
Mass of Oven Can Lid                      & {[}g{]} {[}lb{]} & 24.84  & 26.09  & 26.33  & 75.79  \\ \hline
Mass of Oven Can, (Lid,) and Wet Soil     & {[}g{]} {[}lb{]} & 70.85  & 73.43  & 77.52  & 75.79  \\ \hline
Mass of Oven Can and, (Lid,) and Dry Soil & {[}g{]} {[}lb{]} & 69.45  & 71.19  & 74.25  & 72.91  \\ \hline
\end{tabularx}
\end{table}

\begin{table}
\begin{tabularx}{\textwidth}{Xccccc}
\toprule
Property                                  & Unit             & Test 1 & Test 2 & Test 3 & Test 4 \\ \midrule
Blows (Number of Drops                    & --          & 30     & 17     & 22     & 15     \\ 
Oven Can ID                               & --          & 1      & 2      & 3      & 4      \\ 
Mass of Oven Can                          & [g] [lb] & 63.49  & 62.67  & 62.06  & 62.29  \\ 
Mass of Oven Can Lid                      & [g] [lb] & 24.84  & 26.09  & 26.33  & 75.79  \\ 
Mass of Oven Can, (Lid,) and Wet Soil     & [g] [lb] & 70.85  & 73.43  & 77.52  & 75.79  \\ 
Mass of Oven Can and, (Lid,) and Dry Soil & [g] [lb] & 69.45  & 71.19  & 74.25  & 72.91  \\ 
\bottomrule
\end{tabularx}
\end{table}

\begin{table}
\centering
\begin{tabular}{lccccc}
\toprule
Property                                                      & Test 1 & Test 2 & Test 3 & Test 4 \\ \midrule
Blows (Number of Drops                                        & 30     & 17     & 22     & 15     \\ 
Oven Can ID                                                   & 1      & 2      & 3      & 4      \\ 
Mass of... in [g] [lb]\\
\multicolumn{1}{@{\quad\quad}l}{Oven Can}                     & 63.49  & 62.67  & 62.06  & 62.29  \\ 
\multicolumn{1}{@{\quad\quad}l}{Oven Can Lid}                 & 24.84  & 26.09  & 26.33  & 75.79  \\ 
\multicolumn{1}{@{\quad\quad}l}{Oven Can, (Lid,) and Wet Soil}& 70.85  & 73.43  & 77.52  & 75.79  \\ 
\multicolumn{1}{@{\quad\quad}l}{Oven Can and, (Lid,) and Dry Soil} & 69.45  & 71.19  & 74.25  & 72.91  \\ 
\bottomrule
\end{tabular}
\end{table}

\end{document}

相关内容