groff
[Top][All Lists]
Advanced

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

Re: <OK> [Groff] Diversion of formatted text


From: M Bianchi
Subject: Re: <OK> [Groff] Diversion of formatted text
Date: Sat, 15 Apr 2006 12:11:16 -0400

On Sun, Apr 16, 2006 at 01:39:59AM +1000, Miklos Somogyi wrote:
> Hello all,
> 
> I try to use a diversion to determine the height of a block of text, so
> that I can paint something underneath this block in PostScript.
> The following simplified example works nicely if no-fill is turned on.
> 
> However, there are problems in fill mode.
> Spaces inserted in the text disappear in print, though the height 
> register
> \n[.d] is ok (not used here).
> Also, there are problems with with the bulleted paragraph macro.
> Please change .nf to .fi and see the difference.
> 
> I would be glad if you could explain what's going on and how to fix the
> problem.

I think I get what you want by surround the call to the  lines  diversion thus:

        .de start
        .   br
        .   di lines
        \#      .   nf        \" try .fi & .nf and see the difference in
        spacing & bulleting
        .fi
        ..
        .\"------------------ finish diversion, dump the result
        .
        .de finish
        .   br
        .   di
        .
        .\"     calculate heights and fill a box "underlay" in PostScript
        .
        .   sp
 >      . nf    \" ADDED
 >      .   lines   \" dump accumulated (formatted?) lines
 >      . fi    \" ADDED
        .   sp
        ..

The diversion lines has been formated in fill mode, and then is presentes as
formatted in .nf mode.

At least that is how I understand it.

-- 
 Mike Bianchi
 Foveal Systems

 973 822-2085   call to arrange Fax

 address@hidden
 http://www.AutoAuditorium.com
 tp://www.FovealMounts.com




reply via email to

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