Package: keyboard-configuration Version: 1.234 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 -rCHECKSTYLE=10 -ww -z < "man page" [Use "groff -e ' $' -e '\\~$' <file>" to find obvious 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>:64: warning: trailing space in the line troff:<stdin>:97: 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.12.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 keyboard-configuration depends on: ii debconf [debconf-2.0] 1.5.89 ii liblocale-gettext-perl 1.07-7+b1 ii xkb-data 2.42-1 keyboard-configuration recommends no packages. keyboard-configuration suggests no packages. Versions of packages console-setup depends on: ii console-setup-linux 1.234 ii debconf [debconf-2.0] 1.5.89 ii xkb-data 2.42-1 Versions of packages console-setup suggests: ii locales 2.40-6 ii lsb-base 11.6 ii sysvinit-utils [lsb-base] 3.13-1 Versions of packages console-setup-linux depends on: ii init-system-helpers 1.68 ii initscripts 3.13-1 ii kbd 2.7.1-2 Versions of packages console-setup-linux suggests: ii console-setup 1.234 Versions of packages keyboard-configuration is related to: pn console-common <none> pn console-data <none> pn console-tools <none> pn gnome-control-center <none> ii kbd 2.7.1-2 ii systemd 257.2-3 -- debconf information excluded
Input file is keyboard.5 Output from "mandoc -T lint keyboard.5": (shortened list) 1 input text line longer than 80 bytes: Unfortunately, there... 2 whitespace at end of input line -.-. Output from "test-groff -mandoc -t -ww -z keyboard.5": (shortened list) 2 trailing space in the line -.-. Remove space characters (whitespace) at the end of lines. Use "git apply ... --whitespace=fix" to fix extra space issues, or use global configuration "core.whitespace". Number of lines affected is 2 -.-. Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em), if one is intended. " \(em " creates a too big gap in the text (in "troff"). 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 "-" (begin of an option or end of options) then use "\-\-". keyboard.5:174:udevadm trigger --subsystem-match=input --action=change -.-. Add a comma (or \&) after "e.g." and "i.e.", or use English words (man-pages(7)). Abbreviation points should be protected against being interpreted as an end of sentence, if they are not, and that independent of the current place on the line. 182:When a triple-layout is used on the console, i.e. a layout with three -.-. 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. Mark a final abbreviation point as such by suffixing it with "\&". Some sentences (etc.) do not begin on a new line. 14:file describes the properties of the keyboard. It is read by 30:Toman and Ivan U. Pascal: 72:keyboard layout name. This is usually the country or language type of 73:the keyboard. Default: 81:keyboard variant components. These can be used to further specify the 82:keyboard layout details. Default: not set. 182:When a triple-layout is used on the console, i.e. a layout with three -.-. 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 26, length 140 Unfortunately, there is little documentation how to use them. Description of all possible values for these options can be found in the file -.-. Put a parenthetical sentence, phrase on a separate line, if not part of a code. See man-pages(7), item "semantic newline". keyboard.5:54:Only one assignment is allowed per line. Comments (starting with '#') keyboard.5:188:console (only the first and the second layout are taken into account). keyboard.5:236:keyboard led as indicator for the current layout (US or Greek). -.-. Use a character "\(->" instead of plain "->" or "\->". 185:\-> Group2 \-> Group1 \-> Group3. -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ": troff:<stdin>:64: warning: trailing space in the line troff:<stdin>:97: warning: trailing space in the line
--- keyboard.5 2025-02-11 23:24:14.694757994 +0000 +++ keyboard.5.new 2025-02-11 23:55:21.036438407 +0000 @@ -11,7 +11,8 @@ keyboard \- keyboard configuration file .SH DESCRIPTION The .B keyboard -file describes the properties of the keyboard. It is read by +file describes the properties of the keyboard. +It is read by .BR setupcon (1) in order to configure the keyboard on the console. In Debian systems the default keyboard layout is described in @@ -23,11 +24,13 @@ The specification of the keyboard layout file is based on the .SM XKB options XkbModel, XkbLayout, XkbVariant and XkbOptions. -Unfortunately, there is little documentation how to use them. Description of all possible values for these options can be found in the file +Unfortunately, there is little documentation how to use them. +Description of all possible values for these options can be found in the +file .IR base.lst . .P You might want to read \*(lqThe XKB Configuration Guide\*(rq by Kamil -Toman and Ivan U. Pascal: +Toman and Ivan U.\& Pascal: .IP http://www.xfree86.org/current/XKB-Config.html .P @@ -51,7 +54,8 @@ format: .IP .IR VARIABLE = VALUE .PP -Only one assignment is allowed per line. Comments (starting with '#') +Only one assignment is allowed per line. Comments +(starting with '#') are also allowed. .SH OPTIONS @@ -61,7 +65,7 @@ The following variables can be set. .B XKBMODEL Specifies the .SM XKB -keyboard model name. Default: +keyboard model name. Default: .B pc105 on most platforms. @@ -69,8 +73,10 @@ on most platforms. .B XKBLAYOUT Specifies the .SM XKB -keyboard layout name. This is usually the country or language type of -the keyboard. Default: +keyboard layout name. +This is usually the country +or language type of the keyboard. +Default: .B us on most platforms @@ -78,8 +84,9 @@ on most platforms .B XKBVARIANT Specifies the .SM XKB -keyboard variant components. These can be used to further specify the -keyboard layout details. Default: not set. +keyboard variant components. +These can be used to further specify the keyboard layout details. +Default: not set. .TP .B XKBOPTIONS @@ -94,7 +101,7 @@ Default: not set. .TP .B BACKSPACE -Determines the behavior of +Determines the behavior of .nh .SM <BackSpace> .hy @@ -171,7 +178,7 @@ system, or use .in +4n .nf -udevadm trigger --subsystem-match=input --action=change +udevadm trigger \-\-subsystem-match=input \-\-action=change .fi .in @@ -179,13 +186,14 @@ In order to activate the changes on the .BR setupcon (1) . .SH BUGS -When a triple-layout is used on the console, i.e. a layout with three +When a triple-layout is used on the console, +i.e., a layout with three .SM XKB groups, then the group toggling happens in the following way: Group1 -\-> Group2 \-> Group1 \-> Group3. +\(-> Group2 \(-> Group1 \(-> Group3. .P -On FreeBSD triple- and quadruple-layouts are not supported on the -console (only the first and the second layout are taken into account). +On FreeBSD triple- and quadruple-layouts are not supported on the console +(only the first and the second layout are taken into account). .P The option .B grp:shifts_toggle @@ -233,7 +241,8 @@ and Greek layout. The option .B grp_led:scroll is ignored on the console but in X in means to use the ScrollLock -keyboard led as indicator for the current layout (US or Greek). +keyboard led as indicator for the current layout +(US or Greek). .in +4n .nf
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 -.- Any "autogenerator" should check its products with the above mentioned 'groff', 'mandoc', and additionally with 'nroff ...'. It should also check its input files for too long (> 80) lines. This is just a simple quality control measure. The "autogenerator" may have to be corrected to get a better man page, the source file may, and any additional file may. Common defects: 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. Line length should thus be reduced. The script "reportbug" uses 'quoted-printable' encoding when a line is longer than 1024 characters in an 'ascii' file. 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 -d -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 from 'diff -d -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) -.-