git.iko.soy/typeable/pandoc
on master help sign in
PDF: Use ; for TEXINPUTS separator on Windows.

Closes #1151, I hope. Testing needed.

commit19b127b8986fb1a35e14c26808cf8247d6d6f3c4 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 23 Feb 2014, 20:35 (13 years ago) parenta826d39
2 files changed+8−1
pandoc.cabal+2 src/Text/Pandoc/PDF.hs+6−1
pandoc.cabal+2
@@ -243,6 +243,8 @@ Library
243243 cpp-options: -DEMBED_DATA_FILES
244244 -- Build-Tools: hsb2hs -- not yet recognized by cabal
245245 other-modules: Text.Pandoc.Data
246+ if os(windows)
247+ Cpp-options: -D_WINDOWS
246248 Ghc-Options: -rtsopts -Wall -fno-warn-unused-do-bind
247249 Ghc-Prof-Options: -auto-all -caf-all -rtsopts
248250 Default-Language: Haskell98
src/Text/Pandoc/PDF.hs+6−1
@@ -149,7 +149,12 @@ runTeXProgram program runsLeft tmpDir source = do
149149 let programArgs = ["-halt-on-error", "-interaction", "nonstopmode",
150150 "-output-directory", tmpDir, file]
151151 env' <- getEnvironment
152− let texinputs = maybe (tmpDir ++ ":") ((tmpDir ++ ":") ++)
152+#ifdef _WINDOWS
153+ let sep = ";"
154+#else
155+ let sep = ":"
156+#endif
157+ let texinputs = maybe (tmpDir ++ sep) ((tmpDir ++ sep) ++)
153158 $ lookup "TEXINPUTS" env'
154159 let env'' = ("TEXINPUTS", texinputs) :
155160 [(k,v) | (k,v) <- env', k /= "TEXINPUTS"]