[Top][All Lists]

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

Re: [groff] 01/03: **/*.man: Eliminate blank lines in man pages.

From: G. Branden Robinson
Subject: Re: [groff] 01/03: **/*.man: Eliminate blank lines in man pages.
Date: Thu, 23 Jan 2020 13:12:34 +1100
User-agent: NeoMutt/20180716

At 2020-01-16T16:27:42+0100, Ingo Schwarze wrote:
> These are three very different cases.
> 1. In man/, the blank lines were inside tbl(1) code.
>    In that context, the meaning of a blank line is well defined:
>    it means a table row without any cells, i.e. an empty table row.

I can't find any support at all for your claim.  I've checked 1976,
1977, 1979, and 1989 versions of the Bell Labs tbl whitepaper (not the
man page, the journal paper--or "Volume 2" article, if you will).

All of them say the same thing:

        Troff commands within tables

        --- An input line beginning with a '.' followed by anything but
        a number is assumed to be a command to _troff_ and is passed
        through unchanged, retaining its position in the table.  So, for
        example, space within a table may be produced by ".sp" commands
        in the data.

I cannot find any mention of blank or empty lines, and of course .blm is
a GNU extension so we're not likely to find it produced by classical

Also, since tbl is a preprocessor, if it passes through empty lines
unchanged, they _have no semantics_ for tbl, and they should be
discouraged as and where they are in other roff documents (in other
words, they shouldn't be used in raw roff documents and otherwise it's
up to a macro package to support them; e.g., ms(7) does, man(7)

>    Your commit breaks formatting with mandoc(1):
>      $ mandoc -W unsupp
>    .TS
>    tab(:);
>    L L.
>    a:b
>    .sp
>    c:d
>    .TE
>    mandoc: <stdin>:5:4: UNSUPP: ignoring macro in table: sp
>    ()                                                                ()
>    a   b
>    c   d
>                              January 16, 2020                        ()
>    As you see, the blank line is now gone because mandoc(1) supports
>    neither low-level roff requests like .sp nor high-level macros
>    like .PP inside tbl(1) code.  You might argue that is a limitation
>    of mandoc(1), but even if you do, changing groff_char(7) that way
>    still reduces portability.

Bell Labs has been blessing .sp within tbl tables since 1976.

>    So i would prefer if this part of the commit could be reverted.

I find it pretty difficult to accept your assertion that my change is
wrong, but since I want to overhaul this page anyway, I won't rule out
changing it in some way that doesn't cause mandoc grief.

The blank lines were there as a form of sub-sectioning within the (often
long) tables, so there are probably other ways to skin this cat.

I'll reply separate regarding man pages and examples, particularly since
your objects there are not as strong.


Attachment: signature.asc
Description: PGP signature

reply via email to

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