From 2ae0c0d433d4764487060df387ad8bd0d71d87b8 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 23 Mar 2018 12:57:36 -0700 Subject: PDF: with xelatex, don't compress images til the last run. This saves time for image-heavy documents. Closes #4484. --- src/Text/Pandoc/PDF.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs index 06915cf6e..d73126f44 100644 --- a/src/Text/Pandoc/PDF.hs +++ b/src/Text/Pandoc/PDF.hs @@ -277,7 +277,12 @@ runTeXProgram verbosity program args runNumber numRuns tmpDir source = do let file' = file #endif let programArgs = ["-halt-on-error", "-interaction", "nonstopmode", - "-output-directory", tmpDir'] ++ args ++ [file'] + "-output-directory", tmpDir'] ++ + -- see #4484, only compress images on last run: + if program == "xelatex" && runNumber < numRuns + then ["-output-driver", "xdvipdfmx -z0"] + else [] + ++ args ++ [file'] env' <- getEnvironment let sep = [searchPathSeparator] let texinputs = maybe (tmpDir' ++ sep) ((tmpDir' ++ sep) ++) -- cgit v1.2.3