@@ -100,7 +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
103+ , optNumberOffset :: [Int] -- ^ Starting number for sections
104104 , optSectionDivs :: Bool -- ^ Put sections in div tags in HTML
105105 , optIncremental :: Bool -- ^ Use incremental lists in Slidy/Slideous/S5
106106 , optSelfContained :: Bool -- ^ Make HTML accessible offline
@@ -157,7 +157,7 @@ defaultOpts = Opt
157157 , optVariables = []
158158 , optOutputFile = "-" -- "-" means stdout
159159 , optNumberSections = False
160− , optNumberFrom = 1
160+ , optNumberOffset = [1,1,1,1,1,1]
161161 , optSectionDivs = False
162162 , optIncremental = False
163163 , optSelfContained = False
@@ -469,15 +469,15 @@ options =
469469 (\opt -> return opt { optNumberSections = True }))
470470 "" -- "Number sections in LaTeX"
471471
472− , Option "" ["number-from"]
472+ , Option "" ["number-offset"]
473473 (ReqArg
474474 (\arg opt ->
475− case safeRead arg of
476− Just n -> return opt { optNumberFrom = n,
477− optNumberSections = True }
478− _ -> err 57 "could not parse number-from")
479− "NUMBER")
480− "" -- "Starting number for sections"
475+ case safeRead ('[':arg ++ "]") of
476+ Just ns -> return opt { optNumberOffset = ns,
477+ optNumberSections = True }
478+ _ -> err 57 "could not parse number-offset")
479+ "NUMBERS")
480+ "" -- "Starting number for sections, subsections, etc."
481481
482482 , Option "" ["no-tex-ligatures"]
483483 (NoArg
@@ -841,7 +841,7 @@ main = do
841841 , optTemplate = templatePath
842842 , optOutputFile = outputFile
843843 , optNumberSections = numberSections
844− , optNumberFrom = numberFrom
844+ , optNumberOffset = numberFrom
845845 , optSectionDivs = sectionDivs
846846 , optIncremental = incremental
847847 , optSelfContained = selfContained
@@ -1035,7 +1035,7 @@ main = do
10351035 writerBiblioFiles = reffiles,
10361036 writerIgnoreNotes = False,
10371037 writerNumberSections = numberSections,
1038− writerNumberFrom = numberFrom,
1038+ writerNumberOffset = numberFrom,
10391039 writerSectionDivs = sectionDivs,
10401040 writerReferenceLinks = referenceLinks,
10411041 writerWrapText = wrap,