groff
[Top][All Lists]
Advanced

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

RE: [Groff] Writing in gray with groff... possible?


From: Ted Harding
Subject: RE: [Groff] Writing in gray with groff... possible?
Date: Sat, 24 Jun 2000 17:38:44 +0100 (BST)

On 25-Jun-00 baruchel wrote:
> Brest, le samedi 24 juin
> 
> Is it possible to write in gray with groff?
> Is it possible to use gray in the tbl preprocessor (eg. have the
> background of
> a cell in gray and your letters in black)?
> 
> -- 
>    .~.   Thomas Baruchel

Yes in principle, but not all easily.

There is no provision at present in tbl for cell-background-filling, so
you would have to fake it.

The only way I can think of would go as follows:

Knowing the size of the cell, define a string (say \*[bbg]) which
defines a fill-level (using \D'f ...'), and draws a filled box
(using \D'P ...') (see man groff_out). Then make your cell entries
like (using # for the tab character):

  ...#\*[bbg]<cell text contents>#...

How do you know the cell size?, you ask.

Well, if you inspect the output of tbl itself very carefull, you
will find that number registers are defined from which the
dimensions of a cell could be deduced.

This would be the hardest bit of all. I have from time to time
thought of trying it out, but hace never been sufficiently
motivated to really do it. So I can't say how well it could be
made to work.

Nevertheless, for what it's worth, that is my idea on the question!

Best wishes to all,
Ted.

PS if anyone does want to try doing it, don't forget that the
\D'f ...' command implements, as a side effect, a horizontal
motion equal to its argument in groff units. This has to be
undone with an extra \h'...' command so as to suppress the motion.



--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 284 7749
Date: 24-Jun-00                                       Time: 17:38:44
------------------------------ XFMail ------------------------------

reply via email to

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