From 18306c74fb40184560f7ac18f35bea4c48aa4cec Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 22 Jul 2011 13:11:46 -0700 Subject: 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. --- src/markdown2pdf.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/markdown2pdf.hs') 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 -- cgit v1.2.3