[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Groff] Inserting raw PostScript output
From: |
Ted Harding |
Subject: |
RE: [Groff] Inserting raw PostScript output |
Date: |
Thu, 10 Oct 2002 11:52:43 +0100 (BST) |
On 10-Oct-02 Greg 'groggy' Lehey wrote:
> I'm playing around with some macros to change text colour in
> PostScript output from groff. I've written the following macro:
>
> .de colour
> \X'ps: exec \\$1 \\$2 \\$3 setrgbcolor'
> ..
>
> This works, up to a point. The trouble is that it offsets the
> remainder of the text by 10 points down, presumably a line space. How
> can I get rid of this? I've tried adding a \v'-10p' to the macro, but
> this has no effect.
>
> Apart from that question, of course, there's a more obvious one: is
> there a better way to do this?
What I do is define strings such as
.ds BLUE \X'ps: exec 0 0 1 setrgbcolor
.ds BLACK \X'ps: exec 1 1 1 setrgbcolor
and then you have no formatting problems if you do
This will change to \*[BLUE]blue-coloured text and then
\*[BLACK]back to black text.
(and it's also obvious to the reader what's happening).
Of course you can interpolate a ".ds" anywhere without
affecting layout, if you need a colour you have not yet
defined.
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 10-Oct-02 Time: 11:52:43
------------------------------ XFMail ------------------------------