home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / go / prog / golatex.taz / golatex / xdvi < prev   
Encoding:
Text File  |  1992-11-16  |  1.7 KB  |  73 lines

  1. #! /bin/sh
  2. #
  3. # Front-end for /usr/local/X/bin/xdvi, the TeX previewer
  4. #
  5. # What we want is an easy way to specify the fonts to use:
  6. #
  7. #    1. -P<printer> flag
  8. #    2. The environment variable PRINTER
  9. #    3. The default is "psc"
  10. #
  11. # Author: Jan van der Steen
  12. # Date    : Fri Aug 30 11:58:52 MET DST 1991
  13.  
  14. usage="xdvi [-P<printer>] [xdvi_options] dvi_file"
  15.  
  16. #
  17. # System settings
  18. #
  19. BITMAPS=/usr/local/TeX/lib/fonts
  20. XDVI=/usr/local/X11R5/bin/xdvi
  21.  
  22. #
  23. # Available fonts
  24. #
  25. psc="300:329:360:432:518:622:746"
  26. agfa="406:445:487:585:702:842:1010"
  27. oce="508:556:610:732:878:1053:1264"
  28. compu="1200:1315:1440:1728:2074:2488:2986"
  29.  
  30. #
  31. # Get the options
  32. #
  33. case $1 in
  34.     -P*)
  35.     PRINTER=`expr ${1} : '-P\(.*\)'`
  36.     case ${PRINTER} in
  37.         #
  38.         # See /etc/printcap for legal/equal PRINTER values
  39.         #
  40.         psc)                PRINTER="psc"        ;;
  41.         hqpsc|agfa|P400|hq2psc|sjors|ag|hq3psc|sjimmie|fa)
  42.                         PRINTER="agfa"        ;;
  43.         oce|ps|PostScript|postscript)    PRINTER="oce"        ;;
  44.         compu|compugraphic)            PRINTER="compugraphic"    ;;
  45.     esac
  46.     shift;;
  47.     *)    PRINTER=${PRINTER-"psc"};;
  48. esac
  49.  
  50. #
  51. # The Go font bitmaps
  52. #
  53. GOTEX=/ufs/jansteen/games2/go/IGS/latex/tue
  54. GOPSC=${GOTEX}/Go_300pk
  55. GOOCE=${GOTEX}/Go_508pk
  56.  
  57. case ${PRINTER} in
  58.     psc)        resolution="300"; EXTRA=${GOPSC} ;;
  59.     agfa)        resolution="406" ;;
  60.     oce)        resolution="508"; EXTRA=${GOOCE} ;;
  61.     compugraphic)    resolution="1200";;
  62.     *)    echo "Bad printer specification" >&2; echo "${usage}" >&2; exit 2;;
  63. esac
  64.  
  65. XDVIFONTS="${EXTRA}:.:${BITMAPS}/${PRINTER}:/tmp/TeX_pk"; export XDVIFONTS
  66. XDVISIZES="${EXTRA}:${PRINTER}";              export XDVISIZES
  67.  
  68. #
  69. # Execute /usr/local/X/bin/xdvi
  70. #
  71. # exec ${XDVI} -p ${resolution} -hushspecials -margins 1 -S 40 -s 3 $*
  72. exec ${XDVI} -p ${resolution} -hushspecials -margins 1 $*
  73.