Fixed v1.16 reversion with --latex-engine.

In 1.16 --latex-engine raises an error if a full path is
given. This commit fixes this reversion. Closes #2618.
This commit is contained in:
John MacFarlane 2016-01-04 22:44:50 -08:00
parent a6d20b32c7
commit 4990350fc7

View file

@ -99,9 +99,9 @@ makePDF program writer opts doc = withTempDir "tex2pdf." $ \tmpdir -> do
doc' <- handleImages opts tmpdir doc
let source = writer opts doc'
args = writerLaTeXArgs opts
case program of
case takeBaseName program of
"context" -> context2pdf (writerVerbose opts) tmpdir source
_ | program `elem` ["pdflatex", "lualatex", "xelatex"]
prog | prog `elem` ["pdflatex", "lualatex", "xelatex"]
-> tex2pdf' (writerVerbose opts) args tmpdir program source
_ -> return $ Left $ UTF8.fromStringLazy $ "Unknown program " ++ program