home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8710 / 18 / htroff < prev    next >
Encoding:
Text File  |  1990-07-13  |  482 b   |  37 lines

  1. #! /bin/sh
  2. #    invoke troff with appropriate options for use with
  3. #    HP LaserJet II and font cartridges.
  4. #
  5. #    parse arguments
  6. #
  7. options=-t
  8. files=
  9. for i in $*
  10. do case $i in
  11.     -*) options="$options $i";;
  12.     *) files="$files $i";;
  13. esac
  14. done
  15. #
  16. #    insert font files
  17. #
  18. (
  19. echo "\
  20. .fp 1 R
  21. .fp 2 I
  22. .fp 3 B
  23. .fp 4 S
  24. .lg 0"
  25. #
  26. #    files string empty -- use standard input
  27. #
  28. if [ "$files" ]
  29. then
  30.     cat $files
  31. else
  32.     cat
  33. fi
  34. ) | troff $options \
  35. | /usr/local/lib/troff2lj \
  36. | uux -n - "sst!/usr/ucb/lpr -Prhp"
  37.