@@ -288,6 +288,8 @@ blockToOpenDocument o bs
288 | Plain b <- bs = if null b
288 | Plain b <- bs = if null b
289 then return empty
289 then return empty
290 else inParagraphTags =<< inlinesToOpenDocument o b
290 else inParagraphTags =<< inlinesToOpenDocument o b
291+ | Para [Image c (s,'f':'i':'g':':':t)] <- bs
291 | Para b <- bs = if null b
293 | Para b <- bs = if null b
292 then return empty
294 then return empty
293 else inParagraphTags =<< inlinesToOpenDocument o b
295 else inParagraphTags =<< inlinesToOpenDocument o b
@@ -334,7 +336,7 @@ blockToOpenDocument o bs
334 mapM_ addParaStyle . newPara $ paraHStyles ++ paraStyles
336 mapM_ addParaStyle . newPara $ paraHStyles ++ paraStyles
335 captionDoc <- if null c
337 captionDoc <- if null c
336 then return empty
338 then return empty
337− else withParagraphStyle o "Caption" [Para c]
339+ else withParagraphStyle o "TableCaption" [Para c]
338 th <- if all null h
340 th <- if all null h
339 then return empty
341 then return empty
340 else colHeadsToOpenDocument o name (map fst paraHStyles) h
342 else colHeadsToOpenDocument o name (map fst paraHStyles) h
@@ -342,6 +344,12 @@ blockToOpenDocument o bs
342 return $ inTags True "table:table" [ ("table:name" , name)
344 return $ inTags True "table:table" [ ("table:name" , name)
343 , ("table:style-name", name)
345 , ("table:style-name", name)
344 ] (vcat columns $$ th $$ vcat tr) $$ captionDoc
346 ] (vcat columns $$ th $$ vcat tr) $$ captionDoc
347+ figure caption source title | null caption =
348+ withParagraphStyle o "Figure" [Para [Image caption (source,title)]]
350+ imageDoc <- withParagraphStyle o "FigureWithCaption" [Para [Image caption (source,title)]]
351+ captionDoc <- withParagraphStyle o "FigureCaption" [Para caption]
352+ return $ imageDoc $$ captionDoc
346colHeadsToOpenDocument :: WriterOptions -> String -> [String] -> [[Block]] -> State WriterState Doc
354colHeadsToOpenDocument :: WriterOptions -> String -> [String] -> [[Block]] -> State WriterState Doc
347colHeadsToOpenDocument o tn ns hs =
355colHeadsToOpenDocument o tn ns hs =
@@ -553,4 +561,3 @@ textStyleAttr s
553 ,("style:font-name-asian" ,"Courier New")
561 ,("style:font-name-asian" ,"Courier New")
554 ,("style:font-name-complex" ,"Courier New")]
562 ,("style:font-name-complex" ,"Courier New")]
555 | otherwise = []
563 | otherwise = []