aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-03-23 12:57:36 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-03-23 12:58:05 -0700
commit2ae0c0d433d4764487060df387ad8bd0d71d87b8 (patch)
tree6927893e60df835ae8c3125769fa7399149a025e /src/Text/Pandoc
parentdb596a5b126520c311001010f573afe474dac1e5 (diff)
downloadpandoc-2ae0c0d433d4764487060df387ad8bd0d71d87b8.tar.gz
PDF: with xelatex, don't compress images til the last run.
This saves time for image-heavy documents. Closes #4484.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/PDF.hs7
1 files changed, 6 insertions, 1 deletions
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) ++)