演示效果图: 我们发现和并行的项不见了。 【解决方案】 原来是所着颜色遮盖了合并项,只需使用 代码如下: 演示效果图:\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{multirow}
\begin{document}
\begin{table}[h]
\centering\footnotesize
\caption{example}
\begin{tabular}{|>{\columncolor{gray!25}}c|r|c|}
\hline
\rowcolor{gray!25} & Second & Third \\
\hline
\multirow{3}*{multirow}& 22 & 1 \\
\cline{2-3}
& 2 & 3 \\
\cline{2-3}
& 3 & 2 \\
\hline
\end{tabular}
\end{table}
\end{document}multirow{-3}*{multirow}
,也就是说让表格先着色,然后我们再把合并项放置在上面。注意:这个项应该放在要合并行的最后一行。这样就解决了。\begin{table}[h]
\centering\footnotesize
\caption{example}
\begin{tabular}{|>{\columncolor{gray!25}}c|r|c|}
\hline
\rowcolor{gray!25} & Second & Third \\
\hline
& 22 & 1 \\
\cline{2-3}
& 2 & 3 \\
\cline{2-3}
\multirow{-3}*{multirow}& 3 & 2 \\
\hline
\end{tabular}
\end{table}
发表评论 取消回复