From 5fa78695bc4f2f0cd416997671eb17ccfd5e6da9 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 17 Nov 2007 23:34:16 +0000 Subject: ConTeXt writer: + Don't use \(sub)+subject if header level > 5. + Modified tests to conform to new treatment of level 4 and 5 headers. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1083 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/ConTeXt.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs index 871748e98..e2e240d33 100644 --- a/src/Text/Pandoc/Writers/ConTeXt.hs +++ b/src/Text/Pandoc/Writers/ConTeXt.hs @@ -163,8 +163,10 @@ blockToConTeXt opts HorizontalRule = return $ text "\\thinrule\n" blockToConTeXt opts (Header level lst) = do contents <- inlineListToConTeXt opts lst let base = if writerNumberSections opts then "section" else "subject" - return $ char '\\' <> text (concat (replicate (level - 1) "sub")) <> - text base <> char '{' <> contents <> char '}' <> char '\n' + return $ if level >= 1 && level <= 5 + then char '\\' <> text (concat (replicate (level - 1) "sub")) <> + text base <> char '{' <> contents <> char '}' <> char '\n' + else contents <> char '\n' blockToConTeXt opts (Table caption aligns widths heads rows) = do let colWidths = map printDecimal widths let colDescriptor colWidth alignment = (case alignment of -- cgit v1.2.3