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
commit369a57e3395616252a357c4964c1df680c1ca2ac
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
dateSun 8 Jul 2007, 16:40 (19 years ago)
parentdfcae80
src/wrappers/markdown2pdf.in+2−1
@@ -48,7 +48,8 @@ fi
4848 exit $errcode
4949 }
5050 if [ $runs -lt 3 ] &&
51− grep -q "LaTeX Warning: There were undefined references." $texname.log; then
51+ ((grep -q "LaTeX Warning: There were undefined references." $texname.log) ||
52+ (echo "$@" | grep -q -- "--toc")); then
5253 runs=$(($runs + 1))
5354 if grep -q "LaTeX Warning:.*[Cc]itation" $texname.log; then
5455 bibtex $texname 2>&1 >bibtex.err