Debian Codegraph @

texmf-dist/doc/generic/pst-nutation/animations/tex2gif.sh

raw symbols SCIP
1 #!/bin/bash
2 # tex->pdf
3
4 if [ $# -eq 0 ]
5 then
6 echo "No arguments supplied"
7 echo "converting all tex-files to a gif image:"
8 for file in *.tex ; do
9 STEM=`basename $file .tex`
10 echo "convert $file ..."
11 latex $file
12 latex $file
13 dvips $STEM.dvi
14 ps2pdf $STEM.ps
15 magick convert -delay 5 -density 100x100 -alpha remove $STEM.pdf -loop 0 $STEM.gif
16 echo "... done $STEM.gif"
17 done
18 else
19 STEM=`basename $1 .tex`
20 echo "convert $1 ..."
21 latex $1
22 latex $1
23 dvips $STEM.dvi
24 ps2pdf $STEM.ps
25 magick convert -delay 5 -density 100x100 -alpha remove $STEM.pdf -loop 0 $STEM.gif
26 echo "... done $STEM.gif"
27 fi
28 rm *.aux
29 rm *.log
30 rm *.ps
31 rm *.pdf
32 rm *.dvi