diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-12-31 01:16:00 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-12-31 01:16:00 +0000 |
commit | dd210437f6abab19512c387ac73af1e3e44aa5ae (patch) | |
tree | 4517ecd92ca5503906a22b921f37201e8508f94e /src | |
parent | fbef848a3af236ca3a18e6aad7c459e93b8495fc (diff) | |
download | pandoc-dd210437f6abab19512c387ac73af1e3e44aa5ae.tar.gz |
Use $for$ for multiple authors in context, latex, markdown.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1723 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/ConTeXt.hs | 4 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 6 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 7 |
3 files changed, 8 insertions, 9 deletions
diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs index 6c9a7ace8..55105f786 100644 --- a/src/Text/Pandoc/Writers/ConTeXt.hs +++ b/src/Text/Pandoc/Writers/ConTeXt.hs @@ -76,8 +76,8 @@ pandocToConTeXt options (Pandoc (Meta title authors date) blocks) = do [ ("toc", if writerTableOfContents options then "yes" else "") , ("body", main) , ("title", titletext) - , ("authors", intercalate "\\\\" authorstext) - , ("date", datetext) ] + , ("date", datetext) ] ++ + [ ("author", a) | a <- authorstext ] return $ if writerStandalone options then renderTemplate context $ writerTemplate options else main diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 6782cc14e..412d774e9 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -32,7 +32,7 @@ import Text.Pandoc.Definition import Text.Pandoc.Shared import Text.Pandoc.Templates import Text.Printf ( printf ) -import Data.List ( (\\), isSuffixOf, intercalate, intersperse ) +import Data.List ( (\\), isSuffixOf, intersperse ) import Data.Char ( toLower ) import Control.Monad.State import Control.Monad (liftM) @@ -67,8 +67,8 @@ pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do [ ("toc", if writerTableOfContents options then "yes" else "") , ("body", main) , ("title", titletext) - , ("authors", intercalate "\\\\" authorsText) - , ("date", dateText) ] + , ("date", dateText) ] ++ + [ ("author", a) | a <- authorsText ] return $ if writerStandalone options then renderTemplate context $ writerTemplate options else main diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 7b3bb9f1f..5f44449f0 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -52,8 +52,7 @@ writeMarkdown opts document = pandocToMarkdown :: WriterOptions -> Pandoc -> State WriterState String pandocToMarkdown opts (Pandoc (Meta title authors date) blocks) = do title' <- inlineListToMarkdown opts title - authors' <- liftM (hcat . intersperse (text "; ")) $ - mapM (inlineListToMarkdown opts) authors + authors' <- mapM (inlineListToMarkdown opts) authors date' <- inlineListToMarkdown opts date let titleblock = not $ null title && null authors && null date let headerBlocks = filter isHeaderBlock blocks @@ -76,10 +75,10 @@ pandocToMarkdown opts (Pandoc (Meta title authors date) blocks) = do [ ("toc", render toc) , ("body", main) , ("title", render title') - , ("authors", render authors') , ("date", render date') ] ++ - [ ("titleblock", "yes") | titleblock ] + [ ("titleblock", "yes") | titleblock ] ++ + [ ("author", render a) | a <- authors' ] if writerStandalone opts then return $ renderTemplate context $ writerTemplate opts else return main |