(Ted Harding) <[EMAIL PROTECTED]> wrote:
> 1. I'm not aware of a simple mechanism in groff to
> do this -- e.g. fill all lines whose minimum
> formatted length is within X of line-length.
AT&T troff has a \n(.x register which holds the remaining
horizontal space on the current output line. Thus it is
possible to do
.sp 5c
.ps 28
.vs 36
.de SP
. if \\n(.x<1n \p\%
. sp
..
.ll \w'a full line'u
a full line
stretch it
.SP
a full line
a line
.SP
more text
\n(.x is documented as a "reserved version-dependent register"
but has the described semantics in every version I have seen
from 7th edition troff on.
The \% is necessary to trick the internal control flow; the
.brp request would make it superfluous but is, of course, not
available in AT&T troff.
By introducing a documented register for the same purpose, it
would become possible to use e.g.
.de SP
. if \\n[.rl]<1n .brp
. sp
..
to get the desired effect.
Gunnar
_______________________________________________
Groff mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/groff