groff
[Top][All Lists]
Advanced

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

Re: [Groff] recently introduced bug in -me macro .(b


From: Dave Kemper
Subject: Re: [Groff] recently introduced bug in -me macro .(b
Date: Thu, 24 Apr 2014 20:22:46 -0500

On 12/29/13, I wrote:
> This bug report concerns the -me macro set's handling of the .(b and
> .)b macro pair. [snip]
>
> An earlier bug in this macro pair was present in groff 1.21 (see
> http://lists.gnu.org/archive/html/bug-groff/2012-12/msg00011.html);
> in 1.22.2, this bug has been fixed, but a new one has taken its place.
> I don't know for sure that the fix to the older bug caused the new bug,

I have confirmed that the same git commit caused both the old .)b bug
to be fixed, and the new one to be introduced.  The culpable commit is:

commit b69062693d3360efce9d4d63fac337be21e07db7
Author: Werner LEMBERG <address@hidden>
Date:   Wed Jul 20 18:44:50 2011 +0000

    Improve line numbering support in tbl and with me macros.

    * tmac/e.tmac (n1, n2, TH, PS): Implement it.
    (@h, @n, @o, @t, @k, )b, (c, (q, )q, (l, )l, (f, @q, PE): Updated.

If I back out tmac/e.tmac to its state before this commit, the bug from
groff 1.21 returns, and the newer bug is not present.  If I apply this
commit's change to e.tmac, the 1.21 bug disappears, and the new one
crops up.

I described the new bug in my December email, as quoted below.  (I said
it's in groff 1.22.2's e.tmac, but the latest e.tmac from git continues
to exhibit the buggy behavior.)

e.tmac remains indecipherable to me, so if any of you macro experts
can figure out what's causing this bug, I'd much appreciate the help.
Thank you!


> The bug: In 1.22.2, a block defined with .(b and .)b no longer has
> the same amount of space above and below it.  meref.me documents that
> it should: "All displays except centered blocks and block quotes are
> preceded and followed by an extra \n(bs ... space."  So with the following
> input file:
>
> .mso me.tmac
> .nr bs 2v
> Above the block.
> .(b L
> In the block, with surrounding space = \n(bs.
> .)b
> Below the block.
> .br
> .
> .nr bs 1v
> Above the block.
> .(b L
> In the block, with surrounding space = \n(bs.
> .)b
> Below the block.
> .br
> .
> .nr bs 0
> Above the block.
> .(b L
> In the block, with surrounding space = \n(bs.
> .)b
> Below the block.
> .br
>
> in all three cases we should expect to see the "In the block" line
> equidistantly spaced from the "Above" and "Below" lines.  (The results
> are the same in PostScript and ASCII output; I've pasted the ASCII here.)
> This does happen in 1.21; however, 1.22.2 puts one extra line above the
> block in each case:
>
> $ groff-1.21 -Tascii test.roff | head -25
>
>
>
>
>
>
>
> Above the block.
>
>
> In the block, with surrounding space = 80.
>
>
> Below the block.
> Above the block.
>
> In the block, with surrounding space = 40.
>
> Below the block.
> Above the block.
> In the block, with surrounding space = 0.
> Below the block.
>
>
>
> $ groff-1.22.2 -Tascii test.roff | head -25
>
>
>
>
>
>
>
> Above the block.
>
>
>
> In the block, with surrounding space = 80.
>
>
> Below the block.
> Above the block.
>
>
> In the block, with surrounding space = 40.
>
> Below the block.
> Above the block.
>
> In the block, with surrounding space = 0.
> Below the block.
> $



reply via email to

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