Package: x11-xkb-utils
Version: 7.7+8+b1
Severity: minor
Tags: patch

Dear Maintainer,

   * What led up to the situation?

     Checking for defects with

[test-][g|n]roff -mandoc -t -K utf8 -ww -b -z <man page>

  [test-groff is a script in the repository for "groff"]

   * What was the outcome of this action?

troff: backtrace: '/home/bg/git/groff/build/s-tmac/an.tmac':562: macro 'B'
troff: backtrace: file '<stdin>':50
troff:<stdin>:50: warning: special character '-+' not defined

   * What outcome did you expect instead?

     No output (warnings).

-.-

  Remarks and a patch are in the attachments.


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.7.12-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 x11-xkb-utils depends on:
ii  libc6        2.38-11
ii  libx11-6     2:1.8.7-1+b1
ii  libxaw7      2:1.0.14-1+b2
ii  libxkbfile1  1:1.1.0-1+b1
ii  libxrandr2   2:1.5.4-1
ii  libxt6t64    1:1.2.1-1.2

x11-xkb-utils recommends no packages.

x11-xkb-utils suggests no packages.

-- no debconf information
  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' 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.

-.-

The difference between the formatted outputs can be seen with:

  nroff -man <file1> > <out1>
  nroff -man <file2> > <out2>
  diff -u <out1> <out2>

and for groff, using

"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -man -Z - "

instead of "nroff -man"

  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 -z"

export MAN_KEEP_STDERR=yes (or any non-empty value)

-.-.

Output from "mandoc -T lint xkbvleds.1": (possibly shortened list)

mandoc: xkbvleds.1:41:2: WARNING: skipping paragraph macro: PP empty
mandoc: xkbvleds.1:48:2: WARNING: skipping paragraph macro: PP empty
mandoc: xkbvleds.1:52:2: WARNING: skipping paragraph macro: PP empty
mandoc: xkbvleds.1:56:2: WARNING: skipping paragraph macro: PP empty
mandoc: xkbvleds.1:60:2: WARNING: skipping paragraph macro: PP empty
mandoc: xkbvleds.1:64:2: WARNING: skipping paragraph macro: PP empty
mandoc: xkbvleds.1:68:2: WARNING: skipping paragraph macro: PP empty
mandoc: xkbvleds.1:72:2: WARNING: skipping paragraph macro: PP empty
mandoc: xkbvleds.1:76:2: WARNING: skipping paragraph macro: PP empty
mandoc: xkbvleds.1:80:2: WARNING: skipping paragraph macro: PP empty

-.-.

Wrong distance between sentences.

  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.

38:which includes the effective compatibility state. The default set of LEDs

-.-.

Put '[' and ']' around a choice in the DESCRIPTION.

-.-

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

troff: backtrace: '/home/bg/git/groff/build/s-tmac/an.tmac':562: macro 'B'
troff: backtrace: file '<stdin>':50
troff:<stdin>:50: warning: special character '-+' not defined

The character '-+' is only defined in the URW-fonts, which is provided in the
'groff'-software.

 Add a fallback character for '\[-+]' in troff mode and for the 'groff'
formatter.

--- xkbvleds.1  2024-06-02 14:14:55.842952010 +0000
+++ xkbvleds.1.new      2024-06-02 16:06:31.453013570 +0000
@@ -18,6 +18,13 @@
 .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 .\" DEALINGS IN THE SOFTWARE.
+.
+.\" Add a fallback character for \[-+], MINUS-OR-PLUS, unicode \[u2213]
+.if \n(.g \{\
+.  if t \{\
+.    if !c \[-+] .fchar \[-+] \-+
+.  \}
+.\}
 .TH xkbvleds 1 "xkbutils 1.0.5" "X Version 11"
 .SH NAME
 xkbvleds \- XKB extension user utility
@@ -35,49 +42,39 @@ xkbvleds \- XKB extension user utility
 .SH DESCRIPTION
 This program is used to display the state of LEDs on an XKB keyboard.
 It reports the changes in the fundamental components of the XKB state
-which includes the effective compatibility state. The default set of LEDs
-is \-union +name +automatic +real.
+which includes the effective compatibility state.
+The default set of LEDs is \-union +name +automatic +real.
 .SH OPTIONS
-.PP
 .TP 8
 .B \-indpy <name>
 Mask of LEDs to watch
 .TP 8
 .B \-watch <leds>
 turn on synchronization
-.PP
 .TP 8
-.B \[-+]automatic
+.RB [ \[-+] ] automatic
 (Don't) watch automatic LEDs
-.PP
 .TP 8
-.B \[-+]explicit
+.RB [ \[-+] ] explicit
 (Don't) watch explicit LEDs
-.PP
 .TP 8
-.B \[-+]name
+.RB [ \[-+] ] name
 (Don't) watch named LEDs
-.PP
 .TP 8
-.B \[-+]real
+.RB [ \[-+] ] real
 (Don't) watch real LEDs
-.PP
 .TP 8
-.B \[-+]virtual
+.RB [ \[-+] ] virtual
 (Don't) watch virtual LEDs
-.PP
 .TP 8
 .B \-intersection
 Watch only LEDs in all desired sets
-.PP
 .TP 8
 .B \-union
 Watch LEDs in any desired sets
-.PP
 .TP 8
 .B \-help
 print list of options and exit
-.PP
 .TP 8
 .B \-version
 print program version and exit

Reply via email to