我的论文中两个连续的表格之间有一个不需要的空格。我该如何删除它?
\begin{table}
\centering
\caption{Quantifying the requirement-to-class rtm\textsubscript{c} input traces}
\label{ClassTracesInput}
\tabcolsep=2.5pt
\begin{tabular}{|r|r|r|r|r|r|r|r|}
\hline \textbf{System}
& \textbf{T\textsubscript{c}(\#)} & \textbf{N\textsubscript{c}(\#)} &
\textbf{U\textsubscript{c}(\#)}&
\textbf{Total} & \textbf{T\textsubscript{c}(\%)} &
\textbf{N\textsubscript{c}(\%)} & \textbf{U\textsubscript{c}(\%)} \\ \hline
\textbf{Chess} & 131 & 253 & 448 & \textbf{832} & 15.75 & 30.41 & 53.85 \\ \hline
\textbf{Gantt} & 93 & 2483 & 9412 & \textbf{11988} & 0.78 & 20.71 & 78.51 \\
\hline
\textbf{iTrust} & 181 & 2743 & 21488 & \textbf{24412} & 0.74 & 11.24 & 88.02 \\
\hline
\textbf{JHotD.} & 98 & 1490 & 12335 & \textbf{13923} & 0.70 & 10.70 & 88.59 \\
\hline
\end{tabular}
\end{table}
\begin{table}
\centering
\caption{Quantifying the requirement-to-method rtm\textsubscript{m} Input Gold Standard}
\label{GoldStandardInputCompleteness}
\tabcolsep=2.5pt
\begin{tabular}{|r|r|r|r|r|r|r|r|}
\hline \textbf{System}
& \textbf{T\textsubscript{m}(\#)} & \textbf{N\textsubscript{m}(\#)} &
\textbf{U\textsubscript{m}(\#)}&
\textbf{Total} & \textbf{T\textsubscript{m}(\%)} &
\textbf{N\textsubscript{m}(\%)} & \textbf{U\textsubscript{m}(\%)} \\ \hline
\textbf{Chess} & 563 & 2389 & 3064 & \textbf{6016} & 9.36 & 39.71 & 50.93 \\ \hline
\textbf{Gantt} & 343 & 23166 & 66725 & \textbf{90234} & 0.38 & 25.67 & 73.95 \\
\hline
\textbf{iTrust} & 307 & 7173 & 159562 & \textbf{167042} & 0.18 & 4.30 & 95.52 \\
\hline
\textbf{JHotD.} & 439 & 12219 & 124262 & \textbf{136920} & 0.32 & 8.92 & 90.76 \\
\hline
\end{tabular}
\end{table}
答案1
我的论文中两个连续的表格之间有一个不需要的空格,我该如何删除它?
只需使用一个table
环境,其中包含 2 个tabular
环境和 2\caption
和 2 个\label
语句。根据您的个人喜好,使用\bigskip
或\bigskip\bigskip
在表格之间插入一些垂直空白。
\begin{table}
\setlength{\tabcolsep}{2.5pt}
\centering
\caption{Quantifying the requirement-to-class rtm\textsubscript{c} input traces}
\label{ClassTracesInput}
\begin{tabular}{|r|r|r|r|r|r|r|r|}
% body of first tabular env.
\end{tabular}
\bigskip % or \bigskip\bigskip
\caption{Quantifying the requirement-to-method rtm\textsubscript{m} Input Gold Standard}
\label{GoldStandardInputCompleteness}
\begin{tabular}{|r|r|r|r|r|r|r|r|}
% body of second tabular env.
\end{tabular}
\end{table}
附录:应用建议使用单一table
环境,并进一步对表格的外观进行一些简化,可能会得到如下结果:
请注意,我删除了所有垂直线和大多数水平线,为标题行提供了更明确的结构,并删除了所有\textbf
指令。
\documentclass{IEEEtran} % or some other suitable document class
\usepackage{lipsum,array,booktabs,newtxtext,newtxmath}
\begin{document}
\setcounter{table}{3} % just for this example
\begin{table}[ht!]
\tabcolsep=0pt
\caption{Quantifying the requirement-to-class rtm\textsubscript{c} input traces}
\label{ClassTracesInput}
\begin{tabular*}{\columnwidth}{@{\extracolsep{\fill}} l *{7}{r} @{}}
\toprule
System & $T_c$ & $N_c$ & $U_c$ & Total & $T_c$ & $N_c$ & $U_c$ \\
& (\#) & (\#) & (\#) & & (\%) & (\%) & (\%) \\
\midrule
Chess & 131 & 253 & 448 & 832 & 15.75 & 30.41 & 53.85 \\
Gantt & 93 & 2483 & 9412 & 11988 & 0.78 & 20.71 & 78.51 \\
iTrust & 181 & 2743 & 21488 & 24412 & 0.74 & 11.24 & 88.02\\
JHotD. & 98 & 1490 & 12335 & 13923 & 0.70 & 10.70 & 88.59 \\
\bottomrule
\end{tabular*}
\bigskip\medskip
\caption{Quantifying the requirement-to-method rtm\textsubscript{m} Input Gold Standard}
\label{GoldStandardInputCompleteness}
\begin{tabular*}{\columnwidth}{@{\extracolsep{\fill}} l *{7}{r} @{}}
\toprule
System & $T_m$ & $N_m$ & $U_m$ & Total & $T_m$ & $N_m$ & $U_m$ \\
& (\#) & (\#) & (\#) & & (\%) & (\%) & (\%) \\
\midrule
Chess & 563 & 2389 & 3064 & 6016 & 9.36 & 39.71 & 50.93 \\
Gantt & 343 & 23166 & 66725 & 90234 & 0.38 & 25.67 & 73.95\\
iTrust& 307 & 7173 & 159562 & 167042 & 0.18 & 4.30 & 95.52\\
JHotD.& 439 & 12219 & 124262 & 136920 & 0.32 & 8.92 &90.76\\
\bottomrule
\end{tabular*}
\end{table}
\lipsum % produce some filler text
\end{document}