From 55e8cb07d02318a3005b4070af3ae21cd00c44ba Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 6 Jul 2018 23:43:19 +0200 Subject: PDF: Fix logic error in runTeXProgram. We were running the tex program one more time than requested. This should speed up pdf production. --- src/Text/Pandoc/PDF.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs index 7fa2cd26c..e951c8c3e 100644 --- a/src/Text/Pandoc/PDF.hs +++ b/src/Text/Pandoc/PDF.hs @@ -314,7 +314,7 @@ runTeXProgram verbosity program args runNumber numRuns tmpDir source = do putStrLn $ "[makePDF] Run #" ++ show runNumber BL.hPutStr stdout out putStr "\n" - if runNumber <= numRuns + if runNumber < numRuns then runTeXProgram verbosity program args (runNumber + 1) numRuns tmpDir source else do let pdfFile = replaceDirectory (replaceExtension file ".pdf") tmpDir -- cgit v1.2.3