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