aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Shared.hs1
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs1
-rw-r--r--src/markdown2pdf.hs9
-rw-r--r--src/pandoc.hs10
4 files changed, 13 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index b22012070..9717e1bc8 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -493,6 +493,7 @@ data WriterOptions = WriterOptions
, writerAscii :: Bool -- ^ Avoid non-ascii characters
} deriving Show
+{-# DEPRECATED writerXeTeX "writerXeTeX no longer does anything" #-}
-- | Default writer options.
defaultWriterOptions :: WriterOptions
defaultWriterOptions =
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 5e5567aec..c4eac4cd9 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -111,7 +111,6 @@ pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do
, ("title", titletext)
, ("date", dateText) ] ++
[ ("author", a) | a <- authorsText ] ++
- [ ("xetex", "yes") | writerXeTeX options ] ++
[ ("verbatim-in-note", "yes") | stVerbInNote st ] ++
[ ("fancy-enums", "yes") | stEnumerate st ] ++
[ ("tables", "yes") | stTable st ] ++
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
diff --git a/src/pandoc.hs b/src/pandoc.hs
index 13e867deb..406c70bb7 100644
--- a/src/pandoc.hs
+++ b/src/pandoc.hs
@@ -309,7 +309,10 @@ options =
, Option "" ["xetex"]
(NoArg
- (\opt -> return opt { optXeTeX = True }))
+ (\opt -> do
+ UTF8.hPutStrLn stderr $ "pandoc: --xetex is deprecated. "
+ ++ "It is no longer needed for use with XeTeX."
+ return opt { optXeTeX = True }))
"" -- "Format latex for processing by XeTeX"
, Option "" ["chapters"]
@@ -675,7 +678,6 @@ main = do
, optSectionDivs = sectionDivs
, optIncremental = incremental
, optOffline = offline
- , optXeTeX = xetex
, optSmart = smart
, optHtml5 = html5
, optChapters = chapters
@@ -786,7 +788,8 @@ main = do
stateIndentedCodeClasses = codeBlockClasses,
stateApplyMacros = writerName' `notElem` ["latex", "latex+lhs"] }
- let writerOptions = WriterOptions { writerStandalone = standalone',
+ let writerOptions = defaultWriterOptions
+ { writerStandalone = standalone',
writerTemplate = if null template
then defaultTemplate
else template,
@@ -798,7 +801,6 @@ main = do
writerHTMLMathMethod = mathMethod,
writerSlideVariant = slideVariant,
writerIncremental = incremental,
- writerXeTeX = xetex,
writerCiteMethod = citeMethod,
writerBiblioFiles = reffiles,
writerIgnoreNotes = False,