aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-02-19 19:11:40 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-02-19 19:11:40 -0800
commit1ab21530b4500885a8e4ed27e4f32faa6b243583 (patch)
treedb1407257eed048b20ac75c677053cfb2af5afc9 /src/Text/Pandoc
parent5914ae1ea3767541797e57d5cd08db1e27aabfc8 (diff)
downloadpandoc-1ab21530b4500885a8e4ed27e4f32faa6b243583.tar.gz
PDF: run latex 3 times if --toc specified.
Closes #424.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/PDF.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs
index cc19e1c50..59cce2e45 100644
--- a/src/Text/Pandoc/PDF.hs
+++ b/src/Text/Pandoc/PDF.hs
@@ -57,7 +57,7 @@ tex2pdf' :: FilePath -- ^ temp directory for output
-> IO (Either ByteString ByteString)
tex2pdf' tmpDir program source = do
let numruns = if "\\tableofcontents" `isInfixOf` source
- then 2
+ then 3
else 1
(exit, log', mbPdf) <- runTeXProgram program numruns tmpDir source
let msg = "Error producing PDF from TeX source."