groff
[Top][All Lists]
Advanced

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

Re: Represent several consecutive newlines


From: G. Branden Robinson
Subject: Re: Represent several consecutive newlines
Date: Mon, 9 May 2022 12:24:41 -0500

At 2022-05-09T18:32:08+0200, Alejandro Colomar wrote:
> BTW, I just downloaded groff.git into my current computer, so it's likely
> that I'll try to review the new groff_man*(7) manual pages soon (and
> possibly others).

Cool!  I'd like to encourage you to review tbl(1) carefully; I rewrote
it for 1.23, imposed terminological discipline on it, tried to
present the preprocessor's behavior more accurately and in greater
detail, and attempted to make the page more accessible to those not
already familiar with Lesk's original white paper about the program.

While tables can be overused, any man page author not conversant with
tbl(1) will eventually hit a frustrating wall if they don't have a
certain level of competence with it.

While I hope the new page is easily understood and defect-free, you're
in a good position to spot places where I might have failed to meet the
needs of the man page-authoring audience.

> > In a *roff document that was not a manual page, I'd use the 'sp'
> > request or a macro package's wrapper for it, if one were present.
> 
> Just out of curiosity: why?

I think it's more economical and more maintainable.  Instead of typing
four lines of '\&', I can simply say '.sp 4v'.  The argument to .sp is a
numeric expression[1], so it can contain arithmetic, or register or
string interpolations.  That kind of power is sometimes handy.

It might be worth noting that man-db man(1), unconditionally as far as I
can tell, squeezes multiple consecutive blank lines to one.

https://gitlab.com/cjwatson/man-db/-/blob/main/src/man.c#L1559
https://gitlab.com/cjwatson/man-db/-/blob/main/src/man.c#L1642

Now that "groff -man -rcR=1" no longer produces 3 lines of space
after man(7) page headers and before footers, maybe we can ask Colin
Watson to make that squeezing behavior optional, or remove it entirely
if the number of real-world pages that employ vertical white space
excessively within their text is low.

("Now" meaning "in groff Git HEAD"--I don't expect Colin to make changes
to man-db to accommodate an unreleased groff.)

Regards,
Branden

[1] That's something else I rewrote/ expanded for groff 1.23.  See the
    "Numeric Expressions" section/node of our Texinfo manual, or the
    "Numeric expressions" section of groff(7).

Attachment: signature.asc
Description: PGP signature


reply via email to

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