@@ -57,6 +57,13 @@ writeConTeXt options document =
5757
5858pandocToConTeXt :: WriterOptions -> Pandoc -> State WriterState String
5959pandocToConTeXt options (Pandoc (Meta title authors date) blocks) = do
60+ titletext <- if null title
61+ then return ""
62+ else liftM render $ inlineListToConTeXt title
63+ authorstext <- mapM (liftM render . inlineListToConTeXt) authors
64+ datetext <- if null date
65+ then return ""
66+ else liftM render $ inlineListToConTeXt date
6067 body <- blockListToConTeXt blocks
6168 let before = if null (writerIncludeBefore options)
6269 then empty
@@ -65,13 +72,6 @@ pandocToConTeXt options (Pandoc (Meta title authors date) blocks) = do
6572 then empty
6673 else text $ writerIncludeAfter options
6774 let main = render $ before $$ body $$ after
68− titletext <- if null title
69− then return ""
70− else liftM render $ inlineListToConTeXt title
71− authorstext <- mapM (liftM render . inlineListToConTeXt) authors
72− datetext <- if null date
73− then return ""
74− else liftM render $ inlineListToConTeXt date
7575 let context = writerVariables options ++
7676 [ ("toc", if writerTableOfContents options then "yes" else "")
7777 , ("body", main)