git.iko.soy/typeable/pandoc
on master help sign in
+ Revert previous commit which is wrong and insufficient on some parts.
52666e2roktas
src/wrappers/markdown2pdf.in+9−14
@@ -27,23 +27,18 @@ destname="${outfile:-$defaultdest}"
27
27
28(
28(
29 cd $THIS_TEMPDIR
29 cd $THIS_TEMPDIR
30− if ! pdflatex -interaction=batchmode $texname.tex >$texname.log 2>&1; then
30+ if ! pdflatex -interaction=batchmode $texname.tex >/dev/null 2>&1; then
31+ err "${THIS}: pdfLaTeX error context:"
32+ sed -ne '/^![[:space:]]/,/^[[:space:]]*$/p' \
33+ -ne '/^[Ll]a[Tt]e[Xx] [Ww]arning/,/^[[:space:]]*$/p' \
31− shortlog="$(sed -ne 's/^[Ee]rror:*[[:space:]]*//p' $texname.log)"
34+ -ne '/^[Ee]rror/,/^[[:space:]]*$/p' $texname.log >&2
32− if [ -n "$shortlog" ]; then
33− err "Errors:"
34− err "$shortlog"
35− else
36− # Short log is not available, dump the whole log.
37− err "pdfLaTeX log:"
38− cat $texname.log >&2
39− fi
40 if grep -q "File \`ucs.sty' not found" $texname.log; then
35 if grep -q "File \`ucs.sty' not found" $texname.log; then
41− err "Please install the 'unicode' package from CTAN:"
36+ err "${THIS}: Please install the 'unicode' package from CTAN:"
42− err "http://www.ctan.org/tex-archive/macros/latex/contrib/unicode/"
37+ err " http://www.ctan.org/tex-archive/macros/latex/contrib/unicode/"
43 fi
38 fi
44 if grep -q "File \`fancyvrb.sty' not found" $texname.log; then
39 if grep -q "File \`fancyvrb.sty' not found" $texname.log; then
45− err "Please install the 'fancyvrb' package from CTAN:"
40+ err "${THIS}: Please install the 'fancyvrb' package from CTAN:"
46− err "http://www.ctan.org/tex-archive/macros/latex/contrib/fancyvrb/"
41+ err " http://www.ctan.org/tex-archive/macros/latex/contrib/fancyvrb/"
47 fi
42 fi
48 exit 1
43 exit 1
49 fi
44 fi