From 369a57e3395616252a357c4964c1df680c1ca2ac Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sun, 8 Jul 2007 16:40:07 +0000 Subject: Modified markdown2pdf to run pdflatex a second time if --toc was specified; otherwise the table of contents won't appear. git-svn-id: https://pandoc.googlecode.com/svn/trunk@651 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/wrappers/markdown2pdf.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wrappers/markdown2pdf.in b/src/wrappers/markdown2pdf.in index 16df2b9cd..7bba44466 100644 --- a/src/wrappers/markdown2pdf.in +++ b/src/wrappers/markdown2pdf.in @@ -48,7 +48,8 @@ fi exit $errcode } if [ $runs -lt 3 ] && - grep -q "LaTeX Warning: There were undefined references." $texname.log; then + ((grep -q "LaTeX Warning: There were undefined references." $texname.log) || + (echo "$@" | grep -q -- "--toc")); then runs=$(($runs + 1)) if grep -q "LaTeX Warning:.*[Cc]itation" $texname.log; then bibtex $texname 2>&1 >bibtex.err -- cgit v1.2.3