diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs
index 4e3979c07..0e8a8bf8b 100644
--- a/src/Text/Pandoc/Writers/OpenDocument.hs
+++ b/src/Text/Pandoc/Writers/OpenDocument.hs
@@ -112,7 +112,9 @@ setInDefinitionList :: Bool -> State WriterState ()
setInDefinitionList b = modify $ \s -> s { stInDefinition = b }
inParagraphTags :: Doc -> Doc
-inParagraphTags = inTags False "text:p" [("text:style-name", "Text_20_body")]
+inParagraphTags d | isEmpty d = empty
+inParagraphTags d =
+ inTags False "text:p" [("text:style-name", "Text_20_body")] d
inParagraphTagsWithStyle :: String -> Doc -> Doc
inParagraphTagsWithStyle sty = inTags False "text:p" [("text:style-name", sty)]
@@ -359,7 +361,7 @@ inlineToOpenDocument o ils
| Code s <- ils = preformatted s
| Math _ s <- ils = inlinesToOpenDocument o (readTeXMath s)
| Cite _ l <- ils = inlinesToOpenDocument o l
- | TeX s <- ils = preformatted s
+ | TeX _ <- ils = return empty
| HtmlInline s <- ils = preformatted s
| Link l (s,t) <- ils = mkLink s t <$> inlinesToOpenDocument o l
| Image _ (s,_) <- ils = return $ mkImg s
diff --git a/tests/writer.opendocument b/tests/writer.opendocument
index a08e5cf0a..179d29ac9 100644
--- a/tests/writer.opendocument
+++ b/tests/writer.opendocument
@@ -1301,7 +1301,7 @@
LaTeX
- \cite[22-23]{smith.1899}
+
2 + 2 = 4
@@ -1341,11 +1341,6 @@
Here’s a LaTeX table:
-\begin{tabular}{|l|l|}\hline
-Animal & Number \\ \hline
-Dog & 2 \\
-Cat & 1 \\ \hline
-\end{tabular}
Special Characters
Here is some unicode: