Russ Allbery <[email protected]> writes:

> I see that in addition to changing from .IP to .TP, I also need to
> override the the TS register to restore the previous formatting
> behavior, since apparently that *also* changed in a
> backwards-incompatible way. That was immediately obvious when I tried to
> format the Pod::Man documentation with a patched pod2man that used .TP
> and got incorrect results.

> Is the TS register another one of these magic registers that I have to
> set after .TH because it gets reset every time .TH is processed, and
> therefore cannot be meaningfully set in the pod2man preamble?

I have merged code to the main branch of podlators to hopefully work
around this change and produce the same output with both older and newer
groff. Testing would be very much welcome; there are a lot of subtleties
here and I am not certain that I got all of them correct. Code is
available from either:

    https://git.eyrie.org/git/perl/podlators.git
    https://github.com/rra/podlators

The timing for the upcoming Perl release is as bad as it possibly could
be, which is my fault for sitting on a new release for too long. (I'm
sorry about that, Guillem; I did see your bug report but didn't have a
chance to address it until now.) I am hesitant to make a release today
without some confirmation that the fix appears to be correct, but I will
try to make one very soon since there are a large number of other
accumulated fixes that I have been sitting on.

Colin, for the purposes of this groff bug, I think adding the local
configuration specified early in this bug is correct but insufficient.
groff_man(7) is now also wrong, since it claims that .IP doesn't enforce
tag separation but, with that change, I assume it does. (I haven't tested
the change myself.)

In addition, groff 1.24 also broke .TP formatting in a more minor way by
increasing the tag separation from 1n to 2n, which will likely cause
unintended tag spilling onto a separate line in the cases where the indent
was carefully chosen to leave just enough room for the tag and a single
space. This pattern is very common in POD documents; those are unaffected,
of course, since pod2man has always used .IP, but from that I would
conclude that it's probably also common in hand-written documents. I think
you should therefore also override the TS register to set it to 1n, thus
restoring backward compatibility with previous versions of groff.

-- 
Russ Allbery ([email protected])             <https://www.eyrie.org/~eagle/>

Reply via email to