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
This commit is contained in:
fiddlosopher 2007-07-08 16:40:07 +00:00
parent dfcae807b0
commit 369a57e339

View file

@ -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