summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-01-04 22:44:50 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2016-01-04 22:44:50 -0800
commit4990350fc7e8237bac857c56ff4ceaca7cdb0a9d (patch)
treea10e96c6cdacf136fc9c3e361ef79c35dfd1f2d5 /src/Text/Pandoc
parenta6d20b32c74b55c9e019026b940da01bb81bd6bb (diff)
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.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/PDF.hs4
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