groff
[Top][All Lists]
Advanced

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

Re: pressing man(7) into service for non-man page documents


From: G. Branden Robinson
Subject: Re: pressing man(7) into service for non-man page documents
Date: Mon, 7 Mar 2022 11:45:18 +1100
User-agent: NeoMutt/20180716

Hi Alex,

At 2022-01-29T02:38:03+1100, G. Branden Robinson wrote:
> > I'll still use man(7) for a while, I think.  My only problem with
> > man(7) is .TH, which I can't remove :/
> 
> Well, you sort of can.  You can call .TH with 2 dummy arguments and
> then redefine the header and footer traps (PT and BT, respectively).
> If you don't _need_ either or both of them, you can redefine them to
> nothing.  That way the information declared in the `TH` call will
> never show up and your document won't even look much like a man page
> anymore.
> 
> I'm attaching a demonstration.
> 
> This exercise did cause me to notice a probable bug; you have to
> redefine the page trap before calling `TH` because itself calls `PT`.
> But in groff_man(7) we tell the reader to perform any macro
> redefinitions _after_ calling `TH`, so if people follow the rules we
> tell them, they can't escape having the default header on the first
> page of the document.
> 
> And if you use -mandoc, even that won't suffice to escape the problem
> because andoc.tmac relies upon seeing `TH` to know when to (re)load
> the man(7) package.  That's one reason we tell people to do their
> redefinitions afterward--as I understand it, the other is "to
> accommodate timid mandb(8) implementations", as we say in
> groff_man(7).
> 
> It's a problem.  I guess people don't use this feature much or we'd
> have heard about it.  We need the page header to get called ASAP after
> starting a new page, but not _from_ `TH`.  Maybe an input trap will do
> it...I'll have a look.

This is now fixed in groff Git HEAD.

Details are at <https://savannah.gnu.org/bugs/?61954>.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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