On Sun, Jun 19, 2016 at 04:51:06PM +0200, Xose Vazquez Perez wrote: > Hi, > > I'm using: groff -z -b -wall manpage.x > > Is there anything better? > > > Thank you, >
Yes, add "-e -t" and use "-w w" instead of "-wall". I have written a shell script that tests for some bad selections of style. Some of the tests are crude and give wrong positives. The scripts are in the attachments. -- Bjarni I. Gislason
chk_manuals.gz
Description: GNU Zip compressed data
athman.gz
Description: GNU Zip compressed data
#! /bin/bash set -efu Cmd_name=${0##*/} if echo "$1" | grep -q -v -e '^[0-9][0-9]*$'; then echo ${Cmd_name}: "The first argument is not a number but \"$1\" >&2 exit 1 fi if test -z "${2:-}"; then input='-' else input="$2" fi expand ${input} | awk \ 'BEGIN { ref_length = '"$1"'; long_lines = 0; } length($0) > ref_length { printf "%s: line %d\tlength %d\n",'\ " \"$input\" "', FNR, length($0); long_lines++} END {if (long_lines > 0) { exit 0; } else { exit 1; } }'
References: 1) man-pages(7) from package "man-pages" or "www.kernel.org/doc/man-pages" section 7 or "man7.org/linux/man-pages/man7/man-pages.7.html": "New sentences should be started on new lines. This makes it easier to see the effect of patches, which often operate at the level of individual sentences." 2) groff_diff(7) in package "groff": "In GNU troff, as in UNIX troff, you should always follow a sentence with either a newline or two spaces." 3) "info groff": Search for the word "sentence" in the output to get more hints about input conventions.