diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-02-23 20:35:07 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-02-23 20:36:21 -0800 |
commit | 19b127b8986fb1a35e14c26808cf8247d6d6f3c4 (patch) | |
tree | 0611f4a446c518fdad22a5725c059ff5bf0a9817 | |
parent | a826d3936dcdefe630715007917dc676eb60861d (diff) | |
download | pandoc-19b127b8986fb1a35e14c26808cf8247d6d6f3c4.tar.gz |
PDF: Use ; for TEXINPUTS separator on Windows.
Closes #1151, I hope. Testing needed.
-rw-r--r-- | pandoc.cabal | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/PDF.hs | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/pandoc.cabal b/pandoc.cabal index b99eb5420..bbf963672 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -243,6 +243,8 @@ Library cpp-options: -DEMBED_DATA_FILES -- Build-Tools: hsb2hs -- not yet recognized by cabal other-modules: Text.Pandoc.Data + if os(windows) + Cpp-options: -D_WINDOWS Ghc-Options: -rtsopts -Wall -fno-warn-unused-do-bind Ghc-Prof-Options: -auto-all -caf-all -rtsopts Default-Language: Haskell98 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"] |