PDF: Fix logic error in runTeXProgram.

We were running the tex program one more time than requested.
This should speed up pdf production.
This commit is contained in:
John MacFarlane 2018-07-06 23:43:19 +02:00
parent c30eada4ee
commit 55e8cb07d0

View file

@ -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