diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-06-01 10:50:22 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-06-01 10:50:22 -0700 |
commit | e14712dabd9773a44be9a29fecb903079dac162f (patch) | |
tree | d3b5f994a94a959857e5b71b16d9ca94e4180a7e /src/Text/Pandoc/Writers | |
parent | 3fd80cd835b06cfcf1e3d729c2af43b5842d3b35 (diff) | |
download | pandoc-e14712dabd9773a44be9a29fecb903079dac162f.tar.gz |
LaTeX writer: Ensure newline after Verbatim at end of footnote.
This fixes a regression. Also added a test for this.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 650eadbc0..7a4dfc3c4 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -588,13 +588,16 @@ inlineToLaTeX (Note contents) = do contents' <- blockListToLaTeX contents modify (\s -> s {stInNote = False}) inTable <- liftM stInTable get + let optnl = case reverse contents of + (CodeBlock _ _ : _) -> cr + _ -> empty if inTable then do curnotes <- liftM stTableNotes get let marker = cycle ['a'..'z'] !! length curnotes modify $ \s -> s{ stTableNotes = (marker, contents') : curnotes } return $ "\\tmark" <> brackets (char marker) <> space - else return $ "\\footnote" <> braces (nest 2 contents') + else return $ "\\footnote" <> braces (nest 2 contents' <> optnl) -- note: a \n before } needed when note ends with a Verbatim environment citationsToNatbib :: [Citation] -> State WriterState Doc |