#979728 man pages: manuals created from docbook files need postprocessing

Package:
texlive-binaries
Source:
texlive-bin
Description:
Binaries for TeX Live
Submitter:
Bjarni Ingi Gislason
Date:
2025-11-17 22:59:01 UTC
Severity:
minor
#979728#5
Date:
2021-01-10 20:12:22 UTC
From:
To:
Dear Maintainer,

  the attachment contains a shell script to fix man pages created from
a docbook file.

  Main improvements are:

# Remove trailing spaces.
# Remove .PP after .SH and .SH.
# Remove '\&' before a period inside or after a word.
#  '\&' suppresses kerning between characters on both sides of it.
# Break lines after a punctuation mark, before a parentheses.
#  To make lines shorter and easier to edit and diff.

sed -e '/\\"/n' \
  -e '/^\.TS,^\.TE/n' \
  -e 's/  *$//' \
  -e '/^\.S[SH]/{n; /\.PP/d}' \
  -e 's/\([^ ]\)\\&\./\1./g' \
  -e 's/\([^ ][.,;!?]\)  */\1\n/g' \
  -e 's/ (/\n(/g' $1

  An example is "afm2pl.1".

#979728#10
Date:
2025-11-09 22:51:21 UTC
From:
To:
On 1/10/2021 9:12 PM, Bjarni Ingi Gislason wrote:

Hello,
Sorry, long response times.

What do you expect me to do with that file? If the generator of a manual
page file generates broken code it should be fixed, instead of writing a
post processor, IMHO.
Is it still correct, that the manual pages generated from docbook still
contain the errors you try to fix in the script?

Hilmar

#979728#15
Date:
2025-11-09 22:52:59 UTC
From:
To:
On 1/10/2021 9:12 PM, Bjarni Ingi Gislason wrote:

Hello,
Sorry, long response times.

What do you expect me to do with that file? If the generator of a manual
page file generates broken code it should be fixed, instead of writing a
post processor, IMHO.
Is it still correct, that the manual pages generated from docbook still
contain the errors you try to fix in the script?

Hilmar

#979728#22
Date:
2025-11-16 23:51:19 UTC
From:
To:
  I put some suggestions in the "general.bug" file in each reportbug
attachment.

  Postprocessing is a workaround until the defects are eliminated (both
upstream (the generator) and downstream (the input file).  And if some
defects can not be eliminated, a postprocessing should be applied upstream
(downstream), that is _before_ delivery.

  The producer (upstream) is accountable for its product.
  I don't know.  The sed-script was doing too much changes, so a reduced
version is following, but I have not used it.

#!/bin/sh
set -efu

# Skip lines with comments.
# Skip tables.
# Skip macro definitions
# Remove trailing spaces.
# Remove .PP after .SH and .SS.
# Remove trailing space after .SH or .SH
# Remove '\&' before a period inside or after a word.
#  '\&' suppresses kerning between characters on both sides of it.

sed -e '/\\"/n' \
  -e '/^\.TS,^\.TE/n' \
  -e '/^\.de ,^\.\.$/n' \
  -e 's/  *$//' \
  -e '/^\.S[SH]/{n; /\.PP/d}' \
  -e 's/  *$//' \
  -e 's/\([^ ]\)\\&\./\1./g' \
  ${1:--}

N.B.
  I got another e-mail at about the same time.  I must have deleted it,
before saving e-mails.

#979728#27
Date:
2025-11-17 22:56:12 UTC
From:
To:
Hello,

In this case I just got the statement that docbook generated manual
pages need postprocessing and a sample script to do so. Just a sample
manual pages was named the see the issues in the generated pages.

However I'm unsure how to go from here. IMHO the processor itself should
be fixed. If this is not possible for some reasons the postprocessor
should be installed by the package, generating the broken manual pages.
I'm pretty sure this is not TeX Live, so the bug is addressed wrong
anyway. Not 100% sure about this.

Hilmar