@@ -256,15 +256,23 @@ blockCommands = M.fromList $
256256 , ("signature", mempty <$ (skipopts *> authors))
257257 , ("date", mempty <$ (skipopts *> tok >>= addDate))
258258 -- sectioning
259− , ("chapter", updateState (\s -> s{ stateHasChapters = True }) *> section 0)
260− , ("section", section 1)
261− , ("subsection", section 2)
262− , ("subsubsection", section 3)
263− , ("paragraph", section 4)
264− , ("subparagraph", section 5)
259+ , ("chapter", updateState (\s -> s{ stateHasChapters = True })
260+ *> section nullAttr 0)
261+ , ("chapter*", updateState (\s -> s{ stateHasChapters = True })
262+ *> section ("",["unnumbered"],[]) 0)
263+ , ("section", section nullAttr 1)
264+ , ("section*", section ("",["unnumbered"],[]) 1)
265+ , ("subsection", section nullAttr 2)
266+ , ("subsection*", section ("",["unnumbered"],[]) 2)
267+ , ("subsubsection", section nullAttr 3)
268+ , ("subsubsection*", section ("",["unnumbered"],[]) 3)
269+ , ("paragraph", section nullAttr 4)
270+ , ("paragraph*", section ("",["unnumbered"],[]) 4)
271+ , ("subparagraph", section nullAttr 5)
272+ , ("subparagraph*", section ("",["unnumbered"],[]) 5)
265273 -- beamer slides
266− , ("frametitle", section 3)
267− , ("framesubtitle", section 4)
274+ , ("frametitle", section nullAttr 3)
275+ , ("framesubtitle", section nullAttr 4)
268276 -- letters
269277 , ("opening", (para . trimInlines) <$> (skipopts *> tok))
270278 , ("closing", skipopts *> closing)
@@ -313,13 +321,13 @@ authors = try $ do
313321addDate :: Inlines -> LP ()
314322addDate dat = updateState (\s -> s{ stateDate = toList dat })
315323
316−section :: Int -> LP Blocks
317−section lvl = do
324+section :: Attr -> Int -> LP Blocks
325+section attr lvl = do
318326 hasChapters <- stateHasChapters `fmap` getState
319327 let lvl' = if hasChapters then lvl + 1 else lvl
320328 skipopts
321329 contents <- grouped inline
322− return $ header lvl' contents
330+ return $ headerWith attr lvl' contents
323331
324332inlineCommand :: LP Inlines
325333inlineCommand = try $ do