home *** CD-ROM | disk | FTP | other *** search
- :
- # htroff - troff for HP LaserJet
- # Usage: htroff [-options] [files]
- #
- # Special options:
- # -nXX mount font XX on position n (n = 1-3)
- # -dYY download font YY
- #
- # Sends its output to the LaserJet automatically.
- # Latest revision: 07/26/88
-
- translate=troff2lj
- #translate=/usr/local/lib/troff2lj
- printcmd='lpr -plaserjet'
- #printcmd='uux -n - "sst!/usr/ucb/lpr -Prhp"'
- download= # null to start out with
- dfiles=
-
- options=-t # Send output to stdout instead of /dev/cat.
- ljopts=
- files=
- font1=R
- font2=I
- font3=B
-
- for arg
- do
- case $arg in
- -) files="$files $arg" ;;
- -d*) download="download -d";
- dfiles="$dfiles `echo $arg|sed 's/-d//'`" ;;
- -1*) font1=`echo $arg|sed 's/-1//'`; ljopts="$ljopts $arg" ;;
- -2*) font2=`echo $arg|sed 's/-2//'`; ljopts="$ljopts $arg" ;;
- -3*) font3=`echo $arg|sed 's/-3//'`; ljopts="$ljopts $arg" ;;
- -[4-9]*|-0*) echo "Illegal font mount: $arg" >&2; exit 1 ;;
- -*) options="$options $arg" ;;
- *) files="$files $arg" ;;
- esac
- done
-
- {
- $download $dfiles
- {
- echo "\
- .fp 1 $font1
- .fp 2 $font2
- .fp 3 $font3
- .fp 4 S
- .lg 0"
-
- cat $files
- } | troff $options | $translate $ljopts
- } | $printcmd
-