I'm trying to generate pairs of tables in several different templates. The first table has a "normal" appearance, but the second is a transformation of the first that displays all of the rulings, especially those that are not drawn in the original table. It is important that the original table also includes the horizontal separators because the two images need to be the same size. The second must show the "grid" that shows all independent cells.

An example:

& Romanization & polverine \\ \arrayrulecolor{black} \hline \arrayrulecolor{black} 
gastratrophia & 9 & 77 \\ \arrayrulecolor{white} \hline \arrayrulecolor{black} 
Adamitical & 3 & 61 \\  \arrayrulecolor{white} \hline \arrayrulecolor{black}

 & Romanization & polverine \\ \hline
gastratrophia & 9 & 77 \\ \hline
Adamitical & 3 & 61 \\ \hline

Which results in the following tables:

enter image description here

I realize that it is really discouraged to use vertical separators in tables, but due to the goal of the table generation I need them. Now as you can see, the white line is drawn over the vertical ruling, which results in a small white gap. I've tried to find ways to make the \hline transparent instead of white, but I cannot find a way to do that.

Is there a way to draw the vertical lines after the horizontal lines, such that they will be placed over the white lines? If not, is there a way of replacing the white lines by some extra vertical spacing that is exactly the size of what a \hline would be?


1 Answer 1


A working solution is to use \\[0.4pt] for the rows that do not have a \hline. Since a \hline has this width, this compensates for the space that a \hline would produce otherwise. It does not interrupt the vertical lines.

For other ruling types, this is very well written post: booktabs: What is the difference between \toprule and \hline

  • Or \\[\arrayrulewidth] in case it changes. May 28, 2019 at 19:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .