diff mbox series

arecordmidi.1: Some remarks and editorial changes for this man page

Message ID 173293654339.5079.9034847255158350049.reportbug@kassi.invalid.is (mailing list archive)
State New
Headers show
Series arecordmidi.1: Some remarks and editorial changes for this man page | expand

Commit Message

Bjarni Ingi Gislason Nov. 30, 2024, 3:18 a.m. UTC
Package: alsa-utils
Version: 1.2.12-1
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: backtrace: file '<stdin>':69
troff:<stdin>:69: warning: trailing space in the line
troff: backtrace: file '<stdin>':77
troff:<stdin>:77: warning: trailing space in the line

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

troff: backtrace: file '<stdin>':69
troff:<stdin>:69: warning: trailing space in the line
troff: backtrace: file '<stdin>':77
troff:<stdin>:77: 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 alsa-utils depends on:
ii  kmod              33+20240816-2
ii  libasound2t64     1.2.12-1+b1
ii  libatopology2t64  1.2.12-1+b1
ii  libc6             2.40-3
ii  libfftw3-single3  3.3.10-1+b3
ii  libncursesw6      6.5-2+b1
ii  libsamplerate0    0.2.2-4+b2
ii  libtinfo6         6.5-2+b1

alsa-utils recommends no packages.

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

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

      2 whitespace at end of input line

-.-.

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

      2 trailing space in the line

-.-.

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

mandoc: arecordmidi.1:69:73: STYLE: whitespace at end of input line
mandoc: arecordmidi.1:77:67: 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".

69:Metronome sounds are played on channel 10, MIDI notes 33 & 34 (GM2/GS/XG 
77:the numerator and denominator of the time signature as it would be 

-.-.

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.

36:name. A port is specified by its number; for port 0 of a client, the
78:notated. The denominator must be a power of two. Both numbers should be
79:separated by a colon. The time signature is 4:4 by default.

-.-.

Split a punctuation from a single argument, if a two-font macro is meant

32:.I \-p,\-\-port=client:port,...

-.-.

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

arecordmidi.1:47:Possible values are 24, 25, 29.97 (for 30 drop-frame), and 30.
arecordmidi.1:52:in ticks per beat (when using musical tempo) or ticks per frame

-.-.

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

troff: backtrace: file '<stdin>':69
troff:<stdin>:69: warning: trailing space in the line
troff: backtrace: file '<stdin>':77
troff:<stdin>:77: warning: trailing space in the line
diff mbox series

Patch

--- arecordmidi.1	2024-11-30 02:53:12.480984416 +0000
+++ arecordmidi.1.new	2024-11-30 03:01:19.447146661 +0000
@@ -29,12 +29,14 @@  Prints the current version.
 Prints a list of possible input ports.
 
 .TP
-.I \-p,\-\-port=client:port,...
+.IR \-p , \-\-port=client:port ,...
 Sets the sequencer port(s) from which events are recorded.
 
-A client can be specified by its number, its name, or a prefix of its
-name. A port is specified by its number; for port 0 of a client, the
-":0" part of the port specification can be omitted.
+A client can be specified by its number,
+its name, or a prefix of its name.
+A port is specified by its number;
+for port 0 of a client,
+the ":0" part of the port specification can be omitted.
 
 .TP
 .I \-b,\-\-bpm=beats
@@ -44,12 +46,16 @@  The default value is 120 BPM.
 .TP
 .I \-f,\-\-fps=frames
 Sets the SMPTE resolution, in frames per second.
-Possible values are 24, 25, 29.97 (for 30 drop-frame), and 30.
+Possible values are 24, 25, 29.97
+(for 30 drop-frame),
+and 30.
 
 .TP
 .I \-t,\-\-ticks=ticks
 Sets the resolution of timestamps (ticks) in the MIDI file,
-in ticks per beat (when using musical tempo) or ticks per frame
+in ticks per beat
+(when using musical tempo)
+or ticks per frame
 (when using SMPTE timing).
 The default value is 384 ticks/beat or 40 ticks/frame, respectively.
 
@@ -66,17 +72,19 @@  will generate a "format 0" file.
 .I \-m,\-\-metronome=client:port
 Plays a metronome signal on the specified sequencer port.
 
-Metronome sounds are played on channel 10, MIDI notes 33 & 34 (GM2/GS/XG 
+Metronome sounds are played on channel 10, MIDI notes 33 & 34 (GM2/GS/XG
 metronome standard notes), with velocity 100 and duration 1.
 
 .TP
 .I \-i,\-\-timesig=numerator:denominator
 Sets the time signature for the MIDI file and metronome.
 
-The time signature is specified as usual with two numbers, representing
-the numerator and denominator of the time signature as it would be 
-notated. The denominator must be a power of two. Both numbers should be
-separated by a colon. The time signature is 4:4 by default.
+The time signature is specified as usual with two numbers,
+representing the numerator and denominator of the time signature
+as it would be notated.
+The denominator must be a power of two.
+Both numbers should be separated by a colon.
+The time signature is 4:4 by default.
 
 .SH AUTHOR
 Clemens Ladisch <clemens@ladisch.de>