我在标记表格时遇到问题。我想删除那里的这一行。
\begin{table} [htp]
\begin{center}
\caption{AAA}
\begin{tabular}{|c|c|c|c|c|c|} \hline
\multicolumn2{|c|}{\multirow{2}{*}{BUG}} & \multirow{2}{*}{B} & \multicolumn3{|c|}{A} \\ \cline{4-6} \tspacer
& & & {$m = 1$} & {$m = 2$} & {$m = 3$}\\ \hline \tspacer
\multirow{2}{*}{$n_all$} & {STD} & {158} & {132} & {62} & {56} \\ \cline{3-6} \tspacer
& {HL} & {132} & {61} & {46} & {34} \\ \cline{3-6} \tspacer
& {STR} & {50} & {32} & {30} & {32} \\ \hline
\end{tabular}
\end{center}
\end{table}
答案1
您需要从第二行开始
\multicolumn{1}{|c}{}
删除第一个条目后的垂直线
像这样,我还删除了未定义的命令,并修复了 A 标题左侧的双垂直规则
\documentclass{article}
\usepackage{multirow,array}
\setlength{\extrarowheight}{2pt}
\begin{document}
\begin{table} [htp]
\begin{center}
\caption{AAA}
\begin{tabular}{|c|c|c|c|c|c|} \hline
\multicolumn2{|c|}{\multirow{2}{*}{BUG}} & \multirow{2}{*}{B} & \multicolumn3{c|}{A} \\
\cline{4-6}
\multicolumn1{|c}{}& & & {$m = 1$} & {$m = 2$} & {$m = 3$}\\
\hline
\multirow{2}{*}{$n_all$} & {STD} & {158} & {132} & {62} & {56} \\
\cline{3-6}
& {HL} & {132} & {61} & {46} & {34} \\
\cline{3-6}
& {STR} & {50} & {32} & {30} & {32} \\
\hline
\end{tabular}
\end{center}
\end{table}
\end{document}