Package: moreutils
Version: 0.69-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 "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>:73: warning: font name 'CW' is deprecated
troff:<stdin>:74: 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.9-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 moreutils depends on:
ii  libc6                  2.40-5
ii  libipc-run-perl        20231003.0-2
ii  libtime-duration-perl  1.21-2
ii  libtimedate-perl       2.3300-2
ii  perl                   5.40.0-8

moreutils recommends no packages.

moreutils suggests no packages.

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

      1 input text line longer than 80 bytes: as used by \fBstrfti...
      1 whitespace at end of input line

-.-.

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

      1 font name 'CW' is deprecated
      1 trailing space in the line

-.-.

Show if Pod::Man generated this.

Who is actually creating this man page?  Debian or upstream?

Is the generating software out of date?

2:.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)

-.-.

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

1

-.-.

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 "\&".

73:as used by \fBstrftime\fR\|(3). The default format is "%b \f(CW%d\fR 
\f(CW%H:\fR%M:%S". In
80:the input to relative times, such as "15m5s ago". Many common timestamp
81:formats are supported. Note that the Time::Duration and Date::Parse perl
82:modules are required for this mode to work. Currently, converting localized
89:absolute ones. The default format changes to "%H:%M:%S", and "%.S" and "%.s" 
can
90:be used as well. In case of \-i, every timestamp will be the time elapsed 
since
91:the last timestamp. In case of \-s, the time elapsed since start of the 
program

-.-.

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 73, length 90

as used by \fBstrftime\fR\|(3). The default format is "%b \f(CW%d\fR 
\f(CW%H:\fR%M:%S". In

-.-.

Add a zero (0) in front of a decimal fraction that begins with a period
(.)

7:.if t .sp .5v

-.-.

No space is needed before a quote (") at the end of a line

58:.TH TS 1 2024-02-25 moreutils " "

-.-.

Use ".na" (no adjustment) instead of "ad l" and then ".ad" to begin the
same adjustment again as before

61:.if n .ad l

-.-.

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

troff:<stdin>:73: warning: font name 'CW' is deprecated
troff:<stdin>:74: warning: trailing space in the line

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

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

-.-.

Additionally:

Adjust font use in the macro Vb.

Change font CW to CR.
--- ts.1        2025-01-19 02:59:21.590514793 +0000
+++ ts.1.new    2025-01-19 03:08:05.395829356 +0000
@@ -4,11 +4,12 @@
 .\" Standard preamble:
 .\" ========================================================================
 .de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
+.if t .sp 0.5v
 .if n .sp
 ..
 .de Vb \" Begin verbatim text
-.ft CW
+.ie \\n(.g .ft CR
+.el ft CW
 .nf
 .ne \\$1
 ..
@@ -55,10 +56,10 @@
 .\" ========================================================================
 .\"
 .IX Title "TS 1"
-.TH TS 1 2024-02-25 moreutils " "
+.TH TS 1 2024-02-25 moreutils ""
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
-.if n .ad l
+.if n .na
 .nh
 .SH NAME
 ts \- timestamp input
@@ -70,8 +71,9 @@ ts [\-r] [\-i | \-s] [\-m] [format]
 ts adds a timestamp to the beginning of each line of input.
 .PP
 The optional format parameter controls how the timestamp is formatted,
-as used by \fBstrftime\fR\|(3). The default format is "%b \f(CW%d\fR 
\f(CW%H:\fR%M:%S". In
-addition to the regular strftime conversion specifications, 
+as used by \fBstrftime\fR\|(3).
+The default format is "%b \f(CR%d\fR \f(CR%H:\fR%M:%S".
+In addition to the regular strftime conversion specifications,
 "%.S" and "%.s" and "%.T"
 are like "%S" and "%s" and "%T", but provide subsecond resolution
 (ie, "30.00001" and "1301682593.00001" and "1:15:30.00001").

Reply via email to