aboutsummaryrefslogtreecommitdiff
path: root/src/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-01-21 14:18:36 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-01-21 14:18:36 -0800
commite6e4311ddd3f964122a309af926dc95f6ef970d9 (patch)
tree372293706afe60e9b7e5c0e89f7e9bda725009b3 /src/pandoc.hs
parent194bdadc57fffc698aedfd43c0cb2aa09e3a75ea (diff)
downloadpandoc-e6e4311ddd3f964122a309af926dc95f6ef970d9.tar.gz
pandoc: Better error checking.
Diffstat (limited to 'src/pandoc.hs')
-rw-r--r--src/pandoc.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs
index 6eac02ee2..bb190aeba 100644
--- a/src/pandoc.hs
+++ b/src/pandoc.hs
@@ -549,6 +549,16 @@ options =
"FILENAME")
"" -- "Path of epub metadata file"
+ , Option "" ["latex-program"]
+ (ReqArg
+ (\arg opt -> do
+ let b = takeBaseName arg
+ if (b == "pdflatex" || b == "lualatex" || b == "xelatex")
+ then return opt { optLaTeXProgram = arg }
+ else err 45 "latex-program must be pdflatex, lualatex, or xelatex.")
+ "PROGRAM")
+ "" -- "Name of latex program to use in generating PDF"
+
, Option "D" ["print-default-template"]
(ReqArg
(\arg _ -> do