@@ -100,7 +100,7 @@ data Opt = Opt
100 , optVariables :: [(String,String)] -- ^ Template variables to set
100 , optVariables :: [(String,String)] -- ^ Template variables to set
101 , optOutputFile :: String -- ^ Name of output file
101 , optOutputFile :: String -- ^ Name of output file
102 , optNumberSections :: Bool -- ^ Number sections in LaTeX
102 , optNumberSections :: Bool -- ^ Number sections in LaTeX
103− , optNumberFrom :: Int -- ^ Starting number for sections
103+ , optNumberOffset :: [Int] -- ^ Starting number for sections
104 , optSectionDivs :: Bool -- ^ Put sections in div tags in HTML
104 , optSectionDivs :: Bool -- ^ Put sections in div tags in HTML
105 , optIncremental :: Bool -- ^ Use incremental lists in Slidy/Slideous/S5
105 , optIncremental :: Bool -- ^ Use incremental lists in Slidy/Slideous/S5
106 , optSelfContained :: Bool -- ^ Make HTML accessible offline
106 , optSelfContained :: Bool -- ^ Make HTML accessible offline
@@ -157,7 +157,7 @@ defaultOpts = Opt
157 , optVariables = []
157 , optVariables = []
158 , optOutputFile = "-" -- "-" means stdout
158 , optOutputFile = "-" -- "-" means stdout
159 , optNumberSections = False
159 , optNumberSections = False
160− , optNumberFrom = 1
160+ , optNumberOffset = [1,1,1,1,1,1]
161 , optSectionDivs = False
161 , optSectionDivs = False
162 , optIncremental = False
162 , optIncremental = False
163 , optSelfContained = False
163 , optSelfContained = False
@@ -469,15 +469,15 @@ options =
469 (\opt -> return opt { optNumberSections = True }))
469 (\opt -> return opt { optNumberSections = True }))
470 "" -- "Number sections in LaTeX"
470 "" -- "Number sections in LaTeX"
472− , Option "" ["number-from"]
472+ , Option "" ["number-offset"]
474 (\arg opt ->
474 (\arg opt ->
475− case safeRead arg of
475+ case safeRead ('[':arg ++ "]") of
476− Just n -> return opt { optNumberFrom = n,
476+ Just ns -> return opt { optNumberOffset = ns,
477− optNumberSections = True }
477+ optNumberSections = True }
478− _ -> err 57 "could not parse number-from")
478+ _ -> err 57 "could not parse number-offset")
479− "NUMBER")
479+ "NUMBERS")
480− "" -- "Starting number for sections"
480+ "" -- "Starting number for sections, subsections, etc."
482 , Option "" ["no-tex-ligatures"]
482 , Option "" ["no-tex-ligatures"]
@@ -841,7 +841,7 @@ main = do
841 , optTemplate = templatePath
841 , optTemplate = templatePath
842 , optOutputFile = outputFile
842 , optOutputFile = outputFile
843 , optNumberSections = numberSections
843 , optNumberSections = numberSections
844− , optNumberFrom = numberFrom
844+ , optNumberOffset = numberFrom
845 , optSectionDivs = sectionDivs
845 , optSectionDivs = sectionDivs
846 , optIncremental = incremental
846 , optIncremental = incremental
847 , optSelfContained = selfContained
847 , optSelfContained = selfContained
@@ -1035,7 +1035,7 @@ main = do
1035 writerBiblioFiles = reffiles,
1035 writerBiblioFiles = reffiles,
1036 writerIgnoreNotes = False,
1036 writerIgnoreNotes = False,
1037 writerNumberSections = numberSections,
1037 writerNumberSections = numberSections,
1038− writerNumberFrom = numberFrom,
1038+ writerNumberOffset = numberFrom,
1039 writerSectionDivs = sectionDivs,
1039 writerSectionDivs = sectionDivs,
1040 writerReferenceLinks = referenceLinks,
1040 writerReferenceLinks = referenceLinks,
1041 writerWrapText = wrap,
1041 writerWrapText = wrap,