aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/LaTeX.hs
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:16:55 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:16:55 +0000
commit2a9ac1e65a2e1c4617a937f1c6a79f551d8637c5 (patch)
tree29e01834fbe57f16df9055f90778b338561ebdec /src/Text/Pandoc/Writers/LaTeX.hs
parent7dc43d3684045d5e83c2440a75040f22de4efcf4 (diff)
downloadpandoc-2a9ac1e65a2e1c4617a937f1c6a79f551d8637c5.tar.gz
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
Diffstat (limited to 'src/Text/Pandoc/Writers/LaTeX.hs')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs6
1 files changed, 3 insertions, 3 deletions
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)