groff
[Top][All Lists]
Advanced

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

Re: groff now undoing .ad settings after .IP


From: G. Branden Robinson
Subject: Re: groff now undoing .ad settings after .IP
Date: Fri, 15 Mar 2024 15:20:10 -0500

At 2024-03-15T12:29:36-0700, Russ Allbery wrote:
> "G. Branden Robinson" <g.branden.robinson@gmail.com> writes:
> 
> > Can you name me a misbehaving perlpod(1)-generated page?  I'll check
> > it out.
> 
> Yeah, pod2man(1) itself will do it on a Debian system with recent
> groff.  You'll see justification switch from ragged right to full in
> the body of the first option documented in OPTIONS.

Yup.  Can reproduce.  Excellent.  I don't have to change my system an
iota to experiment.  I'll get right on this.

> > Perhaps what I really needed here was:
> 
> Aha, yes, I was wondering if you could just save and restore the
> adjustment rather than having to set it to the AD register.

Sometimes save-now-and-restore-later doesn't work well, and frustrates
user intentions, because between "now" and "later" might be some user
input that invalidates what you've thus defined as "previous state".

But for the case at issue, it's impossible (knock wood), for the user to
sneak an adjustment change in between the time they declare a paragraph
tag and the time the package emits it.

> Must have been some other implementation where I ran into this, then.
> I think at the time I was testing on a pile of different commercial
> UNIXes.

I gather there is a copy of Dell SVr4 Unix (x86) kicking around that
people have gotten their mitts on and run under emulation.  When I get
some round tuits I'd love to give that a spin.

> Hm, I tracked down the commit message where I changed from ".if n .na"
> in the preamble to ".if n .ad l" after .TH, and the comment claims it
> was for groff.
> 
>         * lib/Pod/Man.pm (guesswork): Recognize more uses of hyphens
>         in regular English text and allow them to be regular hyphens.
>         (preamble): Turn off hyphenation and, for nroff, justification
>         after the .TH macro since that's where groff turns them on.
>         * t/basic.t: Update for the new preamble.
>         * t/filehandle.t: Likewise.
>         * t/man.t: Likewise, and test the new hyphen behavior.
>         * t/basic.man: Adjust for the new hyphen behavior.
> 
> (Bad 2006 version of me, combining unrelated changes into a single
> commit.)  It's possible that the comment is referring to the
> hyphenation change and I just moved them both together.  I don't
> appear to have written down why I switched from ".na" to ".ad l".
> 
> ".if n .na" was in the generated output of Pod::Man of my very first
> version in 1999, which strongly implies that it was in Tom
> Christiansen's original pod2man script on which Pod::Man was
> originally based.

The nice thing about software archeology is being able to do it at all.
See the last 2-3 paragraphs of

https://www.tuhs.org/pipermail/tuhs/2024-March/029625.html

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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