diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2010-03-13 04:11:24 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2010-03-13 04:11:24 +0000 |
commit | 3b9be92492cca7573f9ce79dff099b4d2fa3c56c (patch) | |
tree | f26d5f856df472e203645f082782e158fb5d8e2e /src/Text/Pandoc/Writers/LaTeX.hs | |
parent | a35af5db295b0e0c598b1ff68f52fc14a4d3911e (diff) | |
download | pandoc-3b9be92492cca7573f9ce79dff099b4d2fa3c56c.tar.gz |
Use template variables for include-before/after.
* These options now imply -s; previously they worked also
in fragment mode.
* Users can now adjust position of include-before and
include-after text in the templates.
* Default position of include-before moved back (as it
originally was) before table of contents.
* Resolves Issue #217.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1883 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Writers/LaTeX.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index f4375ad8c..3362c1d25 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -74,13 +74,7 @@ pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do authorsText <- mapM (liftM render . inlineListToLaTeX) authors dateText <- liftM render $ inlineListToLaTeX date body <- blockListToLaTeX blocks - let before = if null (writerIncludeBefore options) - then empty - else text $ writerIncludeBefore options - let after = if null (writerIncludeAfter options) - then empty - else text $ writerIncludeAfter options - let main = render $ before $$ body $$ after + let main = render body st <- get let context = writerVariables options ++ [ ("toc", if writerTableOfContents options then "yes" else "") |