aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-03-18 02:39:13 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-03-18 02:39:13 +0000
commit312d098d351a938d84ecf0e20c6235196f3669c8 (patch)
treef562e829fb4dfbd37e24e6ec451762f43c849df9 /src
parenta9b0d876d9ec3a0b01be359cc4ab8278bd2d983e (diff)
downloadpandoc-312d098d351a938d84ecf0e20c6235196f3669c8.tar.gz
Texinfo writer: Handle images in figures.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1901 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Texinfo.hs6
1 files changed, 6 insertions, 0 deletions
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