diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-07-08 16:40:07 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-07-08 16:40:07 +0000 |
commit | 369a57e3395616252a357c4964c1df680c1ca2ac (patch) | |
tree | 6597cf0234bc398f1d6455ae7092bebd397b2418 | |
parent | dfcae807b07e585e91b1b3a9981bd7ad9543f53e (diff) | |
download | pandoc-369a57e3395616252a357c4964c1df680c1ca2ac.tar.gz |
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
-rw-r--r-- | src/wrappers/markdown2pdf.in | 3 |
1 files changed, 2 insertions, 1 deletions
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 |