diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/OpenDocument.hs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs index e2c8abd2e..f00ae12bf 100644 --- a/src/Text/Pandoc/Writers/OpenDocument.hs +++ b/src/Text/Pandoc/Writers/OpenDocument.hs @@ -393,7 +393,10 @@ blockToOpenDocument o bs mapM_ addParaStyle . newPara $ paraHStyles ++ paraStyles captionDoc <- if null c then return empty - else inlinesToOpenDocument o c >>= numberedTableCaption + else inlinesToOpenDocument o c >>= + if True -- temporary: see #5474 + then unNumberedCaption "TableCaption" + else numberedTableCaption th <- if all null h then return empty else colHeadsToOpenDocument o (map fst paraHStyles) h @@ -405,7 +408,10 @@ blockToOpenDocument o bs withParagraphStyle o "Figure" [Para [Image attr caption (source,title)]] | otherwise = do imageDoc <- withParagraphStyle o "FigureWithCaption" [Para [Image attr caption (source,title)]] - captionDoc <- inlinesToOpenDocument o caption >>= numberedFigureCaption + captionDoc <- inlinesToOpenDocument o caption >>= + if True -- temporary: see #5474 + then unNumberedCaption "FigureCaption" + else numberedFigureCaption return $ imageDoc $$ captionDoc @@ -434,6 +440,9 @@ numberedCaption style term name num caption = c = text ": " in inParagraphTagsWithStyle style $ hcat [ t, text " ", s, c, caption ] +unNumberedCaption :: Monad m => String -> Doc -> OD m Doc +unNumberedCaption style caption = return $ inParagraphTagsWithStyle style caption + colHeadsToOpenDocument :: PandocMonad m => WriterOptions -> [String] -> [[Block]] -> OD m Doc |