> 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.


.\" tbl a4 land
.\" ----------------------------------------------------------------
.defcolor lightgray gray 0.95
.fcolor lightgray
.nr TW 0
.nr LW 0.2p
.ds X \Z'\h'-\\n[LW]u'\v'0.39v'\D'P 0 1v 2u*\\n[LW]u+\\n[TW]u 0 0 -1v''
.ds Y \Z'\h'-\\n[LW]u'\v'0.22v'\D'P 0 1v 2u*\\n[LW]u+\\n[TW]u 0 0 -1v''
.\" ----------------------------------------------------------------
.po 2c
.ll 29.7c-4c
.ps 10
.vs 12
.sp 3c
.TS
center expand;
l0c |cbescbescbescbescbescbescbescbescbescbescbesl
l0lb|n0n n0n n0n n0n n0n n0n n0n n0n n0n n0n n0n0l.
\*X     System  Chahnae Drougayn        Helmar  Kalavel Lesdin  Peles   Petrion 
Seljan  Tauran  Telmera Varos
_
        Ajada           11h     19d     11h     6d      3h      5d      16h     
2d      1h      4d      23h             3h      12d     16h             9h      
1d      3h              14h
\*Y     Chahnae                 12d     16h     8d      12h     4d      19h     
2d      17h     6d      20h             22h     7d      22h             12h     
        8h              16h
        Drougayn                                        5d      17h     4d      
6h      12d     6h      2d      19h     11d     2h      6d      21h     9d      
10h     11d     11h     7d      13h
\*Y     Helmar                                                  9d      20h     
3d      18h     5d      6h      9d      3h      3d      22h     7d      2h      
5d      21h     10d     15h
        Kalavel                                                                 
7d      4h      9d      6h      10d     7h      3d      5h      12d     15h     
7d      14h     10d     19h
\*Y     Lesdin                                                                  
                9d      11h     11d     16h     1d      23h     10d     2h      
6d      8h      7d      11h
        Peles                                                                   
                                9d      19h     2d      14h     3d      6h      
10d     20h     4d      6h
\*Y     Petrion                                                                 
                                                4d      11h     7d      18h     
3d      9h              7h
        Seljan                                                                  
                                                                6d      1h      
9d      5h              13h
\*Y     Tauran                                                                  
                                                                                
        20h             5h
        Telmera                                                                 
                                                                                
                        9h
.TE

Attachment: alternaterows.pdf
Description: Adobe PDF document

Reply via email to