From 97a3b2234a5cde8022edb306e20bacf30afb0463 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Wed, 19 Mar 2008 18:46:27 +0000 Subject: OpenDocument: use the new Definition_20_Term and Definition_20_Definition styles and some other minor cleanup. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1256 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/Writers/OpenDocument.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Text/Pandoc/Writers/OpenDocument.hs b/Text/Pandoc/Writers/OpenDocument.hs index 86375ab0c..827aa30e6 100644 --- a/Text/Pandoc/Writers/OpenDocument.hs +++ b/Text/Pandoc/Writers/OpenDocument.hs @@ -158,9 +158,9 @@ inPreformattedTags s = do orderedListToOpenDocument :: WriterOptions -> Int -> [[Block]] -> State WriterState Doc -orderedListToOpenDocument o pn is = +orderedListToOpenDocument o pn bs = vcat . map (inTagsIndented "text:list-item") <$> - mapM (orderedItemToOpenDocument o pn . map plainToPara) is + mapM (orderedItemToOpenDocument o pn . map plainToPara) bs orderedItemToOpenDocument :: WriterOptions -> Int -> [Block] -> State WriterState Doc orderedItemToOpenDocument o n (b:bs) @@ -198,8 +198,8 @@ listItemsToOpenDocument s o is = deflistItemToOpenDocument :: WriterOptions -> ([Inline],[Block]) -> State WriterState Doc deflistItemToOpenDocument o (t,d) = do - t' <- withParagraphStyle o "Definition-term" [Para t] - d' <- withParagraphStyle o "Definition-definition" (map plainToPara d) + t' <- withParagraphStyle o "Definition_20_Term" [Para t] + d' <- withParagraphStyle o "Definition_20_Definition" (map plainToPara d) return $ t' $$ d' inBlockQuote :: WriterOptions -> Int -> [Block] -> State WriterState Doc @@ -338,8 +338,8 @@ generateStyles acc = fonts = inTagsIndented "office:font-face-decls" (vcat $ map font ["Lucida Sans Unicode", "Tahoma", "Times New Roman"]) font fn = selfClosingTag "style:font-face" - [ ("style:name", fn) - , ("svg:font-family", fn)] + [ ("style:name" , "'" ++ fn ++ "'") + , ("svg:font-family", fn )] in scripts $$ fonts $$ inTagsIndented "office:automatic-styles" (vcat $ reverse acc) bulletListStyle :: Int -> State WriterState (Int,(Int,[Doc])) -- cgit v1.2.3