groff
[Top][All Lists]
Advanced

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

groff now undoing .ad settings after .IP


From: Russ Allbery
Subject: groff now undoing .ad settings after .IP
Date: Thu, 14 Mar 2024 22:02:26 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

pod2man has, for a couple of decades, added:

    .if n .ad l

to the top of every generated man page after the .TH macro on the grounds
that, for an output device that only has full-width spaces and no support
for subtle adjustments of interword spacing, ragged right is a more
readable default than full justification.

This broke in groff 1.23.0.  Now, any .TP directive restores full
justification for all subsequent text.  This appears to be due to the
addition of:

.  ad \\*[AD]

in an-write-paragraph-tag.  I'm not sure why this was added, but I've
already gotten multiple complaints about full justification cropping up in
pod2man-generated man pages with current versions of groff.

Assuming this is intentional, is there some way that I can avoid this
change in behavior shy of the brute force approach of adding .if n .ad l
after every .TP tag?  That seems fairly ugly and also further undermines
the intent of the AD register.

The other obvious option is:

    .if n .ds AD l

before the .TH macro, which will technically work and which doesn't really
break anything that isn't already broken because pod2man-generated man
pages currently break the intent of the AD register anyway, but
groff_man(7) makes it clear that you don't want me to do that and I do
understand why.

I would be happy to support the AD register and let the user choose if
they have an explicit preference.  I just want to change the default under
nroff to l to stay consistent with the past 20 years of pod2man output.
Maybe we can find some way that I can signal to the an macro set that I
want a different default when running under nroff, but am happy to have my
chosen default overridden by the AD register if it's set?

(I understand that I can explain to users that they can set MANROFFOPT to
-dAD=l to get this behavior for every man page, and I like that this
option exists, but I'm not willing to take the regression and support hit
of having to explain this to every user.)

-- 
Russ Allbery (eagle@eyrie.org)             <https://www.eyrie.org/~eagle/>



reply via email to

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