-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefig
executable file
·45 lines (35 loc) · 1.03 KB
/
makefig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/csh
#C'est pour compiler les figures Xfig avec des formules LaTeX
set fig=$1:r
#if (-M $fig.fig > -M $fig.ps) then
echo Compile de $fig
echo creation de $fig.pstex
fig2dev -L pstex $fig.latexfig $fig.pstex
echo creation de $fig.tex_1
fig2dev -L pstex_t -p $fig.pstex $fig.latexfig >! $fig.tex_1
echo creation de $fig.tex
echo "%%%%" >! $fig.tex
echo "\documentclass[10pt]{report}" >> $fig.tex
echo "\usepackage{graphicx,color,epsfig,psfig,subfigure}" >> $fig.tex
echo "\usepackage{amsmath,amsfonts,amssymb}" >> $fig.tex
echo "\usepackage{bm}" >> $fig.tex
echo "\pagestyle{empty}" >> $fig.tex
echo '\begin{document}' >> $fig.tex
cat $fig.tex_1 >> $fig.tex
echo "\end{document}" >> $fig.tex
echo compilation de $fig.tex
latex -interaction=batchmode $fig.tex
#> /dev/null
echo création du postscript
dvips $fig.dvi -o -E
rm $fig.tex
rm $fig.dvi
rm $fig.tex_1
rm $fig.log
rm $fig.aux
rm $fig.pstex
#cp $fig.ps ..
#cd ..
##else
##echo $fig up to date
#endif