diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-03-09 10:20:12 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-03-09 10:33:25 -0800 |
commit | f7229b147314042f946dfded3b441ab0fae260a0 (patch) | |
tree | fd40edcaa87e399a7299133b2b9919e102b8407a /src/Text/Pandoc/Writers | |
parent | be165a21ad15d9843d3d79aed651b89f623b49a9 (diff) | |
download | pandoc-f7229b147314042f946dfded3b441ab0fae260a0.tar.gz |
LaTeX reader: citation handling changes.
Previously, a LaTeX citation would always be parsed as a Citation
element, with the raw LaTeX in the [Inline] part.
Now, the LaTeX citation is parsed as a Citation element only if
`--biblio` was specified (i.e. only if there is a nonempty set
of references in readerReferences). Otherwise it is parsed as
raw LaTeX.
This will make it possible to simplify some things in the markdown
writer. It also makes the LaTeX reader behave more like the Markdown
reader.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index aa7764356..c19cad22b 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -644,7 +644,8 @@ inlineToMarkdown opts (LineBreak) | otherwise = return $ " " <> cr inlineToMarkdown _ Space = return space inlineToMarkdown opts (Cite (c:cs) lst) - | not (isEnabled Ext_citations opts) = inlineListToMarkdown opts lst + | not (null lst) = inlineListToMarkdown opts lst + -- if lst is null, citeproc wasn't run; print a pandoc markdown citation | citationMode c == AuthorInText = do suffs <- inlineListToMarkdown opts $ citationSuffix c rest <- mapM convertOne cs |