groff
[Top][All Lists]
Advanced

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

[Groff] Diversion of formatted text


From: Miklos Somogyi
Subject: [Groff] Diversion of formatted text
Date: Sun, 16 Apr 2006 01:26:05 +1000


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.

Thanks,

Miklos

PS: Werner, I'm sorry for the delay, I haven't forgotten about the grops patch. By the way, since you have installed the .device and .devicem things, how
    can one get to use them?

=====================

.po  3.2c
.ll 15.0c
.
.\"------------------ bulleted paragraph
.
.de pB
.   ne 1
.   in \\$1n
.   ps -1
\(bu
.   ne 0
.   in +2n
.   ps
.   sp -1
..
.\"------------------ start diversion
.
.de start
.   br
. nf \" try .fi & .nf and see the difference in spacing & bulleting
.   di lines
..
.\"------------------ finish diversion, dump the result
.
.de finish
.   br
.   di
.
.\"     calculate heights and fill a box "underlay" in PostScript
.
.   sp
.   lines   \" dump accumulated (formatted?) lines
.   sp
..


reply via email to

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