aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-02-03 10:30:48 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-02-03 10:30:48 -0800
commitd46f434d4b8906ae3b983e568549213de94fd1a2 (patch)
treed1c31ada67d539098130218e60e098fd989c81e7 /src/Text/Pandoc/Writers
parente148fd75474f5391a5348fd674532dbd1dc1d756 (diff)
downloadpandoc-d46f434d4b8906ae3b983e568549213de94fd1a2.tar.gz
Citation changes.
* Citations will work in markdown even if `--biblio` isn't specified. Note: this may cause unexpected behavior for people who use strings of the form `@foo` that are not citations! * If `--biblio` isn't used, the markdown writer will write markdown citations rather than CSL-rendered citations. * This means, for example, that you can do `pandoc -f latex -t markdown` and convert biblatex or natbib citations into pandoc citations.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index 4d848d55b..8ff5ff9de 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -614,7 +614,9 @@ inlineToMarkdown opts (LineBreak)
| otherwise = return $ " " <> cr
inlineToMarkdown _ Space = return space
inlineToMarkdown opts (Cite (c:cs) lst)
- | writerCiteMethod opts == Citeproc = inlineListToMarkdown opts lst
+ | writerCiteMethod opts == Citeproc && not (null lst) &&
+ case lst of { RawInline "latex" _ : _ -> False; _ -> True} =
+ inlineListToMarkdown opts lst
| citationMode c == AuthorInText = do
suffs <- inlineListToMarkdown opts $ citationSuffix c
rest <- mapM convertOne cs