@@ -163,8 +163,10 @@ blockToConTeXt opts HorizontalRule = return $ text "\\thinrule\n"
163163blockToConTeXt opts (Header level lst) = do
164164 contents <- inlineListToConTeXt opts lst
165165 let base = if writerNumberSections opts then "section" else "subject"
166− return $ char '\\' <> text (concat (replicate (level - 1) "sub")) <>
167− text base <> char '{' <> contents <> char '}' <> char '\n'
166+ return $ if level >= 1 && level <= 5
167+ then char '\\' <> text (concat (replicate (level - 1) "sub")) <>
168+ text base <> char '{' <> contents <> char '}' <> char '\n'
169+ else contents <> char '\n'
168170blockToConTeXt opts (Table caption aligns widths heads rows) = do
169171 let colWidths = map printDecimal widths
170172 let colDescriptor colWidth alignment = (case alignment of