[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] background shading using tbl
From: |
Werner LEMBERG |
Subject: |
Re: [Groff] background shading using tbl |
Date: |
Sat, 03 Jul 2010 19:13:12 +0200 (CEST) |
> \*[shd1]Andy Armstrong#Class 1A#Sciences
> \*[shd0]Alan Beamish#Class 1B#Arts and Humanities
> \*[shd1]Brian Aldwych#Class 2A#Media Skills
> \*[shd0]Beowulf Budweiser#Class 2B#Brewing and Biochemistry
> \*[shd1]Charlie Dimmock#Class 3D#Self-Support
This is not optimal. Just imagine the insertion of an entry, and you
have to adjust all of the `0' and `1' numbers which follow.
Instead, as I've suggested, you should use a string with an automatic
flip (which then either calls \*[shd1] or \*[shd0]):
.nr colour-flip 0
.ds shd \R'colour-flip (1 - \\n[colour-flip])'\\*[shd\\n[colour-flip]]
...
\*[shd]Andy Armstrong#Class 1A#Sciences
\*[shd]Alan Beamish#Class 1B#Arts and Humanities
\*[shd]Brian Aldwych#Class 2A#Media Skills
\*[shd]Beowulf Budweiser#Class 2B#Brewing and Biochemistry
\*[shd]Charlie Dimmock#Class 3D#Self-Support
Werner