Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/examples/mf/mftest

raw
1 #!/bin/sh
2 # mftest -- script to test the mf version of a single picture file
3 #
4 # Usage: mftest file
5 #
6 # e.g. copy ex03.m4 here and type chmod +x mftest; ./mftest ex03
7 # Invokes m4 on file.m4, and builds the resulting picture in file.ps
8
9 LIBS=mfpic.m4
10 MODE=ljfzzz
11
12 echo "\documentclass{article}
13 \usepackage[amssymb,Gray,thinqspace,textstyle]{SIunits}
14 \usepackage{mfpic}
15 &begin{document}
16 \opengraphsfile{"$1"mfpic}
17 %{This is a test of the -m option of dpic (mfpic output).}" \
18 | tr '\046' '\134' > $1.tex
19
20 m4 $LIBS $1.m4 | dpic -m >> $1.tex
21
22 echo "
23 &closegraphsfile
24 \end{document}" | tr '\046' '\134' >> $1.tex
25
26 echo "
27 latex "$1
28 latex $1
29 echo "
30 mf \mode:=$MODE; scrollmode; input $1""mfpic < /dev/null"
31 mf "\mode:="$MODE"; scrollmode; input "$1mfpic < /dev/null
32 echo "
33 gftopk:"
34 ls $1mfpic.*gf | sed -e 's/^/gftopk /' \
35 -e "s/$1mfpic.\([0-9]*\)gf/$1mfpic.\1gf $1mfpic.\1pk/" | sh
36 ls $1mfpic.*gf $1mfpic.*pk
37 cp $1mfpic.*pk $1mfpic.pk
38 echo "
39 TEXFORMATS=.: TEXFONTS=.: latex $1"
40 TEXFORMATS=.: TEXFONTS=.: latex $1
41 echo "
42 TEXPKS=.: dvips -M1 -P$MODE $1 -o"
43 TEXPKS=.: dvips -M1 -P$MODE $1 -o