(Ted Harding) <[EMAIL PROTECTED]> wrote:
> 2. \[.rl] of course does not exist so would get value 0
> if invoked.
The following works with groff:
.de SP
. if (\\n(.k+\\n[.in])>=(\\n(.l-1n-\w' ') .brp
. sp
..
Note that there is an incompatibility between AT&T troff and
groff here: AT&T troff does not add the length of the space
character that is implied by the previous newline to the value
of \n(.k while groff does. So
.nr x \w'foo'
.nr y \w' '
foo
.tm \nx \ny \n(.k
prints "13330 2500 15830" with groff but "88 20 88" with 7th
Edition troff or "13330 3330 13330" with Heirloom troff.
The AT&T troff variant of the macro above would thus be
.de SP
. if (\\n(.k+\\n(.y)>=(\\n(.l-1n) \p\%
. sp
..
\n(.y has had the same semantics as \n[.in] in groff from
Unix 7th edition on.
Gunnar
_______________________________________________
Groff mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/groff