@@ -57,6 +57,13 @@ writeConTeXt options document =
58pandocToConTeXt :: WriterOptions -> Pandoc -> State WriterState String
58pandocToConTeXt :: WriterOptions -> Pandoc -> State WriterState String
59pandocToConTeXt options (Pandoc (Meta title authors date) blocks) = do
59pandocToConTeXt options (Pandoc (Meta title authors date) blocks) = do
60+ titletext <- if null title
62+ else liftM render $ inlineListToConTeXt title
63+ authorstext <- mapM (liftM render . inlineListToConTeXt) authors
64+ datetext <- if null date
66+ else liftM render $ inlineListToConTeXt date
60 body <- blockListToConTeXt blocks
67 body <- blockListToConTeXt blocks
61 let before = if null (writerIncludeBefore options)
68 let before = if null (writerIncludeBefore options)
62 then empty
69 then empty
@@ -65,13 +72,6 @@ pandocToConTeXt options (Pandoc (Meta title authors date) blocks) = do
65 then empty
72 then empty
66 else text $ writerIncludeAfter options
73 else text $ writerIncludeAfter options
67 let main = render $ before $$ body $$ after
74 let main = render $ before $$ body $$ after
68− titletext <- if null title
70− else liftM render $ inlineListToConTeXt title
71− authorstext <- mapM (liftM render . inlineListToConTeXt) authors
72− datetext <- if null date
74− else liftM render $ inlineListToConTeXt date
75 let context = writerVariables options ++
75 let context = writerVariables options ++
76 [ ("toc", if writerTableOfContents options then "yes" else "")
76 [ ("toc", if writerTableOfContents options then "yes" else "")
77 , ("body", main)
77 , ("body", main)