groff
[Top][All Lists]
Advanced

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

Re: [Groff] Possible Difference Between Bell Labs and GNU?


From: ralph
Subject: Re: [Groff] Possible Difference Between Bell Labs and GNU?
Date: Fri, 08 Feb 2002 16:04:48 +0000

Hi Werner,

> > I noticed that my GNU groff-built version of Bentley's packet
> > diagram looks different from his.
> > 
> > Attached are two PDF files.  belllabspic.pdf is page nine from
> > Bentley's CSTR 142 with the text cut away.  gnupic.pdf is the same
> > dformat source run through GNU groff.
> 
> I've never used dformat, so I can't comment on all issues.

It's a very simple awk script, downloadable from
http://troff.org/source.html

> >     Bentley has more space between eqn's sub text than I do, e.g.
> >     `Chunk m', and around the - in `Data sub {n-1}'.
> 
> groff's eqn is heavily based on TeX, using many features of it to
> improve formula handling.  So it is probably a feature to have such
> small differences.

How would one write `Data sub {n-1}' in that toungue whose name I will
not mention here and I'll try and give it a go.

> dformat is a preprocessor which produces pic code, right?  Without
> closer examination of this intermediate output I can't tell anything.

OK, the dformat's input is available at
http://troff.org/prog.html#dformat.  The output is

    .EQ
    delim @@
    .EN
    .PS
    fillval = 0.9
    BoxA: box invis ht 0.3 wid 0
     BoxB: box invis ht 0.3 wid 0 at BoxA
      BoxB: box  solid ht 0.3 wid 1.28 with .w at BoxB.e
        "Frame" at BoxB.c
        "\s-4\s+4" at BoxB.s + (0,0.055)
      BoxB: box  solid ht 0.3 wid 1.28 with .w at BoxB.e
        "Frame" at BoxB.c
        "\s-4\s+4" at BoxB.s + (0,0.055)
      A1:  BoxB: box  solid ht 0.3 wid 1.28 with .w at BoxB.e
        "Frame" at BoxB.c
        "\s-4\s+4" at BoxB.s + (0,0.055)
      BoxB: box  solid ht 0.3 wid 1.28 with .w at BoxB.e
        "Frame" at BoxB.c
        "\s-4\s+4" at BoxB.s + (0,0.055)
      BoxB: box  dashed ht 0.3 wid 0.64 with .w at BoxB.e
        "..." at BoxB.c
        "\s-4\s+4" at BoxB.s + (0,0.055)
    BoxA: box invis ht 0.3 wid 0 with .n at BoxA.s - (0,0.3)
     BoxB: box invis ht 0.3 wid 0 at BoxA
      A2:  BoxB: box  solid ht 0.3 wid 0.64 with .w at BoxB.e
        "Flags" at BoxB.c
            "\|\s-48\s+4" ljust at BoxB.sw + (0,0.055)
            "\s-4\s+4\|" rjust at BoxB.se + (0,0.055)
      BoxB: box  solid ht 0.3 wid 0.64 with .w at BoxB.e
        "Status" at BoxB.c
            "\|\s-48\s+4" ljust at BoxB.sw + (0,0.055)
            "\s-4\s+4\|" rjust at BoxB.se + (0,0.055)
      BoxB: box  solid ht 0.3 wid 0.64 with .w at BoxB.e
        "@roman Chunk sub 1@" at BoxB.c
        "\s-4\s+4" at BoxB.s + (0,0.055)
      B1:  BoxB: box  solid ht 0.3 wid 0.64 with .w at BoxB.e
        "@roman Chunk sub 2@" at BoxB.c
        "\s-4\s+4" at BoxB.s + (0,0.055)
      BoxB: box  dashed ht 0.3 wid 0.64 with .w at BoxB.e
        "..." at BoxB.c
        "\s-4\s+4" at BoxB.s + (0,0.055)
      BoxB: box  solid ht 0.3 wid 0.64 with .w at BoxB.e
        "@roman Chunk sub m@" at BoxB.c
        "\s-4\s+4" at BoxB.s + (0,0.055)
      BoxB: box  solid ht 0.3 wid 1.28 with .w at BoxB.e
        "CRC" at BoxB.c
            "\|\s-416\s+4" ljust at BoxB.sw + (0,0.055)
            "\s-4\s+4\|" rjust at BoxB.se + (0,0.055)
      A3:  BoxB: box  solid ht 0.3 wid 0.64 with .w at BoxB.e
        "Flags" at BoxB.c
            "\|\s-48\s+4" ljust at BoxB.sw + (0,0.055)
            "\s-4\s+4\|" rjust at BoxB.se + (0,0.055)
    BoxA: box invis ht 0.3 wid 0 with .n at BoxA.s - (0,0.3)
     BoxB: box invis ht 0.3 wid 0 at BoxA
      B2:  BoxB: box  solid ht 0.3 wid 0.64 with .w at BoxB.e
        "@roman Data sub 1@" at BoxB.c
            "\|\s-48\s+4" ljust at BoxB.sw + (0,0.055)
            "\s-4\s+4\|" rjust at BoxB.se + (0,0.055)
      BoxB: box  solid ht 0.3 wid 0.64 with .w at BoxB.e
        "@roman Data sub 2@" at BoxB.c
            "\|\s-48\s+4" ljust at BoxB.sw + (0,0.055)
            "\s-4\s+4\|" rjust at BoxB.se + (0,0.055)
      BoxB: box  solid ht 0.3 wid 0.64 with .w at BoxB.e
        "@roman Data sub 3@" at BoxB.c
            "\|\s-48\s+4" ljust at BoxB.sw + (0,0.055)
            "\s-4\s+4\|" rjust at BoxB.se + (0,0.055)
      BoxB: box  solid ht 0.3 wid 0.64 with .w at BoxB.e
        "@roman Data sub 4@" at BoxB.c
            "\|\s-48\s+4" ljust at BoxB.sw + (0,0.055)
            "\s-4\s+4\|" rjust at BoxB.se + (0,0.055)
      BoxB: box  dashed ht 0.3 wid 0.64 with .w at BoxB.e
        "..." at BoxB.c
        "\s-4\s+4" at BoxB.s + (0,0.055)
      BoxB: box  solid ht 0.3 wid 0.64 with .w at BoxB.e
        "@roman Data sub {n-1}@" at BoxB.c
            "\|\s-48\s+4" ljust at BoxB.sw + (0,0.055)
            "\s-4\s+4\|" rjust at BoxB.se + (0,0.055)
      BoxB: box  solid ht 0.3 wid 0.64 with .w at BoxB.e
        "@roman Data sub n@" at BoxB.c
            "\|\s-48\s+4" ljust at BoxB.sw + (0,0.055)
            "\s-4\s+4\|" rjust at BoxB.se + (0,0.055)
      BoxB: box  solid ht 0.3 wid 0.48 with .w at BoxB.e
        "Length" at BoxB.c
            "\|\s-46\s+4" ljust at BoxB.sw + (0,0.055)
            "\s-4\s+4\|" rjust at BoxB.se + (0,0.055)
      B3:  BoxB: box  solid ht 0.3 wid 0.8 with .w at BoxB.e
        "Channel #" at BoxB.c
            "\|\s-410\s+4" ljust at BoxB.sw + (0,0.055)
            "\s-4\s+4\|" rjust at BoxB.se + (0,0.055)
     line dotted from A1.sw to A2.nw
     line dotted from A1.se to A3.ne
     line dotted from B1.sw to B2.nw
     line dotted from B1.se to B3.ne
    .PE

> >     He has more dashes vertically in the top right box yet the same
> >     number and spacing horizontally.

That's the

      BoxB: box  dashed ht 0.3 wid 0.64 with .w at BoxB.e

above.

> > 
> >     The dots used to draw the diagonal lines are bigger in Bentley's.
> >     In mine they look a bit washed out.

And this is

     line dotted from A1.sw to A2.nw

> > Are we trying to match exactly?
> 
> With eqn stuff, no.  With pic stuff, maybe.  This really depends on
> the input data -- maybe there is a bug lurking around in GNU pic.

I don't think it is a calculation bug.  Just GNU pic draws the same
thing in a different way.

Here's GNU pic.

    % ( echo .PS ; echo line dotted ; echo .PE ) | pic
    ...
    \h'0.050i'\v'0.000i'\D'l0.000i 0.000i'
    ...

And AIX pic, probably similiar to Bentley's.

    $ ( echo .PS ; echo line dotted ; echo .PE ) | pic
    ...
    \h'0.050i'\&.
    ...

So GNU ends up producing PostScript that draws a line from point X to
point X resulting in a very pale dot.  Bell Labs use a full stop.

> > I'd have thought so, otherwise carefully tailored drawings worsen
> > under GNU.
> 
> Hmm, the features you mention shouldn't really affect the global
> appearance IMHO.

But they clearly do.  Take the `line dotted from A1.sw to A2.nw'.
Bentley's diagram looks fine.  With mine drawn using GNU pic you can
hardly see the dots.  So, if I was Bentley and happy with the diagram's
appearance I'd now be a bit peeved at GNU pic's output.  There is no
question that the `global appearance' of the picture is affected.

Cheers,


Ralph.


reply via email to

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