@@ -572,7 +572,13 @@ tableCellToLaTeX header (width, align, blocks) = do
572572 $ reverse ns)
573573
574574listItemToLaTeX :: [Block] -> State WriterState Doc
575−listItemToLaTeX lst = blockListToLaTeX lst >>= return . (text "\\item" $$) .
575+listItemToLaTeX lst
576+ -- we need to put some text before a header if it's the first
577+ -- element in an item. This will look ugly in LaTeX regardless, but
578+ -- this will keep the typesetter from throwing an error.
579+ | ((Header _ _ _) :_) <- lst =
580+ blockListToLaTeX lst >>= return . (text "\\item ~" $$) . (nest 2)
581+ | otherwise = blockListToLaTeX lst >>= return . (text "\\item" $$) .
576582 (nest 2)
577583
578584defListItemToLaTeX :: ([Inline], [[Block]]) -> State WriterState Doc
@@ -586,7 +592,11 @@ defListItemToLaTeX (term, defs) = do
586592 then braces term'
587593 else term'
588594 def' <- liftM vsep $ mapM blockListToLaTeX defs
589− return $ "\\item" <> brackets term'' $$ def'
595+ return $ case defs of
596+ (((Header _ _ _) : _) : _) ->
597+ "\\item" <> brackets term'' <> " ~ " $$ def'
598+ _ ->
599+ "\\item" <> brackets term'' $$ def'
590600
591601-- | Craft the section header, inserting the secton reference, if supplied.
592602sectionHeader :: Bool -- True for unnumbered