张玉 Zhang Yu, Aaron wrote:
I download the lyx1.5.4 installation for windows, and get it installed with
default setup. It downloads MikteX and ImageMagik automatically.

However when select File->Export->OpenDocument, it runs "Latx run
Number1"..."oolatex -filename", but nothing happens to my directory.

 I searched all my files and I'm sure there's no output.

Anyone know what's the problem?

Lyx 1.5.4
MikTeX 2.7
Windows XP


I have the same setup except that it's MiKTeX 2.6. The version of TeX4HT I have installed is the MiKTeX package. (You can also download and install it from non-MiKTeX sources, which may make a difference. See http://schlosser.info/latexsystem-en.html#x1-200003.6.) It's broken on my system, and the problem lies (I think) with TeX4HT, not with LyX.

Try exporting an ODT file as before, and after it fails (with LyX still open) use Windows Explorer to look at your temp directory. Tools -> Preferences... -> Paths -> Temporary directory will get you close to it; below that you'll find lyx_tmpdir# (where # is a randomly generated number) and below that will be lyx_tmpbuf# where # is a sequence number for which doc in the current session you're working with. In that directory, you should find yourfile.tex and a bunch of other stuff, and I'm guessing you'll find yourfile.tmp, which will be your document in XML format.

Assuming yourfile.tex is there, open a command prompt in that directory, make sure the MiKTeX bin directory is on your command path, and run 'oolatex yourfile.tex'. You'll get a heaping helping of output, and somewhere in it I'm pretty sure you'll find one or more error messages. On a trivial test file I got the following:

System call: java -classpath c:\tex4ht\texmf\tex4ht\bin xtpipes -i c:\tex4ht\texmf\tex4ht\xttl\ -o newfile1.4oo newfile1.tmp
Exception in thread "main" java.lang.NoClassDefFoundError: xtpipes
--- Warning --- System return: 1

The Java exception was fatal (hence return code 1),and so newfile1.oo was never created. The rest of the conversion process chugged along minus the file it was supposed to be converting, so I got a bunch of ancillary stuff but no actual document. Then comes a second fatal error (well, it would be fatal if the victim weren't already dead):

System call: zip sxw-newfile1.dir\newfile1.odt sxw-newfile1.dir\META-INF\*.*
'zip' is not recognized as an internal or external command,
operable program or batch file.
--- Warning --- System return: 1

It seems that something thinks the command to zip a file on my system is 'zip', which is incorrect.

The second problem looks like a configuration problem, but I'm not sure about the first one. In any case, I have no idea how to reconfigure TeX4HT when it's installed as a MiKTeX package. I could work around the second one by creating a script named 'zip' that would run my zip utility, but I don't know what to do about the xtpipes class error.

I suggest you try this experiment and, if you get similar results, maybe try uninstalling the MiKTeX tex4ht package and installing from source.

/Paul

Reply via email to