I've noticed that the GnuWin32 project ported wvWare for converting Word documents, and LyX supports it, so I thought I'd give it a try. Here are the results.

As expected, doesn't work out of the box because wvCleanLatex that LyX calls is a shell script (a bit useless since GnuWin32 doesn't provide a shell???). Tried invoking it with MSYS sh.exe that comes with Ruurd's port of LyX, but no dice, that sh.exe doesn't understand commands like 'basename' etc. So I did my own Win .bat file (very primitive, equivalent to only the last line of the original script, i.e. doesn't do any input checks, please feel welcome to extend it).

Here goes:

- create GnuWin32\bin\wvCleanLatex.bat with the following line

 @ wvWare -x %~dp0..\share\wv\wvCleanLatex.xml -d %~dp2 -b %~n2 %1 > %2

- make sure GnuWin32\bin is in your path

- reconfigure LyX, restart and you're ready to go (there still the isuue of a .relyx1 file not being cleaned up)

If you found this useful, could someone please add it to the Wiki.

Regards,
Milos

Reply via email to