[Tex/LaTex] Convert DVI into PDF properly

colortblconvertdvipdf

For viewing my work when I'm programming LaTeX, I decided to use the DVI format.
The reason is that the result is perfect compare to the PDF.

For example, the borders of tabulars appear perfeclty even if I use rowcolors or other exotic stuf. It doesnt in PDF. Even if I'm zooming-in, sometimes it doesnt show up.

But my main issue with that is that I need to be able to generate a document to distribute to all my collegues. The PDF format is mainly known and used.
So I would like to generate a PDF from the DVI.

I have this option on TeXnicCenter, but the result is almost the same that with the direct conversion in PDF.
Is there a way to generate a PDF from a DVI that look exactly the same ?

Is there another option of all this ?

Best Answer

There are two separate issues with tabular rules and colortbl colored backgrounds.

  1. \cline doesn't work. This is explicitly documented in the colortbl manual. \cline is implemented such that it takes no vertical space, the rule is a negative space of half the width followed by a rule followed by another negative space of half the width. So if there are coloured backgrounds, The top half of the \cline over-prints the background of the row above, and the bottom half of the \cline is over-printed by the background of the row below.

  2. Vertical rules and horiziontal rules may vanish at some zoom levels. In the DVI or PDF the coloured panels and rules are specified to very high accuracy as adjacent rules, however a viewing application always needs to snap such coordinates on to the physical pixel layout of the device, so it can happen that the coloured panels either side of a rule due to rounding end up on adjacent or nearly adjacent pixels and so making the rule impossibly thin to see. Some viewers are better at avoiding this than others, it is a property of the viewer, not of the format.

A better way to solve this is not to draw the rules between the coloured panels but to render the table in two or three layers with the coloured panels first, then the data and the rules. That requires two passes over the table though and just isn't the way colortbl works. There are answers on site showing tikz-decorated tables that work this way and so are more robust with respect to pixel rounding in viewers.

Related Question