@@ -181,7 +181,7 @@ data Opt = Opt
181181 , optHtmlQTags :: Bool -- ^ Use <q> tags in HTML
182182 , optHighlight :: Bool -- ^ Highlight source code
183183 , optHighlightStyle :: Style -- ^ Style to use for highlighted code
184− , optTopLevelDivision :: Division -- ^ Type of the top-level divisions
184+ , optTopLevelDivision :: Maybe Division -- ^ Type of the top-level divisions
185185 , optHTMLMathMethod :: HTMLMathMethod -- ^ Method to print HTML math
186186 , optReferenceODT :: Maybe FilePath -- ^ Path of reference.odt
187187 , optReferenceDocx :: Maybe FilePath -- ^ Path of reference.docx
@@ -246,7 +246,7 @@ defaultOpts = Opt
246246 , optHtmlQTags = False
247247 , optHighlight = True
248248 , optHighlightStyle = pygments
249− , optTopLevelDivision = Section
249+ , optTopLevelDivision = Nothing
250250 , optHTMLMathMethod = PlainMath
251251 , optReferenceODT = Nothing
252252 , optReferenceDocx = Nothing
@@ -598,13 +598,13 @@ options =
598598 (NoArg
599599 (\opt -> do warn $ "--chapters is deprecated. " ++
600600 "Use --top-level-division=chapter instead."
601− return opt { optTopLevelDivision = Chapter }))
601+ return opt { optTopLevelDivision = Just Chapter }))
602602 "" -- "Use chapter for top-level sections in LaTeX, DocBook"
603603
604604 , Option "" ["top-level-division"]
605605 (ReqArg
606606 (\arg opt -> case safeRead (uppercaseFirstLetter arg) of
607− Just dvsn -> return opt { optTopLevelDivision = dvsn }
607+ Just dvsn -> return opt { optTopLevelDivision = Just dvsn }
608608 _ -> err 76 "Top-level division must be section, chapter, or part")
609609 "[section|chapter|part]")
610610 "" -- "Use top-level division type in LaTeX, ConTeXt, DocBook"