groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there any way to make alternate rows of a table have a light gray


From: Tadziu Hoffmann
Subject: Re: Is there any way to make alternate rows of a table have a light gray background?
Date: Wed, 9 Jun 2021 14:31:55 +0200
User-agent: Mutt/1.11.4 (2019-03-13)

> The data is simple, but the table is wide and the data
> occurs in a right triangle shape, with one point at the
> top left, another point at the top right, and the other
> point at the bottom right.  This means that it is hard to
> accurately follow from the row heading on the left to the
> appropriate column on the right.

> Is there any way to make alternate rows of a table have a
> light gray background?

It is possible only with some trickery, and it's easier
if all the lines have the same height, otherwise much more
manual intervention will be necessary.  To make this fully
automatic will probably require modifying tbl.

In the attached example, the gray background is created by
drawing filled boxes across the width of the table.  In fact,
the background is drawn in advance for the *next* line, in
order to prevent the horizontal line from being painted over,
which can happen at low resolutions; however, this requires
two slightly different versions of the fill because the line
spacing is different around the horizontal line.

TW is the width of the table and is set by tbl.  LW is a
correction for (half) the line width and is only necessary
because I'm using square linecaps.


Attachment: alternaterows.ro
Description: Text document

Attachment: alternaterows.pdf
Description: Adobe PDF document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]