unshar.1: Some remarks and editorial changes for this man page
Bjarni Ingi Gislason <[email protected]> Sat, 21 Sep 2024 13:50:12 +0000
| Newsgroups | gmane.comp.gnu.utils.bugs |
|---|---|
| Message-ID | <172692649861.14202.9615359264110555354.reportbug@kassi.invalid.is> |
--Qh/9jg0veq1Epzah
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Package: sharutils
Version: 1:4.15.2-9
Severity: minor
Tags: patch
* What led up to the situation?
Checking for defects with
[test-]groff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z < "man page"
[test-groff is a script in the repository for "groff"] (local copy and
"troff" slightly changed by me).
* What was the outcome of this action?
troff: backtrace: file '<stdin>':30
troff:<stdin>:30: warning: register 'Pp' not defined
* What outcome did you expect instead?
No output (no warnings).
-.-
General remarks and further material, if a diff-file exist, are in the
attachments.
-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.10.9-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages sharutils depends on:
ii libc6 2.40-2
sharutils recommends no packages.
Versions of packages sharutils suggests:
pn bsd-mailx | mailx <none>
pn sharutils-doc <none>
-- no debconf information
--Qh/9jg0veq1Epzah
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="chk_man.err.unshar.1"
Any program (person), that produces man pages, should check its content for
defects by using
groff -mandoc -t -ww -b -z [ -K utf8 | k ] <man page>
The same goes for man pages that are used as an input.
For a style guide use
mandoc -T lint
-.-
So any 'generator' should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.
This is just a simple quality control measure.
The 'generator' may have to be corrected to get a better man page,
the source file may, and any additional file may.
Common defects:
Input text line longer than 80 bytes.
Not removing trailing spaces (in in- and output).
The reason for these trailing spaces should be found and eliminated.
Not beginning each input sentence on a new line.
Lines should thus be shorter.
See man-pages(7), item 'semantic newline'.
-.-
The difference between the formatted outputs can be seen with:
nroff -mandoc <file1> > <out1>
nroff -mandoc <file2> > <out2>
diff -u <out1> <out2>
and for groff, using
"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - "
instead of \'nroff -mandoc\'
Add the option \'-t\', if the file contains a table.
Read the output of \'diff -u\' with \'less -R\' or similar.
-.-.
If \'man\' (man-db) is used to check the manual for warnings,
the following must be set:
The option "-warnings=w"
The environmental variable:
export MAN_KEEP_STDERR=yes (or any non-empty value)
or
(produce only warnings):
export MANROFFOPT="-ww -b -z"
export MAN_KEEP_STDERR=yes (or any non-empty value)
-.-.
Output from "mandoc -T lint unshar.1": (possibly shortened list)
mandoc: unshar.1:127:2: WARNING: skipping paragraph macro: PP empty
mandoc: unshar.1:164:2: WARNING: skipping paragraph macro: PP empty
mandoc: unshar.1:174:95: STYLE: input text line longer than 80 bytes: This program is rele...
-.-.
Change '-' (\-) to '\(en' (en-dash) for a numeric range.
GNU gnulib has recently (2023-06-18) updated its
"build_aux/update-copyright" to recognize "\(en" in man pages.
unshar.1:173:Copyright (C) 1994-2015 Free Software Foundation, Inc. all rights reserved.
-.-.
Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em),
if one is intended. An en-dash is usually surrounded by a space,
while an em-dash is used without spaces.
"man" (1 byte characters in input) transforms an en-dash (\(en) to one
HYPHEN-MINUS,
and an em-dash to two HYPHEN-MINUSES without considering the space
around it.
If "--" are two single "-" (end of options) then use "\-\-".
unshar.1:71:This is an alias for the \fI--overwrite\fR option.
unshar.1:89:\fB--split-at=--\fP. The signature will then be skipped, along with
unshar.1:99:\fB--split-at="exit 0"\fP.
-.-.
Change -- in x--y to \(em (em-dash), or, if an
option, to \-\-
71:This is an alias for the \fI--overwrite\fR option.
89:\fB--split-at=--\fP. The signature will then be skipped, along with
99:\fB--split-at="exit 0"\fP.
-.-.
Change a HYPHEN-MINUS (code 0x2D) to a minus(-dash) (\-),
if it
is in front of a name for an option,
is a symbol for standard input,
is a single character used to indicate an option,
or is in the NAME section (man-pages(7)).
N.B. - (0x2D), processed as a UTF-8 file, is changed to a hyphen
(0x2010, groff \[u2010] or \[hy]) in the output.
67:shell archive scripts accept a \fB-c\fP argument to indicate that
71:This is an alias for the \fI--overwrite\fR option.
89:\fB--split-at=--\fP. The signature will then be skipped, along with
99:\fB--split-at="exit 0"\fP.
-.-.
Wrong distance between sentences in the input file.
Separate the sentences and subordinate clauses; each begins on a new
line. See man-pages(7) ("Conventions for source file layout") and
"info groff" ("Input Conventions").
The best procedure is to always start a new sentence on a new line,
at least, if you are typing on a computer.
Remember coding: Only one command ("sentence") on each (logical) line.
E-mail: Easier to quote exactly the relevant lines.
Generally: Easier to edit the sentence.
Patches: Less unaffected text.
Search for two adjacent words is easier, when they belong to the same line,
and the same phrase.
The amount of space between sentences in the output can then be
controlled with the ".ss" request.
173:Copyright (C) 1994-2015 Free Software Foundation, Inc. all rights reserved.
-.-.
Name of a manual is set in bold, the section in roman.
See man-pages(7).
166:shar(1)
-.-.
Output from "test-groff -b -mandoc -rF0 -rHY=0 -K utf8 -t -ww -z ":
troff: backtrace: file '<stdin>':30
troff:<stdin>:30: warning: register 'Pp' not defined
-.-
Additionally:
Add definition of register 'Pp' (paragraph space)
--Qh/9jg0veq1Epzah
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="unshar.1.diff"
--- unshar.1 2024-09-21 13:11:02.279379640 +0000
+++ unshar.1.new 2024-09-21 13:39:59.941013628 +0000
@@ -1,3 +1,11 @@
+.\" PARAGRAPH SPACE
+.if t \{\
+. nr Pp .5v
+.\}
+.if n \{\
+. nr Pp 1v
+.\}
+.
.de1 NOP
. it 1 an-trap
. if \\n[.$] \,\\$*\/
@@ -64,11 +72,11 @@ to insert a \fBcd <dir>\fP commad at the
overwrite any pre-existing files.
.sp
This option is passed through as an option to the shar file. Many
-shell archive scripts accept a \fB-c\fP argument to indicate that
+shell archive scripts accept a \fB\-c\fP argument to indicate that
existing files should be overwritten.
.TP
.NOP \f\*[B-Font]\-f\f[], \f\*[B-Font]\-\-force\f[]
-This is an alias for the \fI--overwrite\fR option.
+This is an alias for the \fI\-\-overwrite\fR option.
.TP
.NOP \f\*[B-Font]\-E\f[] \f\*[I-Font]split\-mark\f[], \f\*[B-Font]\-\-split\-at\f[]=\f\*[I-Font]split\-mark\f[]
split input on \fBsplit-mark\fP lines.
@@ -86,7 +94,7 @@ readily identifiable string at the start
.sp
For example, noticing that most `.signatures' have a double hyphen
("--") on a line right before them, one can then sometimes use
-\fB--split-at=--\fP. The signature will then be skipped, along with
+\fB\-\-split-at=--\fP. The signature will then be skipped, along with
the headers of the following message.
.TP
.NOP \f\*[B-Font]\-e\f[], \f\*[B-Font]\-\-exit\-0\f[]
@@ -96,7 +104,7 @@ split-at.
.sp
Most shell archives end with a line consisting of simply "exit 0".
This option is equivalent to (and conflicts with)
-\fB--split-at="exit 0"\fP.
+\fB\-\-split-at="exit 0"\fP.
.TP
.NOP \f\*[B-Font]\-D\f[], \f\*[B-Font]\-\-debug\f[]
debug the shell code.
@@ -124,7 +132,6 @@ out of order.
Output version of program and exit. The default mode is `v', a simple
version. The `c' mode will print copyright information and `n' will
print the full copyright notice.
-.PP
.SH "OPTION PRESETS"
Any option that is not marked as \fInot presettable\fP may be preset
by loading values from configuration ("RC" or ".INI") file(s).
@@ -161,16 +168,15 @@ A specified configuration file could not
.NOP 70 " (EX_SOFTWARE)"
libopts had an internal operational error. Please report
it to [email protected]. Thank you.
-.PP
.SH "SEE ALSO"
-shar(1)
+.BR shar (1)
.SH AUTHORS
The \fIshar\fP and \fIunshar\fP programs is the collective work of
many authors. Many people contributed by reporting problems,
suggesting various improvements or submitting actual code. A list of
these people is in the \fITHANKS\fP file in the sharutils distribution.
.SH "COPYRIGHT"
-Copyright (C) 1994-2015 Free Software Foundation, Inc. all rights reserved.
+Copyright (C) 1994\(en2015 Free Software Foundation, Inc.\& all rights reserved.
This program is released under the terms of the GNU General Public License, version 3 or later.
.SH BUGS
Please put \fBsharutils\fP in the subject line for emailed bug
--Qh/9jg0veq1Epzah--