From e14712dabd9773a44be9a29fecb903079dac162f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 1 Jun 2012 10:50:22 -0700 Subject: LaTeX writer: Ensure newline after Verbatim at end of footnote. This fixes a regression. Also added a test for this. --- src/Text/Pandoc/Writers/LaTeX.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Writers') 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 -- cgit v1.2.3