On Saturday 19 September 2009 09:42:41 am rgheck wrote:
> > Can I
> >
> > a) save
> > b) export
> > c) edit
> >
> > a document in MS Word (.doc) format in LyX?
> 
> This depends upon exactly what you want to do. If the situation is that
> you have a Word document and you want to import it into LyX, then this
> can be done, though not directly, as there's no good converter chain for
> you to use. (That said, I believe what I'm about to describe could be
> automated using PyUno, or whatever the OOo python scripting service is
> called.) What you would need to do is open the document in OpenOffice,
> then save it as LaTeX, and then import that into LyX.
> 
> Conversely, if you want to save the document in a format in which it can
> be edited by those who have not seen the light (aka, Word users), then
> you can export to RTF.
> 
> Richard
> 

I have to go the Word --> LyX way and viceversa often and yes, as Richard 
said, it can be done. But it is a pain. Mostly, because the doc-->tex 
converters suffer from a category error: they try to replicate the appearance 
of the original instead of its logical structure, abusing LaTeX commands to 
"paint" a document's appearance. The most egregious instance of this wrong-
headed behavior (IMHO) is openoffice creating a bogus /tab command and 
liberally 
sprinkling it throughout your document to take care of section indents and 
similar issues.   

After trying everything under the sun, I have settled on this chain:
1. open word file in ooffice
2. save as rtf
3. convert to latex with rtf2latex
4. open in a tex-aware text editor (emacs, kile, etc)
5. clean up the latex code 
6. import into lyx

This method has worked reasonably well for a book I am editing where 14 of the 
15 contributions have been submitted in .doc format. It obviously does not 
work very well it you plan to go back and forth between .lyx and .doc

For the opposite route (most philosophy publishers and journals will only 
accept .doc, unfortunately) I now save to rtf from lyx and open the rtf into 
openoffice. This works reasonably well for text-only documents (no eq., no 
pictures), although the output looks ugly.  I do not really care about that, 
though, because publishers/and journals will typically import your .doc file 
into a real typesetting program. With eq., graphics, etc. all bets are off.


Conclusion: in my experience,  .doc <--> .lyx conversion is possible but it is 
(now) a one-way street. It allows you to convert final drafts of either format 
into the other, but it precludes any serious collaboration on shared texts. 
For the book I mentioned above, my co-editor and I used .doc to write the 
introduction, then I converted the next to final draft into .lyx format and 
from that point on all his editing, additions, etcetera were done by him 
sending me the corrections and me inserting them into the Lyx file.

Hope it helps,

S.


______________________________________________________________
Stefano Franchi
Department of Philosophy          Ph:  (979) 862-2211
Texas A&M University              Fax: (979) 845-0458
305B Bolton Hall                  fran...@philosophy.tamu.edu
College Station, TX 77843-4237

Reply via email to