#979737 man pages: manuals created from a docbook file need postprocessing

#979737#5
Date:
2021-01-10 23:32: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 and before a parentheses.
#  To make lines shorter and easier to read, edit, and make a 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 "apt-transport-http.1".