Bug#1091762: pdfdetach.1: Some remarks and a patch with editorial changes for this man page

Bjarni Ingi Gislason bjarniig at simnet.is
Mon Dec 30 23:26:56 GMT 2024


Package: poppler-utils
Version: 24.08.0-3
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?


an.tmac:<stdin>:2: style: .TH missing fourth argument; consider package/project name and version (e.g., "groff 1.23.0")
an.tmac:<stdin>:33: misuse, warning: .BI is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.

   * 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.6-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 poppler-utils depends on:
ii  libc6          2.40-4
ii  libcairo2      1.18.2-2
ii  libfreetype6   2.13.3+dfsg-1
ii  liblcms2-2     2.16-2
ii  libpoppler140  24.08.0-3
ii  libstdc++6     14.2.0-8

poppler-utils recommends no packages.

poppler-utils suggests no packages.

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


-.-.

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

      1 .BI is for at least 2 arguments, got 1
      1 Use macro '.B' for one argument or split argument.

-.-.

Change '-' (\-) to '\(en' (en-dash) for a numeric range.
GNU gnulib has recently (2023-06-18) updated its
"build_aux/update-copyright" to recognize "\(en" in man pages.

pdfdetach.1:81:The pdfinfo software and documentation are copyright 1996-2011 Glyph &

-.-.

Use the correct macro for the font change of a single argument or
split the argument into two.

33:.BI \-saveall

-.-.

Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".
Not considered in a patch, too many lines.


pdfdetach.1:5:extractor (version 3.03)
pdfdetach.1:25:associated with the embedded file (as printed by the "\-list" switch);
pdfdetach.1:30:associated with the embedded file (as printed by the "\-list" switch);
pdfdetach.1:35:with the embedded files (as printed by the "\-list" switch).  By
pdfdetach.1:44:Sets the encoding to use for text output (embedded file names).

-.-.

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

an.tmac:<stdin>:2: style: .TH missing fourth argument; consider package/project name and version (e.g., "groff 1.23.0")
an.tmac:<stdin>:33: misuse, warning: .BI is for at least 2 arguments, got 1
Use macro '.B' for one argument or split argument.

-.-.

  Additionally (general):

  Abbreviations get a '\&' added after their final full stop (.) to mark them
as such and not as an end of a sentence.
-------------- next part --------------
--- pdfdetach.1	2024-12-30 22:53:56.472423386 +0000
+++ pdfdetach.1.new	2024-12-30 23:17:44.045599259 +0000
@@ -21,8 +21,10 @@ List all of the embedded files in the PD
 converted to the text encoding specified by the "\-enc" switch.
 .TP
 .BI \-save " number"
-Save the specified embedded file.  By default, this uses the file name
-associated with the embedded file (as printed by the "\-list" switch);
+Save the specified embedded file.
+By default,
+this uses the file name associated with the embedded file
+(as printed by the "\-list" switch);
 the file name can be changed with the "\-o" switch.
 .TP
 .BI \-savefile " filename"
@@ -30,18 +32,20 @@ Save the specified embedded file.  By de
 associated with the embedded file (as printed by the "\-list" switch);
 the file name can be changed with the "\-o" switch.
 .TP
-.BI \-saveall
-Save all of the embedded files.  This uses the file names associated
-with the embedded files (as printed by the "\-list" switch).  By
-default, the files are saved in the current directory; this can be
-changed with the "\-o" switch.
+.B \-saveall
+Save all of the embedded files.
+This uses the file names associated with the embedded files
+(as printed by the "\-list" switch).
+By default, the files are saved in the current directory;
+this can be changed with the "\-o" switch.
 .TP
 .BI \-o " path"
 Set the file name used when saving an embedded file with the "\-save"
 switch, or the directory used by "\-saveall".
 .TP
 .BI \-enc " encoding-name"
-Sets the encoding to use for text output (embedded file names).
+Sets the encoding to use for text output
+(embedded file names).
 This defaults to "UTF-8".
 .TP
 .BI \-opw " password"
@@ -78,7 +82,7 @@ Error related to PDF permissions.
 99
 Other error.
 .SH AUTHOR
-The pdfinfo software and documentation are copyright 1996-2011 Glyph &
+The pdfinfo software and documentation are copyright 1996\(en2011 Glyph &
 Cog, LLC.
 .SH "SEE ALSO"
 .BR pdffonts (1),


More information about the Pkg-freedesktop-maintainers mailing list