|
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: 2046 (0x7fe) Types: TextFile Names: »transfig«
└─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89 └─⟦this⟧ »./tex82/TeXgraphics/transfig/transfig«
#!/bin/csh -f # # Transfig: figure translation setup program # creates TeX macro file transfig.tex # makefile transfig.make # # usage: transfig <to> <figure> [...] # set TO = $1 set TX = transfig.tex set MK = Makefile # # 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} % constants \let\pics=2 \let\dottedpics=1 \let\nopics=0 \let\optpics=3 % commands to change picture drawing mode \newcommand{\nopictures}{\let\picturemode=\nopics} \newcommand{\dottedpictures}{\let\picturemode=\dottedpics} \newcommand{\pictures}{\let\picturemode=\pics} \newcommand{\optimizedpictures}{\let\picturemode=\optpics} % set default \pictures Epictex breaksw case postscript: echo '\typeout{Transfig: figures in PostScript.}' >$TX breaksw default: echo "unknown graphics language $1" exit(1) breaksw endsw # # create an appropriate makefile # shift 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 ($argv) # 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 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