PDF: run latex 3 times if --toc specified.
Closes #424.
commit1ab21530b4500885a8e4ed27e4f32faa6b243583
authorJohn MacFarlane <fiddlosopher@gmail.com>
dateSun 19 Feb 2012, 19:11 (15 years ago)
parent5914ae1
src/Text/Pandoc/PDF.hs+1−1
@@ -57,7 +57,7 @@ tex2pdf' :: FilePath -- ^ temp directory for output
5757 -> IO (Either ByteString ByteString)
5858tex2pdf' tmpDir program source = do
5959 let numruns = if "\\tableofcontents" `isInfixOf` source
60− then 2
60+ then 3
6161 else 1
6262 (exit, log', mbPdf) <- runTeXProgram program numruns tmpDir source
6363 let msg = "Error producing PDF from TeX source."