* Suppress most of that crap TeX spews over your screen. Print a
summary of the under/overfull boxes and undefined references/citations. The full log output is still written to $out/log. svn path=/nixpkgs/trunk/; revision=3590
This commit is contained in:
parent
5ac3904860
commit
b40cfcf0f5
@ -27,7 +27,7 @@ while (scalar @workset > 0) {
|
|||||||
$doneset{$fn} = 1;
|
$doneset{$fn} = 1;
|
||||||
|
|
||||||
if (!open FILE, "< $fn") {
|
if (!open FILE, "< $fn") {
|
||||||
print STDERR "(cannot open $fn, ignoring)\n";
|
# print STDERR "(cannot open $fn, ignoring)\n";
|
||||||
next;
|
next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ for i in $extraFiles; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
rootName=$(basename $(stripHash "$rootFile"; echo $strippedName))
|
rootName=$(basename $(stripHash "$rootFile"; echo $strippedName))
|
||||||
echo "root name is $rootName"
|
|
||||||
|
|
||||||
rootNameBase=$(echo "$rootName" | sed 's/\..*//')
|
rootNameBase=$(echo "$rootName" | sed 's/\..*//')
|
||||||
|
|
||||||
@ -23,20 +22,65 @@ else
|
|||||||
latex=latex
|
latex=latex
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$latex $rootName
|
latexFlags="-file-line-error"
|
||||||
|
tmpFile=$out/log
|
||||||
|
|
||||||
|
showError() {
|
||||||
|
echo
|
||||||
|
echo "LATEX ERROR (LAST LOG LINES SHOWN):"
|
||||||
|
tail -n 20 $tmpFile
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
runLaTeX() {
|
||||||
|
if ! $latex $latexFlags $rootName >$tmpFile 2>&1; then showError; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo "PASS 1..."
|
||||||
|
runLaTeX
|
||||||
|
echo
|
||||||
|
|
||||||
if grep -q '\\citation' $rootNameBase.aux; then
|
if grep -q '\\citation' $rootNameBase.aux; then
|
||||||
bibtex $rootNameBase
|
echo "RUNNING BIBTEX..."
|
||||||
|
bibtex --terse $rootNameBase
|
||||||
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$latex $rootName
|
echo "PASS 2..."
|
||||||
|
runLaTeX
|
||||||
|
echo
|
||||||
|
|
||||||
|
if test -f $rootNameBase.idx; then
|
||||||
|
echo "MAKING INDEX..."
|
||||||
makeindex $rootNameBase.idx
|
makeindex $rootNameBase.idx
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
$latex $rootName
|
echo "PASS 3..."
|
||||||
|
runLaTeX
|
||||||
|
echo
|
||||||
if test -n "$generatePDF"; then
|
if test -n "$generatePDF"; then
|
||||||
cp $rootNameBase.pdf $out
|
cp $rootNameBase.pdf $out
|
||||||
else
|
else
|
||||||
cp $rootNameBase.dvi $out
|
cp $rootNameBase.dvi $out
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "OVERFULL/UNDERFULL:"
|
||||||
|
cat $tmpFile | egrep "Overfull|Underfull" || true
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "UNDEFINED REFERENCES:"
|
||||||
|
cat $tmpFile | grep "Reference.*undefined" || true
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "UNDEFINED CITATIONS:"
|
||||||
|
cat $tmpFile | grep "Citation.*undefined" || true
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "STATS:"
|
||||||
|
printf "%5d overfull/underfull h/vboxes\n" $(cat $tmpFile | egrep -c "Overfull|Underfull" || true)
|
||||||
|
printf "%5d undefined references\n" $(cat $tmpFile | grep -c "Reference.*undefined" || true)
|
||||||
|
printf "%5d undefined citations\n" $(cat $tmpFile | grep -c "Citation.*undefined" || true)
|
||||||
|
echo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user