From ac79429a128bf7efeb0ad3896968c29392af7b1a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 8 Jul 2015 17:37:54 -0700 Subject: [PATCH] PDF: Make sure `--latex-engine-opt` goes before the filename... on the command line. LaTeX needs the argument to come after the options. Closes #1779 - again! Thanks to squisher for pointing out the problem. --- src/Text/Pandoc/PDF.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs index 1711c0f36..8f92a3321 100644 --- a/src/Text/Pandoc/PDF.hs +++ b/src/Text/Pandoc/PDF.hs @@ -190,7 +190,7 @@ runTeXProgram verbose program args runNumber numRuns tmpDir source = do let file' = file #endif let programArgs = ["-halt-on-error", "-interaction", "nonstopmode", - "-output-directory", tmpDir', file'] ++ args + "-output-directory", tmpDir'] ++ args ++ [file'] env' <- getEnvironment let sep = searchPathSeparator:[] let texinputs = maybe (tmpDir' ++ sep) ((tmpDir' ++ sep) ++)