From 312d098d351a938d84ecf0e20c6235196f3669c8 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Thu, 18 Mar 2010 02:39:13 +0000 Subject: Texinfo writer: Handle images in figures. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1901 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/Texinfo.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/Texinfo.hs b/src/Text/Pandoc/Writers/Texinfo.hs index bd77c57bb..47a318631 100644 --- a/src/Text/Pandoc/Writers/Texinfo.hs +++ b/src/Text/Pandoc/Writers/Texinfo.hs @@ -107,6 +107,12 @@ blockToTexinfo Null = return empty blockToTexinfo (Plain lst) = inlineListToTexinfo lst +blockToTexinfo (Para [Image txt (src,tit)]) = do + capt <- inlineListToTexinfo txt + img <- inlineToTexinfo (Image txt (src,tit)) + return $ text "@float" $$ img $$ (text "@caption{" <> capt <> char '}') $$ + text "@end float" + blockToTexinfo (Para lst) = inlineListToTexinfo lst -- this is handled differently from Plain in blockListToTexinfo -- cgit v1.2.3