请看如下代码:

\begin{table}
\centering
\begin{tabular}{ll||ccc|ccc|ccc||c|c}
\hline
&& \multicolumn{6}{c}{experiments} & \multicolumn{3}{c}{simulation} & x & y \\
\hline
1 & 2& 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 \\
1 & 2& 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 \\
\end{tabular}
\end{table}

貌似没有什么问题,但是运行结果却是如图中箭头所示:

修改意见如下:

\begin{table}[!ht]
\centering
\begin{tabular}{ll||ccc|ccc|ccc||c|c} \hline
& & \multicolumn{6}{c}{experiments} & \multicolumn{3}{c|
|}{simulation} & x & y \\\hline
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 \\
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 \\
\end{tabular}
\end{table}

原因是multicolumn吞掉了后面的画线命令。
演示效果图:

演示代码:

\documentclass{article}

\begin{document}
\begin{table}
\centering
\begin{tabular}{ll||ccc|ccc|ccc||c|c}
\hline
&& \multicolumn{6}{c}{experiments} & \multicolumn{3}{c}{simulation} & x & y \\
\hline
1 & 2& 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 \\
1 & 2& 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 \\
\end{tabular}
\end{table}

\begin{table}[!ht]
\centering
\begin{tabular}{ll|
|ccc|ccc|ccc||c|c} \hline
& & \multicolumn{6}{c}{experiments} & \multicolumn{3}{c||}{simulation} & x & y \\\hline
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 \\
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 \\
\end{tabular}
\end{table}
\end{document}

点赞(0)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部