LyXconvert lyx (latex) to word or open office (doc or odt)

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
h2sammo
Posts: 10
Joined: Fri Feb 12, 2010 4:52 pm

convert lyx (latex) to word or open office (doc or odt)

Post by h2sammo »

is there a way to convert (export) into a format being opened by open office with the goal of saving into a .doc file?
i can export as rtf right now and it does a pretty good job but it doesnt pick up any images/tables or it doesnt display references.

i use lyx 1.6.5 on gentoo linux:

Code: Select all

[ebuild   R   ] app-office/lyx-1.6.5  USE="X cups debug dia docbook html latex monolithic-build nls rtf -dot -rcs -subversion" LINGUAS="-ar -ca -cs -de -en -es -eu -fi -fr -gl -he -hu -id -it -ja -nb -nn -pl -pt -ro -ru -sk -tr -uk -zh_CN -zh_TW" 0 kB
i am trying to convert achemso style document to open office.

thank you

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

convert lyx (latex) to word or open office (doc or odt)

Post by frabjous »

LyX now has an "OpenDocument" (.odt) export routine. At least mine does. (Installed 1.6.5 through Ubuntu Lucid repo; texlive-full was already installed.) I'm pretty sure this is using the oolatex option from htlatex/tex4ht as a backend for the conversion. Some discussion in the Ubuntu forums can be found here.

Especially with a more complex starting document however, I wouldn't expect a perfect conversion, however.
h2sammo
Posts: 10
Joined: Fri Feb 12, 2010 4:52 pm

Re: convert lyx (latex) to word or open office (doc or odt)

Post by h2sammo »

yeah i read that and other discussions. conversion might be ok for simple files but my document has figures, tables and citations. i got it to convert to .odt but openofice cannot open document due to errors.

i found a solution however (or two). first of all the native conversion to .rtf gives a very nice typesetting, very similar to latex original. it does not put any figures or citations. but its good enough to communicate with reviewers (my case) alongside a pdf version.

the other solution was to convert from Lyx to plain HTML and the INSERT that file into an open office document. once inserted I can save that file as odt, and then as .doc. This method preserves pictures in one file and citations but typesetting is different. Again, for reviewing purposes it can be sent alongside a pdf and others can make corrections on your manuscript.

Adobe notes wold be ideal on the original pdf compilation. Do you know of an opensource alternative which allows to open pdf files and make notes to text, figs etc already in the file (working on windows preferably - for the non-unix crowd).
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

convert lyx (latex) to word or open office (doc or odt)

Post by meho_r »

I wouldn't go with open-source solution for reviewing (there are issues with highlights, notes etc. in pdfs with all these tools). Instead, I'll recommend PDF-XChange Viewer which works fantastic with wine (the team behind it cannot afford to create a native Linux version, but they do try to make it work with wine).
llewellyn
Posts: 17
Joined: Mon Feb 04, 2008 8:20 pm

Re: convert lyx (latex) to word or open office (doc or odt)

Post by llewellyn »

I do this often.
export the LYX file as pdf (latex)
open the PDf file
use the selection tool to select what you want. Big documents I do page by page
selection tool gives option to save to clipboard.
Save to clipboard
open a new office document
paste the clipboard
Voila you got ODT
Sometimes needs a bit of pretty up work.
Now open office will allow you to export again to many MS formats
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

convert lyx (latex) to word or open office (doc or odt)

Post by frabjous »

llewellyn wrote:I do this often.
export the LYX file as pdf (latex)
open the PDf file
use the selection tool to select what you want. Big documents I do page by page
selection tool gives option to save to clipboard.
Save to clipboard
open a new office document
paste the clipboard
Voila you got ODT
Sometimes needs a bit of pretty up work.
Now open office will allow you to export again to many MS formats
My god! Do you really want to re do *all* the formatting, special characters, etc.?

Besides, last I checked, LyX comes with an export to ODT menu option. (At least the current version in the Ubuntu repos does.)
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

convert lyx (latex) to word or open office (doc or odt)

Post by meho_r »

frabjous wrote:
llewellyn wrote:I do this often.
export the LYX file as pdf (latex)
open the PDf file
use the selection tool to select what you want. Big documents I do page by page
selection tool gives option to save to clipboard.
Save to clipboard
open a new office document
paste the clipboard
Voila you got ODT
Sometimes needs a bit of pretty up work.
Now open office will allow you to export again to many MS formats
My god! Do you really want to re do *all* the formatting, special characters, etc.?

Besides, last I checked, LyX comes with an export to ODT menu option. (At least the current version in the Ubuntu repos does.)
Ah, those youngsters, never lacking enthusiasm :D
michaelc
Posts: 2
Joined: Wed Jun 15, 2011 12:07 am

Re: convert lyx (latex) to word or open office (doc or odt)

Post by michaelc »

Actually, as of Lyx 2.0 (2.0.1 for Debian Linux) it seems there is no capacity to export to OpenOffice (odt). It was available in 1.6.X.

Is this a bug or has this feature been dropped?

I need to coordinate work with people who use only Word and the ability to generate a doc version (by first converting to odt) is important. Cut and paste into OpenOffice is not an option for a 100+ page document.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

convert lyx (latex) to word or open office (doc or odt)

Post by frabjous »

Try pandoc or latex2rtf, perhaps? Another option would be to use HTML as an intermediate format and use TeX4ht. None of these really deliver perfect results, however. Indeed, I think that has a odt output routine too.
michaelc
Posts: 2
Joined: Wed Jun 15, 2011 12:07 am

Re: convert lyx (latex) to word or open office (doc or odt)

Post by michaelc »

Thanks for the pointer to pandoc.

A quick test with a simple document shows the results to odt and rtf are not bad, but references are missing and the page layout is not respected. I tried a more complicated document with embedded ERT and images and found that pandoc failed with many complaints.

I'll continue to play with pandoc to see if it can fill some of the export role.

Still, what happened to the Lyx export capability in ver2.0? A number of users must face the same situation I am in (working on a thesis). The lack of functional (accepting it will not be perfect) output to a format that word processors can us is a step backwards for Lyx.
Post Reply