Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Ekkehart Schlicht wrote: Colin J. Williams wrote: Ekkehart Schlicht wrote: It suffices to place a file lyx2lyx.cmd containing @ path to python\python path to lyx\share\lyx\lyx2lyx\lyx2lyx %* into the /lyx/share/lyx/lyx2lyx You can use Ruurd Reitsma's python - no proper python needed for this. I have put this on the WiKi. Ekkehart I've followed the guidance above. The .tex file is converted to .lyx OK but the resulting file is not loaded to LyX and I get a message Can't find error conversion script. The converter for Latex = Lyx is reLyX -f $$i I am using Windows XP with LyX 1.3.5. Any suggestions? Colin W. Sorry. It worked well for me. I have just converted an entire book from rtf to tex (via rtf2latex2e.exe) and imported it successfully into Lyx - with some minor drawbacks regarding graphics. I have the same converter instruction and the same OS and LyX version that you have noted. To identify the problem, so that the WiKi entry can be corrected: Could you just create a lyx file with some text in it (Hallo World) and export it to LaTeX and then import it to LyX? Could you just tell me whether this works? I have a full python on my computer and simply tried (by renaming) to hide it and use Ruurd's python. This worked for me. Maybe we need the full python and delete the python.exe in Ruurd's distribution. This would be the next step to try. I think that LaTeX export and import are /absolutely /essential. Thanks Ekkehart Ekkehart, My project is absolutely trivial compared with yours. Here are the three files which are generated from the process you suggest. The error message I get is Can't find the conversion script. If I execute the relyx command, I get: C:\LyX\TexreLyX -f hello.tex C:\LyX\Texrem reLyX.bat To provide command line access to reLyX C:\LyX\TexC:\Lyx\lyx\bin\relyx.bat -f hello.tex reLyX directory is: C:/LyX/lyx/share/lyx/reLyX reLyX, the LaTeX to LyX translator. Revision date 2003/01/20 Reading LaTeX command syntax (hello.tex: Splitting Preamble Creating LyX preamble Reading layout file Cleaning... Translating... Writing... ) Deleting temp files Finished successfully! When I attempt to open the created Hello.lyx, I get the Can't open conversion script message. I have Python 2.3.5 installed and had deleted the Python 2.2 stuff from the lyx\bin. In view of you comments above, I reinstalled LyX 1.3.5 and then renamed Python23 to Python23Z. I get the same message. Please let me know if there is other information I can provide. Colin W. # The reLyX bundled with LyX 1.3 created this file. # For more info see http://www.lyx.org/ \lyxformat 2.15 \textclass article \language english \inputencoding latin1 \use_natbib 0 \use_numerical_citations 0 \begin_preamble \usepackage{babel} \end_preamble \layout Title Hello \layout Paragraph Now is the time for all good men to come to the aid of the party. \the_end %% LyX 1.3 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \makeatletter \usepackage{babel} \makeatother %% LyX 1.3 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \makeatletter \usepackage{babel} \makeatother \begin{document} \title{Hello} \maketitle \paragraph{Now is the time for all good men to come to the aid of the party.} \end{document}
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Colin J. Williams wrote: Here are the three files which are generated from the process you suggest. I can import and Hello.tex into LyX without problems and view it with both pdflatex and latex/dvi The error message I get is Can't find the conversion script. If I execute the relyx command, I get: C:\LyX\TexreLyX -f hello.tex C:\LyX\Texrem reLyX.bat To provide command line access to reLyX C:\LyX\TexC:\Lyx\lyx\bin\relyx.bat -f hello.tex reLyX directory is: C:/LyX/lyx/share/lyx/reLyX reLyX, the LaTeX to LyX translator. Revision date 2003/01/20 Reading LaTeX command syntax (hello.tex: Splitting Preamble Creating LyX preamble Reading layout file Cleaning... Translating... Writing... ) Deleting temp files Finished successfully! I get the same When I attempt to open the created Hello.lyx, I get the Can't open conversion script message. I don't get this message - Hello.lyx opens nicely with Lyx, both the version you have provided and the one I produced myself with relyx. So it seems a problem of your Lyx, rather than the import/export/reLyX stuff. I have Python 2.3.5 installed and had deleted the Python 2.2 stuff from the lyx\bin. In view of you comments above, I reinstalled LyX 1.3.5 and then renamed Python23 to Python23Z. I get the same message. I have Python 2.3.4, have renamed Ruurd's Python and use LyXWin 1.3.5 qt. Our setups seem nearly identical. Please let me know if there is other information I can provide. Have you opened Lyx and then opened Hello.lyx from /within/ Lyx? You may try the original approach by Michael Wojcik: -copy the lyx2lyx file to lyx2lyx.py - change the lyx2lyx.cmd file to @ /path/to/lyx2lyx.py %* Does this work? Colin W. Unfortunately I have no other ideas! Ekkehart
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Colin J. Williams wrote: When I attempt to open the created Hello.lyx, I get the Can't open conversion script message. I have Python 2.3.5 installed and had deleted the Python 2.2 stuff from the lyx\bin. In view of your comments above, I reinstalled LyX 1.3.5 and then renamed Python23 to Python23Z. I get the same message. This is rapidly becoming a LyX/Win FAQ. Indeed, much of the information you require is detailed in the rest of this thread. However, I think that a recap might provide you with some illumination. The reLyX Perl script converts your LaTeX file to a file in a mish-mash of different LyX file formats and it is this mish-mash LyX file must be sanitized by the lyx2lyx Python conversion script. It is this conversion script, lyx2lyx, can't be run because it is invoked by LyX as path to\lyx2lyx --output new file.lyx old file.lyx Invocation of the script in this way is perfectly fine in a Unix environment because the shell will look at the first line of the script to ascertain what interpretter (python) should be used. Windows doesn't follow this tradition. Instead it looks either for a .py extension to the script name or requires that the script be invoked as python path to\lyx2lyx --output new file.lyx old file.lyx Since the invocation is hard-coded into the LyX executable, you can't change it. Tough. A work-around has been suggested, however. Place a file lyx2lyx.cmd in the same directory as the lyx2lyx python script. This file should contain the line: @ path to python\python path to lyx2lyx\lyx2lyx %* You can also run these scripts from the CMD prompt. PROMPT reLyX -f hello.tex PROMPT python path to lyx2lyx\lyx2lyx -o sanitized_hello.lyx hello.lyx This sanitized_hello.lyx should be loadable by LyX 1.3.x without further conversion. This assumes, of course, that reLyX has done a reasonable job of converting your LaTeX file in the first place. Alternatively, you might consider using tex2lyx. Read about it here: http://wiki.lyx.org/LaTeX/LatexToLyx -- Angus
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Angus Leeming wrote: Alternatively, you might consider using tex2lyx. Read about it here: http://wiki.lyx.org/LaTeX/LatexToLyx Great page! This addresses essentially all my latex-import suggestions and problems that made me start this thread. Thanks for making tex2lyx accessible! (But still looking forward to the 1.4 release...) Cheers, Sven
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Sven Schreiber wrote: Alternatively, you might consider using tex2lyx. Read about it here: http://wiki.lyx.org/LaTeX/LatexToLyx Great page! This addresses essentially all my latex-import suggestions and problems that made me start this thread. Thanks for making tex2lyx accessible! Can I suggest that you post minimal latex files of any construct that you find aren't handled well to the lyx-devel list. In fact, I've added a note to this effect to the page itself. (But still looking forward to the 1.4 release...) Aren't we all. Still it's looking a lot more solid than it did a month or so ago. -- Angus
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Angus Leeming wrote: Colin J. Williams wrote: When I attempt to open the created Hello.lyx, I get the Can't open conversion script message. I have Python 2.3.5 installed and had deleted the Python 2.2 stuff from the lyx\bin. In view of your comments above, I reinstalled LyX 1.3.5 and then renamed Python23 to Python23Z. I get the same message. This is rapidly becoming a LyX/Win FAQ. Indeed, much of the information you require is detailed in the rest of this thread. However, I think that a recap might provide you with some illumination. The reLyX Perl script converts your LaTeX file to a file in a mish-mash of different LyX file formats and it is this mish-mash LyX file must be sanitized by the lyx2lyx Python conversion script. It is this conversion script, lyx2lyx, can't be run because it is invoked by LyX as path to\lyx2lyx --output new file.lyx old file.lyx Invocation of the script in this way is perfectly fine in a Unix environment because the shell will look at the first line of the script to ascertain what interpretter (python) should be used. Windows doesn't follow this tradition. Instead it looks either for a .py extension to the script name or requires that the script be invoked as python path to\lyx2lyx --output new file.lyx old file.lyx Since the invocation is hard-coded into the LyX executable, you can't change it. Tough. A work-around has been suggested, however. Place a file lyx2lyx.cmd in the same directory as the lyx2lyx python script. This file should contain the line: @ path to python\python path to lyx2lyx\lyx2lyx %* You can also run these scripts from the CMD prompt. PROMPT reLyX -f hello.tex PROMPT python path to lyx2lyx\lyx2lyx -o sanitized_hello.lyx hello.lyx This sanitized_hello.lyx should be loadable by LyX 1.3.x without further conversion. This assumes, of course, that reLyX has done a reasonable job of converting your LaTeX file in the first place. Alternatively, you might consider using tex2lyx. Read about it here: http://wiki.lyx.org/LaTeX/LatexToLyx So far, I have not been able to make this fly, although the two scripts from the CMD prompt do the job. I have the download from the wiki and will try it tomorrow. Thanks for all your work on this. Colin W.
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Ekkehart Schlicht wrote: Colin J. Williams wrote: Ekkehart Schlicht wrote: It suffices to place a file lyx2lyx.cmd containing @ path to python\python path to lyx\share\lyx\lyx2lyx\lyx2lyx %* into the /lyx/share/lyx/lyx2lyx You can use Ruurd Reitsma's python - no proper python needed for this. I have put this on the WiKi. Ekkehart I've followed the guidance above. The .tex file is converted to .lyx OK but the resulting file is not loaded to LyX and I get a message Can't find error conversion script. The converter for Latex = Lyx is reLyX -f $$i I am using Windows XP with LyX 1.3.5. Any suggestions? Colin W. Sorry. It worked well for me. I have just converted an entire book from rtf to tex (via rtf2latex2e.exe) and imported it successfully into Lyx - with some minor drawbacks regarding graphics. I have the same converter instruction and the same OS and LyX version that you have noted. To identify the problem, so that the WiKi entry can be corrected: Could you just create a lyx file with some text in it (Hallo World) and export it to LaTeX and then import it to LyX? Could you just tell me whether this works? I have a full python on my computer and simply tried (by renaming) to hide it and use Ruurd's python. This worked for me. Maybe we need the full python and delete the python.exe in Ruurd's distribution. This would be the next step to try. I think that LaTeX export and import are /absolutely /essential. Thanks Ekkehart Ekkehart, My project is absolutely trivial compared with yours. Here are the three files which are generated from the process you suggest. The error message I get is Can't find the conversion script. If I execute the relyx command, I get: C:\LyX\TexreLyX -f hello.tex C:\LyX\Texrem reLyX.bat To provide command line access to reLyX C:\LyX\TexC:\Lyx\lyx\bin\relyx.bat -f hello.tex reLyX directory is: C:/LyX/lyx/share/lyx/reLyX reLyX, the LaTeX to LyX translator. Revision date 2003/01/20 Reading LaTeX command syntax (hello.tex: Splitting Preamble Creating LyX preamble Reading layout file Cleaning... Translating... Writing... ) Deleting temp files Finished successfully! When I attempt to open the created Hello.lyx, I get the Can't open conversion script message. I have Python 2.3.5 installed and had deleted the Python 2.2 stuff from the lyx\bin. In view of you comments above, I reinstalled LyX 1.3.5 and then renamed Python23 to Python23Z. I get the same message. Please let me know if there is other information I can provide. Colin W. # The reLyX bundled with LyX 1.3 created this file. # For more info see http://www.lyx.org/ \lyxformat 2.15 \textclass article \language english \inputencoding latin1 \use_natbib 0 \use_numerical_citations 0 \begin_preamble \usepackage{babel} \end_preamble \layout Title Hello \layout Paragraph Now is the time for all good men to come to the aid of the party. \the_end %% LyX 1.3 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \makeatletter \usepackage{babel} \makeatother %% LyX 1.3 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \makeatletter \usepackage{babel} \makeatother \begin{document} \title{Hello} \maketitle \paragraph{Now is the time for all good men to come to the aid of the party.} \end{document}
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Colin J. Williams wrote: Here are the three files which are generated from the process you suggest. I can import and Hello.tex into LyX without problems and view it with both pdflatex and latex/dvi The error message I get is Can't find the conversion script. If I execute the relyx command, I get: C:\LyX\TexreLyX -f hello.tex C:\LyX\Texrem reLyX.bat To provide command line access to reLyX C:\LyX\TexC:\Lyx\lyx\bin\relyx.bat -f hello.tex reLyX directory is: C:/LyX/lyx/share/lyx/reLyX reLyX, the LaTeX to LyX translator. Revision date 2003/01/20 Reading LaTeX command syntax (hello.tex: Splitting Preamble Creating LyX preamble Reading layout file Cleaning... Translating... Writing... ) Deleting temp files Finished successfully! I get the same When I attempt to open the created Hello.lyx, I get the Can't open conversion script message. I don't get this message - Hello.lyx opens nicely with Lyx, both the version you have provided and the one I produced myself with relyx. So it seems a problem of your Lyx, rather than the import/export/reLyX stuff. I have Python 2.3.5 installed and had deleted the Python 2.2 stuff from the lyx\bin. In view of you comments above, I reinstalled LyX 1.3.5 and then renamed Python23 to Python23Z. I get the same message. I have Python 2.3.4, have renamed Ruurd's Python and use LyXWin 1.3.5 qt. Our setups seem nearly identical. Please let me know if there is other information I can provide. Have you opened Lyx and then opened Hello.lyx from /within/ Lyx? You may try the original approach by Michael Wojcik: -copy the lyx2lyx file to lyx2lyx.py - change the lyx2lyx.cmd file to @ /path/to/lyx2lyx.py %* Does this work? Colin W. Unfortunately I have no other ideas! Ekkehart
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Colin J. Williams wrote: When I attempt to open the created Hello.lyx, I get the Can't open conversion script message. I have Python 2.3.5 installed and had deleted the Python 2.2 stuff from the lyx\bin. In view of your comments above, I reinstalled LyX 1.3.5 and then renamed Python23 to Python23Z. I get the same message. This is rapidly becoming a LyX/Win FAQ. Indeed, much of the information you require is detailed in the rest of this thread. However, I think that a recap might provide you with some illumination. The reLyX Perl script converts your LaTeX file to a file in a mish-mash of different LyX file formats and it is this mish-mash LyX file must be sanitized by the lyx2lyx Python conversion script. It is this conversion script, lyx2lyx, can't be run because it is invoked by LyX as path to\lyx2lyx --output new file.lyx old file.lyx Invocation of the script in this way is perfectly fine in a Unix environment because the shell will look at the first line of the script to ascertain what interpretter (python) should be used. Windows doesn't follow this tradition. Instead it looks either for a .py extension to the script name or requires that the script be invoked as python path to\lyx2lyx --output new file.lyx old file.lyx Since the invocation is hard-coded into the LyX executable, you can't change it. Tough. A work-around has been suggested, however. Place a file lyx2lyx.cmd in the same directory as the lyx2lyx python script. This file should contain the line: @ path to python\python path to lyx2lyx\lyx2lyx %* You can also run these scripts from the CMD prompt. PROMPT reLyX -f hello.tex PROMPT python path to lyx2lyx\lyx2lyx -o sanitized_hello.lyx hello.lyx This sanitized_hello.lyx should be loadable by LyX 1.3.x without further conversion. This assumes, of course, that reLyX has done a reasonable job of converting your LaTeX file in the first place. Alternatively, you might consider using tex2lyx. Read about it here: http://wiki.lyx.org/LaTeX/LatexToLyx -- Angus
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Angus Leeming wrote: Alternatively, you might consider using tex2lyx. Read about it here: http://wiki.lyx.org/LaTeX/LatexToLyx Great page! This addresses essentially all my latex-import suggestions and problems that made me start this thread. Thanks for making tex2lyx accessible! (But still looking forward to the 1.4 release...) Cheers, Sven
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Sven Schreiber wrote: Alternatively, you might consider using tex2lyx. Read about it here: http://wiki.lyx.org/LaTeX/LatexToLyx Great page! This addresses essentially all my latex-import suggestions and problems that made me start this thread. Thanks for making tex2lyx accessible! Can I suggest that you post minimal latex files of any construct that you find aren't handled well to the lyx-devel list. In fact, I've added a note to this effect to the page itself. (But still looking forward to the 1.4 release...) Aren't we all. Still it's looking a lot more solid than it did a month or so ago. -- Angus
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Angus Leeming wrote: Colin J. Williams wrote: When I attempt to open the created Hello.lyx, I get the Can't open conversion script message. I have Python 2.3.5 installed and had deleted the Python 2.2 stuff from the lyx\bin. In view of your comments above, I reinstalled LyX 1.3.5 and then renamed Python23 to Python23Z. I get the same message. This is rapidly becoming a LyX/Win FAQ. Indeed, much of the information you require is detailed in the rest of this thread. However, I think that a recap might provide you with some illumination. The reLyX Perl script converts your LaTeX file to a file in a mish-mash of different LyX file formats and it is this mish-mash LyX file must be sanitized by the lyx2lyx Python conversion script. It is this conversion script, lyx2lyx, can't be run because it is invoked by LyX as path to\lyx2lyx --output new file.lyx old file.lyx Invocation of the script in this way is perfectly fine in a Unix environment because the shell will look at the first line of the script to ascertain what interpretter (python) should be used. Windows doesn't follow this tradition. Instead it looks either for a .py extension to the script name or requires that the script be invoked as python path to\lyx2lyx --output new file.lyx old file.lyx Since the invocation is hard-coded into the LyX executable, you can't change it. Tough. A work-around has been suggested, however. Place a file lyx2lyx.cmd in the same directory as the lyx2lyx python script. This file should contain the line: @ path to python\python path to lyx2lyx\lyx2lyx %* You can also run these scripts from the CMD prompt. PROMPT reLyX -f hello.tex PROMPT python path to lyx2lyx\lyx2lyx -o sanitized_hello.lyx hello.lyx This sanitized_hello.lyx should be loadable by LyX 1.3.x without further conversion. This assumes, of course, that reLyX has done a reasonable job of converting your LaTeX file in the first place. Alternatively, you might consider using tex2lyx. Read about it here: http://wiki.lyx.org/LaTeX/LatexToLyx So far, I have not been able to make this fly, although the two scripts from the CMD prompt do the job. I have the download from the wiki and will try it tomorrow. Thanks for all your work on this. Colin W.
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Ekkehart Schlicht wrote: Colin J. Williams wrote: Ekkehart Schlicht wrote: It suffices to place a file lyx2lyx.cmd containing @ \python \share\lyx\lyx2lyx\lyx2lyx %* into the /lyx/share/lyx/lyx2lyx You can use Ruurd Reitsma's python - no "proper" python needed for this. I have put this on the WiKi. Ekkehart I've followed the guidance above. The .tex file is converted to .lyx OK but the resulting file is not loaded to LyX and I get a message "Can't find error conversion script". The converter for Latex => Lyx is reLyX -f $$i I am using Windows XP with LyX 1.3.5. Any suggestions? Colin W. Sorry. It worked well for me. I have just converted an entire book from rtf to tex (via rtf2latex2e.exe) and imported it successfully into Lyx - with some minor drawbacks regarding graphics. I have the same converter instruction and the same OS and LyX version that you have noted. To identify the problem, so that the WiKi entry can be corrected: Could you just create a lyx file with some text in it ("Hallo World") and export it to LaTeX and then import it to LyX? Could you just tell me whether this works? I have a "full" python on my computer and simply tried (by renaming) to hide it and use Ruurd's python. This worked for me. Maybe we need the "full" python and delete the python.exe in Ruurd's distribution. This would be the next step to try. I think that LaTeX export and import are /absolutely /essential. Thanks Ekkehart Ekkehart, My project is absolutely trivial compared with yours. Here are the three files which are generated from the process you suggest. The error message I get is "Can't find the conversion script". If I execute the relyx command, I get: C:\LyX\Tex>reLyX -f hello.tex C:\LyX\Tex>rem reLyX.bat To provide command line access to reLyX C:\LyX\Tex>C:\Lyx\lyx\bin\relyx.bat -f hello.tex reLyX directory is: C:/LyX/lyx/share/lyx/reLyX reLyX, the LaTeX to LyX translator. Revision date 2003/01/20 Reading LaTeX command syntax (hello.tex: Splitting Preamble Creating LyX preamble Reading layout file Cleaning... Translating... Writing... ) Deleting temp files Finished successfully! When I attempt to open the created Hello.lyx, I get the "Can't open conversion script" message. I have Python 2.3.5 installed and had deleted the Python 2.2 stuff from the lyx\bin. In view of you comments above, I reinstalled LyX 1.3.5 and then renamed Python23 to Python23Z. I get the same message. Please let me know if there is other information I can provide. Colin W. # The reLyX bundled with LyX 1.3 created this file. # For more info see http://www.lyx.org/ \lyxformat 2.15 \textclass article \language english \inputencoding latin1 \use_natbib 0 \use_numerical_citations 0 \begin_preamble \usepackage{babel} \end_preamble \layout Title Hello \layout Paragraph Now is the time for all good men to come to the aid of the party. \the_end %% LyX 1.3 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \makeatletter \usepackage{babel} \makeatother %% LyX 1.3 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \makeatletter \usepackage{babel} \makeatother \begin{document} \title{Hello} \maketitle \paragraph{Now is the time for all good men to come to the aid of the party.} \end{document}
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Colin J. Williams wrote: Here are the three files which are generated from the process you suggest. I can import and Hello.tex into LyX without problems and view it with both pdflatex and latex/dvi The error message I get is "Can't find the conversion script". If I execute the relyx command, I get: C:\LyX\Tex>reLyX -f hello.tex C:\LyX\Tex>rem reLyX.bat To provide command line access to reLyX C:\LyX\Tex>C:\Lyx\lyx\bin\relyx.bat -f hello.tex reLyX directory is: C:/LyX/lyx/share/lyx/reLyX reLyX, the LaTeX to LyX translator. Revision date 2003/01/20 Reading LaTeX command syntax (hello.tex: Splitting Preamble Creating LyX preamble Reading layout file Cleaning... Translating... Writing... ) Deleting temp files Finished successfully! I get the same When I attempt to open the created Hello.lyx, I get the "Can't open conversion script" message. I don't get this message - Hello.lyx opens nicely with Lyx, both the version you have provided and the one I produced myself with relyx. So it seems a problem of your Lyx, rather than the import/export/reLyX stuff. I have Python 2.3.5 installed and had deleted the Python 2.2 stuff from the lyx\bin. In view of you comments above, I reinstalled LyX 1.3.5 and then renamed Python23 to Python23Z. I get the same message. I have Python 2.3.4, have renamed Ruurd's Python and use LyXWin 1.3.5 qt. Our setups seem nearly identical. Please let me know if there is other information I can provide. Have you opened Lyx and then opened Hello.lyx from /within/ Lyx? You may try the original approach by Michael Wojcik: -copy the lyx2lyx file to lyx2lyx.py - change the lyx2lyx.cmd file to @ /path/to/lyx2lyx.py %* Does this work? Colin W. Unfortunately I have no other ideas! Ekkehart
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Colin J. Williams wrote: > > When I attempt to open the created Hello.lyx, I get the "Can't open > conversion script" message. > > I have Python 2.3.5 installed and had deleted the Python 2.2 stuff from > the lyx\bin. In view of your comments above, I reinstalled LyX > 1.3.5 and then renamed Python23 to Python23Z. I get the same > message. This is rapidly becoming a LyX/Win FAQ. Indeed, much of the information you require is detailed in the rest of this thread. However, I think that a recap might provide you with some illumination. The reLyX Perl script converts your LaTeX file to a file in a mish-mash of different LyX file formats and it is this mish-mash LyX file must be sanitized by the lyx2lyx Python conversion script. It is this conversion script, lyx2lyx, can't be run because it is invoked by LyX as \lyx2lyx --output .lyx .lyx Invocation of the script in this way is perfectly fine in a Unix environment because the shell will look at the first line of the script to ascertain what interpretter (python) should be used. Windows doesn't follow this tradition. Instead it looks either for a ".py" extension to the script name or requires that the script be invoked as python \lyx2lyx --output .lyx .lyx Since the invocation is hard-coded into the LyX executable, you can't change it. Tough. A work-around has been suggested, however. Place a file "lyx2lyx.cmd" in the same directory as the lyx2lyx python script. This file should contain the line: @ \python \lyx2lyx %* You can also run these scripts from the CMD prompt. PROMPT> reLyX -f hello.tex PROMPT> python \lyx2lyx -o sanitized_hello.lyx hello.lyx This sanitized_hello.lyx should be loadable by LyX 1.3.x without further conversion. This assumes, of course, that reLyX has done a reasonable job of converting your LaTeX file in the first place. Alternatively, you might consider using tex2lyx. Read about it here: http://wiki.lyx.org/LaTeX/LatexToLyx -- Angus
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Angus Leeming wrote: Alternatively, you might consider using tex2lyx. Read about it here: http://wiki.lyx.org/LaTeX/LatexToLyx Great page! This addresses essentially all my latex-import suggestions and problems that made me start this thread. Thanks for making tex2lyx accessible! (But still looking forward to the 1.4 release...) Cheers, Sven
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Sven Schreiber wrote: >> Alternatively, you might consider using tex2lyx. Read about it here: >> >>http://wiki.lyx.org/LaTeX/LatexToLyx >> > Great page! This addresses essentially all my latex-import suggestions > and problems that made me start this thread. Thanks for making tex2lyx > accessible! Can I suggest that you post minimal latex files of any construct that you find aren't handled well to the lyx-devel list. In fact, I've added a note to this effect to the page itself. > (But still looking forward to the 1.4 release...) Aren't we all. Still it's looking a lot more solid than it did a month or so ago. -- Angus
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Angus Leeming wrote: Colin J. Williams wrote: When I attempt to open the created Hello.lyx, I get the "Can't open conversion script" message. I have Python 2.3.5 installed and had deleted the Python 2.2 stuff from the lyx\bin. In view of your comments above, I reinstalled LyX 1.3.5 and then renamed Python23 to Python23Z. I get the same message. This is rapidly becoming a LyX/Win FAQ. Indeed, much of the information you require is detailed in the rest of this thread. However, I think that a recap might provide you with some illumination. The reLyX Perl script converts your LaTeX file to a file in a mish-mash of different LyX file formats and it is this mish-mash LyX file must be sanitized by the lyx2lyx Python conversion script. It is this conversion script, lyx2lyx, can't be run because it is invoked by LyX as \lyx2lyx --output .lyx .lyx Invocation of the script in this way is perfectly fine in a Unix environment because the shell will look at the first line of the script to ascertain what interpretter (python) should be used. Windows doesn't follow this tradition. Instead it looks either for a ".py" extension to the script name or requires that the script be invoked as python \lyx2lyx --output .lyx .lyx Since the invocation is hard-coded into the LyX executable, you can't change it. Tough. A work-around has been suggested, however. Place a file "lyx2lyx.cmd" in the same directory as the lyx2lyx python script. This file should contain the line: @ \python \lyx2lyx %* You can also run these scripts from the CMD prompt. PROMPT> reLyX -f hello.tex PROMPT> python \lyx2lyx -o sanitized_hello.lyx hello.lyx This sanitized_hello.lyx should be loadable by LyX 1.3.x without further conversion. This assumes, of course, that reLyX has done a reasonable job of converting your LaTeX file in the first place. Alternatively, you might consider using tex2lyx. Read about it here: http://wiki.lyx.org/LaTeX/LatexToLyx So far, I have not been able to make this fly, although the two scripts from the CMD prompt do the job. I have the download from the wiki and will try it tomorrow. Thanks for all your work on this. Colin W.
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
It suffices to place a file lyx2lyx.cmd containing @ path to python\python path to lyx\share\lyx\lyx2lyx\lyx2lyx %* into the /lyx/share/lyx/lyx2lyx You can use Ruurd Reitsma's python - no proper python needed for this. I have put this on the WiKi. Ekkehart
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Ekkehart Schlicht wrote: It suffices to place a file lyx2lyx.cmd containing @ path to python\python path to lyx\share\lyx\lyx2lyx\lyx2lyx %* into the /lyx/share/lyx/lyx2lyx You can use Ruurd Reitsma's python - no proper python needed for this. I have put this on the WiKi. Ekkehart I've followed the guidance above. The .tex file is converted to .lyx OK but the resulting file is not loaded to LyX and I get a message Can't find error conversion script. The converter for Latex = Lyx is reLyX -f $$i I am using Windows XP with LyX 1.3.5. Any suggestions? Colin W.
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Colin J. Williams wrote: Ekkehart Schlicht wrote: It suffices to place a file lyx2lyx.cmd containing @ path to python\python path to lyx\share\lyx\lyx2lyx\lyx2lyx %* into the /lyx/share/lyx/lyx2lyx You can use Ruurd Reitsma's python - no proper python needed for this. I have put this on the WiKi. Ekkehart I've followed the guidance above. The .tex file is converted to .lyx OK but the resulting file is not loaded to LyX and I get a message Can't find error conversion script. The converter for Latex = Lyx is reLyX -f $$i I am using Windows XP with LyX 1.3.5. Any suggestions? Colin W. Sorry. It worked well for me. I have just converted an entire book from rtf to tex (via rtf2latex2e.exe) and imported it successfully into Lyx - with some minor drawbacks regarding graphics. I have the same converter instruction and the same OS and LyX version that you have noted. To identify the problem, so that the WiKi entry can be corrected: Could you just create a lyx file with some text in it (Hallo World) and export it to LaTeX and then import it to LyX? Could you just tell me whether this works? I have a full python on my computer and simply tried (by renaming) to hide it and use Ruurd's python. This worked for me. Maybe we need the full python and delete the python.exe in Ruurd's distribution. This would be the next step to try. I think that LaTeX export and import are /absolutely /essential. Thanks Ekkehart
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Ekkehart Schlicht wrote: Michael Wojcik wrote: You could try the following: 1. Rename lyx2lyx to lyx2lyx.py. 2. Make sure .py files have the correct association. You can create a simple test.py containing just print 'Hello' and run that from the command line to check. 3. Create a command file named lyx2lyx.cmd to run lyx2lyx.py: @ /path/to/lyx2lyx.py %* . 4. Now, you should be able to run lyx2lyx; that will actually run lyx2lyx.cmd, which will run lyx2lyx.py. I haven't actually tried this with lyx2lyx, but it works for a simple test Python script, so it might fix the lyx2lxy issue on Windows. Just to confirm: This works just fine with lyx2lyx and LyX/Win32 qt 1.3.5. (and lyx2lyx.cmd in the lyx\share\lyx\lyx2lyx directory.) Maybe this would be good post in Wiki. Thanks, Ekkehart, for confirming this. I'll write a Wiki tip. (I have another one pending that I haven't added to the actual Wiki yet, so I'll get both of them up there as soon as I have a free moment.) -- Michael Wojcik
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
It suffices to place a file lyx2lyx.cmd containing @ path to python\python path to lyx\share\lyx\lyx2lyx\lyx2lyx %* into the /lyx/share/lyx/lyx2lyx You can use Ruurd Reitsma's python - no proper python needed for this. I have put this on the WiKi. Ekkehart
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Ekkehart Schlicht wrote: It suffices to place a file lyx2lyx.cmd containing @ path to python\python path to lyx\share\lyx\lyx2lyx\lyx2lyx %* into the /lyx/share/lyx/lyx2lyx You can use Ruurd Reitsma's python - no proper python needed for this. I have put this on the WiKi. Ekkehart I've followed the guidance above. The .tex file is converted to .lyx OK but the resulting file is not loaded to LyX and I get a message Can't find error conversion script. The converter for Latex = Lyx is reLyX -f $$i I am using Windows XP with LyX 1.3.5. Any suggestions? Colin W.
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Colin J. Williams wrote: Ekkehart Schlicht wrote: It suffices to place a file lyx2lyx.cmd containing @ path to python\python path to lyx\share\lyx\lyx2lyx\lyx2lyx %* into the /lyx/share/lyx/lyx2lyx You can use Ruurd Reitsma's python - no proper python needed for this. I have put this on the WiKi. Ekkehart I've followed the guidance above. The .tex file is converted to .lyx OK but the resulting file is not loaded to LyX and I get a message Can't find error conversion script. The converter for Latex = Lyx is reLyX -f $$i I am using Windows XP with LyX 1.3.5. Any suggestions? Colin W. Sorry. It worked well for me. I have just converted an entire book from rtf to tex (via rtf2latex2e.exe) and imported it successfully into Lyx - with some minor drawbacks regarding graphics. I have the same converter instruction and the same OS and LyX version that you have noted. To identify the problem, so that the WiKi entry can be corrected: Could you just create a lyx file with some text in it (Hallo World) and export it to LaTeX and then import it to LyX? Could you just tell me whether this works? I have a full python on my computer and simply tried (by renaming) to hide it and use Ruurd's python. This worked for me. Maybe we need the full python and delete the python.exe in Ruurd's distribution. This would be the next step to try. I think that LaTeX export and import are /absolutely /essential. Thanks Ekkehart
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Ekkehart Schlicht wrote: Michael Wojcik wrote: You could try the following: 1. Rename lyx2lyx to lyx2lyx.py. 2. Make sure .py files have the correct association. You can create a simple test.py containing just print 'Hello' and run that from the command line to check. 3. Create a command file named lyx2lyx.cmd to run lyx2lyx.py: @ /path/to/lyx2lyx.py %* . 4. Now, you should be able to run lyx2lyx; that will actually run lyx2lyx.cmd, which will run lyx2lyx.py. I haven't actually tried this with lyx2lyx, but it works for a simple test Python script, so it might fix the lyx2lxy issue on Windows. Just to confirm: This works just fine with lyx2lyx and LyX/Win32 qt 1.3.5. (and lyx2lyx.cmd in the lyx\share\lyx\lyx2lyx directory.) Maybe this would be good post in Wiki. Thanks, Ekkehart, for confirming this. I'll write a Wiki tip. (I have another one pending that I haven't added to the actual Wiki yet, so I'll get both of them up there as soon as I have a free moment.) -- Michael Wojcik
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
It suffices to place a file lyx2lyx.cmd containing @ \python \share\lyx\lyx2lyx\lyx2lyx %* into the /lyx/share/lyx/lyx2lyx You can use Ruurd Reitsma's python - no "proper" python needed for this. I have put this on the WiKi. Ekkehart
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Ekkehart Schlicht wrote: It suffices to place a file lyx2lyx.cmd containing @ \python \share\lyx\lyx2lyx\lyx2lyx %* into the /lyx/share/lyx/lyx2lyx You can use Ruurd Reitsma's python - no "proper" python needed for this. I have put this on the WiKi. Ekkehart I've followed the guidance above. The .tex file is converted to .lyx OK but the resulting file is not loaded to LyX and I get a message "Can't find error conversion script". The converter for Latex => Lyx is reLyX -f $$i I am using Windows XP with LyX 1.3.5. Any suggestions? Colin W.
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Colin J. Williams wrote: Ekkehart Schlicht wrote: It suffices to place a file lyx2lyx.cmd containing @ \python \share\lyx\lyx2lyx\lyx2lyx %* into the /lyx/share/lyx/lyx2lyx You can use Ruurd Reitsma's python - no "proper" python needed for this. I have put this on the WiKi. Ekkehart I've followed the guidance above. The .tex file is converted to .lyx OK but the resulting file is not loaded to LyX and I get a message "Can't find error conversion script". The converter for Latex => Lyx is reLyX -f $$i I am using Windows XP with LyX 1.3.5. Any suggestions? Colin W. Sorry. It worked well for me. I have just converted an entire book from rtf to tex (via rtf2latex2e.exe) and imported it successfully into Lyx - with some minor drawbacks regarding graphics. I have the same converter instruction and the same OS and LyX version that you have noted. To identify the problem, so that the WiKi entry can be corrected: Could you just create a lyx file with some text in it ("Hallo World") and export it to LaTeX and then import it to LyX? Could you just tell me whether this works? I have a "full" python on my computer and simply tried (by renaming) to hide it and use Ruurd's python. This worked for me. Maybe we need the "full" python and delete the python.exe in Ruurd's distribution. This would be the next step to try. I think that LaTeX export and import are /absolutely /essential. Thanks Ekkehart
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Ekkehart Schlicht wrote: Michael Wojcik wrote: You could try the following: 1. Rename lyx2lyx to lyx2lyx.py. 2. Make sure .py files have the correct association. You can create a simple "test.py" containing just "print 'Hello'" and run that from the command line to check. 3. Create a command file named lyx2lyx.cmd to run lyx2lyx.py: @ /path/to/lyx2lyx.py %* . 4. Now, you should be able to run lyx2lyx; that will actually run lyx2lyx.cmd, which will run lyx2lyx.py. I haven't actually tried this with lyx2lyx, but it works for a simple test Python script, so it might fix the lyx2lxy issue on Windows. Just to confirm: This works just fine with lyx2lyx and LyX/Win32 qt 1.3.5. (and lyx2lyx.cmd in the lyx\share\lyx\lyx2lyx directory.) Maybe this would be good post in Wiki. Thanks, Ekkehart, for confirming this. I'll write a Wiki tip. (I have another one pending that I haven't added to the actual Wiki yet, so I'll get both of them up there as soon as I have a free moment.) -- Michael Wojcik
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Michael Wojcik wrote: You could try the following: 1. Rename lyx2lyx to lyx2lyx.py. 2. Make sure .py files have the correct association. You can create a simple test.py containing just print 'Hello' and run that from the command line to check. 3. Create a command file named lyx2lyx.cmd to run lyx2lyx.py: @ /path/to/lyx2lyx.py %* . 4. Now, you should be able to run lyx2lyx; that will actually run lyx2lyx.cmd, which will run lyx2lyx.py. I haven't actually tried this with lyx2lyx, but it works for a simple test Python script, so it might fix the lyx2lxy issue on Windows. -- Michael Wojcik Just to confirm: This works just fine with lyx2lyx and LyX/Win32 qt 1.3.5. (and lyx2lyx.cmd in the lyx\share\lyx\lyx2lyx directory.) Maybe this would be good post in Wiki. Ekkehart
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Michael Wojcik wrote: You could try the following: 1. Rename lyx2lyx to lyx2lyx.py. 2. Make sure .py files have the correct association. You can create a simple test.py containing just print 'Hello' and run that from the command line to check. 3. Create a command file named lyx2lyx.cmd to run lyx2lyx.py: @ /path/to/lyx2lyx.py %* . 4. Now, you should be able to run lyx2lyx; that will actually run lyx2lyx.cmd, which will run lyx2lyx.py. I haven't actually tried this with lyx2lyx, but it works for a simple test Python script, so it might fix the lyx2lxy issue on Windows. -- Michael Wojcik Just to confirm: This works just fine with lyx2lyx and LyX/Win32 qt 1.3.5. (and lyx2lyx.cmd in the lyx\share\lyx\lyx2lyx directory.) Maybe this would be good post in Wiki. Ekkehart
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Michael Wojcik wrote: You could try the following: 1. Rename lyx2lyx to lyx2lyx.py. 2. Make sure .py files have the correct association. You can create a simple "test.py" containing just "print 'Hello'" and run that from the command line to check. 3. Create a command file named lyx2lyx.cmd to run lyx2lyx.py: @ /path/to/lyx2lyx.py %* . 4. Now, you should be able to run lyx2lyx; that will actually run lyx2lyx.cmd, which will run lyx2lyx.py. I haven't actually tried this with lyx2lyx, but it works for a simple test Python script, so it might fix the lyx2lxy issue on Windows. -- Michael Wojcik Just to confirm: This works just fine with lyx2lyx and LyX/Win32 qt 1.3.5. (and lyx2lyx.cmd in the lyx\share\lyx\lyx2lyx directory.) Maybe this would be good post in Wiki. Ekkehart
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Andre Poenitz wrote: On Wed, Jan 26, 2005 at 06:59:29PM -0500, Michael Wojcik wrote: Actually, at least in XP (and, presumably, Win2003), if the association for the py file extension is correct, running foo.py from the command line works fine, as does eg system(foo.py). I didn't bother testing OS functions like CreateProcess, or check the source to see how lyx2lyx is being run. It's a bit moot as long as lyx2lyx doesn't have an extension. It has no extension. Yes, I know; that's why I said it was moot. I meant as long as in the strict sense (until it is changed), not in the idiomatic sense of if it is true that. Or am I missing your point? -- Michael Wojcik
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Andre Poenitz wrote: On Wed, Jan 26, 2005 at 06:59:29PM -0500, Michael Wojcik wrote: Actually, at least in XP (and, presumably, Win2003), if the association for the py file extension is correct, running foo.py from the command line works fine, as does eg system(foo.py). I didn't bother testing OS functions like CreateProcess, or check the source to see how lyx2lyx is being run. It's a bit moot as long as lyx2lyx doesn't have an extension. It has no extension. Yes, I know; that's why I said it was moot. I meant as long as in the strict sense (until it is changed), not in the idiomatic sense of if it is true that. Or am I missing your point? -- Michael Wojcik
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Andre Poenitz wrote: On Wed, Jan 26, 2005 at 06:59:29PM -0500, Michael Wojcik wrote: Actually, at least in XP (and, presumably, Win2003), if the association for the "py" file extension is correct, running foo.py from the command line works fine, as does eg system("foo.py"). I didn't bother testing OS functions like CreateProcess, or check the source to see how lyx2lyx is being run. It's a bit moot as long as lyx2lyx doesn't have an extension. It has no extension. Yes, I know; that's why I said it was moot. I meant "as long as" in the strict sense ("until it is changed"), not in the idiomatic sense of "if it is true that". Or am I missing your point? -- Michael Wojcik
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
On Wed, Jan 26, 2005 at 06:59:29PM -0500, Michael Wojcik wrote: I understand that that wouldn't work even if it had a .py extension. That mechanism is triggered only if you click on the blighter or such like. Apparently. The only sure fire way to get things working is to invoke it as python path to/lyx2lyx. Actually, at least in XP (and, presumably, Win2003), if the association for the py file extension is correct, running foo.py from the command line works fine, as does eg system(foo.py). I didn't bother testing OS functions like CreateProcess, or check the source to see how lyx2lyx is being run. It's a bit moot as long as lyx2lyx doesn't have an extension. It has no extension. Andre'
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
On Wed, Jan 26, 2005 at 06:59:29PM -0500, Michael Wojcik wrote: I understand that that wouldn't work even if it had a .py extension. That mechanism is triggered only if you click on the blighter or such like. Apparently. The only sure fire way to get things working is to invoke it as python path to/lyx2lyx. Actually, at least in XP (and, presumably, Win2003), if the association for the py file extension is correct, running foo.py from the command line works fine, as does eg system(foo.py). I didn't bother testing OS functions like CreateProcess, or check the source to see how lyx2lyx is being run. It's a bit moot as long as lyx2lyx doesn't have an extension. It has no extension. Andre'
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
On Wed, Jan 26, 2005 at 06:59:29PM -0500, Michael Wojcik wrote: > >I understand that that wouldn't work even if it had a .py extension. > >That mechanism is triggered only if you click on the blighter or such > >like. Apparently. The only sure fire way to get things working is to > >invoke it as "python /lyx2lyx". > > Actually, at least in XP (and, presumably, Win2003), if the association > for the "py" file extension is correct, running foo.py from the command > line works fine, as does eg system("foo.py"). I didn't bother testing > OS functions like CreateProcess, or check the source to see how lyx2lyx > is being run. It's a bit moot as long as lyx2lyx doesn't have an extension. It has no extension. Andre'
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Jack M. Lyon wrote: I get the same thing: An error occurred when running the conversion script. If I add the .py extension to lyx2lyx, the program says it can't *find* the conversion script. You may have intended to send this to the list instead of me; it appears that LyX-Users sets Reply-To to the original sender's address. Executing a Python script in WinXP directly requires that the .py extension (if that's what the file has) have the correct association, including a full path to python.exe; and that the script be in a directory on PATH. However, I assume the problem here is that whatever's executing lyx2lyx (relyx?) tries to run lyx2lyx, not lyx2lyx.py. That's why I noted in my message to the list that the Windows file-association facility was moot in this case - as long as lyx2lyx doesn't have an extension, file-association isn't going to help. You could try the following: 1. Rename lyx2lyx to lyx2lyx.py. 2. Make sure .py files have the correct association. You can create a simple test.py containing just print 'Hello' and run that from the command line to check. 3. Create a command file named lyx2lyx.cmd to run lyx2lyx.py: @ /path/to/lyx2lyx.py %* (omit the path information if lyx2lyx.py is in a directory on your path, or guaranteed in the current directory when lyx2lyx.cmd is executed). 4. Now, you should be able to run lyx2lyx; that will actually run lyx2lyx.cmd, which will run lyx2lyx.py. I haven't actually tried this with lyx2lyx, but it works for a simple test Python script, so it might fix the lyx2lxy issue on Windows. -- Michael Wojcik
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Jack M. Lyon wrote: I get the same thing: An error occurred when running the conversion script. If I add the .py extension to lyx2lyx, the program says it can't *find* the conversion script. You may have intended to send this to the list instead of me; it appears that LyX-Users sets Reply-To to the original sender's address. Executing a Python script in WinXP directly requires that the .py extension (if that's what the file has) have the correct association, including a full path to python.exe; and that the script be in a directory on PATH. However, I assume the problem here is that whatever's executing lyx2lyx (relyx?) tries to run lyx2lyx, not lyx2lyx.py. That's why I noted in my message to the list that the Windows file-association facility was moot in this case - as long as lyx2lyx doesn't have an extension, file-association isn't going to help. You could try the following: 1. Rename lyx2lyx to lyx2lyx.py. 2. Make sure .py files have the correct association. You can create a simple test.py containing just print 'Hello' and run that from the command line to check. 3. Create a command file named lyx2lyx.cmd to run lyx2lyx.py: @ /path/to/lyx2lyx.py %* (omit the path information if lyx2lyx.py is in a directory on your path, or guaranteed in the current directory when lyx2lyx.cmd is executed). 4. Now, you should be able to run lyx2lyx; that will actually run lyx2lyx.cmd, which will run lyx2lyx.py. I haven't actually tried this with lyx2lyx, but it works for a simple test Python script, so it might fix the lyx2lxy issue on Windows. -- Michael Wojcik
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Jack M. Lyon wrote: I get the same thing: "An error occurred when running the conversion script." If I add the .py extension to lyx2lyx, the program says it can't *find* the conversion script. You may have intended to send this to the list instead of me; it appears that LyX-Users sets Reply-To to the original sender's address. Executing a Python script in WinXP directly requires that the ".py" extension (if that's what the file has) have the correct association, including a full path to python.exe; and that the script be in a directory on PATH. However, I assume the problem here is that whatever's executing lyx2lyx (relyx?) tries to run "lyx2lyx", not "lyx2lyx.py". That's why I noted in my message to the list that the Windows file-association facility was moot in this case - as long as lyx2lyx doesn't have an extension, file-association isn't going to help. You could try the following: 1. Rename lyx2lyx to lyx2lyx.py. 2. Make sure .py files have the correct association. You can create a simple "test.py" containing just "print 'Hello'" and run that from the command line to check. 3. Create a command file named lyx2lyx.cmd to run lyx2lyx.py: @ /path/to/lyx2lyx.py %* (omit the path information if lyx2lyx.py is in a directory on your path, or guaranteed in the current directory when lyx2lyx.cmd is executed). 4. Now, you should be able to run lyx2lyx; that will actually run lyx2lyx.cmd, which will run lyx2lyx.py. I haven't actually tried this with lyx2lyx, but it works for a simple test Python script, so it might fix the lyx2lxy issue on Windows. -- Michael Wojcik
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Angus Leeming wrote: Jean-Marc Lasgouttes wrote: Another guess is that lyx2lyx fails to run. What version of LyX for windows are you using? 1.3.5 has a bug that prevents lyx2lyx from running (it is invoked directly, and windows does not guess that it is a python script, since it does not have a .py extension). Windows users, please correct me if I am wrong. I understand that that wouldn't work even if it had a .py extension. That mechanism is triggered only if you click on the blighter or such like. Apparently. The only sure fire way to get things working is to invoke it as python path to/lyx2lyx. Actually, at least in XP (and, presumably, Win2003), if the association for the py file extension is correct, running foo.py from the command line works fine, as does eg system(foo.py). I didn't bother testing OS functions like CreateProcess, or check the source to see how lyx2lyx is being run. It's a bit moot as long as lyx2lyx doesn't have an extension. In older versions of Windows, you would have had to use the start command to have the associated program (python.exe in this case) executed for a *.py file, IIRC; just typing the name at the command prompt wouldn't have done it. I tried playing around with various combinations of Windows shortcuts and Interix symbolic and hard links, but couldn't find one that would pick the right associated program for a file without an extension. -- Michael Wojcik
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Angus Leeming wrote: Jean-Marc Lasgouttes wrote: Another guess is that lyx2lyx fails to run. What version of LyX for windows are you using? 1.3.5 has a bug that prevents lyx2lyx from running (it is invoked directly, and windows does not guess that it is a python script, since it does not have a .py extension). Windows users, please correct me if I am wrong. I understand that that wouldn't work even if it had a .py extension. That mechanism is triggered only if you click on the blighter or such like. Apparently. The only sure fire way to get things working is to invoke it as python path to/lyx2lyx. Actually, at least in XP (and, presumably, Win2003), if the association for the py file extension is correct, running foo.py from the command line works fine, as does eg system(foo.py). I didn't bother testing OS functions like CreateProcess, or check the source to see how lyx2lyx is being run. It's a bit moot as long as lyx2lyx doesn't have an extension. In older versions of Windows, you would have had to use the start command to have the associated program (python.exe in this case) executed for a *.py file, IIRC; just typing the name at the command prompt wouldn't have done it. I tried playing around with various combinations of Windows shortcuts and Interix symbolic and hard links, but couldn't find one that would pick the right associated program for a file without an extension. -- Michael Wojcik
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Angus Leeming wrote: Jean-Marc Lasgouttes wrote: Another guess is that lyx2lyx fails to run. What version of LyX for windows are you using? 1.3.5 has a bug that prevents lyx2lyx from running (it is invoked directly, and windows does not guess that it is a python script, since it does not have a .py extension). Windows users, please correct me if I am wrong. I understand that that wouldn't work even if it had a .py extension. That mechanism is triggered only if you click on the blighter or such like. Apparently. The only sure fire way to get things working is to invoke it as "python /lyx2lyx". Actually, at least in XP (and, presumably, Win2003), if the association for the "py" file extension is correct, running foo.py from the command line works fine, as does eg system("foo.py"). I didn't bother testing OS functions like CreateProcess, or check the source to see how lyx2lyx is being run. It's a bit moot as long as lyx2lyx doesn't have an extension. In older versions of Windows, you would have had to use the "start" command to have the "associated program" (python.exe in this case) executed for a *.py file, IIRC; just typing the name at the command prompt wouldn't have done it. I tried playing around with various combinations of Windows "shortcuts" and Interix symbolic and hard links, but couldn't find one that would pick the right associated program for a file without an extension. -- Michael Wojcik
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Sven Schreiber wrote: My guess is that relyx has problems with the latex file and produces a bad lyx-file which lyx2lyx cannot handle. Too bad that the relyx The guess is probably correct. 1. I read somewhere that another import tool is coming with the new lyx version (tex2lyx?); if this is true (and it would be great), would it be possible to provide it standalone even before the new lyx version is released? It would be possible, but some work. Unfortunately the table import is the least developed area of tex2lyx, so it would probably not help much in this case. 2. In the meantime it would be nice if the relyx-savvy could provide (permanent links to) more concrete advice on what latex constructs to avoid. (In my particular case retyping the tables in lyx is probably quicker than hand-editing the latex code, but for long-term or search-and-replace batch operations this may be helpful.) Maybe I just missed it? IMHO the needed time would be better spent in improving tex2lyx wrt tables. 3. Because the lyx doc format apparently changes from time to time, it seems to me that lyx2lyx is a very very important component of lyx. I understand that developer resources are limited, so what I'm saying is just that making lyx2lyx more robust should maybe receive higher priority than other or new features. The problem is most definitely not lyx2lyx, but reLyX. It does not produce clean 2.15 files, but a mixture of different formats. This in turn causes trouble for lyx2lyx. Georg
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Sven Schreiber wrote: My guess is that relyx has problems with the latex file and produces a bad lyx-file which lyx2lyx cannot handle. Too bad that the relyx Georg The guess is probably correct. Another guess is that lyx2lyx fails to run. What version of LyX for windows are you using? 1.3.5 has a bug that prevents lyx2lyx from running (it is invoked directly, and windows does not guess that it is a python script, since it does not have a .py extension). Windows users, please correct me if I am wrong. JMarc
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Jean-Marc Lasgouttes wrote: Georg Sven Schreiber wrote: My guess is that relyx has problems with the latex file and produces a bad lyx-file which lyx2lyx cannot handle. Too bad that the relyx Georg The guess is probably correct. Another guess is that lyx2lyx fails to run. What version of LyX for windows are you using? 1.3.5 has a bug that prevents lyx2lyx from running (it is invoked directly, and windows does not guess that it is a python script, since it does not have a .py extension). Windows users, please correct me if I am wrong. I understand that that wouldn't work even if it had a .py extension. That mechanism is triggered only if you click on the blighter or such like. Apparently. The only sure fire way to get things working is to invoke it as python path to/lyx2lyx. -- Angus
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Sven Schreiber wrote: My guess is that relyx has problems with the latex file and produces a bad lyx-file which lyx2lyx cannot handle. Too bad that the relyx The guess is probably correct. 1. I read somewhere that another import tool is coming with the new lyx version (tex2lyx?); if this is true (and it would be great), would it be possible to provide it standalone even before the new lyx version is released? It would be possible, but some work. Unfortunately the table import is the least developed area of tex2lyx, so it would probably not help much in this case. 2. In the meantime it would be nice if the relyx-savvy could provide (permanent links to) more concrete advice on what latex constructs to avoid. (In my particular case retyping the tables in lyx is probably quicker than hand-editing the latex code, but for long-term or search-and-replace batch operations this may be helpful.) Maybe I just missed it? IMHO the needed time would be better spent in improving tex2lyx wrt tables. 3. Because the lyx doc format apparently changes from time to time, it seems to me that lyx2lyx is a very very important component of lyx. I understand that developer resources are limited, so what I'm saying is just that making lyx2lyx more robust should maybe receive higher priority than other or new features. The problem is most definitely not lyx2lyx, but reLyX. It does not produce clean 2.15 files, but a mixture of different formats. This in turn causes trouble for lyx2lyx. Georg
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Sven Schreiber wrote: My guess is that relyx has problems with the latex file and produces a bad lyx-file which lyx2lyx cannot handle. Too bad that the relyx Georg The guess is probably correct. Another guess is that lyx2lyx fails to run. What version of LyX for windows are you using? 1.3.5 has a bug that prevents lyx2lyx from running (it is invoked directly, and windows does not guess that it is a python script, since it does not have a .py extension). Windows users, please correct me if I am wrong. JMarc
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Jean-Marc Lasgouttes wrote: Georg Sven Schreiber wrote: My guess is that relyx has problems with the latex file and produces a bad lyx-file which lyx2lyx cannot handle. Too bad that the relyx Georg The guess is probably correct. Another guess is that lyx2lyx fails to run. What version of LyX for windows are you using? 1.3.5 has a bug that prevents lyx2lyx from running (it is invoked directly, and windows does not guess that it is a python script, since it does not have a .py extension). Windows users, please correct me if I am wrong. I understand that that wouldn't work even if it had a .py extension. That mechanism is triggered only if you click on the blighter or such like. Apparently. The only sure fire way to get things working is to invoke it as python path to/lyx2lyx. -- Angus
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Sven Schreiber wrote: > My guess is that relyx has problems with the latex file and produces a > bad lyx-file which lyx2lyx cannot handle. Too bad that the relyx The guess is probably correct. > 1. I read somewhere that another import tool is coming with the new lyx > version (tex2lyx?); if this is true (and it would be great), would it be > possible to provide it standalone even before the new lyx version is > released? It would be possible, but some work. Unfortunately the table import is the least developed area of tex2lyx, so it would probably not help much in this case. > 2. In the meantime it would be nice if the relyx-savvy could provide > (permanent links to) more concrete advice on what latex constructs to > avoid. (In my particular case retyping the tables in lyx is probably > quicker than hand-editing the latex code, but for long-term or > search-and-replace batch operations this may be helpful.) Maybe I just > missed it? IMHO the needed time would be better spent in improving tex2lyx wrt tables. > 3. Because the lyx doc format apparently changes from time to time, it > seems to me that lyx2lyx is a very very important component of lyx. I > understand that developer resources are limited, so what I'm saying is > just that making lyx2lyx more robust should maybe receive higher > priority than other or new features. The problem is most definitely not lyx2lyx, but reLyX. It does not produce clean 2.15 files, but a mixture of different formats. This in turn causes trouble for lyx2lyx. Georg
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Sven Schreiber wrote: >> My guess is that relyx has problems with the latex file and >> produces a bad lyx-file which lyx2lyx cannot handle. Too bad that >> the relyx Georg> The guess is probably correct. Another guess is that lyx2lyx fails to run. What version of LyX for windows are you using? 1.3.5 has a bug that prevents lyx2lyx from running (it is invoked directly, and windows does not guess that it is a python script, since it does not have a .py extension). Windows users, please correct me if I am wrong. JMarc
Re: failed import of latex doc (relyx produces something that causes lyx2lyx to hang)
Jean-Marc Lasgouttes wrote: > Georg> Sven Schreiber wrote: >>> My guess is that relyx has problems with the latex file and >>> produces a bad lyx-file which lyx2lyx cannot handle. Too bad that >>> the relyx > > Georg> The guess is probably correct. > > Another guess is that lyx2lyx fails to run. What version of LyX for > windows are you using? 1.3.5 has a bug that prevents lyx2lyx from > running (it is invoked directly, and windows does not guess that it is > a python script, since it does not have a .py extension). > > Windows users, please correct me if I am wrong. I understand that that wouldn't work even if it had a .py extension. That mechanism is triggered only if you click on the blighter or such like. Apparently. The only sure fire way to get things working is to invoke it as "python /lyx2lyx". -- Angus