@@ -100,6 +100,7 @@ data Opt = Opt
100100 , optVariables :: [(String,String)] -- ^ Template variables to set
101101 , optOutputFile :: String -- ^ Name of output file
102102 , optNumberSections :: Bool -- ^ Number sections in LaTeX
103+ , optNumberFrom :: Int -- ^ Starting number for sections
103104 , optSectionDivs :: Bool -- ^ Put sections in div tags in HTML
104105 , optIncremental :: Bool -- ^ Use incremental lists in Slidy/Slideous/S5
105106 , optSelfContained :: Bool -- ^ Make HTML accessible offline
@@ -156,6 +157,7 @@ defaultOpts = Opt
156157 , optVariables = []
157158 , optOutputFile = "-" -- "-" means stdout
158159 , optNumberSections = False
160+ , optNumberFrom = 1
159161 , optSectionDivs = False
160162 , optIncremental = False
161163 , optSelfContained = False
@@ -467,6 +469,15 @@ options =
467469 (\opt -> return opt { optNumberSections = True }))
468470 "" -- "Number sections in LaTeX"
469471
472+ , Option "" ["number-from"]
473+ (ReqArg
474+ (\arg opt ->
475+ case safeRead arg of
476+ Just n -> return opt { optNumberFrom = n }
477+ _ -> err 57 "could not parse number-from")
478+ "NUMBER")
479+ "" -- "Starting number for sections"
480+
470481 , Option "" ["no-tex-ligatures"]
471482 (NoArg
472483 (\opt -> return opt { optTeXLigatures = False }))
@@ -829,6 +840,7 @@ main = do
829840 , optTemplate = templatePath
830841 , optOutputFile = outputFile
831842 , optNumberSections = numberSections
843+ , optNumberFrom = numberFrom
832844 , optSectionDivs = sectionDivs
833845 , optIncremental = incremental
834846 , optSelfContained = selfContained
@@ -1022,6 +1034,7 @@ main = do
10221034 writerBiblioFiles = reffiles,
10231035 writerIgnoreNotes = False,
10241036 writerNumberSections = numberSections,
1037+ writerNumberFrom = numberFrom,
10251038 writerSectionDivs = sectionDivs,
10261039 writerReferenceLinks = referenceLinks,
10271040 writerWrapText = wrap,