0

I've tried to follow many posts about this general issue but have not yet understood the problem or how to fix it.

In this example, the color overlaps the left border, or the left border does not display. After dvips. I am using dvips because of pstricks.

In other words, the border seems to look okay when zoomed in in xdvi, but not after converted to postscript. Before zooming in the border (left border of fist cell in first row) appears to be missing in xdvi as well.

How can I cause the border to display or not be overlapped?

\documentclass{article}
\usepackage{colortbl}
\begin{document}
\begin{tabular}{|l|l|} \hline
\multicolumn{2}{|l|}{\cellcolor{yellow}blarg blarg} \\ \hline
& y \\ \hline
\end{tabular}
\end{document}
cheyrn
  • 33
  • This is only a visual artefact from your viewer at a specific zoom level. When you zoom in, do you exactly this? – Werner Jan 12 '15 at 06:57
  • @Werner No, I can notice the same behavior with latex->dvips->ps2pdf – karlkoeller Jan 12 '15 at 07:59
  • Try compiling with xelatex – karlkoeller Jan 12 '15 at 08:04
  • @karlkoeller: Same as with pdfLaTeX; it's an issue with the zoom-level (and therefore not TeX-related). – Werner Jan 12 '15 at 08:09
  • @Werner With pdflatex or xelatex I can't notice that. But with latex->dvips->ps2pdf I can notice it at every zoom-level.... – karlkoeller Jan 12 '15 at 08:19
  • I see no problem with latex-dvips-ps2pdf, also after loading pstricks when viewing with Skim. The issue seems to appear when Adobe Reader is used for viewing; also the internal PDF viewer of TeXworks shows the problem. – egreg Jan 12 '15 at 08:48
  • It is probably not a problem with a viewer because if I open the postscript in adobe illustrator I see the overwritten rule in the first cell. If it is a viewer problem then I am stuck trying to figure out how to make it appear correctly to others in different viewers. I am unclear on how hhline is supposed to be used for this. What I have tried so far does not fix the problem with the rule in the first cell. – cheyrn Jan 12 '15 at 17:22
  • The colortbl docs give a solution of sorts which is to use left/right overhang parameters of columncolor, e.g. \columncolor{yellow}[.99\tabcolsep][\tabcolsep]. – cheyrn Jan 13 '15 at 01:41

1 Answers1

0

The colortbl docs give an answer of sorts, by using left/right overhang parameters of columncolor:

\documentclass{article}
\usepackage{hhline}
\usepackage{colortbl}
\begin{document}
\begin{tabular}{|l|l|} \hline
\multicolumn{2}{|>{\columncolor{yellow}[.99\tabcolsep][\tabcolsep]}l|}{blarg blarg} \\ \hline
& y \\ \hline
\end{tabular}
\end{document}

Somewhere I think I saw a post by David Carlisle that used reusable values in the overhang instead of my guessing at .99\tabcolsep.

cheyrn
  • 33