painter off (to prohibit TeX running)
[PyX/mjg.git] / manual / runlatex.sh
blobdae13bc7522e602dbdd412c42314d69ff84ca302
1 #!/bin/bash
3 if [ $# != 1 ] ; then
4 echo "runs latex several times to get cross-references right"
5 echo "usage: runlatex.sh <file>[.tex]"
6 exit 1
7 fi
9 file=${1%.tex}
10 rerunstring=1
11 latexerror=0
12 while [[ "$rerunstring" != "" && "$latexerror" == "0" ]]
14 latex $file.tex
15 latexerror=$?
16 rerunstring=$(tail -20 $file.log|grep "Rerun to get cross-references right.")
17 done
18 exit $latexerror