[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1088249: update-texmf.8: Some remarks and editorial changes for this man page



Package: tex-common
Version: 6.18
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>':18
troff:<stdin>:18: warning: trailing space in the line
troff: backtrace: file '<stdin>':21
troff:<stdin>:21: warning: trailing space in the line
troff: backtrace: file '<stdin>':30
troff:<stdin>:30: 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.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 tex-common depends on:
ii  ucf  3.0043+nmu1

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.87
ii  libpaper-utils         1.1.29+b2
ii  sensible-utils         0.0.24
ii  texlive-binaries       2024.20240313.70630+ds-5
ii  ucf                    3.0043+nmu1
ii  xdg-utils              1.1.3-4.1

Versions of packages texlive-base recommends:
pn  lmodern  <none>

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

Versions of packages texlive-binaries depends on:
ii  libc6            2.40-3
ii  libcairo2        1.18.2-2
ii  libfontconfig1   2.15.0-1.1+b1
ii  libfreetype6     2.13.3+dfsg-1
ii  libgcc-s1        14.2.0-8
ii  libgraphite2-3   1.3.14-2+b1
ii  libharfbuzz0b    10.0.1-1
ii  libicu72         72.1-5+b1
ii  libkpathsea6     2024.20240313.70630+ds-5
ii  libmpfi0         1.5.4+ds-4
ii  libmpfr6         4.2.1-1+b2
ii  libpaper1        1.1.29+b2
ii  libpixman-1-0    0.44.0-3
ii  libpng16-16t64   1.6.44-2
ii  libpotrace0      1.16-2+b2
ii  libptexenc1      2024.20240313.70630+ds-5
ii  libstdc++6       14.2.0-8
ii  libsynctex2      2024.20240313.70630+ds-5
ii  libteckit0       2.5.12+ds1-1+b1
ii  libtexlua53-5    2024.20240313.70630+ds-5
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+b3
ii  libxpm4          1:3.5.17-1+b2
ii  libxt6t64        1:1.2.1-1.2+b1
ii  libzzip-0-13t64  0.13.72+dfsg.1-1.2+b1
ii  perl             5.40.0-7
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.20241115-1

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

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

  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  update-texmf.8 ": (shortened list)

      1 missing date, using ""
      3 skipping paragraph macro
      3 whitespace at end of input line

-.-.

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

      3 trailing space in the line

-.-.

Output from "mandoc -T lint update-texmf.8 ":

mandoc: update-texmf.8:1:2: WARNING: missing date, using "": TH
mandoc: update-texmf.8:9:2: WARNING: skipping paragraph macro: br at the end of SH
mandoc: update-texmf.8:18:71: STYLE: whitespace at end of input line
mandoc: update-texmf.8:21:69: STYLE: whitespace at end of input line
mandoc: update-texmf.8:30:11: STYLE: whitespace at end of input line
mandoc: update-texmf.8:35:2: WARNING: skipping paragraph macro: PP after SH
mandoc: update-texmf.8:38:2: WARNING: skipping paragraph macro: PP empty

-.-.

Remove space characters at the end of lines.

Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

18:is a shell script to generate /etc/texmf/web2c/texmf.cnf from files in 
21:A user who wants to customize /etc/texmf/web2c/texmf.cnf should add, 
30:--verbose. 

-.-.

Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em),
if one is intended.
  " \(em " creates a too big gap in the text (in "troff").

An en-dash is usually surrounded by a space,
while an em-dash is used without spaces.
"man" (1 byte characters in input) transforms an en-dash (\(en) to one
HYPHEN-MINUS,
and an em-dash to two HYPHEN-MINUSES without considering the space
around it.
If "--" are two single "-" (end of options) then use "\-\-".

update-texmf.8:25:.B \-v, --verbose
update-texmf.8:28:.B \-d, --debug
update-texmf.8:30:--verbose. 
update-texmf.8:32:.B \-o, --output FILE

-.-.

Change -- in x--y to \(em (em-dash), or, if an
option, to \-\-

25:.B \-v, --verbose
28:.B \-d, --debug
32:.B \-o, --output FILE

-.-.

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

12:.BR update-texmf

-.-.

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.

25:.B \-v, --verbose
28:.B \-d, --debug
30:--verbose. 
32:.B \-o, --output FILE

-.-.

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.


29:Show debugging information, and don't delete temporary files. Implies

-.-.

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

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

-.-.


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

troff: backtrace: file '<stdin>':18
troff:<stdin>:18: warning: trailing space in the line
troff: backtrace: file '<stdin>':21
troff:<stdin>:21: warning: trailing space in the line
troff: backtrace: file '<stdin>':30
troff:<stdin>:30: warning: trailing space in the line

-.-

  Additionally:

  Add '\:' to a long string to control the line breaking of it.

  Change '.' to ',' in an enumeration of file endings.
--- update-texmf.8	2024-11-25 19:04:24.252737725 +0000
+++ update-texmf.8.new	2024-11-25 19:24:07.021973674 +0000
@@ -5,37 +5,35 @@
 update-texmf \- shell script to generate /etc/texmf/texmf.cnf
 .SH SYNOPSIS
 .B update-texmf
-.I "[options]"
-.br
+.RI [ options ]
 .SH DESCRIPTION
 This manual page documents briefly the
-.BR update-texmf
+.B update-texmf
 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
-is a shell script to generate /etc/texmf/web2c/texmf.cnf from files in 
+is a shell script to generate /etc/texmf/web2c/texmf.cnf from files in
 /etc/texmf/texmf.d/*.cnf
 .PP
-A user who wants to customize /etc/texmf/web2c/texmf.cnf should add, 
+A user who wants to customize /etc/texmf/web2c/texmf.cnf should add,
 for example, 22mymacro.cnf in /etc/texmf/texmf.d/ and run 'update-texmf'.
 .SH OPTIONS
 .TP
-.B \-v, --verbose
+.BR \-v ", " \-\-verbose
 Show verbose messages.
 .TP
-.B \-d, --debug
-Show debugging information, and don't delete temporary files. Implies
---verbose. 
+.BR \-d ", " \-\-debug
+Show debugging information, and don't delete temporary files.
+Implies \-\-verbose.
 .TP
-.B \-o, --output FILE
+.BR \-o ", " \-\-output " \fIFILE\fR"
 Generate output in FILE instead of /etc/texmf/web2c/texmf.cnf.
 .SH SEE ALSO
-.PP
 Further information can be found in
-/usr/share/doc/tex-common/README.Debian.{txt,pdf.html}
-.PP
+/usr/share/doc/\:tex-common/\:README.Debian.{txt,pdf,html}
 .SH AUTHOR
 This manual page was written by Atsuhito Kohda <kohda@debian.org>,
-for the Debian GNU/Linux system (but may be used by others).
+for the Debian GNU/Linux system
+(but may be used by others).

Reply to: