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

Bug#1089856: developers-reference.1: Some remarks and a patch for editorial changes for this man page



Package: developers-reference
Version: 13.15
Severity: minor
Tags: patch

   * What led up to the situation?

     Checking for defects with a new version

test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -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:<stdin>:17: 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.10-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)

developers-reference depends on no packages.

Versions of packages developers-reference recommends:
ii  debian-policy            4.7.0.1
ii  libjs-jquery             3.6.1+dfsg+~3.5.14-1
ii  libjs-sphinxdoc          7.4.7-4
ii  sensible-utils           0.0.24
ii  sphinx-rtd-theme-common  3.0.2+dfsg-1

Versions of packages developers-reference suggests:
ii  doc-base                   0.11.2
ii  firefox-esr [www-browser]  128.5.0esr-1
ii  lynx [www-browser]         2.9.2-1
ii  w3m [www-browser]          0.5.3+git20230121-2+b3

-- no debconf information
Input file is developers-reference.1

  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  developers-reference.1": (shortened list)

      1 skipping paragraph macro
      1 whitespace at end of input line

-.-.

Output from "test-groff -mandoc -t -ww -z developers-reference.1": (shortened list)

      1 trailing space in the line

-.-.

Output from "mandoc -T lint  developers-reference.1":

mandoc: developers-reference.1:5:2: WARNING: skipping paragraph macro: br after SH
mandoc: developers-reference.1:17:31: STYLE: whitespace at end of input line

-.-.

Remove space characters at the end of lines.

Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

17:Osamu Aoki (osamu@debian.org). 

-.-.

Output from "test-groff  -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ":

troff:<stdin>:17: warning: trailing space in the line

-.-

Additional:

Add enougth place for the "BROWSER" item.
--- developers-reference.1	2024-12-14 06:44:24.221677419 +0000
+++ developers-reference.1.new	2024-12-14 07:01:56.872612965 +0000
@@ -2,19 +2,20 @@
 .SH NAME
 developers-reference \- guidelines and information for Debian developers
 .SH SYNOPSIS
-.br
 .B developers-reference
 .SH DESCRIPTION
-This is a small script that starts your favorite browser and displays
-the index page
+This is a small script
+that starts your favorite browser
+and displays the index page
 .I file:///usr/share/developers-reference/index.html
 of the developers-reference package.
 .SH ENVIRONMENT
-.IP BROWSER
+.nr width \w'BROWSER  '
+.IP BROWSER \n[width]u
 The browser used to display the HTML files.
 
 .SH AUTHOR
-Osamu Aoki (osamu@debian.org). 
+Osamu Aoki (osamu@debian.org).
 .PP
 This document may be used under the terms of the GNU General Public
 License version 2 or higher.

Reply to: