groff
[Top][All Lists]
Advanced

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

Re: [Groff] "Cosmetic" filling


From: Gunnar Ritter
Subject: Re: [Groff] "Cosmetic" filling
Date: Thu, 31 Aug 2006 19:53:18 +0200
User-agent: Heirloom mailx 12.2pre 7/7/06

(Ted Harding) <address@hidden> 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




reply via email to

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