Package: xpdf
Version: 3.04+git20250103-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 ' $' -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?

an.tmac:<stdin>:3: style: .TH missing fourth argument; consider package/project 
name and version (e.g., "groff 1.23.0")

   * 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.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 xpdf depends on:
ii  libc6          2.40-5
ii  libgcc-s1      14.2.0-12
ii  libpaper2      2.2.5-0.3
ii  libpoppler140  24.08.0-4
ii  libstdc++6     14.2.0-12
ii  libx11-6       2:1.8.10-2
ii  libxm4         2.3.8-4
ii  libxt6t64      1:1.2.1-1.2+b2

Versions of packages xpdf recommends:
pn  cups-bsd          <none>
ii  fonts-urw-base35  20200910-8
ii  poppler-data      0.4.12-1
ii  poppler-utils     24.08.0-4
ii  sensible-utils    0.0.24

xpdf suggests no packages.

-- no debconf information
Input file is xpdf.1

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

      8 skipping paragraph macro: PP empty

-.-.

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

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

-.-.

Change a HYPHEN-MINUS (code 0x2D) to a minus(-dash) (\-),
if it
is in front of a name for an option,
is a symbol for standard input,
is a single character used to indicate an option,
or is in the NAME section (man-pages(7)).
N.B. - (0x2D), processed as a UTF-8 file, is changed to a hyphen
(0x2010, groff \[u2010] or \[hy]) in the output.

742:    bind x "run(ls -l)"
888:    bind -              any         zoomOut

-.-.

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

958:The fonts used can be customised using X resources. By default, they are

-.-.

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

xpdf.1:630:Zoom in - go to the next higher zoom factor.
xpdf.1:633:Zoom out - go the next lower zoom factor.

-.-.

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

844:    bind ctrl-home      any         gotoPage(1)

-.-.

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

1006:.ad l

-.-.

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

an.tmac:<stdin>:3: style: .TH missing fourth argument; consider package/project 
name and version (e.g., "groff 1.23.0")
an.tmac:<stdin>:474: misuse, warning: .BR is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.
--- xpdf.1      2025-01-28 04:32:09.947232271 +0000
+++ xpdf.1.new  2025-01-28 04:55:13.264459795 +0000
@@ -456,7 +456,7 @@ Set the zoom factor to 125% (ready for i
 .B +
 Zoom in (increment the zoom factor by 1).
 .TP
-.B -
+.B \-
 Zoom out (decrement the zoom factor by 1).
 .TP
 .B z
@@ -471,7 +471,7 @@ Set the zoom factor to 'height' (fit pag
 .B alt-F
 Toggle full-screen mode.
 .TP
-.BR ?
+.B ?
 Open the 'about' dialog.
 .TP
 .BR q " or " <Escape>
@@ -627,10 +627,10 @@ Set the zoom factor to fit-width.
 Set the zoom factor to fit-height.
 .TP
 .B zoomIn
-Zoom in - go to the next higher zoom factor.
+Zoom in \(en go to the next higher zoom factor.
 .TP
 .B zoomOut
-Zoom out - go the next lower zoom factor.
+Zoom out \(en go the next lower zoom factor.
 .TP
 .B zoomToSelection
 Zoom in to the currently selected rectangle, if there is one.
@@ -739,7 +739,7 @@ The external command string will often c
 command must be quoted in the xpdfrc file:
 .nf
 
-    bind x "run(ls -l)"
+    bind x "run(ls \-l)"
 
 .fi
 .TP
@@ -841,7 +841,7 @@ The default mouse bindings are as follow
 The default key bindings are as follows:
 .nf
 
-    bind ctrl-home      any         gotoPage(1)
+    bind ctrl-home      any         \fBgotoPage\fR(1)
     bind home           any         scrollToTopLeft
     bind ctrl-end       any         gotoLastPage
     bind end            any         scrollToBottomRight
@@ -885,7 +885,7 @@ The default key bindings are as follows:
     bind G              any         focusToPageNum
     bind 0              any         zoomPercent(125)
     bind +              any         zoomIn
-    bind -              any         zoomOut
+    bind \-              any         zoomOut
     bind z              any         zoomFitPage
     bind Z              any         zoomFitPage
     bind w              any         zoomFitWidth
@@ -955,7 +955,8 @@ for text in a monospaced font, and
 and
 .B helpBig
 for headings in the About dialog.
-The fonts used can be customised using X resources. By default, they are
+The fonts used can be customised using X resources.
+By default, they are
 configured as follows:
 .nf
 
@@ -1003,7 +1004,7 @@ The original Xpdf software and documenta
 Cog, LLC.  Modifications for Poppler support and further development were done
 by the Debian and Gentoo Xpdf maintainers, and by xpopple contributors.
 .SH "SEE ALSO"
-.ad l
+.na
 .BR pdftops (1),
 .BR pdftotext (1),
 .BR pdftohtml (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

-.-

  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 -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 -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)

-.-

Reply via email to