git.iko.soy/typeable/pandoc
on master help sign in
Texinfo writer: Handle images in figures.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1901 788f1e2b-df1e-0410-8736-df70ead52e1b

commit312d098d351a938d84ecf0e20c6235196f3669c8 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateThu 18 Mar 2010, 02:39 (17 years ago) parenta9b0d87
2 files changed+9
src/Text/Pandoc/Writers/Texinfo.hs+6 tests/writer.texinfo+3
src/Text/Pandoc/Writers/Texinfo.hs+6
@@ -107,6 +107,12 @@ blockToTexinfo Null = return empty
107107blockToTexinfo (Plain lst) =
108108 inlineListToTexinfo lst
109109
110+blockToTexinfo (Para [Image txt (src,tit)]) = do
111+ capt <- inlineListToTexinfo txt
112+ img <- inlineToTexinfo (Image txt (src,tit))
113+ return $ text "@float" $$ img $$ (text "@caption{" <> capt <> char '}') $$
114+ text "@end float"
115+
110116blockToTexinfo (Para lst) =
111117 inlineListToTexinfo lst -- this is handled differently from Plain in blockListToTexinfo
112118
tests/writer.texinfo+3
@@ -977,7 +977,10 @@ or here: <http://example.com/>
977977@chapter Images
978978From ``Voyage dans la Lune'' by Georges Melies (1902):
979979
980+@float
980981@image{lalune,,,lalune,jpg}
982+@caption{lalune}
983+@end float
981984
982985Here is a movie @image{movie,,,movie,jpg} icon.
983986