aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-07-06 23:43:19 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2018-07-06 23:43:43 +0200
commit55e8cb07d02318a3005b4070af3ae21cd00c44ba (patch)
tree0a3bcbdaf5b93569ff4db6dca4e8c69fbd4d9f9a
parentc30eada4ee2af38cc8120d6ac6165c3aee4dff3b (diff)
downloadpandoc-55e8cb07d02318a3005b4070af3ae21cd00c44ba.tar.gz
PDF: Fix logic error in runTeXProgram.
We were running the tex program one more time than requested. This should speed up pdf production.
-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 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