特定のセルに色をつけた表で \cline{} を用いると罫線が部分的に表示されないことがあります.
下記のソースでは b と d のセルの間の罫線が消えてしまっています.
これをきちんと表示させるにはどうしたらよろしいでしょうか?
\documentclass{article}
\usepackage{colortbl}
\begin{document}
\begin{tabular}{|*{3}{c|}}
\hline
& a & b \\
\cline{2-3}
& c & \multicolumn{1}{>{\columncolor[gray]{0.8}}c|}{d} \\
\hline
\end{tabular}
\end{document}
10 Less fun with \cline
Lines produced by \cline
are coloured if you use \arrayrulecolor
but you may not notice as they are covered up by any colour pannels in the following row. This is a ‘feature’ of \cline
. If using this package you would probably better using the -
rule type in a \hhline
argument, rather than \cline
.
と,colortbl のマニュアルにありますので,
\documentclass{article} \usepackage{colortbl}%%% ←ドライバを指定したほうがいいかもしれません. \usepackage{hhline}%%% ←追加 \begin{document} \begin{tabular}{|*{3}{c|}} \hline & a & b \\ %\cline{2-3}%%% ←変更 \hhline{|~|-|-|}%%% ←変更 & c & \multicolumn{1}{>{\columncolor[gray]{0.8}}c|}{d} \\ \hline \end{tabular} \end{document}
でうまくいきませんか?