git.iko.soy/typeable/pandoc
on master help sign in
Deprecated `--xetex` option - it is no longer needed.
18306c7John MacFarlane
@@ -265,9 +265,6 @@ Options
265 show in the output, so that the slide show will work even when no
265 show in the output, so that the slide show will work even when no
266 internet connection is available.
266 internet connection is available.
267
267
268−`--xetex`
269−: Create LaTeX outut suitable for processing by XeTeX.
270−
271`--chapters`
268`--chapters`
272: Treat top-level headers as chapters in LaTeX, ConTeXt, and DocBook
269: Treat top-level headers as chapters in LaTeX, ConTeXt, and DocBook
273 output.
270 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
42\--strict
42\--strict
43: Use strict markdown syntax, with no extensions or variants.
43: Use strict markdown syntax, with no extensions or variants.
44
44
45−\--xetex
46−: Use xelatex instead of pdflatex to create the PDF.
47−
48-N, \--number-sections
45-N, \--number-sections
49: Number section headings in LaTeX output. (Default is not to number them.)
46: Number section headings in LaTeX output. (Default is not to number them.)
50
47
@@ -109,6 +106,9 @@ packages are not included in your latex setup, they can be obtained from
109 or `s5` directory placed in this directory will override pandoc's
106 or `s5` directory placed in this directory will override pandoc's
110 normal defaults.
107 normal defaults.
111
108
109+\--xetex
110+: Use xelatex instead of pdflatex to create the PDF.
111+
112# SEE ALSO
112# SEE ALSO
113
113
114`pandoc`(1), `pdflatex`(1)
114`pandoc`(1), `pdflatex`(1)
src/Text/Pandoc/Shared.hs+1
@@ -493,6 +493,7 @@ data WriterOptions = WriterOptions
493 , writerAscii :: Bool -- ^ Avoid non-ascii characters
493 , writerAscii :: Bool -- ^ Avoid non-ascii characters
494 } deriving Show
494 } deriving Show
495
495
496+{-# DEPRECATED writerXeTeX "writerXeTeX no longer does anything" #-}
496-- | Default writer options.
497-- | Default writer options.
497defaultWriterOptions :: WriterOptions
498defaultWriterOptions :: WriterOptions
498defaultWriterOptions =
499defaultWriterOptions =
src/Text/Pandoc/Writers/LaTeX.hs−1
@@ -111,7 +111,6 @@ pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do
111 , ("title", titletext)
111 , ("title", titletext)
112 , ("date", dateText) ] ++
112 , ("date", dateText) ] ++
113 [ ("author", a) | a <- authorsText ] ++
113 [ ("author", a) | a <- authorsText ] ++
114− [ ("xetex", "yes") | writerXeTeX options ] ++
115 [ ("verbatim-in-note", "yes") | stVerbInNote st ] ++
114 [ ("verbatim-in-note", "yes") | stVerbInNote st ] ++
116 [ ("fancy-enums", "yes") | stEnumerate st ] ++
115 [ ("fancy-enums", "yes") | stEnumerate st ] ++
117 [ ("tables", "yes") | stTable st ] ++
116 [ ("tables", "yes") | stTable st ] ++
src/markdown2pdf.hs+6−3
@@ -210,9 +210,12 @@ main = bracket
210 (code, out, _err) <- readProcessWithExitCode "pandoc" ["--help"] ""
210 (code, out, _err) <- readProcessWithExitCode "pandoc" ["--help"] ""
211 UTF8.putStrLn "markdown2pdf [OPTIONS] [FILES]\nOptions:"
211 UTF8.putStrLn "markdown2pdf [OPTIONS] [FILES]\nOptions:"
212 UTF8.putStr $ unlines $
212 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"]
214 exitWith code
215 exitWith code
215
216
217+ let args' = filter (/= "--xetex") args
218+
216 -- check for executable files
219 -- check for executable files
217 let latexProgram = if "--xetex" `elem` opts
220 let latexProgram = if "--xetex" `elem` opts
218 then "xelatex"
221 then "xelatex"
@@ -224,7 +227,7 @@ main = bracket
224
227
225 -- parse arguments
228 -- parse arguments
226 -- if no input given, use 'stdin'
229 -- if no input given, use 'stdin'
227− pandocArgs <- parsePandocArgs args
230+ pandocArgs <- parsePandocArgs args'
228 (input, output) <- case pandocArgs of
231 (input, output) <- case pandocArgs of
229 Nothing -> exit "Could not parse arguments"
232 Nothing -> exit "Could not parse arguments"
230 Just ([],out) -> do
233 Just ([],out) -> do
@@ -235,7 +238,7 @@ main = bracket
235 -- no need because we'll pass all arguments to pandoc
238 -- no need because we'll pass all arguments to pandoc
236 Just (_ ,out) -> return ([], out)
239 Just (_ ,out) -> return ([], out)
237 -- run pandoc
240 -- run pandoc
238− pandocRes <- runPandoc (input ++ args) $ replaceDirectory output tmp
241+ pandocRes <- runPandoc (input ++ args') $ replaceDirectory output tmp
239 case pandocRes of
242 case pandocRes of
240 Left err -> exit err
243 Left err -> exit err
241 Right texFile -> do
244 Right texFile -> do
src/pandoc.hs+6−4
@@ -309,7 +309,10 @@ options =
309
309
310 , Option "" ["xetex"]
310 , Option "" ["xetex"]
311 (NoArg
311 (NoArg
312+ (\opt -> do
313+ UTF8.hPutStrLn stderr $ "pandoc: --xetex is deprecated. "
314+ ++ "It is no longer needed for use with XeTeX."
312− (\opt -> return opt { optXeTeX = True }))
315+ return opt { optXeTeX = True }))
313 "" -- "Format latex for processing by XeTeX"
316 "" -- "Format latex for processing by XeTeX"
314
317
315 , Option "" ["chapters"]
318 , Option "" ["chapters"]
@@ -675,7 +678,6 @@ main = do
675 , optSectionDivs = sectionDivs
678 , optSectionDivs = sectionDivs
676 , optIncremental = incremental
679 , optIncremental = incremental
677 , optOffline = offline
680 , optOffline = offline
678− , optXeTeX = xetex
679 , optSmart = smart
681 , optSmart = smart
680 , optHtml5 = html5
682 , optHtml5 = html5
681 , optChapters = chapters
683 , optChapters = chapters
@@ -786,7 +788,8 @@ main = do
786 stateIndentedCodeClasses = codeBlockClasses,
788 stateIndentedCodeClasses = codeBlockClasses,
787 stateApplyMacros = writerName' `notElem` ["latex", "latex+lhs"] }
789 stateApplyMacros = writerName' `notElem` ["latex", "latex+lhs"] }
788
790
791+ let writerOptions = defaultWriterOptions
789− let writerOptions = WriterOptions { writerStandalone = standalone',
792+ { writerStandalone = standalone',
790 writerTemplate = if null template
793 writerTemplate = if null template
791 then defaultTemplate
794 then defaultTemplate
792 else template,
795 else template,
@@ -798,7 +801,6 @@ main = do
798 writerHTMLMathMethod = mathMethod,
801 writerHTMLMathMethod = mathMethod,
799 writerSlideVariant = slideVariant,
802 writerSlideVariant = slideVariant,
800 writerIncremental = incremental,
803 writerIncremental = incremental,
801− writerXeTeX = xetex,
802 writerCiteMethod = citeMethod,
804 writerCiteMethod = citeMethod,
803 writerBiblioFiles = reffiles,
805 writerBiblioFiles = reffiles,
804 writerIgnoreNotes = False,
806 writerIgnoreNotes = False,