From 270ffe6ab548de83287b7647269b0c8a18b9e8bf Mon Sep 17 00:00:00 2001 From: Dmitry Pogodin Date: Sun, 3 Nov 2019 18:17:05 +0300 Subject: Place caption before table in OpenDocument format. (#5869) Closes #5681. --- src/Text/Pandoc/Writers/OpenDocument.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs index 7a3aa4973..9c6867797 100644 --- a/src/Text/Pandoc/Writers/OpenDocument.hs +++ b/src/Text/Pandoc/Writers/OpenDocument.hs @@ -404,9 +404,11 @@ blockToOpenDocument o bs then return empty else colHeadsToOpenDocument o (map fst paraHStyles) h tr <- mapM (tableRowToOpenDocument o (map fst paraStyles)) r - return $ inTags True "table:table" [ ("table:name" , name) - , ("table:style-name", name) - ] (vcat columns $$ th $$ vcat tr) $$ captionDoc + let tableDoc = inTags True "table:table" [ + ("table:name" , name) + , ("table:style-name", name) + ] (vcat columns $$ th $$ vcat tr) + return $ captionDoc $$ tableDoc figure attr caption source title | null caption = withParagraphStyle o "Figure" [Para [Image attr caption (source,title)]] | otherwise = do -- cgit v1.2.3