Can't open Odt file generated from Pandoc
<p>I tried to generated a basic <code>odt</code> file with a mathematic formula with the Haskell <code>pandoc</code> library to verify if the problem described with <code>docx</code> documents in <a href="https://stackoverflow.com/questions/40228608/spaces-in-multi-characters-variable-name-in-pandoc-export-to-docx">this question</a> is the same with odt files.</p>

<p>However, when I execute this code : </p>

<pre><code>import Text.Pandoc
import Data.Map (fromList)
import qualified Data.ByteString.Lazy as B
import qualified Data.Set as Set

main = do
  document &lt;- writeODT   WriterOptions{ writerStandalone=False
                               , writerReferenceODT=Nothing
                               , writerUserDataDir=Nothing
                               , writerExtensions=plainExtensions
                               }  pandoc
  B.writeFile "document.odt" document

pandoc = Pandoc ( Meta {unMeta = fromList []})
                           [ Para  [Str "A small Math example"]
                           , Plain [Math InlineMath "A_e = \\{var\\} + 5"]
                           , HorizontalRule
                           ]


plainExtensions = Set.fromList
  [ Ext_table_captions
  , Ext_implicit_figures
  , Ext_simple_tables
  , Ext_multiline_tables
  , Ext_grid_tables
  , Ext_latex_macros
  , Ext_fancy_lists
  , Ext_startnum
  , Ext_definition_lists
  , Ext_example_lists
  , Ext_intraword_underscores
  , Ext_blank_before_blockquote
  , Ext_blank_before_header
  , Ext_strikeout
  ]
</code></pre>

<p>The generated <code>odt</code> file can't be opened with libreoffice. When the file is opening, the following error message appear : </p>

<pre><code>Format error discovered in the file in sub-document content.xml at 2,0(row,col)
</code></pre>

<p><strong>Is there something I made wrong with my Haskell code ? Or is it a Pandoc bug ?</strong></p>

<p><strong>Is there a trick to open the odt file nevertheless ?</strong></p>