On Thu, Aug 21, 2025 at 08:38:16PM +0200, Ingo Schwarze wrote:
> Hello Alejandro,

Hi Ingo,

> Alejandro Colomar wrote on Sat, Aug 16, 2025 at 06:16:37PM +0200:
> > On Fri, Aug 15, 2025 at 05:43:03PM +0200, Alejandro Colomar wrote:
> >> On Fri, Aug 15, 2025 at 09:30:30AM -0500, G. Branden Robinson wrote:
> >>> Someone wrote:
> 
> >>>>  $ grep -m1 -B3 -A8 ^$ man/man7/inode.7
> >>>>  .TS
> >>>>  lB l l.
> >>>>  S_IFMT  0170000 bit mask for the file type bit field
> >>>> 
> >>>>  S_IFSOCK        0140000 socket
> >>>>  S_IFLNK 0120000 symbolic link
> >>>>  S_IFREG 0100000 regular file
> >>>>  S_IFBLK 0060000 block device
> >>>>  S_IFDIR 0040000 directory
> >>>>  S_IFCHR 0020000 character device
> >>>>  S_IFIFO 0010000 FIFO
> >>>>  .TE
> >>>> 
> >>>> Is there a way to avoid these blanks in tbl code?
> 
> >>> Certainly.  You can use the *roff dummy character `\&` to make the table
> >>> row non-blank according to the formatter.
> >>> 
> >>> This makes no difference even on typesetters, because the (default)
> >>> meaning of a blank input line is a 1v space on the output.  A text line
> >>> with only a dummy character on it behaves the same way.  Thus, I
> >>> wouldn't call these false positives, but true ones.*
> 
> >> Ahh, I was thinking tbl(1) would need a real blank line.  Then it's all
> >> good.  Thanks!
> 
> > Hmmm, I get now a conflicting diagnostic:
> > 
> > mandoc: .tmp/man/man7/man-pages.7:852:1:
> >         ERROR: ignoring data in spanned tbl cell: \&
> > 
> > What do you think of this diagnostic?
> 
> So far, i failed to reproduce.

The diagnostic only appears in some tables.

Here's a reproducer:

        alx@debian:~/tmp$ cat ./man-pages.7 
        .TH man-pages 7 2025-08-21 "Linux man-pages (unreleased)"
        .SH NAME
        man-pages \- conventions for writing Linux man pages
        .SH DESCRIPTION
        The following table lists some preferred terms to use in man pages,
        mainly to ensure consistency across pages.
        .P
        .TS
        l l l
        ---
        l l ll.
        Term    Avoid using     Notes
        \&
        bit mask        bitmask
        built-in        builtin
        .TE
        alx@debian:~/tmp$ diff -u \
                        <(groff -t -man -Tutf8 ./man-pages.7) \
                        <(mandoc -man -Tutf8 ./man-pages.7);
        --- /dev/fd/63  2025-08-21 21:54:10.840387913 +0200
        +++ /dev/fd/62  2025-08-21 21:54:10.840387913 +0200
        @@ -1,15 +1,15 @@
        -man-pages(7)           Miscellaneous Information Manual           
man-pages(7)
        +man-pages(7)           Miscellaneous Information Manual           
man-pages(7)
         
        -NAME
        +NAME
                man-pages - conventions for writing Linux man pages
         
        -DESCRIPTION
        -       The  following  table  lists  some preferred terms to use in 
man pages,
        +DESCRIPTION
        +       The following table lists some preferred terms to use in man 
pages,
                mainly to ensure consistency across pages.
         
                Term       Avoid using   Notes
        -       ────────────────────────────────
        +       ───────────────────────────────╴ ─
                bit mask   bitmask
                built-in   builtin
         
        -Linux man-pages (unreleased)      2025-08-21                      
man-pages(7)
        +Linux man-pages (unreleased)      2025-08-21                      
man-pages(7)
        alx@debian:~/tmp$ mandoc -man -Tlint ./man-pages.7 
        mandoc: ./man-pages.7:13:1: ERROR: ignoring data in spanned tbl cell: \&
        mandoc: ./man-pages.7:1:5: STYLE: lower case character in document 
title: TH man-pages


I suspect the glitch in the separating line has something to do with the
diagnostic.


Cheers,
Alex

> I put the table quoted above into a man(7) file, changed the blank
> line to "\&", amd mandoc -T lint does not emit the message you show.
> 
> I'm not surprised that it doesn't, because that table does not
> contain any spanned cells, just look at the layout line.
> 
> What exactly are you doing to get that message?
> 
> Also, mandoc(1) output looks fine with the "\&" line,
> which does not surprise me, either.
> 
> Yours,
>   Ingo

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature

Reply via email to