TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm guessing the answer to this question is no, but no harm asking - tex4ht, when outputting oolatex, outputs an .odt OpenDocument, which is actually a .zip file (which then contains content.xml, folders with images, etc).

However, there is this OpenDocument "Flat XML" file, which gets the extension '.fodt' in Libre/OpenOffice. This one actually even contains encoded binary data of images, within the <office:binary-data> tag! There is a bit on this format in OpenDocument technical specification - Wikipedia, the free encyclopedia.

So, for double-checking what tex4ht outputs in case of oolatex, I guess I'd prefer a direct "render" to a Flat XML .fodt file - instead of bulding the .odt zip, then unzipping it to check its content... But I'm not sure if it's possible at all - I cannot find many references for this Flat XML file format.

Many thanks in advance for any answers,

share|improve this question
there is no such option, and I think it would be hard to do it - you would need to post-process the xml with some script and include all images, maybe herder would be to rewrite the tex4ht's ooffice config files. I think better to go this way would be to convert odt to fodt (see oooforum.org/forum/viewtopic.phtml?t=153292 ). or write script to unzip text content from the odt file – michal.h21 Apr 30 '12 at 19:21
Many thanks for that, @michal.h21 - I was suspecting that is the case; maybe you can move your comment to an answer so I can accept it? Thanks - cheers! – sdaau Apr 30 '12 at 19:55
up vote 6 down vote accepted

As Michal wrote in his comment, there's no option to create a flat ODT document directly with TeX4ht. However, you don't need additional OO wrapper scripts either but can directly use OpenOffice/LibreOffice as a command-line converter:

oowriter --convert-to fodt myfile.odt

You only have to ensure that the proper OO XSLT filters are installed, i.e. export format .fodt is listed as an option in the SaveAs dialog.

share|improve this answer
Many thanks for that, @Martin - good to have it in writing :) Cheers! – sdaau Apr 30 '12 at 20:23
This silently exits doing nothing if any OpenOffice/LibreOffice is running - see here for workaround. – Beni Cherniavsky-Paskin Dec 13 '12 at 19:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.