git.iko.soy/typeable/pandoc
on master help sign in
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.

commit18306c74fb40184560f7ac18f35bea4c48aa4cec authorJohn MacFarlane <jgm@berkeley.edu> dateFri 22 Jul 2011, 13:11 (15 years ago) parent0590d7e
6 files changed+16−14
README−3 man/man1/markdown2pdf.1.md+3−3 src/Text/Pandoc/Shared.hs+1 src/Text/Pandoc/Writers/LaTeX.hs−1 src/markdown2pdf.hs+6−3 src/pandoc.hs+6−4
README−3
@@ -265,9 +265,6 @@ Options
265265 show in the output, so that the slide show will work even when no
266266 internet connection is available.
267267
268−`--xetex`
269−: Create LaTeX outut suitable for processing by XeTeX.
270−
271268`--chapters`
272269: Treat top-level headers as chapters in LaTeX, ConTeXt, and DocBook
273270 output.
man/man1/markdown2pdf.1.md+3−3
@@ -42,9 +42,6 @@ packages are not included in your latex setup, they can be obtained from
4242\--strict
4343: Use strict markdown syntax, with no extensions or variants.
4444
45−\--xetex
46−: Use xelatex instead of pdflatex to create the PDF.
47−
4845-N, \--number-sections
4946: Number section headings in LaTeX output. (Default is not to number them.)
5047
@@ -109,6 +106,9 @@ packages are not included in your latex setup, they can be obtained from
109106 or `s5` directory placed in this directory will override pandoc's
110107 normal defaults.
111108
109+\--xetex
110+: Use xelatex instead of pdflatex to create the PDF.
111+
112112# SEE ALSO
113113
114114`pandoc`(1), `pdflatex`(1)
src/Text/Pandoc/Shared.hs+1
@@ -493,6 +493,7 @@ data WriterOptions = WriterOptions
493493 , writerAscii :: Bool -- ^ Avoid non-ascii characters
494494 } deriving Show
495495
496+{-# DEPRECATED writerXeTeX "writerXeTeX no longer does anything" #-}
496497-- | Default writer options.
497498defaultWriterOptions :: WriterOptions
498499defaultWriterOptions =
src/Text/Pandoc/Writers/LaTeX.hs−1
@@ -111,7 +111,6 @@ pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do
111111 , ("title", titletext)
112112 , ("date", dateText) ] ++
113113 [ ("author", a) | a <- authorsText ] ++
114− [ ("xetex", "yes") | writerXeTeX options ] ++
115114 [ ("verbatim-in-note", "yes") | stVerbInNote st ] ++
116115 [ ("fancy-enums", "yes") | stEnumerate st ] ++
117116 [ ("tables", "yes") | stTable st ] ++
src/markdown2pdf.hs+6−3
@@ -210,9 +210,12 @@ main = bracket
210210 (code, out, _err) <- readProcessWithExitCode "pandoc" ["--help"] ""
211211 UTF8.putStrLn "markdown2pdf [OPTIONS] [FILES]\nOptions:"
212212 UTF8.putStr $ unlines $
213− filter (\l -> any (`isInfixOf` l) goodoptslong) $ lines out
213+ filter (\l -> any (`isInfixOf` l) goodoptslong) (lines out)
214+ ++ [replicate 24 ' ' ++ "--xetex"]
214215 exitWith code
215216
217+ let args' = filter (/= "--xetex") args
218+
216219 -- check for executable files
217220 let latexProgram = if "--xetex" `elem` opts
218221 then "xelatex"
@@ -224,7 +227,7 @@ main = bracket
224227
225228 -- parse arguments
226229 -- if no input given, use 'stdin'
227− pandocArgs <- parsePandocArgs args
230+ pandocArgs <- parsePandocArgs args'
228231 (input, output) <- case pandocArgs of
229232 Nothing -> exit "Could not parse arguments"
230233 Just ([],out) -> do
@@ -235,7 +238,7 @@ main = bracket
235238 -- no need because we'll pass all arguments to pandoc
236239 Just (_ ,out) -> return ([], out)
237240 -- run pandoc
238− pandocRes <- runPandoc (input ++ args) $ replaceDirectory output tmp
241+ pandocRes <- runPandoc (input ++ args') $ replaceDirectory output tmp
239242 case pandocRes of
240243 Left err -> exit err
241244 Right texFile -> do
src/pandoc.hs+6−4
@@ -309,7 +309,10 @@ options =
309309
310310 , Option "" ["xetex"]
311311 (NoArg
312− (\opt -> return opt { optXeTeX = True }))
312+ (\opt -> do
313+ UTF8.hPutStrLn stderr $ "pandoc: --xetex is deprecated. "
314+ ++ "It is no longer needed for use with XeTeX."
315+ return opt { optXeTeX = True }))
313316 "" -- "Format latex for processing by XeTeX"
314317
315318 , Option "" ["chapters"]
@@ -675,7 +678,6 @@ main = do
675678 , optSectionDivs = sectionDivs
676679 , optIncremental = incremental
677680 , optOffline = offline
678− , optXeTeX = xetex
679681 , optSmart = smart
680682 , optHtml5 = html5
681683 , optChapters = chapters
@@ -786,7 +788,8 @@ main = do
786788 stateIndentedCodeClasses = codeBlockClasses,
787789 stateApplyMacros = writerName' `notElem` ["latex", "latex+lhs"] }
788790
789− let writerOptions = WriterOptions { writerStandalone = standalone',
791+ let writerOptions = defaultWriterOptions
792+ { writerStandalone = standalone',
790793 writerTemplate = if null template
791794 then defaultTemplate
792795 else template,
@@ -798,7 +801,6 @@ main = do
798801 writerHTMLMathMethod = mathMethod,
799802 writerSlideVariant = slideVariant,
800803 writerIncremental = incremental,
801− writerXeTeX = xetex,
802804 writerCiteMethod = citeMethod,
803805 writerBiblioFiles = reffiles,
804806 writerIgnoreNotes = False,