QQ群:91940767/145316219/141877998/80300084/194770436
淘宝店:http://latexstudio.taobao.com
技巧续篇:http://latexstudio.net/
常见数学公式问题集下载
请看如下代码:
\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}
加载中,请稍候......