![帮助解决表格的一个问题](https://linux22.com/image/247926/%E5%B8%AE%E5%8A%A9%E8%A7%A3%E5%86%B3%E8%A1%A8%E6%A0%BC%E7%9A%84%E4%B8%80%E4%B8%AA%E9%97%AE%E9%A2%98.png)
我在标记表格时遇到问题。我想删除那里的这一行。
\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}