git.iko.soy/typeable/pandoc
on master help sign in
PDF: with xelatex, don't compress images til the last run.
2ae0c0dJohn MacFarlane
src/Text/Pandoc/PDF.hs+6−1
@@ -277,7 +277,12 @@ runTeXProgram verbosity program args runNumber numRuns tmpDir source = do
277 let file' = file
277 let file' = file
278#endif
278#endif
279 let programArgs = ["-halt-on-error", "-interaction", "nonstopmode",
279 let programArgs = ["-halt-on-error", "-interaction", "nonstopmode",
280− "-output-directory", tmpDir'] ++ args ++ [file']
280+ "-output-directory", tmpDir'] ++
281+ -- see #4484, only compress images on last run:
282+ if program == "xelatex" && runNumber < numRuns
283+ then ["-output-driver", "xdvipdfmx -z0"]
284+ else []
285+ ++ args ++ [file']
281 env' <- getEnvironment
286 env' <- getEnvironment
282 let sep = [searchPathSeparator]
287 let sep = [searchPathSeparator]
283 let texinputs = maybe (tmpDir' ++ sep) ((tmpDir' ++ sep) ++)
288 let texinputs = maybe (tmpDir' ++ sep) ((tmpDir' ++ sep) ++)