diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/PDF.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs index 766827a71..da4ee4e33 100644 --- a/src/Text/Pandoc/PDF.hs +++ b/src/Text/Pandoc/PDF.hs @@ -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 |