aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-02-23 20:35:07 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-02-23 20:36:21 -0800
commit19b127b8986fb1a35e14c26808cf8247d6d6f3c4 (patch)
tree0611f4a446c518fdad22a5725c059ff5bf0a9817 /src/Text
parenta826d3936dcdefe630715007917dc676eb60861d (diff)
downloadpandoc-19b127b8986fb1a35e14c26808cf8247d6d6f3c4.tar.gz
PDF: Use ; for TEXINPUTS separator on Windows.
Closes #1151, I hope. Testing needed.
Diffstat (limited to 'src/Text')
-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 360338f8f..39442854d 100644
--- a/src/Text/Pandoc/PDF.hs
+++ b/src/Text/Pandoc/PDF.hs
@@ -149,7 +149,12 @@ runTeXProgram program runsLeft tmpDir source = do
let programArgs = ["-halt-on-error", "-interaction", "nonstopmode",
"-output-directory", tmpDir, file]
env' <- getEnvironment
- let texinputs = maybe (tmpDir ++ ":") ((tmpDir ++ ":") ++)
+#ifdef _WINDOWS
+ let sep = ";"
+#else
+ let sep = ":"
+#endif
+ let texinputs = maybe (tmpDir ++ sep) ((tmpDir ++ sep) ++)
$ lookup "TEXINPUTS" env'
let env'' = ("TEXINPUTS", texinputs) :
[(k,v) | (k,v) <- env', k /= "TEXINPUTS"]