home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / unixtex-6.1b-src.lha / unixtex-6.1b / web2c / lib / MakeTeXMF < prev    next >
Encoding:
Text File  |  1994-01-21  |  1.9 KB  |  82 lines

  1. #!/bin/sh
  2. #
  3. # This script make a new METAFONT cm*.mf or dc*.mf file
  4. # because one wasn't found.  Usage
  5. #
  6. # MakeTeXMF name
  7. #
  8. # `name' is the name of the font file, such as `cmr10'
  9. #
  10. # This file need the sauter font system and the dc fonts
  11. #
  12. # Of course this need to be customized to your site
  13. MFDIR=/home/estwk1/pnoma/lib/mf
  14. DESTDIR=$MFDIR/macros/tmp
  15. SAUTERDIR=/home/estwk1/pnoma/src/tex/fonts/sauter
  16. DCDIR=/home/estwk1/pnoma/src/tex/fonts/dc
  17.  
  18. NAME=`echo $1 | sed 's/\.mf$//'`
  19.  
  20. umask 0
  21.  
  22. MFNAME=$NAME.mf
  23.  
  24. # Which type of font is this?
  25. case $NAME in
  26.   cm*) font=cm;;
  27.   dc*) font=dc;;
  28.   *) font=other;;
  29. esac
  30.  
  31. if test -r $DESTDIR/$MFNAME
  32. then
  33.    echo "$DESTDIR/$MFNAME already exists!"
  34.    exit 0
  35. fi
  36.  
  37. # check also in the standard place
  38.  
  39. if test -r /usr/local/lib/mf/inputs/$MFNAME
  40. then
  41.    echo /usr/local/lib/mf/inputs/$MFNAME already exists!
  42.    exit 0
  43. fi
  44.  
  45. if test $font = cm; then
  46.   # The font is CM.  Try Sauter's scripts.
  47.   cd $SAUTERDIR
  48.   pwd
  49.   rootfont=`echo $NAME | sed 's/[0-9]*$//'`
  50.   pointsize=`echo $NAME | sed 's/cm[a-z]*//'`
  51.   make-mf $rootfont $pointsize
  52.   echo "Trying interpolated/extrapolated (Sauter) CM source." 1>&2
  53.   # Install the MF file carefully, since others may be doing the same
  54.   # as us simultaneously.
  55.  
  56.   chmod 644 mf/$MFNAME
  57.   mv mf/$MFNAME $DESTDIR/mftmp.$$
  58.   cd $DESTDIR
  59.   mv mftmp.$$ $MFNAME
  60. elif test $font = dc; then
  61.   # The font is DC. 
  62.   cd $DCDIR
  63.   rootfont=`echo $NAME | sed 's/[0-9]*$//'`
  64.   pointsize=`echo $NAME | sed 's/dc[a-z]*//'`
  65.   cat dcstdedt.pre > dctmp.tex
  66.   echo $pointsize " ) " >> dctmp.tex
  67.   echo "     \makefont " $rootfont " ( " $pointsize " ) " >> dctmp.tex
  68.   cat dcstdedt.end >> dctmp.tex
  69.   tex dctmp
  70.   rm -f dctmp.* mfbatch.bat
  71.   echo "Trying interpolated/extrapolated DC source." 1>&2
  72.   # Install the MF file carefully, since others may be doing the same
  73.   # as us simultaneously.
  74.  
  75.   chmod 644 $MFNAME
  76.   mv $MFNAME $DESTDIR/mftmp.$$
  77.   cd $DESTDIR
  78.   mv mftmp.$$ $MFNAME 
  79. else
  80.   echo "MakeTeXMF is not implemented for this font"
  81. fi
  82.