Graphics, Figures & Tablescolortbl | Colored Cells cover horizontal Lines

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Dhondtie
Posts: 4
Joined: Thu Mar 10, 2011 9:44 pm

colortbl | Colored Cells cover horizontal Lines

Post by Dhondtie »

Hi,

I have a problem using the \cellcolor command from the colortbl package. When I color a cell it colors not only the cell but also the cell-lines (top and left).

Code: Select all

\documentclass{article}
\usepackage{rotating}
\usepackage{colortbl}
\usepackage{color}
\usepackage{array}

\begin{document}

\begin{sidewaystable}[h!]
\centering
\begin{tabular}{ | c | c | c | }
\hline
A \cellcolor[gray]{0.8} & B & C \\ \hline
D & E & F \\ \cline{2-3}
G & H \cellcolor[gray]{0.8} & I \\ \hline
\end{tabular}
\end{sidewaystable}
\end{document}
So I was wondering if it was possible to color a cell without covering the lines of that cell.

Many thanks,
Dhondtie

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply