[mod.sources] troff hyphenation utility

sources-request@panda.UUCP (12/24/85)

Mod.sources:  Volume 3, Issue 67
Submitted by: Stewart Levin <genrad!decvax!mazama!stew>


#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	Makefile
#	hyphen.1
#	hyphen.lib
#	hyphen.sh
# This archive created: Tue Dec 24 09:13:47 1985
export PATH; PATH=/bin:$PATH
echo shar: extracting "'Makefile'" '(211 characters)'
if test -f 'Makefile'
then
	echo shar: will not over-write existing file "'Makefile'"
else
cat << \SHAR_EOF > 'Makefile'
BIN=/usr/bin/
LIB=/usr/lib/
MAN=/usr/man/man1
install: 
	sed -e 's@$$(LIB)@$(LIB)@' <hyphen.sh >hyphen
	install -m 555 hyphen $(BIN)
	install -c -m 555 hyphen.lib $(LIB)hyphen
	install -c -m 444 hyphen.1 $(MAN)
SHAR_EOF
if test 211 -ne "`wc -c < 'Makefile'`"
then
	echo shar: error transmitting "'Makefile'" '(should have been 211 characters)'
fi
fi
echo shar: extracting "'hyphen.1'" '(732 characters)'
if test -f 'hyphen.1'
then
	echo shar: will not over-write existing file "'hyphen.1'"
else
cat << \SHAR_EOF > 'hyphen.1'
.TH HYPHEN 1
.SH NAME
hyphen \- filter troff input, inserting conditional hyphenation
.SH SYNOPSIS
.B hyphen
[file1 file2 ...]
.SH DESCRIPTION
Some words are exceptions to troff's built in hyphenation rules.
While troff has a limited facility to handle such exceptions (the .hw
command), the facility is easily overloaded.
.I Hyphen
is an alternative that inserts explicit conditional hyphenation
(\e%) into a system dependent list of exceptions.
.sp
This command copies the named files to standard output, inserting
conditional hyphenation.  If no files are specified, standard input
is read.
.SH FILES
/usr/lib/hyphen		editor list of words to hyphenate
.SH "SEE ALSO"
sed(1), vtroff(1), eqn(1), tbl(1)
.SH AUTHOR
Stewart A. Levin
SHAR_EOF
if test 732 -ne "`wc -c < 'hyphen.1'`"
then
	echo shar: error transmitting "'hyphen.1'" '(should have been 732 characters)'
fi
fi
echo shar: extracting "'hyphen.lib'" '(768 characters)'
if test -f 'hyphen.lib'
then
	echo shar: will not over-write existing file "'hyphen.lib'"
else
cat << \SHAR_EOF > 'hyphen.lib'
s/unknown/un\\%known/g
s/devised/de\\%vised/g
s/comparisons/com\\%par\\%i\\%sons/g
s/geophysical/ge\\%o\\%phys\\%i\\%cal/g
s/boundary/bound\\%a\\%ry/g
s/trigonometric/trig\\%o\\%no\\%met\\%ric/g
s/velocity/ve\\%loc\\%i\\%ty/g
s/kilometer/kil\\%o\\%me\\%ter/g
s/prestack/pre\\%stack/g
s/unfamiliarity/un\\%fa\\%mil\\%iar\\%i\\%ty/g
s/acknowledge/ac\\%knowl\\%edge/g
s/crystals/crys\\%tals/g
s/extrapolation/ex\\%trap\\%o\\%la\\%tion/g
s/familiar/fa\\%mil\\%iar/g
s/propagating/prop\\%a\\%ga\\%ting/g
s/participate/par\\%tic\\%i\\%pate/g
s/destroy/de\\%stroy/g
s/parameter/pa\\%ram\\%e\\%ter/g
s/semicircular/sem\\%i\\%cir\\%cu\\%lar/g
s/semicircle/sem\\%i\\%cir\\%cle/g
s/graduate/grad\\%u\\%ate/g
s/wraparound/wrap\\%around/g
s/semidefinite/sem\\%i\\%def\\%i\\%nite/g
SHAR_EOF
if test 768 -ne "`wc -c < 'hyphen.lib'`"
then
	echo shar: error transmitting "'hyphen.lib'" '(should have been 768 characters)'
fi
fi
echo shar: extracting "'hyphen.sh'" '(639 characters)'
if test -f 'hyphen.sh'
then
	echo shar: will not over-write existing file "'hyphen.sh'"
else
cat << \SHAR_EOF > 'hyphen.sh'
#! /bin/sh
: shell  hyphen
if { [ \( -t 0 \)  -a  \( 0 = $# \) ] ; } then \
{ cat <<DATA ; }
/*
filter troff input, inserting conditional hyphenation
  
hyphen  [ file1 file2 ... ]
  
parameters:
	file		troff file(s) to conditionally hyphenate. Default is
			standard input.
discussion:
Some words are exceptions to troff's built in hyphenation rules.
While troff has a limited facility to handle such exceptions (the
.hw command), the facility is easily overloaded.  This program
is an alternative that inserts explicit conditional hyphenation
(\%) into a system dependent list of exceptions.
*/
DATA
else { sed -f $(LIB)hyphen $* ; }
fi
SHAR_EOF
if test 639 -ne "`wc -c < 'hyphen.sh'`"
then
	echo shar: error transmitting "'hyphen.sh'" '(should have been 639 characters)'
fi
fi
exit 0
#	End of shell archive