git.iko.soy/typeable/pandoc
on master help sign in
Minor cleanups in markdown2pdf.in.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@468 788f1e2b-df1e-0410-8736-df70ead52e1b

commit4814b0ae021ed0e1389e8c124294b85bb81c1b29 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateTue 9 Jan 2007, 02:07 (20 years ago) parent11f1e77
1 file changed+18−19
src/wrappers/markdown2pdf.in+18−19
src/wrappers/markdown2pdf.in+18−19
@@ -10,8 +10,7 @@ SYNOPSIS="converts markdown-formatted text to PDF, using pdflatex."
1010texname=output
1111logfile=$THIS_TEMPDIR/log
1212
13−pandoc -s -r markdown -w latex "$@" -o - >$THIS_TEMPDIR/$texname.tex \
14−2>$logfile
13+pandoc -s -r markdown -w latex "$@" -o $THIS_TEMPDIR/$texname.tex 2>$logfile
1514
1615if [ "$OUTPUT" = "-" ]; then
1716 firstinfile="$(echo $ARGS | sed -ne '1p')"
@@ -27,23 +26,23 @@ fi
2726 TEXINPUTS=$origdir:$TEXINPUTS:
2827 export TEXINPUTS
2928 pdflatex -interaction=batchmode $texname.tex >/dev/null || {
30− errcode=$?
31− err "${THIS}: pdfLaTeX failed with error code $errcode"
32− [ -f $texname.log ] && {
33− err "${THIS}: error context:"
34− sed -ne '/^!/,/^[[:space:]]*$/p' \
35− -ne '/^[Ll]a[Tt]e[Xx] [Ww]arning/,/^[[:space:]]*$/p' \
36− -ne '/^[Ee]rror/,/^[[:space:]]*$/p' $texname.log >&2
37− if grep -q "File \`ucs.sty' not found" $texname.log; then
38− err "${THIS}: Please install the 'unicode' package from CTAN:"
39− err " http://www.ctan.org/tex-archive/macros/latex/contrib/unicode/"
40− fi
41− if grep -q "File \`fancyvrb.sty' not found" $texname.log; then
42− err "${THIS}: Please install the 'fancyvrb' package from CTAN:"
43− err " http://www.ctan.org/tex-archive/macros/latex/contrib/fancyvrb/"
44− fi
45− }
46− exit $errcode
29+ errcode=$?
30+ err "${THIS}: pdfLaTeX failed with error code $errcode"
31+ [ -f $texname.log ] && {
32+ err "${THIS}: error context:"
33+ sed -ne '/^!/,/^[[:space:]]*$/p' \
34+ -ne '/^[Ll]a[Tt]e[Xx] [Ww]arning/,/^[[:space:]]*$/p' \
35+ -ne '/^[Ee]rror/,/^[[:space:]]*$/p' $texname.log >&2
36+ if grep -q "File \`ucs.sty' not found" $texname.log; then
37+ err "${THIS}: Please install the 'unicode' package from CTAN:"
38+ err " http://www.ctan.org/tex-archive/macros/latex/contrib/unicode/"
39+ fi
40+ if grep -q "File \`fancyvrb.sty' not found" $texname.log; then
41+ err "${THIS}: Please install the 'fancyvrb' package from CTAN:"
42+ err " http://www.ctan.org/tex-archive/macros/latex/contrib/fancyvrb/"
43+ fi
44+ }
45+ exit $errcode
4746 }
4847) || exit $?
4948