为什么表格边框不完整

为什么表格边框不完整

这是我的表格的代码,边框不完整,我不知道为什么

\begin{table}[htbp]
\centering
\caption{Aertssen values for m and n \cite{aertssen3}}
\begin{tabular}{|c|cccccccc|}  \hline
 & \multicolumn{2}{c}{Head Sea} & \multicolumn{2}{c}{Bow Sea} & \multicolumn{2}{c}{Beam Sea} & \multicolumn{2}{c}{Following Sea} \\ \hline       
   BN & m & n & m & n & m & n & m & n \\ \hline
    5 & 900 & 2 & 700 & 2 & 350 & 1 & 100 & 0\\
    6 & 1300 & 6 & 1000 & 5 & 500 & 3 & 200 & 1\\
    7 & 2100 & 11 & 1400 & 8 & 700 & 5 & 400 & 2\\
    8 & 3600 & 18 & 2300 & 12 & 1000 & 7 & 700 & 3\\\hline
\end{tabular}%
\label{mn}%
\end{table}%

答案1

问题是你需要使用\multicolumn{2}{c|}{Following Sea}而不是\multicolumn{2}{c}{Following Sea}。尝试:

\documentclass{amsart}
\begin{document}
   \begin{table}[htbp]
   \centering
   \caption{Aertssen values for m and n \cite{aertssen3}}
   \begin{tabular}{|c|cccccccc|}
   \hline
   & \multicolumn{2}{c}{Head Sea} & \multicolumn{2}{c}{Bow Sea} & \multicolumn{2}{c}{Beam Sea} & \multicolumn{2}{c|}{Following Sea} \\ \hline
   BN & m & n & m & n & m & n & m & n \\ \hline
    5 & 900 & 2 & 700 & 2 & 350 & 1 & 100 & 0\\
    6 & 1300 & 6 & 1000 & 5 & 500 & 3 & 200 & 1\\
    7 & 2100 & 11 & 1400 & 8 & 700 & 5 & 400 & 2\\
    8 & 3600 & 18 & 2300 & 12 & 1000 & 7 & 700 & 3\\
    \hline
    \end{tabular}%
       \label{mn}%   
   \end{table}%
\end{document}

答案2

 & \multicolumn{2}{c}{Head Sea} & \multicolumn{2}{c}{Bow Sea} & \multicolumn{2}{c}{Beam Sea} & \multicolumn{2}{c|}{Following Sea} \\ \hline

相关内容