mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-27 01:45:56 +00:00
makePDF: For pdflatex, use a temp dir in the working directory.
Otherwise we can have problems with things like epstopdf.pl, which pdflatex runs to convert eps files and which won't run on a file above the working directory in restricted mode.
This commit is contained in:
@@ -130,9 +130,11 @@ makePDF "pdfroff" pdfargs writer opts doc = do
|
||||
verbosity <- getVerbosity
|
||||
liftIO $ ms2pdf verbosity args source
|
||||
makePDF program pdfargs writer opts doc = do
|
||||
let withTemp = if takeBaseName program == "context"
|
||||
then withTempDirectory "."
|
||||
else withTempDir
|
||||
-- With context and latex, we create a temp directory within
|
||||
-- the working directory, since pdflatex sometimes tries to
|
||||
-- use tools like epstopdf.pl, which are restricted if run
|
||||
-- on files outside the working directory.
|
||||
let withTemp = withTempDirectory "."
|
||||
commonState <- getCommonState
|
||||
verbosity <- getVerbosity
|
||||
liftIO $ withTemp "tex2pdf." $ \tmpdir -> do
|
||||
|
||||
Reference in New Issue
Block a user