diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-01-09 02:07:48 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-01-09 02:07:48 +0000 |
commit | 4814b0ae021ed0e1389e8c124294b85bb81c1b29 (patch) | |
tree | d2f24812438b79444bf5d268eb25dc582a1e7ec3 | |
parent | 11f1e774029a8c10e688dd330e4000e743cf39d0 (diff) | |
download | pandoc-4814b0ae021ed0e1389e8c124294b85bb81c1b29.tar.gz |
Minor cleanups in markdown2pdf.in.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@468 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r-- | src/wrappers/markdown2pdf.in | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/wrappers/markdown2pdf.in b/src/wrappers/markdown2pdf.in index 663da770e..ee7fa8cd4 100644 --- a/src/wrappers/markdown2pdf.in +++ b/src/wrappers/markdown2pdf.in @@ -10,8 +10,7 @@ SYNOPSIS="converts markdown-formatted text to PDF, using pdflatex." texname=output logfile=$THIS_TEMPDIR/log -pandoc -s -r markdown -w latex "$@" -o - >$THIS_TEMPDIR/$texname.tex \ -2>$logfile +pandoc -s -r markdown -w latex "$@" -o $THIS_TEMPDIR/$texname.tex 2>$logfile if [ "$OUTPUT" = "-" ]; then firstinfile="$(echo $ARGS | sed -ne '1p')" @@ -27,23 +26,23 @@ fi TEXINPUTS=$origdir:$TEXINPUTS: export TEXINPUTS pdflatex -interaction=batchmode $texname.tex >/dev/null || { - errcode=$? - err "${THIS}: pdfLaTeX failed with error code $errcode" - [ -f $texname.log ] && { - err "${THIS}: error context:" - sed -ne '/^!/,/^[[:space:]]*$/p' \ - -ne '/^[Ll]a[Tt]e[Xx] [Ww]arning/,/^[[:space:]]*$/p' \ - -ne '/^[Ee]rror/,/^[[:space:]]*$/p' $texname.log >&2 - if grep -q "File \`ucs.sty' not found" $texname.log; then - err "${THIS}: Please install the 'unicode' package from CTAN:" - err " http://www.ctan.org/tex-archive/macros/latex/contrib/unicode/" - fi - if grep -q "File \`fancyvrb.sty' not found" $texname.log; then - err "${THIS}: Please install the 'fancyvrb' package from CTAN:" - err " http://www.ctan.org/tex-archive/macros/latex/contrib/fancyvrb/" - fi - } - exit $errcode + errcode=$? + err "${THIS}: pdfLaTeX failed with error code $errcode" + [ -f $texname.log ] && { + err "${THIS}: error context:" + sed -ne '/^!/,/^[[:space:]]*$/p' \ + -ne '/^[Ll]a[Tt]e[Xx] [Ww]arning/,/^[[:space:]]*$/p' \ + -ne '/^[Ee]rror/,/^[[:space:]]*$/p' $texname.log >&2 + if grep -q "File \`ucs.sty' not found" $texname.log; then + err "${THIS}: Please install the 'unicode' package from CTAN:" + err " http://www.ctan.org/tex-archive/macros/latex/contrib/unicode/" + fi + if grep -q "File \`fancyvrb.sty' not found" $texname.log; then + err "${THIS}: Please install the 'fancyvrb' package from CTAN:" + err " http://www.ctan.org/tex-archive/macros/latex/contrib/fancyvrb/" + fi + } + exit $errcode } ) || exit $? |