嗨,我是表格新手,我正在努力将表格排版得漂亮一些。代码如下:
\documentclass[]{article}
\usepackage{fullpage}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{multirow}
\begin{document}
\begin{tabularx}{\textwidth}{l *{7}{X}}
\toprule
\multirow{4}{*}{Method} &
\multirow{4}{\linewidth}{Time step} &
\multirow{4}{\linewidth}{Test calculation} &
\multirow{4}{\linewidth}{Testing update} &
\multicolumn{4}{c}{Test hello-world}\\ \cline{5-8}
& & & & Model B, $x = 42$ & Model B, $y = 42$ & ModelC longword & ModelD wordOne wordTwo\\
\midrule
A & 0.010 & 1 & 0 & 1.0 & 1.0 & 1.0 & 1.0 \\
B & 0.010 & 2 & 0 & 1.6 & 1.9 & 2.1 & 2.1 \\
C & 0.010 & 1 & 1 & 2.3 & 3.0 & 3.4 & 3.3 \\
D & 0.010 & 1 & 1 & 1.8 & 2.1 & 2.7 & 2.6 \\
E & 0.010 & 1 & 1 & 2.0 & 3.0 & 3.7 & 3.5 \\
F & 0.010 & (2) & 2 & 4.4 & 5.1 & 7.0 & 6.7 \\
\bottomrule
\end{tabularx}
\end{document}
表格中的第二行与 \cline 的距离太小。如能帮助解决此问题,我们将不胜感激。