groff
[Top][All Lists]
Advanced

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

groff/Heirloom difference: break in diversion trap


From: G. Branden Robinson
Subject: groff/Heirloom difference: break in diversion trap
Date: Sat, 21 Nov 2020 22:02:20 +1100
User-agent: NeoMutt/20180716

In a move that will shock no one, I'm working on the manual.  I'm also
using Heirloom Doctools troff as a convenient stand-in for AT&T because
it is a pain to fire up SIMH and run V7 Unix troff, though I have done
it before.

Is the following behavior difference a bug?  Can someone explain to me
what is happening?

Input document:

        .de DT
        This is my diversion trap.
        .\" groff won't write out this break, but Heirloom will.
        .br
        ..
        Here's some stuff.
        .br
        .di DI
        .dt 1v DT
        Diversion trap coming at \n(.t.
        We've stuffed some stuff into a diversion.
        It's \n(.t basic units to the next vertical position trap.
        And that's it for our diversion.
        .br
        .di
        .DI

Heirloom output:

Here's some stuff.
Diversion trap coming at 40.  We've stuffed  some  stuff  into  a
diversion.  This is my diversion trap.
It's 2147483647 basic units to the next vertical  position  trap.
And that's it for our diversion.

groff output:

Here’s some stuff.
Diversion trap coming at 40.  We’ve stuffed some stuff into a di‐
version.  This is my diversion trap.  It’s 2147483600 basic units
to the next vertical  position  trap.   And that’s it for our di‐
version.

It gets better.  If you add a .br at the beginning of the diversion
trap...

        @@ -1,4 +1,5 @@
         .de DT
        +.br
         This is my diversion trap.
         .\" groff won't write out this break, but Heirloom will.
         .br

...Heirloom suddenly honors the second .br but performs some weird
spreading.  groff ignores both.

Heirloom output:

Here's some stuff.
Diversion trap coming at 40.  We've stuffed  some  stuff  into  a
diversion.                             This is my diversion trap.
It's 2147483647 basic units to the next vertical  position  trap.
And that's it for our diversion.

groff output:

<as before>

Hold on, 'cause it gets weirder.

If I further add to the diversion trap to have some more text with a
break in its midst, Heirloom starts behaving like groff!

        @@ -1,6 +1,8 @@
         .de DT
         .br
         This is my diversion trap.
        +.br
        +It's got breaks in it.
         .\" groff won't write out this break, but Heirloom will.
         .br
         ..

Heirloom output:

Here's some stuff.
Diversion trap coming at 40.  We've stuffed  some  stuff  into  a
diversion.    This is my diversion trap.   It's got breaks in it.
It's 2147483647 basic units to the next vertical  position  trap.
And that's it for our diversion.

groff output:

Here’s some stuff.
Diversion trap coming at 40.  We’ve stuffed some stuff into a di‐
version. This is my diversion trap.  It’s got breaks in it.  It’s
2147483600 basic units to the next vertical  position  trap.  And
that’s it for our diversion.

Any suggestions for how to document this for our Texinfo manual's
"Implementation Differences" node?  I could heretically venture the
notion that AT&T troff (and presumably its descendants) are buggy here.

Thoughts?

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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