For writing documents with equations, I use LibreOffice with TexMaths.

The majority of collaborators use MS Word 2007, so I am forced to save into .docx so that they can read the equations and edit the text (but not edit equations, they are saved as images when this plug in is used and saved to .docx).

If MS Word opens the .odt file directly then the equations appear as jibberish, but the TeX data is obviously saved somehow since I can continue to edit my equations in LibreOffice.

Is there some easy extension or equivalent that I can tell them to install if they want to edit my equations and then pass them the .odt document? How is the TexMaths data stored in the .odt file?

(Note: question was also posted on tex.se and deemed off-topic)

  • Late to the game, but: From my experience, if the majority uses MS Office, best get a virtual machine with Windows and MS Office. Anything else will result in broken documents, as you are not editing a document, but you're repeatedly performing lossy import/export cycles. The only form of LibreOffice/MS Office collaboration that works reasonably well, is if everyone writes a different part, that at the end get exported once and assembled into a consistent document, manually correcting conversion errors while doing so.
    – kdb
    Jan 12, 2022 at 15:11
  • Motivation for my comment: I use LibreOffice Math for equation editing. MS Office can perfectly open a LibreOffice Writer document saved as DOCX, but cannot open ODT files with equations at all. In the opposite direction, only a subset of DOCX equations can be processed by Libreoffice. There will be missing symbols. Inline-equations in PPTX have no equivalent representation in Libreoffice Impress at all.
    – kdb
    Jan 12, 2022 at 15:15

1 Answer 1


I am not familiar with this area, but for this part of your question:

How is the TexMaths data stored in the .odt file

The answer appears to be that TexMaths (and/or LibreOffice) creates an SVG format drawing in a draw:g element, and stores the original TeX oexpression in an svg:desc element (wrapped up a bit).

I cannot get the .odt file to open at all (Microsoft Word 10 thinks it is corrupt), i.e. the only way I could open it in Word would be to use the "recover text from any file" feature, which probably would result in gibberish. It sounds as if you are at least able to open your documents in Word. But Word does not have any facility to import SVG format directly or convert them, and I do not know of any useful extension, sorry. I notice that LibreOffice saves the SVG when exporting to the older .sxw format, and Word opens that but discards the image.

When LibreOffice exports to .docx, it inserts the picture using Word's legacy VML format inside a w:pict element. As far as I can tell the informaiton in svg:desc is discarded, so there is no possibility of round-tripping. I do not know whether LibreOffice could, in theory, store the TeX from the svg:desc element inside the w:pict or VML diagram.

  • Thanks for the info. I also noticed that if the .odt is opened in TextEdit that something in the form of "TexMaths11§display§N \rightarrow \infty§svg§600§FALSE" appears for the equation $N \rightarrow \infty$. I wonder what the complete syntax is (e.g. what the FALSE tag is for)... I suppose if I will go dig around in the extension's source code when I have some free time to try and make a work around, but probably a bit above my current skill level.
    – xyz
    May 21, 2014 at 15:02
  • FWIW you can find the code used by looking inside the .odt, which is a .zip containing some XML files. Or you could save as the single-file .fodt file and look at that. On Windows I tend to use the free XML Notepad editor (it's a Microsoft download) to look at such stuff. But no, I don't know what the extra stuff surrounding the TeX does, although I expect it all means something to TexMaths.
    – user181946
    May 21, 2014 at 17:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .