summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/ConTeXt.hs
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:10:17 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:10:17 +0000
commit9f126c15cf4d0f6c2ab14167e11336d4f5f8783e (patch)
tree416833a563f3be1b9e0bd72e1ec9006150e16943 /src/Text/Pandoc/Writers/ConTeXt.hs
parentc602ed345959dbeb08533cd9c9c11f0604641c10 (diff)
Removed unneeded writer options; use template variables instead.
Removed writerIncludeAfter, writerIncludeBefore, writerTitlePrefix, writerHeader. Removed corresponding fields of Options structure in pandoc.hs. The options now set template variables (writerVariables) instead. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1684 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Writers/ConTeXt.hs')
-rw-r--r--src/Text/Pandoc/Writers/ConTeXt.hs72
1 files changed, 37 insertions, 35 deletions
diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs
index 142c862ef..0682de4bd 100644
--- a/src/Text/Pandoc/Writers/ConTeXt.hs
+++ b/src/Text/Pandoc/Writers/ConTeXt.hs
@@ -57,47 +57,49 @@ writeConTeXt options document =
pandocToConTeXt :: WriterOptions -> Pandoc -> State WriterState Doc
pandocToConTeXt options (Pandoc meta blocks) = do
- main <- blockListToConTeXt 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 body = before $$ main $$ after
- head' <- if writerStandalone options
- then contextHeader options meta
- else return empty
- let toc = if writerTableOfContents options
- then text "\\placecontent\n"
- else empty
- let foot = if writerStandalone options
- then text "\\stoptext\n"
- else empty
- return $ head' $$ toc $$ body $$ foot
+ return empty -- TODO
+-- main <- blockListToConTeXt 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 body = before $$ main $$ after
+-- head' <- if writerStandalone options
+-- then contextHeader options meta
+-- else return empty
+-- let toc = if writerTableOfContents options
+-- then text "\\placecontent\n"
+-- else empty
+-- let foot = if writerStandalone options
+-- then text "\\stoptext\n"
+-- else empty
+-- return $ head' $$ toc $$ body $$ foot
-- | Insert bibliographic information into ConTeXt header.
contextHeader :: WriterOptions -- ^ Options, including ConTeXt header
-> Meta -- ^ Meta with bibliographic information
-> State WriterState Doc
contextHeader options (Meta title authors date) = do
- titletext <- if null title
- then return empty
- else inlineListToConTeXt title
- let authorstext = if null authors
- then ""
- else if length authors == 1
- then stringToConTeXt $ head authors
- else stringToConTeXt $ (intercalate ", " $
- init authors) ++ " & " ++ last authors
- let datetext = if date == ""
- then ""
- else stringToConTeXt date
- let titleblock = text "\\doctitle{" <> titletext <> char '}' $$
- text ("\\author{" ++ authorstext ++ "}") $$
- text ("\\date{" ++ datetext ++ "}")
- let header = text $ writerHeader options
- return $ header $$ titleblock $$ text "\\starttext\n\\maketitle\n"
+ return empty -- TODO
+-- titletext <- if null title
+-- then return empty
+-- else inlineListToConTeXt title
+-- let authorstext = if null authors
+-- then ""
+-- else if length authors == 1
+-- then stringToConTeXt $ head authors
+-- else stringToConTeXt $ (intercalate ", " $
+-- init authors) ++ " & " ++ last authors
+-- let datetext = if date == ""
+-- then ""
+-- else stringToConTeXt date
+-- let titleblock = text "\\doctitle{" <> titletext <> char '}' $$
+-- text ("\\author{" ++ authorstext ++ "}") $$
+-- text ("\\date{" ++ datetext ++ "}")
+-- let header = text $ writerHeader options
+-- return $ header $$ titleblock $$ text "\\starttext\n\\maketitle\n"
-- escape things as needed for ConTeXt