alsactl.1: Some remarks and a patch with editorial changes for this man page

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

 



Package: alsa-utils
Version: 1.2.14-1
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 

grep -n -e ' $' -e '\\~$' -e ' \\f.$' -e ' \\"' <file>

  to find (most) 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>:224: 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: 13.0
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.32-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 alsa-utils depends on:
ii  kmod              34.2-2
ii  libasound2t64     1.2.14-1
ii  libatopology2t64  1.2.14-1
ii  libc6             2.41-8
ii  libfftw3-single3  3.3.10-2+b1
ii  libncursesw6      6.5+20250216-2
ii  libsamplerate0    0.2.2-4+b2
ii  libtinfo6         6.5+20250216-2

alsa-utils recommends no packages.

Versions of packages alsa-utils suggests:
pn  dialog  <none>

-- no debconf information
Input file is alsactl.1

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

      2 input text line longer than 80 bytes

-.-.

Output from
test-nroff -mandoc -t -ww -z alsactl.1: (shortened list)

      1 line(s) with a trailing space

-.-.

Add a "\&" (or a comma (Oxford comma)) after an abbreviation
or use English words
(man-pages(7)).
Abbreviation points should be marked as such and protected against being
interpreted as an end of sentence, if they are not, and that independent
of the current place on the line.

214:necessary for some soundcard features (e.g. enabling/disabling

-.-.

Wrong distance (not two spaces) 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.

Split (sometimes) lines after a punctuation mark; before a conjunction.

  Lines with only one (or two) space(s) between sentences could be split,
so latter sentences begin on a new line.

Use

#!/usr/bin/sh

sed -e '/^\./n' \
-e 's/\([[:alpha:]]\)\.  */\1.\n/g' $1

to split lines after a sentence period.
Check result with the difference between the formatted outputs.
See also the attachment "general.bugs"

17:soundcard drivers. It supports multiple soundcards. If your card has
25:The \fI<card>\fP argument is optional. If no soundcards are specified,
36:configuration file. If restoring fails (eventually partly), the init
46:This command tries to initialize all devices to a default state. If device
76:The optional element identifiers are accepted as a filter. One extra
106:Select the configuration file to use. The default is /var/lib/alsa/asound.state.
110:Select the boot / hotplug ALSA configuration directory to use. The default is /var/lib/alsa.
133:Used with store, restore and init commands. Do not show 'No soundcards found'
152:Save restore and init state to this file. The file will contain only errors.
167:The configuration file for init. By default, PREFIX/share/alsa/init/00main
196:Execute also the 'defaults' section from the UCM configuration. The standard
201:Skip the UCM init even if available. It may be useful for the test the
207:soundcards. The settings include all the usual soundcard mixer
213:\fBalsactl store\fP. Editing the configuration file by hand may be
214:necessary for some soundcard features (e.g. enabling/disabling
231:<abramo@alsa\-project.org>. This document is by Paul Winkler <zarmzarm@xxxxxxxxx>.

-.-.

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.
Add "\:" to split the string for the output, "\<newline>" in the source.  

Line 7, length 93

\fBalsactl\fP [\fIoptions\fP] [\fIstore\fP|\fIrestore\fP|\fIinit\fP] <card # or id or device>

Line 110, length 92

Select the boot / hotplug ALSA configuration directory to use. The default is /var/lib/alsa.

Line 231, length 82

<abramo@alsa\-project.org>. This document is by Paul Winkler <zarmzarm@xxxxxxxxx>.

Longest line is number 7 with 93 characters

-.-.

Use \(en (en-dash) for a dash at the beginning (end) of a line,
or between space characters,
not a minus (\-) or a hyphen (-), except in the NAME section.

alsactl.1:162:ALSA_CONFIG_PATH to read different or optimized configuration - may be

-.-.

The name of a man page is typeset in bold and the section in roman
(see man-pages(7)).

220:amixer(1),
221:alsamixer(1),
222:aplay(1),
223:alsactl_init(7)

-.-.

Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".

alsactl.1:36:configuration file. If restoring fails (eventually partly), the init
alsactl.1:70:collected from the given control device (sound card).
alsactl.1:83:This command dumps the current state (all cards) to stdout.
alsactl.1:87:This command dumps the current configuration (all cards) to stdout.
alsactl.1:120:file (including the global state file).
alsactl.1:188:Set the process priority (see 'man nice')

-.-.

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

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

-.-

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.
--- alsactl.1	2025-06-18 23:16:43.957871692 +0000
+++ alsactl.1.new	2025-06-20 10:23:01.378898947 +0000
@@ -216,12 +216,11 @@ automatic mic gain, digital output, joys
 routing options, etc).
 
 .SH SEE ALSO
-\fB
-amixer(1),
-alsamixer(1),
-aplay(1),
-alsactl_init(7)
-\fP
+.BR \
+amixer "(1), " \
+alsamixer "(1), " \
+aplay "(1), " \
+alsactl_init (7)
 
 .SH BUGS
 None known.
  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>

  To find trailing space use

grep -n -e ' $' -e ' \\f.$' -e ' \\"' <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.

  "git" has a "tool" to point out whitespace,
see for example "git-apply(1)" and git-config(1)")

  Not beginning each input sentence on a new line.
Line length and patch size 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)

-.-

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux