#!/bin/csh # # author : A. Hebert # use : install # chmod 755 . if (-e /usr/local/common/TeX.csh) then source /usr/local/common/TeX.csh endif # if (-e $1.tex) then set nom_fich = $1 else set nom_fich = `basename $PWD` endif echo "begin typesetting file" $nom_fich.tex latex $nom_fich.tex > /dev/null echo "first typesetting completed" if ( -f $nom_fich.idx ) then set header = $nom_fich set core = ` echo $nom_fich | sed -e's/header_//' ` cp $header.idx header_tmp.idx makeindex header_tmp.idx if ( -f header_tmp.tex ) /bin/rm header_tmp.tex if ( -f tmp.tex ) /bin/rm tmp.tex cp $header.tex header_tmp.tex cp $core.tex tmp.tex latex header_tmp.tex > /dev/null latex header_tmp.tex > /dev/null latex header_tmp.tex > /dev/null dvips -f header_tmp.dvi -o header_tmp.ps mv header_tmp.ps $nom_fich.ps else dvips -f $nom_fich.dvi -o $nom_fich.ps endif /bin/rm header_tmp.* tmp.tex /bin/rm *.aux echo "create pdf file" $nom_fich.pdf ps2pdf $nom_fich.ps echo "pdf file produced" open $nom_fich.pdf /bin/rm $nom_fich.dvi $nom_fich.ps $nom_fich.idx $nom_fich.log /bin/rm $nom_fich.toc $nom_fich.lot $nom_fich.lof $nom_fich.out exit