Re: Errors in man pages, here: signal.2

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

 



At 2021-08-10T03:46:23+0200, Michael Kerrisk (man-pages) wrote:
> On 7/27/21 9:03 PM, Jakub Wilk wrote:
> > * Michael Kerrisk <mtk.manpages@xxxxxxxxx>, 2021-07-25, 23:02:
> >>> Man page: signal.2
> >>> Issue: Such paragraphs shouldn't be no-wrap
> >>>
> >>> "B<WARNING>:\n"
> >>> " the behavior of\n"
> >>> "B<signal>()\n"
> >>> "varies across UNIX versions,\n"
[...]
> >>
> >> I don't understand this report, and can't see a problem. Please
> >> elaborate.
> > 
> > I think the problem is that the spurious space before "the behavior"
> > is confusing po4a.
> 
> Thanks, Jakub. I fixed that.

My interpretation would be not that po4a was getting confused, but that
it was taking roff(7) language input at its word, where the default
semantics of a leading space in filled text are that it causes a break
and indents the line by however many spaces are present.

Here's some material from the groff Texinfo manual in the forthcoming
1.23.0 release.

[[
A blank input line not only causes a break, but by default it also
outputs a one-line vertical space (effectively a blank output line).
This behavior can be modified; see *note Blank Line Traps::.  Macro
packages may discourage or disable the blank line method of paragraphing
in favor of their own macros.

A line that begins with one or more spaces causes a break.  The spaces
are output at the beginning of the next line without being _adjusted_
(see below); however, this behavior can be modified (*note Leading Space
Traps::).  Again, macro packages may provide other methods of producing
indented paragraphs.  Trailing spaces on text lines are ignored.(1)
(*note Breaking-Footnote-1::)
]]

I've changed the groff man(7) macro package to install traps to warn of
blank lines and filled lines with leading spaces if the CHECKSTYLE
register is set to a value of 3 or greater.

Here's an example of style-checking the signal.2 page as of commit
1d767b55 (22 March) with groff in development.

$ ./groff/build/test-groff -Tutf8 -man -rCHECKSTYLE=3 -z man-pages/man2/signal.2
an.tmac:man-pages/man2/signal.2:49: style: 1 leading space(s) on input line
an.tmac:man-pages/man2/signal.2:163: style: .BR expects at least 2 arguments, got 1
an.tmac:man-pages/man2/signal.2:179: style: .BR expects at least 2 arguments, got 1
an.tmac:man-pages/man2/signal.2:254: style: .BR expects at least 2 arguments, got 1

The register has to be set to enable style checking; the above
diagnostics will not be presented to innocent man page readers.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux