groff
[Top][All Lists]
Advanced

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

Re: [Groff] background shading using tbl


From: Ted Harding
Subject: Re: [Groff] background shading using tbl
Date: Sat, 03 Jul 2010 19:22:58 +0100 (BST)

On 03-Jul-10 17:13:12, Werner LEMBERG wrote:
> 
>> \*[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

Indeed! In fact (perhaps somewhat buried in my text) I did suggest
(in general terms) doing such a thing:
"I have put them alternately at the starts of the successive lines
of the table. You could simply ignore "shd0", or devise a trick
whereby an initial "\*[shdn]" (say) becomes alternately "\*[shd1]"
and "\*[shd0]".

And you've supplied the trick, Werner! (I got slightly tangled
at the time trying to do it myself ... (.
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 03-Jul-10                                       Time: 19:22:53
------------------------------ XFMail ------------------------------



reply via email to

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