On Tuesday 04 September 2007 13:35, you wrote:
> On Tuesday 04 September 2007, Steve Litt wrote:
> > Hi all,
> >
> > My 1999 classic, "Rapid Learning: Secret Weapon of the Successful
> > Technologist" was written in MS Word. It was a styles based document. Now
> > I want to make a second edition.
> >
> > I tried to work on it in OpenOffice, but OpenOffice is terrible.
> >
> > Is there a way to transfer an MS Word document to LyX, preserving the
> > paragraph and character styles in the document? I don't care how messed
> > up it looks after transfer -- I can tweak the layout file to suit my
> > needs, but I'd prefer not to lose styles.
> >
> > Anyone know how to do that?
>
> Steve,
>
> I've struggled with this kind of conversion -- both ways -- for years. Here
> are a few possibilities, none of them pleasant:
>
> 1. Use the MS Word import in Lyx, which uses wvCleanLatex.
>    This sometimes works -- but does not seem to retain styles, 

That's a showstopper

>    and loads 
>    the preamble with a whole lot of junk which make it hard to get the
>    format to what you want.

That's no big deal, but the dropping of styles is a showstopper.
>
> 2. Export from OpenOffice to LaTeX 2e, then import into Lyx.
>    I've often had to do quite a bit of editing the LaTeX  before Lyx will
>    load the file, and the result in Lyx is often horrible, and sometimes
>    unusable.  I get things like whole paragraphs of text changed to Math
> mode, with no spaces between words.  But with some documents it works well.

I have no math mode stuff in this document, so no problem. However, my 
experience with MS Word to OO Writer is it drops the styles. Anyone else know 
anything about this? If I *can* preserve the styles, this would probably be 
what I want. I can blow off any junk placed in it.
>
> 3. Copy blocks of text in OpenOffice and Paste External Selection in Lyx.
>    This sometimes works quite well, but I'd hate to do it for a large
>    document.

It's about 90,000 words :-)

>
> 4. Export from OpenOffice as text, then import it as paragraphs into Lyx.
>    You'll have to go through the exported file with a text editor to make
>    sure you have an empty line between paragraphs, and have to go through
>    the Lyx document to assign a style to each paragraph -- but at least you
>    have a clean preamble and nothing totally messed up.  This is the way
>    I usually end up making the conversion.

Ughhhh!

I have another idea. I could write a series of Word macros to find styles and 
write their names as tags within the text. Then export as text, write a Ruby 
parser, and convert to LyX. Only thing is, I don't know if I can write the 
word macros to do that. Any of you know of online documentation on writing 
fairly complex word macros? I've got MS Word 97 IIRC.

Thanks

SteveT

Steve Litt
Author: Universal Troubleshooting Process books and courseware
http://www.troubleshooters.com/

Reply via email to