In my opinion it would be nice if groff had a request that would print its argument with all hyphenation points visible, reminiscent of the way some dictionaries render their head words.
E.g., a dictionary may say: re·ca·pit·u·la·tion I ask for a groff request because otherwise the hyphenation points seem to be a black box, and it requires a contrivance to discover them, such as the attached quick hack I threw together. Any alternatives, ideas, or recommendations? -- Regards, Branden
#!/bin/sh
set -e
PREFACE='.ll 100n
The current hyphenation language as set by the hla request is \\n[.hla].
.br
The maximum allowed number of consecutive hyphenated lines as set by the hlm
request is \\n[.hlm].
.br
The current hyphenation flags (as set by the hy request) is \\n[.hy].
.br
The current hyphenation margin (as set by the hym request) is \\n[.hym].
.br
The current hyphenation space (as set by the hys request) is \\n[.hys].
.br
'
WORD="$1"
LENGTH=$(echo -n $WORD | wc -c)
DOC=$(W=$LENGTH;
while [ $W -gt 0 ]; do
echo .ll ${W}n;
echo $WORD;
echo .br;
W=$(( W - 1 ));
done)
#echo "$PREFACE""$DOC"
echo "$PREFACE""$DOC" | nroff 2> /dev/null | sed '/^$/d'
# vim:set ai et sw=4 ts=4 tw=80:
signature.asc
Description: PGP signature
