The Computer Oracle

Converting Open Office (odt) files to Latex

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Popsicle Puzzles

--

Chapters
00:00 Converting Open Office (Odt) Files To Latex
00:25 Accepted Answer Score 11
01:15 Answer 2 Score 1
02:08 Thank you

--

Full question
https://superuser.com/questions/288322/c...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#linux #openoffice #latex #openofficewriter #libreoffice

#avk47



ACCEPTED ANSWER

Score 11


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

Or, if your distribution uses LibreOffice, use libreoffice-writer2latex instead of the above.

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




ANSWER 2

Score 1


Libreoffice has a writer2latex extension that you can load simply by double-clicking on the .oxt file or by getting the package from apt ( I assume also yum )

Link to extension: http://writer2latex.sourceforge.net/index14.html

Once you install the extension, you can use File->Export to .tex.

But:

  • I was unable to get Libreoffice 4.0x to run the extension against a complex document.

  • LO 3.4.4 ran the extension just fine, but lost almost all formatting, lost all tables and pictures.

Bottom Line:

I gave up. You'd be better off just exporting to text, and starting over. It appears to me as a complete NOOB to Lyx and Latex, that many document settings don't have an equivalent, and simply can't be translated. However I'd be delighted to be shown that I am wrong.