Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using the xcolor package to colour the top row in a table. This is displayed properly using PDF viewers such as Preview or Skim (Mac). But using Adobe Reader 10.1.3 (either Windows or Mac) doesn't display the table line properly.

But removing the colouring for the table fixes it. Here is the example that works as expected:

\begin{table}
\caption{Table showing Feature 5's Functional Tests}
\hspace*{-0.5in}
\begin{tabular}[h!]{|p{0.6cm}|p{4cm}|p{5cm}|p{4cm}|p{1.5cm}|}
\hline
{\bf Test ID } & {\bf Task } & {\bf Expected} & {\bf Actual} & {\bf Outcome} \\
\hline
   5.1 & Something &  Something & Something &  Success \\
\hline
   5.2 & Something &  Something & Something &  Success \\
\hline
   5.3 & Something &  Something & Something &  Success \\
\hline
   5.4 & Something &  Something & Something &  Success \\
\hline
\end{tabular} 
\end{table}

And here is the example with a coloured row:

\begin{table}
\caption{Table showing Feature 5's Functional Tests}
\hspace*{-0.5in}
\begin{tabular}[h!]{|p{0.6cm}|p{4cm}|p{5cm}|p{4cm}|p{1.5cm}|}
\hline
\rowcolor{gray!25}
{\bf Test ID } & {\bf Task } & {\bf Expected} & {\bf Actual} & {\bf Outcome} \\
\hline
   5.1 & Something &  Something & Something &  Success \\
\hline
   5.2 & Something &  Something & Something &  Success \\
\hline
   5.3 & Something &  Something & Something &  Success \\
\hline
   5.4 & Something &  Something & Something &  Success \\
\hline
\end{tabular} 
\end{table}

Removing the \rowcolor{} command replacing it with \cellcolor{} creates the same view. Any idea how to fix this?

I've tried printing it out of Adobe and the lines print fine, but as this will be read on as a soft copy it's pretty important. Here is a gallery to show the out of of the LaTeX code.

Any idea how to fix this?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

PDF viewers try to "snap" rules to pixel boundaries and this can mean that the coloured panels get pulled over adjacent rules. Try increasing the rule width with

\setlength\arrayrulewidth{0.6pt}

or whatever value works on your screen.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.