@@ -112,7 +112,9 @@ setInDefinitionList :: Bool -> State WriterState ()
112setInDefinitionList b = modify $ \s -> s { stInDefinition = b }
112setInDefinitionList b = modify $ \s -> s { stInDefinition = b }
114inParagraphTags :: Doc -> Doc
114inParagraphTags :: Doc -> Doc
115+inParagraphTags d | isEmpty d = empty
115−inParagraphTags = inTags False "text:p" [("text:style-name", "Text_20_body")]
117+ inTags False "text:p" [("text:style-name", "Text_20_body")] d
117inParagraphTagsWithStyle :: String -> Doc -> Doc
119inParagraphTagsWithStyle :: String -> Doc -> Doc
118inParagraphTagsWithStyle sty = inTags False "text:p" [("text:style-name", sty)]
120inParagraphTagsWithStyle sty = inTags False "text:p" [("text:style-name", sty)]
@@ -359,7 +361,7 @@ inlineToOpenDocument o ils
359 | Code s <- ils = preformatted s
361 | Code s <- ils = preformatted s
360 | Math _ s <- ils = inlinesToOpenDocument o (readTeXMath s)
362 | Math _ s <- ils = inlinesToOpenDocument o (readTeXMath s)
361 | Cite _ l <- ils = inlinesToOpenDocument o l
363 | Cite _ l <- ils = inlinesToOpenDocument o l
362− | TeX s <- ils = preformatted s
364+ | TeX _ <- ils = return empty
363 | HtmlInline s <- ils = preformatted s
365 | HtmlInline s <- ils = preformatted s
364 | Link l (s,t) <- ils = mkLink s t <$> inlinesToOpenDocument o l
366 | Link l (s,t) <- ils = mkLink s t <$> inlinesToOpenDocument o l
365 | Image _ (s,_) <- ils = return $ mkImg s
367 | Image _ (s,_) <- ils = return $ mkImg s