Bug#1087944: update-catalog.8: Some remarks and editorial changes for this man page
Package: sgml-base
Version: 1.31
Severity: minor
Tags: patch
* What led up to the situation?
Checking for defects with
test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z < "man page"
[Use "groff -e ' $' <file>" to find trailing spaces.]
["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).
[The fate of "test-nroff" was decided in groff bug #55941.]
* What was the outcome of this action?
troff: backtrace: file '<stdin>':36
troff:<stdin>:36: warning: trailing space in the line
* 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.11.7-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 sgml-base depends on:
ii dpkg 1.22.11
sgml-base recommends no packages.
Versions of packages sgml-base suggests:
pn sgml-base-doc <none>
-- no debconf information
Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)
[gn]roff -mandoc -t -ww -b -z -K utf8 <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 output of the original and patched file
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 update-catalog.8": (shortened list)
3 input text line longer than 80 bytes
1 skipping paragraph macro
1 whitespace at end of input line
-.-.
Output from "test-groff -mandoc -t -ww -b -z update-catalog.8": (shortened list)
1 trailing space in the line
-.-.
mandoc: update-catalog.8.new:34:2: WARNING: skipping paragraph macro: PP after SH
-.-.
Remove space characters at the end of lines.
Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".
36:inserts, updates or removes entries in the
-.-.
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.
update-catalog.8:114:Copyright \(co 2001-2004 Ardo van Rangelrooij
-.-.
Change -- in x--y to \(em (em-dash), or, if an
option, to \-\-
20:.B --add
25:.B --remove
30:.B --update-super
46:.B --update-super
55:.B --add
61:.B --remove
67:.B --update-super
75:.B --quiet
78:.B --test
82:.B --version
85:.B --help
95:.IR --update-super
-.-.
Use the correct macro for the font change of a single argument or
split the argument into two.
40:.IR /etc/sgml/catalog
42:.IR /etc/sgml
69:.IR /etc/sgml
91:.IR /etc/sgml/catalog
94:.IR update-catalog
95:.IR --update-super
98:.IR /etc/sgml
-.-.
Split lines longer than 80 characters into two or more lines.
Appropriate break points are the end of a sentence and a subordinate
clause; after punctuation marks.
Line 45, length 102
extension or remove (or move) existing centralized catalogs and regenerate the super catalog using the
Line 103, length 113
Before adding a catalog to the super catalog it is parsed and verified in order to not corrupt the super catalog.
Line 106, length 117
This check ensures that a catalog from a package, which is removed but not purged, is removed from the super catalog.
-.-.
Two or more space charaters between printable characters
118:later for copying conditions. There is
-.-.
Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z ":
troff: backtrace: file '<stdin>':36
troff:<stdin>:36: warning: trailing space in the line
--- update-catalog.8 2024-11-20 13:55:48.820578990 +0000
+++ update-catalog.8.new 2024-11-20 14:33:18.715927032 +0000
@@ -17,33 +17,33 @@ update-catalog \- create or update entry
.SH SYNOPSIS
.B update-catalog
.RI [ options ]
-.B --add
+.B \-\-add
.I centralized_catalog ordinary_catalog
.PP
.B update-catalog
.RI [ options ]
-.B --remove
+.B \-\-remove
.I centralized_catalog ordinary_catalog
.PP
.B update-catalog
.RI [ options ]
-.B --update-super
+.B \-\-update-super
.\"
.\" ----------------------------------------------------------------------
.SH DESCRIPTION
-.PP
.B update-catalog
-inserts, updates or removes entries in the
+inserts, updates or removes entries in the
SGML centralized catalogs located in
.IR /etc/sgml .
To change the SGML super catalog located in
-.IR /etc/sgml/catalog
+.I /etc/sgml/catalog
modify the directory contents of
-.IR /etc/sgml
+.I /etc/sgml
to contain new files or symbolic links having a
.B .cat
-extension or remove (or move) existing centralized catalogs and regenerate the super catalog using the
-.B --update-super
+extension or remove (or move) existing centralized catalogs and regenerate
+the super catalog using the
+.B \-\-update-super
option.
See section
.B SUPER CATALOG
@@ -52,58 +52,61 @@ for details on the generation process.
.\" ----------------------------------------------------------------------
.SH OPTIONS
.TP
-.B --add
+.B \-\-add
Adds an entry for the
.I ordinary_catalog
in the
.IR centralized_catalog .
.TP
-.B --remove
+.B \-\-remove
Removes the entry for the
.I ordinary_catalog
from the
.IR centralized_catalog .
.TP
-.B --update-super
+.B \-\-update-super
Regenerates the SGML super catalog from the contents of the
-.IR /etc/sgml
+.I /etc/sgml
directory.
See section
.B SUPER CATALOG
for details on the super catalog generation.
.TP
-.B --quiet
+.B \-\-quiet
Prevents the usual diagnostic output.
.TP
-.B --test
+.B \-\-test
Prevents the update of the catalog and writes the resulting SGML
catalog to standard output.
.TP
-.B --version
+.B \-\-version
Displays the version information and exits.
.TP
-.B --help
+.B \-\-help
Display the usage information and exits.
.\"
.\" ----------------------------------------------------------------------
.SH SUPER CATALOG
The super-catalog located in
-.IR /etc/sgml/catalog
+.I /etc/sgml/catalog
cannot be directly modified.
It is generated by the
-.IR update-catalog
-.IR --update-super
+.I update-catalog
+.B \-\-update-super
command.
The generation considers files in the
-.IR /etc/sgml
+.I /etc/sgml
directory that have a
.B .cat
extension.
For instance files ending in .old or .disabled are not considered.
-Before adding a catalog to the super catalog it is parsed and verified in order to not corrupt the super catalog.
+Before adding a catalog to the super catalog it is parsed and verified in
+order to not corrupt the super catalog.
All referenced catalogs are verified to actually exist.
If the check fails, a message is printed and the complete catalog is ignored.
-This check ensures that a catalog from a package, which is removed but not purged, is removed from the super catalog.
+This check ensures that a catalog from a package,
+which is removed but not purged,
+is removed from the super catalog.
.\"
.\" ----------------------------------------------------------------------
.SH AUTHOR
@@ -111,11 +114,12 @@ Ardo van Rangelrooij <ardo@debian.org>
.\"
.\" ----------------------------------------------------------------------
.SH COPYRIGHT
-Copyright \(co 2001-2004 Ardo van Rangelrooij
+Copyright \(co 2001\(en2004 Ardo van Rangelrooij
Copyright \(co 2012 Helmut Grohne
This is free software; see the GNU General Public Licence version 2 or
-later for copying conditions. There is
+later for copying conditions.
+There is
.I no
warranty.
.\"
Reply to: