On 31-Aug-06 Gunnar Ritter wrote: > (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.
Thanks for pointing this out! Your version above does not seem to work as intended in groff, but > 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 > .. ... this version does! > to get the desired effect. > > Gunnar Interesting. Many thanks! Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <[EMAIL PROTECTED]> Fax-to-email: +44 (0)870 094 0861 Date: 31-Aug-06 Time: 15:28:10 ------------------------------ XFMail ------------------------------ _______________________________________________ Groff mailing list Groff@gnu.org http://lists.gnu.org/mailman/listinfo/groff