LaTex 表格的单元格划横线,分成两部分

一,效果形式:

LaTex 表格的单元格划横线,分成两部分_第1张图片

二,导包:

\usepackage{diagbox}

三,代码

\begin{table} \tiny
\centering \caption{The experimental results with different $A$ and $B$ values in Section \ref{spatial saliency} on FBMS database.}
\begin{tabular}{ | c | c | c | c | c | c | }
\hline \diagbox{$A$}{$B$}    & 1     & 3     & 5      & 7       & 10 \\
\hline\hline  AUC & 0.7738 & 0.7863 & 0.7934 &0.7887   &0.7882 \\
\hline\hline  CC  & 0.2607 & 0.2232 & 0.3160 &0.2198   &0.2524 \\
\hline\hline  NSS & 0.0606 & 0.9652 & 1.2416 &1.0885   & 0.0936\\
\hline\end{tabular}\vspace{0cm}
\label{tab:parameter experiment 1}
\end{table}

注:分成两份\diagbox{$A$}{$B$},如果分成三份:\diagbox{$A$}{$B$}{$C$}

如把上面表格中的AUC也所在的表格分成三份A,B,C,则只需在对应代码部分换成\diagbox{$A$}{$B$}{$C$}, 完整如下:

\begin{table} \tiny
\centering \caption{The experimental results with different $\sigma_s$ values in Section \ref{spatial saliency} on FBMS database.}
\begin{tabular}{ | c | c | c | c | c | c | }
\hline \diagbox{$A$}{$B$}    & 1     & 3     & 5      & 7       & 10 \\
\hline\hline  \diagbox{$A$}{$B$}{$C$} & 0.7738 & 0.7863 & 0.7934 &0.7887   &0.7882 \\
\hline\hline  CC  & 0.2607 & 0.2232 & 0.3160 &0.2198   &0.2524 \\
\hline\hline  NSS & 0.0606 & 0.9652 & 1.2416 &1.0885   & 0.0936\\
\hline\end{tabular}\vspace{0cm}
\label{tab:parameter experiment 1}
\end{table}

效果如下:

LaTex 表格的单元格划横线,分成两部分_第2张图片

你可能感兴趣的:(Latex)