From 2a9ac1e65a2e1c4617a937f1c6a79f551d8637c5 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Thu, 31 Dec 2009 01:16:55 +0000 Subject: Context and latex writers - parse title, author, date before body. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1729 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/LaTeX.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Text/Pandoc/Writers/LaTeX.hs') diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 412d774e9..2da632798 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -52,6 +52,9 @@ writeLaTeX options document = pandocToLaTeX :: WriterOptions -> Pandoc -> State WriterState String pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do + titletext <- liftM render $ inlineListToLaTeX title + authorsText <- mapM (liftM render . inlineListToLaTeX) authors + dateText <- liftM render $ inlineListToLaTeX date body <- blockListToLaTeX blocks let before = if null (writerIncludeBefore options) then empty @@ -60,9 +63,6 @@ pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do then empty else text $ writerIncludeAfter options let main = render $ before $$ body $$ after - titletext <- liftM render $ inlineListToLaTeX title - authorsText <- mapM (liftM render . inlineListToLaTeX) authors - dateText <- liftM render $ inlineListToLaTeX date let context = writerVariables options ++ [ ("toc", if writerTableOfContents options then "yes" else "") , ("body", main) -- cgit v1.2.3