答案1
建议:将 A、B、C、D 标识符分别与 M/S 合并,删除所有垂直线并移除几乎所有水平线('糟糕'的布局如下)
可以使用 来“省略”单元格\multicolumn{1}{c}{}
,即空的多列语句。部分水平线可以使用\cline{startingcolumn-endcolumn}
等来执行。
\documentclass[12pt]{article}
\usepackage{booktabs}
\begin{document}
{\bfseries
\begin{tabular}{*{9}{c}}
\multicolumn{1}{c}{} & \multicolumn{8}{c}{Treatment 1} \tabularnewline
\multicolumn{1}{c}{} & MA & SA & MB & SB & MC & SC & MD & SD\tabularnewline
\midrule[2pt]
F1 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
F2 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
F3 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
F4 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
\tabularnewline
\multicolumn{1}{c}{} & \multicolumn{8}{c}{Treatment 2} \tabularnewline
\multicolumn{1}{c}{} & MA & SA & MB & SB & MC & SC & MD & SD\tabularnewline
\midrule[2pt]
F1 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
F2 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
F3 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
F4 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
\end{tabular}
}
\end{document}
仅供比较:糟糕的表格布局—— 你自己判断吧……
\documentclass[12pt]{article}
\begin{document}
{\bfseries
\begin{tabular}{|*{9}{c|}}
\cline{2-9}
\multicolumn{1}{c|}{} & \multicolumn{8}{c|}{Treatment 1} \tabularnewline
\cline{2-9}
\multicolumn{1}{c|}{} & \multicolumn{2}{c|}{A}& \multicolumn{2}{c|}{B} & \multicolumn{2}{c|}{C} & \multicolumn{2}{c|}{D} \tabularnewline
\cline{2-9}
\multicolumn{1}{c|}{} & M & S & M & S & M & S & M & S\tabularnewline
\hline
F1 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
\hline
F2 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
\hline
F3 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
\hline
F4 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
\hline
\multicolumn{1}{c|}{} & \multicolumn{8}{c|}{Treatment 2} \tabularnewline
\cline{2-9}
\multicolumn{1}{c|}{} & \multicolumn{2}{c|}{A}& \multicolumn{2}{c|}{B} & \multicolumn{2}{c|}{C} & \multicolumn{2}{c|}{D} \tabularnewline
\cline{2-9}
\multicolumn{1}{c|}{} & M & S & M & S & M & S & M & S\tabularnewline
\hline
F1 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
\hline
F2 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
\hline
F3 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
\hline
F4 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\tabularnewline
\hline
\end{tabular}
}
\end{document}