Colin J. Williams wrote:
Paul A. Rubin wrote:
Colin J. Williams wrote:

Are there known problems with Export? I find that I cannot export to ascii or latex.

What platform? There's a bit of an adventure with exporting on Windows, depending on how you opened the file (file menu v. double-clicking the file icon).

Thanks, you have put your finger on the problem. If I open a file I can export. With clicking in the Windows Explorer I cannot.


The workaround appears to be "NEVER enter LyX by clicking". I've removed the file association

I am using Windows XP with Lyx 1.3.5.

This workaround works for me. It requires features that AFAIK were only added to cmd.exe in XP, so it probably won't work with older versions of Windows.


Create a file named "loadlyx.cmd" in the lyx/bin directory or somewhere else appropriate (eg in a "tools" directory on your path), containing:

   @path c:\programs\lyx\bin;%path%
   for /f "usebackq" %%a in (`echo %1 ^| tr \\ /`) do lyx %%a

Substitute your LyX installation directory for "c:\programs\lyx". (If the LyX bin directory is already in your path, you can skip the path command, but if you have other tr implementations in your path before the LyX one, you may have to fiddle with the backquoted command string, as some of them handle backslash escapes differently.)

Then associate your LyX file extension (.lyx or whatever) with loadlyx.cmd.

loadlyx converts backslashes to forward slashes on the lyx command line, fixing the problem with exports.

Looking at this now, it looks like it won't handle spacy names correctly. It should be possible to fix that by making sure the name is quoted when it's passed to loadlyx, and setting the "delim" option in the for command. Left as an exercise for the reader, unless I get around to writing a followup.

--
Michael Wojcik



  • Re: Exports Michael Wojcik

Reply via email to