2

I have the following code to generate table with color highlights on certain rows and columns, also vertical bars and hline are used to partition the table, the table prints ok on paper, however on screen the lines are overwritten by the colors, as seen in the picture below:

enter image description here

See also here: https://www.writelatex.com/1123639gvpdyx

The code used:

\documentclass{article}
\usepackage{colortbl}
\definecolor{Gray}{gray}{0.8}
\newcolumntype{g}{>{\columncolor{Gray}}c}
\begin{document}
\begin{table}[h]
  \centering
  % Table generated by Excel2LaTeX from sheet 'Sheet1'
  \begin{tabular}{cgc|c}
    128   & 64    & 32    & 16 \\ \rowcolor{Gray}
    64    & 32    & 16    & 8 \\
    32    & 16    & 8     & 4 \\ \hline
    16    & 8     & 4     & 2 \\
  \end{tabular}%
\end{table}
\end{document}

Is there a work around to show correctly on screen?

eN_Joy
  • 227
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Mike Renfro May 26 '14 at 19:54
  • 2
    I think this a pdf viewer problem, which vanishes after zooming in. –  May 26 '14 at 20:00
  • With evince on linux, no problem at any zoom factor. – Tarass May 26 '14 at 21:05
  • @JindanZhou: It was a mere comment of mine, not an real answer, because it did not solve the problem. –  May 27 '14 at 04:48
  • 4
    It is an issue with the OP's pdf viewer and not related with TeX/LaTeX itself, since the effect vanishes after zooming in. –  May 27 '14 at 14:44
  • However one need the information what to do with this problem, i.e. that different zoom gives different thikness of the line. I see 2 possibilities. The first is to paint with another tool, for example with TiKZ [http://tex.stackexchange.com/a/125476/44348]. The second is to increase the thickness of the line manually, for example replace |c| with !{\color{black}\vline} @{\color{black}\vrule width 0.001\doublerulesep} !{\color{black}\vline}c..., where instead of ... put the code from the left side. By the way, there is the same problem with \hline. – Vladimir Parkhomenko Oct 07 '14 at 20:05

0 Answers0