@@ -27,9 +27,16 @@ destname="${outfile:-$defaultdest}"
29 cd $THIS_TEMPDIR
29 cd $THIS_TEMPDIR
30− if ! pdflatex -interaction=batchmode $texname.tex >/dev/null 2>&1; then
30+ if ! pdflatex -interaction=batchmode $texname.tex >$texname.log 2>&1; then
32− sed -ne '/^!/,/^ *$/p' $texname.log >&2
31+ shortlog="$(sed -ne 's/^[Ee]rror:*[[:space:]]*//p' $texname.log)"
32+ if [ -n "$shortlog" ]; then
36+ # Short log is not available, dump the whole log.
33 if grep -q "File \`ucs.sty' not found" $texname.log; then
40 if grep -q "File \`ucs.sty' not found" $texname.log; then
34 err "Please install the 'unicode' package from CTAN:"
41 err "Please install the 'unicode' package from CTAN:"
35 err "http://www.ctan.org/tex-archive/macros/latex/contrib/unicode/"
42 err "http://www.ctan.org/tex-archive/macros/latex/contrib/unicode/"