Package: tex-common
Version: 6.18
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>:1: style: .TH missing third argument; consider document 
modification date in ISO 8601 format (YYYY-MM-DD)
an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project 
name and version (e.g., "groff 1.23.0")
an.tmac:<stdin>:12: misuse, warning: .BR 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.12-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 tex-common depends on:
ii  ucf  3.0050

tex-common recommends no packages.

Versions of packages tex-common suggests:
pn  debhelper  <none>

Versions of packages texlive-base depends on:
ii  debconf [debconf-2.0]  1.5.89
ii  libpaper-utils         2.2.5-0.3+b1
ii  sensible-utils         0.0.24
ii  texlive-binaries       2024.20240313.70630+ds-5+b1
ii  ucf                    3.0050
ii  xdg-utils              1.2.1-2

Versions of packages texlive-base recommends:
ii  lmodern  2.005-1

Versions of packages texlive-base suggests:
ii  ghostscript [postscript-viewer]  10.04.0~dfsg-2+b1
ii  gv [postscript-viewer]           1:3.7.4-2+b2
ii  mupdf [pdf-viewer]               1.25.1+ds1-5+b2
pn  perl-tk                          <none>
ii  xpdf [pdf-viewer]                3.04+git20250103-1+b1
pn  xzdec                            <none>

Versions of packages texlive-binaries depends on:
ii  libc6            2.40-7
ii  libcairo2        1.18.2-2
ii  libfontconfig1   2.15.0-2
ii  libfreetype6     2.13.3+dfsg-1
ii  libgcc-s1        14.2.0-16
ii  libgraphite2-3   1.3.14-2+b1
ii  libharfbuzz0b    10.2.0-1
ii  libicu72         72.1-6
ii  libkpathsea6     2024.20240313.70630+ds-5+b1
ii  libmpfi0         1.5.4+ds-4
ii  libmpfr6         4.2.1-1+b2
ii  libpaper2        2.2.5-0.3+b1
ii  libpixman-1-0    0.44.0-3
ii  libpng16-16t64   1.6.47-1
ii  libpotrace0      1.16-2+b2
ii  libptexenc1      2024.20240313.70630+ds-5+b1
ii  libstdc++6       14.2.0-16
ii  libsynctex2      2024.20240313.70630+ds-5+b1
ii  libteckit0       2.5.12+ds1-1+b1
ii  libtexlua53-5    2024.20240313.70630+ds-5+b1
ii  libx11-6         2:1.8.10-2
ii  libxaw7          2:1.0.16-1
ii  libxi6           2:1.8.2-1
ii  libxmu6          2:1.1.3-3+b4
ii  libxpm4          1:3.5.17-1+b3
ii  libxt6t64        1:1.2.1-1.2+b2
ii  libzzip-0-13t64  0.13.72+dfsg.1-1.2+b1
ii  perl             5.40.1-2
ii  t1utils          1.41-4
ii  zlib1g           1:1.3.dfsg+really1.3.1-1+b1

Versions of packages texlive-binaries recommends:
pn  dvisvgm       <none>
ii  texlive-base  2024.20250114-1

Versions of packages texlive-binaries suggests:
pn  hintview               <none>
pn  texlive-binaries-sse2  <none>

-- debconf information excluded
Input file is update-texmf-config.8

Output from "mandoc -T lint  update-texmf-config.8": (shortened list)


      1 input text line longer than 80 bytes: update-texmf-config ...
      1 missing date, using "": TH
      1 skipping paragraph macro: PP after SH
      1 skipping paragraph macro: PP empty
      1 skipping paragraph macro: br at the end of SH

-.-.

Output from "test-groff -mandoc -t -ww -z update-texmf-config.8": (shortened 
list)


      1         Use macro '.B' for one argument or split argument.
      1 .BR is for at least 2 arguments, got 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 "\&".

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"

24:texmf-format for format updates. All

-.-.

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 5, length 86

update-texmf-config \- script used in maintainer scripts to trigger tex-common 
actions

-.-.

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

update-texmf-config.8:44:for the Debian GNU/Linux system (but may be used by 
others).

-.-.

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

an.tmac:<stdin>:1: style: .TH missing third argument; consider document 
modification date in ISO 8601 format (YYYY-MM-DD)
an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project 
name and version (e.g., "groff 1.23.0")
an.tmac:<stdin>:12: misuse, warning: .BR is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.

-.-.

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.
--- update-texmf-config.8       2025-02-28 18:41:38.008359511 +0000
+++ update-texmf-config.8.new   2025-02-28 18:50:54.253425748 +0000
@@ -2,27 +2,30 @@
 .\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
 .\" other parms are allowed: see man(7), man(1)
 .SH NAME
-update-texmf-config \- script used in maintainer scripts to trigger tex-common 
actions
+update-texmf-config \- script used in maintainer scripts to trigger
+tex-common actions
 .SH SYNOPSIS
 .B update-texmf-config
 .I "[options]"
-.br
 .SH DESCRIPTION
 This manual page documents briefly the
-.BR update-texmf-config
+.B update-texmf-config
 command.
 This manual page was written for the Debian GNU/Linux distribution
 because the original script was designed for Debian packaging system.
 .PP
 .B update-texmf-config
-is a shell script that is called from maintainer scripts shipping new
-map files, hyphenation patterns, or any other TeX input
-file.
+is a shell script
+that is called from maintainer scripts shipping new map files,
+hyphenation patterns,
+or any other TeX input file.
 .PP
-The script simply activates the respective trigger, namely texmf-map
-for font map files, texmf-hyphen for hyphenation patterns, and
-texmf-format for format updates. All
-the necessary action will then be carried out by the tex-common package.
+The script simply activates the respective trigger,
+namely texmf-map for font map files,
+texmf-hyphen for hyphenation patterns,
+and texmf-format for format updates.
+All the necessary action will then be carried out by the tex-common
+package.
 .SH OPTIONS
 .TP
 .B map
@@ -35,10 +38,9 @@ Activate the texmf-hyphen trigger.
 Activate the texmf-format trigger.
 
 .SH SEE ALSO
-.PP
 Further information can be found in
 /usr/share/doc/tex-common/README.Debian.{txt,pdf.html}
-.PP
 .SH AUTHOR
 This manual page was written by Norbert Preining <prein...@logic.at>,
-for the Debian GNU/Linux system (but may be used by others).
+for the Debian GNU/Linux system
+(but may be used by others).
  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.

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

-.-

Reply via email to