groff
[Top][All Lists]
Advanced

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

Missing blank before SH due to PD 0 IP PD


From: Alejandro Colomar
Subject: Missing blank before SH due to PD 0 IP PD
Date: Mon, 22 May 2023 18:40:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

Hi Branden,

I had a typo in a man(7) page where for some reason I slipped an .IP
in the wrong place.  I had no warnings about that IP.  Neither
groff(1) nor mandoc(1) complained about it.  And BTW, mandoc(1)'s
behavior seems the right one to me.

We're lucky that this is not a regression, since groff-1.22.4 is
crappier (it has the same bug, and it even blows me with blank lines
in other unwanted places).

Here's the source:

 cat missing_blank.man 
.TH a s d f
.SH qwe
rty.
.IP \[bu] 3
asd.
.PD 0
.IP \[bu] 3
fgh.
.IP
.PD
.SH jkl
zxc.

And here's what different formatters have to say about it:

$ /usr/bin/groff -ww -man -Tutf8 ./missing_blank.man
a(s)                                                                      a(s)



qwe
       rty.

       •  asd.
       •  fgh.
jkl
       zxc.



f                                      d                                  a(s)


$ /usr/local/bin/groff -ww -rCHECKSTYLE=3 -man -Tutf8 ./missing_blank.man
an.tmac:./missing_blank.man:1: style: .TH missing fifth argument and second 
argument 's' not a recognized manual section; specify its title
an.tmac:./missing_blank.man:6: style: use of deprecated macro: .PD
an.tmac:./missing_blank.man:10: style: use of deprecated macro: .PD
a(s)                                                                      a(s)

qwe
       rty.

       •  asd.
       •  fgh.
jkl
       zxc.

f                                      d                                  a(s)


$ mandoc -Tlint ./missing_blank.man
mandoc: ./missing_blank.man:1:5: STYLE: lower case character in document title: 
TH a
mandoc: ./missing_blank.man:1:9: WARNING: cannot parse date, using it verbatim: 
TH d


$ mandoc -man ./missing_blank.man
a(s)                                                                      a(s)

qwe
       rty.

       •  asd.
       •  fgh.

jkl
       zxc.

f                                      d                                  a(s)


We can see how mandoc(1), even if it doesn't warn about an ignored IP,
it correctly puts a blank before "jkl".

Cheers,
Alex

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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