git.iko.soy/typeable/pandoc
on master help sign in
PDF: Use / as path separators even on Windows.

This seems to be necessary for texlive. Closes #1151 (again!).

commitc026c16fa6d9313dc2aa30e8348176e292dc78e0 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 9 Mar 2014, 21:26 (13 years ago) parentf3c9d37
1 file changed+3−2
src/Text/Pandoc/PDF.hs+3−2
src/Text/Pandoc/PDF.hs+3−2
@@ -91,7 +91,8 @@ handleImage' baseURL tmpdir (Image ils (src,tit)) = do
9191 let ext = fromMaybe (takeExtension src) $
9292 extensionFromMimeType mime
9393 let basename = UTF8.toString $ B64.encode $ UTF8.fromString src
94− let fname = tmpdir </> basename <.> ext
94+ -- note: we want / even on Windows, for TexLive:
95+ let fname = tmpdir ++ "/" ++ basename <.> ext
9596 BS.writeFile fname contents
9697 return $ Image ils (fname,tit)
9798 _ -> do
@@ -143,7 +144,7 @@ extractMsg log' = do
143144runTeXProgram :: String -> Int -> FilePath -> String
144145 -> IO (ExitCode, ByteString, Maybe ByteString)
145146runTeXProgram program runsLeft tmpDir source = do
146− let file = tmpDir </> "input.tex"
147+ let file = tmpDir ++ "/input.tex"
147148 exists <- doesFileExist file
148149 unless exists $ UTF8.writeFile file source
149150 let programArgs = ["-halt-on-error", "-interaction", "nonstopmode",