aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--README3
-rw-r--r--man/man1/markdown2pdf.1.md6
-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
6 files changed, 16 insertions, 14 deletions
diff --git a/README b/README
index 900f52749..3173075eb 100644
--- a/README
+++ b/README
@@ -265,9 +265,6 @@ Options
show in the output, so that the slide show will work even when no
internet connection is available.
-`--xetex`
-: Create LaTeX outut suitable for processing by XeTeX.
-
`--chapters`
: Treat top-level headers as chapters in LaTeX, ConTeXt, and DocBook
output.
diff --git a/man/man1/markdown2pdf.1.md b/man/man1/markdown2pdf.1.md
index efbdc8184..d3d30c119 100644
--- a/man/man1/markdown2pdf.1.md
+++ b/man/man1/markdown2pdf.1.md
@@ -42,9 +42,6 @@ packages are not included in your latex setup, they can be obtained from
\--strict
: Use strict markdown syntax, with no extensions or variants.
-\--xetex
-: Use xelatex instead of pdflatex to create the PDF.
-
-N, \--number-sections
: Number section headings in LaTeX output. (Default is not to number them.)
@@ -109,6 +106,9 @@ packages are not included in your latex setup, they can be obtained from
or `s5` directory placed in this directory will override pandoc's
normal defaults.
+\--xetex
+: Use xelatex instead of pdflatex to create the PDF.
+
# SEE ALSO
`pandoc`(1), `pdflatex`(1)
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,