Package: console-setup
Version: 1.233
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:<stdin>:28: 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)

Versions of packages console-setup depends on:
ii  console-setup-linux     1.233
ii  debconf [debconf-2.0]   1.5.87
ii  keyboard-configuration  1.233
ii  xkb-data                2.42-1

console-setup recommends no packages.

Versions of packages console-setup suggests:
ii  locales                    2.40-4
ii  lsb-base                   11.6
ii  sysvinit-utils [lsb-base]  3.11-1

Versions of packages keyboard-configuration depends on:
ii  debconf [debconf-2.0]   1.5.87
ii  liblocale-gettext-perl  1.07-7+b1
ii  xkb-data                2.42-1

Versions of packages console-setup-linux depends on:
ii  init-system-helpers     1.67
ii  initscripts             3.11-1
ii  kbd                     2.6.4-3
ii  keyboard-configuration  1.233

console-setup-linux suggests no packages.

Versions of packages console-setup is related to:
pn  console-common        <none>
pn  console-data          <none>
pn  console-tools         <none>
pn  gnome-control-center  <none>
ii  kbd                   2.6.4-3
ii  systemd               257~rc3-1

-- debconf information excluded
Input file is ckbcomp.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  ckbcomp.1 ": (shortened list)

      1 input text line longer than 80 bytes
      1 whitespace at end of input line

-.-.

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

      1 trailing space in the line

-.-.

Output from "mandoc -T lint  ckbcomp.1 ":

mandoc: ckbcomp.1:10:93: STYLE: input text line longer than 80 bytes: ckbcomp 
\- compile a...
mandoc: ckbcomp.1:28:36: 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".

28:difference between the arguments of 

-.-.

Use the correct macro for the font change of a single argument or
split the argument into two.

90:.IR /usr/share/X11/xkb
92:.IR /etc/X11/xkb
100:.BI -compact
104:.BI -freebsd

-.-.

Use "\e" to print the escape character instead of "\\" (which gets
interpreted in copy mode).

192:kbdcontrol -f 70 "`printf '\\033[3~'`"

-.-.

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.

33:.I -charmap
35:.I -charmap
43:.BR -? , -help
46:.BI -charmap\  charmap
82:.BI -I dir
95:.BI -v\  level
100:.BI -compact
104:.BI -freebsd
107:.BR -backspace\  [ bs | del ]
148:.BI -symbols\  name
151:.BI -keycodes\  name
154:.BI -rules\  name
157:.BI -model\  name
160:.BI -layout\  name
163:.BI -variant\  name
166:.BI -option\  name
180:.I -freebsd
182:.IR -backspace\ del ,
192:kbdcontrol -f 70 "`printf '\\033[3~'`"

-.-.

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.

112:keys. Value

-.-.

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 10, length 93

ckbcomp \- compile a XKB keyboard description to a keymap suitable for loadkeys 
or kbdcontrol


-.-.

Two or more space charaters between printable characters.

When the distance is between sentences,
start the beginning of the second one on a separate line
("semantic newline", see man-pages(7)).

27:dumps the generated keyboard definition.  The most important
34:when non-Unicode keyboard map is wanted.  Without
47:The encoding to use for the output keymap.  There should be an
85:for files included by the keymap description.  This option may be used
86:multiple times.  If a file can not be found in any of the specified
96:Set level of detail for listing.  The argument
145:specified directly on the command line.  See the synopsis of the
188:special  code by using the following command:

-.-.

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

troff:<stdin>:28: warning: trailing space in the line
--- ckbcomp.1   2024-12-08 09:49:55.687006947 +0000
+++ ckbcomp.1.new       2024-12-08 10:07:44.209280095 +0000
@@ -7,7 +7,8 @@
 .\"
 .TH CKBCOMP 1 2011-03-17 console-setup "Console-setup User's Manual"
 .SH NAME
-ckbcomp \- compile a XKB keyboard description to a keymap suitable for 
loadkeys or kbdcontrol
+ckbcomp \- compile a XKB keyboard description to a keymap suitable for \
+loadkeys or kbdcontrol
 
 .SH SYNOPSIS
 .B ckbcomp
@@ -24,15 +25,16 @@ or
 .P
 On its standard output
 .B ckbcomp
-dumps the generated keyboard definition.  The most important
-difference between the arguments of 
+dumps the generated keyboard definition.
+The most important difference between the arguments of
 .BR setxkbmap (1)
 and the arguments of
 .B ckbcomp
 is the additional parameter
-.I -charmap
-when non-Unicode keyboard map is wanted.  Without
-.I -charmap
+.I \-charmap
+when non-Unicode keyboard map is wanted.
+Without
+.I \-charmap
 .B ckbcomp
 will generate Unicode keyboard.
 
@@ -40,12 +42,12 @@ will generate Unicode keyboard.
 .SH OPTIONS
 .SS General options
 .TP
-.BR -? , -help
+.BR \-? , \-help
 Print a usage message and exit.
 .TP
-.BI -charmap\  charmap
-The encoding to use for the output keymap.  There should be an
-character mapping table defining this encoding in
+.BI \-charmap\  charmap
+The encoding to use for the output keymap.
+There should be an character mapping table defining this encoding in
 .IR /usr/share/consoletrans .
 Definitions of the following charmaps are provided:
 .nh
@@ -79,37 +81,40 @@ Definitions of the following charmaps ar
 .hy
 
 .TP
-.BI -I dir
+.BI \-I dir
 Look in the top-level directory
 .I dir
-for files included by the keymap description.  This option may be used
-multiple times.  If a file can not be found in any of the specified
-directories, it will be searched also in some other standard
-locations, such as
+for files included by the keymap description.
+This option may be used multiple times.
+If a file can not be found in any of the specified directories,
+it will be searched also in some other standard locations,
+such as
 .IR /etc/console-setup/ckb ,
-.IR /usr/share/X11/xkb
+.I /usr/share/X11/xkb
 and
-.IR /etc/X11/xkb
+.I /etc/X11/xkb
 
 .TP
-.BI -v\  level
-Set level of detail for listing.  The argument
+.BI \-v\  level
+Set level of detail for listing.
+The argument
 .I level
 must be a number from 1 to 10.
 .TP
-.BI -compact
+.B \-compact
 Generate a compact keymap with at most two xkb groups and two levels
 in each or only one xkb-group and up to four levels.
 .TP
-.BI -freebsd
+.B \-freebsd
 Generate a keymap for FreeBSD.
 .TP
-.BR -backspace\  [ bs | del ]
+.BR \-backspace\  [ bs | del ]
 Specifies the behaviour of the
 .SM <BackSpace>
 and
 .SM <Delete>
-keys. Value
+keys.
+Value
 .B bs
 specifies VT100-conformant behaviour:
 .nh
@@ -141,29 +146,30 @@ and
 will generate a special function sequence.
 
 .SS XKB Keyboard Description
-The keyboard layout, variant and options components can be also
-specified directly on the command line.  See the synopsis of the
-command.
+The keyboard layout,
+variant and options components
+can be also specified directly on the command line.
+See the synopsis of the command.
 .TP
-.BI -symbols\  name
+.BI \-symbols\  name
 Specifies the symbols component name of the XKB keyboard description.
 .TP
-.BI -keycodes\  name
+.BI \-keycodes\  name
 Specifies the keycodes component name of the XKB keyboard description.
 .TP
-.BI -rules\  name
+.BI \-rules\  name
 The name of the rules file to use.
 .TP
-.BI -model\  name
+.BI \-model\  name
 Specifies the keyboard model used to choose the component names.
 .TP
-.BI -layout\  name
+.BI \-layout\  name
 Specifies the layout used to choose the component names.
 .TP
-.BI -variant\  name
+.BI \-variant\  name
 Specifies the layout variant used to choose the component names.
 .TP
-.BI -option\  name
+.BI \-option\  name
 Adds an option used to choose component names.
 
 .SH FILES
@@ -177,19 +183,19 @@ Adds an option used to choose component
 
 .SH NOTES
 If the option
-.I -freebsd
+.I \-freebsd
 is used together with
-.IR -backspace\ del ,
+.IR \-backspace\ del ,
 then the key
 .SM <Delete>
 will generate the special code
 .BR fkey70 .
 It is your responsibility to assign the appropriate sequence to this
-special  code by using the following command:
+special code by using the following command:
 .in +4n
 .nf
 
-kbdcontrol -f 70 "`printf '\\033[3~'`"
+kbdcontrol \-f 70 "`printf '\e033[3~'`"
 
 .fi
 .in

Reply via email to