diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-02-21 21:40:06 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-02-21 21:40:06 -0800 |
commit | 8df380486c986141ea448e74cdd37e4faae773a1 (patch) | |
tree | b6a86f65fe2f8e52deea6b2f31957eacf7990072 /pandoc.hs | |
parent | 07e8cedf2bddcbf13bfd69a415107b2a9aa074aa (diff) | |
download | pandoc-8df380486c986141ea448e74cdd37e4faae773a1.tar.gz |
Added `--number-from` option and `writerNumberFrom`.
These still aren't hooked up to anything in the writers.
Diffstat (limited to 'pandoc.hs')
-rw-r--r-- | pandoc.hs | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -100,6 +100,7 @@ data Opt = Opt , optVariables :: [(String,String)] -- ^ Template variables to set , optOutputFile :: String -- ^ Name of output file , optNumberSections :: Bool -- ^ Number sections in LaTeX + , optNumberFrom :: Int -- ^ Starting number for sections , optSectionDivs :: Bool -- ^ Put sections in div tags in HTML , optIncremental :: Bool -- ^ Use incremental lists in Slidy/Slideous/S5 , optSelfContained :: Bool -- ^ Make HTML accessible offline @@ -156,6 +157,7 @@ defaultOpts = Opt , optVariables = [] , optOutputFile = "-" -- "-" means stdout , optNumberSections = False + , optNumberFrom = 1 , optSectionDivs = False , optIncremental = False , optSelfContained = False @@ -467,6 +469,15 @@ options = (\opt -> return opt { optNumberSections = True })) "" -- "Number sections in LaTeX" + , Option "" ["number-from"] + (ReqArg + (\arg opt -> + case safeRead arg of + Just n -> return opt { optNumberFrom = n } + _ -> err 57 "could not parse number-from") + "NUMBER") + "" -- "Starting number for sections" + , Option "" ["no-tex-ligatures"] (NoArg (\opt -> return opt { optTeXLigatures = False })) @@ -829,6 +840,7 @@ main = do , optTemplate = templatePath , optOutputFile = outputFile , optNumberSections = numberSections + , optNumberFrom = numberFrom , optSectionDivs = sectionDivs , optIncremental = incremental , optSelfContained = selfContained @@ -1022,6 +1034,7 @@ main = do writerBiblioFiles = reffiles, writerIgnoreNotes = False, writerNumberSections = numberSections, + writerNumberFrom = numberFrom, writerSectionDivs = sectionDivs, writerReferenceLinks = referenceLinks, writerWrapText = wrap, |