aboutsummaryrefslogtreecommitdiff
path: root/src/markdown2pdf.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-07-22 13:11:46 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2011-07-22 13:11:46 -0700
commit18306c74fb40184560f7ac18f35bea4c48aa4cec (patch)
tree21e71c9664536d9768dcf9d4c2a93f04fdc563c6 /src/markdown2pdf.hs
parent0590d7e4c2ee3de8b0fc80163c31277d79136225 (diff)
downloadpandoc-18306c74fb40184560f7ac18f35bea4c48aa4cec.tar.gz
Deprecated `--xetex` option - it is no longer needed.
Deprecated `writerXeTeX` and the `--xetex` option. The latex writer now produces a file that can be processed by latex, pdflatex, lualatex, or xelatex, so this option isn't needed. The option is still neded in markdown2pdf, however, which has been modified to take some options that aren't in pandoc.
Diffstat (limited to 'src/markdown2pdf.hs')
-rw-r--r--src/markdown2pdf.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/markdown2pdf.hs b/src/markdown2pdf.hs
index 4866b4163..9b855537d 100644
--- a/src/markdown2pdf.hs
+++ b/src/markdown2pdf.hs
@@ -210,9 +210,12 @@ main = bracket
(code, out, _err) <- readProcessWithExitCode "pandoc" ["--help"] ""
UTF8.putStrLn "markdown2pdf [OPTIONS] [FILES]\nOptions:"
UTF8.putStr $ unlines $
- filter (\l -> any (`isInfixOf` l) goodoptslong) $ lines out
+ filter (\l -> any (`isInfixOf` l) goodoptslong) (lines out)
+ ++ [replicate 24 ' ' ++ "--xetex"]
exitWith code
+ let args' = filter (/= "--xetex") args
+
-- check for executable files
let latexProgram = if "--xetex" `elem` opts
then "xelatex"
@@ -224,7 +227,7 @@ main = bracket
-- parse arguments
-- if no input given, use 'stdin'
- pandocArgs <- parsePandocArgs args
+ pandocArgs <- parsePandocArgs args'
(input, output) <- case pandocArgs of
Nothing -> exit "Could not parse arguments"
Just ([],out) -> do
@@ -235,7 +238,7 @@ main = bracket
-- no need because we'll pass all arguments to pandoc
Just (_ ,out) -> return ([], out)
-- run pandoc
- pandocRes <- runPandoc (input ++ args) $ replaceDirectory output tmp
+ pandocRes <- runPandoc (input ++ args') $ replaceDirectory output tmp
case pandocRes of
Left err -> exit err
Right texFile -> do