@@ -130,9 +130,11 @@ makePDF "pdfroff" pdfargs writer opts doc = do
130130 verbosity <- getVerbosity
131131 liftIO $ ms2pdf verbosity args source
132132makePDF program pdfargs writer opts doc = do
133− let withTemp = if takeBaseName program == "context"
134− then withTempDirectory "."
135− else withTempDir
133+ -- With context and latex, we create a temp directory within
134+ -- the working directory, since pdflatex sometimes tries to
135+ -- use tools like epstopdf.pl, which are restricted if run
136+ -- on files outside the working directory.
137+ let withTemp = withTempDirectory "."
136138 commonState <- getCommonState
137139 verbosity <- getVerbosity
138140 liftIO $ withTemp "tex2pdf." $ \tmpdir -> do