Hi,

In the macro package I am working on, I want to divert some text to a
region.  If the region is too small, I have to recuperate the text that
could not fit in and put it in another diversion, to output it later.
The way I know the region is full is by a trap positioned at its end.

Here is, in its essence, what I have tried:

$ cat problem.tr
.ll 40m
.wh 1v CUT
.de CUT
.  di TEXT2
.  di
..
.di TEXT
A paragraph that is long enough to be used as an example for my
question. 
.br
.di
.nf
.TEXT
-----
.TEXT2
.fi

The idea is to create the second diversion in the trap, to accumulate
what the first one had not outputed when the trap has sprung.

The output is:

$ preconv problem.tr | nroff
A paragraph that is long enough to be
used as an example for my question.
‐‐‐‐‐

What I would like to have is:

$ preconv solution.tr | nroff
A paragraph that is long enough to be
‐‐‐‐‐
used as an example for my question.

Is there a way to make it work?

Thank you very much,
Selve

Reply via email to