|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T t
Length: 2090 (0x82a) Types: TextFile Names: »transfig«
└─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89 └─⟦this⟧ »./tex82/TeXgraphics/fig2latex/transfig«
#!/bin/csh -f # # Transfig: figure translation setup program # creates TeX macro file transfig.tex # makefile transfig.make # # usage: transfig [<to> [<figure> ...]] # # # file names # set TX = transfig.tex set MK = Makefile # # parse args # if ($#argv > 0) then set TO = $1 shift else set TO = pictex endif if ($#argv > 0) then set FIGS = ($argv) shift else set FIGS = '*.fig' endif # # create appropriate header file # rm -f $TX switch ($TO) case pictex: cat >>$TX <<Epictex % % transfig.tex: macro file for PiCTeX code generated by fig2tex % \typeout{TransFig: figures in PiCTeX.} % load PiCTeX macros % comment out the following lines if PiCTeX is preloaded \input{prepictex} \input{pictex} \input{postpictex} % load fig2tex control macros \input{fig2tex} Epictex breaksw case postscript: case ps: echo '\typeout{TransFig: figures in PostScript.}' >$TX breaksw case latex: echo '\typeout{TransFig: figures in LaTeX.}' >$TX breaksw default: echo "unknown graphics language $1" exit(1) breaksw endsw # # create an appropriate makefile # echo "# " >$MK echo "# Transfig.make: makefile for figure translation into $TO" >>$MK echo "# " >>$MK echo "# figures: $argv" >>$MK echo " " >>$MK echo "all: tex-list" >>$MK echo " " >>$MK set j = set p = foreach i ($FIGS) # remove suffix set i = `basename $i .fig` set j = ($j $i.tex) switch ($TO) case pictex: echo "${i}.tex: ${i}.fig" >>$MK echo " fig2tex ${i}.fig ${i}.tex" >>$MK breaksw case postscript: echo "${i}.tex: ${i}.ps" >>$MK echo " fig2ps2tex ${i}.ps >${i}.tex" >>$MK echo " " >>$MK echo "${i}.ps: ${i}.fig" >>$MK echo " fig2ps ${i}.fig >${i}.ps" >>$MK set p = (${p} ${i}.ps) breaksw case latex: echo "${i}.tex: ${i}.fig" >>$MK echo " fig2latex ${i}.fig ${i}.tex" >>$MK breaksw p endsw end echo " " >>$MK echo "tex-list: ${j}" >>$MK echo "${j}: Makefile" >>$MK echo " " >>$MK echo "clean:" >>$MK echo " rm -f ${j}" >>$MK if ($TO == postscript) then echo " rm -f ${p}" >>$MK endif