How do you convert Open Office (ODT) documents to tex files? I have made a report using libre office. Now I wish to continue editing the document using lyx (latex front end). So the ODT file needs to be saved as some .tex file.

I don't see an option to do this in File menu (export/save as). So is there any other plugin to do this?

link|improve this question

75% accept rate
feedback

1 Answer

up vote 1 down vote accepted

OpenOffice used to have a LaTeX export functionality, which was later removed, I guess. Nevertheless, there is a LaTeX writer:

sudo apt-get install openoffice.org-writer2latex writer2latex

Just confirm all messages with y. After installing, you can use it with w2l

w2l your-document.odt

which will create a .tex file with the same name. The formatting is pretty basic, but I think it gets the job done.

If you wish to edit it in Lyx after that, just concatenate the commands, something like that:

w2l your-document.odt && /usr/bin/env lyx your-document.tex &

I tested the conversion on Ubuntu 11.04 with the default LibreOffice installation

link|improve this answer
So all these commands are valid for LibreOffice ? – AIB May 25 '11 at 9:40
@AIB Yes, as I've mentioned, I tested this of course. – slhck May 25 '11 at 9:41
Thanks @slhck ... I will try itnow – AIB May 25 '11 at 9:41
@AIB Didn't it work? – slhck May 25 '11 at 10:18
It will take a couple of hours to get my repositories working..So I will check and update in 2 hours... – AIB May 25 '11 at 10:21
show 1 more comment
feedback

Your Answer

 
or
required, but never shown

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