Re: follow-up: relyx / lyx2lyx problems
Georg Baum wrote: There are no relyx programmers (anymore). It is good that you found out that the input to lyx2lyx and therefroe relyx and not lyx2lyx was wrong. However, it does not make much sense (IMO) to try to fix bugs in relyx unless you are really fluent in perl and can do that in a couple of minutes. IMO the time would be better spent in preparing ready-to-install packages of tex2lyx and testing tex2lyx. Standalone tex2lyx (before lyx 1.4) would be great, because I've been told it works in all the cases where relyx fails. (And I learned that relyx is obsolete/unmaintained.) I'm aware there are tradeoffs between working on the complete 1.4 release and working on the separation of tex2lyx from lyx 1.4, and I have no clue about the work involved. But I don't expect lyx 1.4 coming soon, so IMveryHO as an end-user having tex2lyx sooner rather than later would be very useful. (Again: only developers can judge if it's worth the effort, this is just to express my (and maybe others'?) preferences.) -sven
Re: follow-up: relyx / lyx2lyx problems
Georg Baum wrote: There are no relyx programmers (anymore). It is good that you found out that the input to lyx2lyx and therefroe relyx and not lyx2lyx was wrong. However, it does not make much sense (IMO) to try to fix bugs in relyx unless you are really fluent in perl and can do that in a couple of minutes. IMO the time would be better spent in preparing ready-to-install packages of tex2lyx and testing tex2lyx. Standalone tex2lyx (before lyx 1.4) would be great, because I've been told it works in all the cases where relyx fails. (And I learned that relyx is obsolete/unmaintained.) I'm aware there are tradeoffs between working on the complete 1.4 release and working on the separation of tex2lyx from lyx 1.4, and I have no clue about the work involved. But I don't expect lyx 1.4 coming soon, so IMveryHO as an end-user having tex2lyx sooner rather than later would be very useful. (Again: only developers can judge if it's worth the effort, this is just to express my (and maybe others'?) preferences.) -sven
Re: follow-up: relyx / lyx2lyx problems
Georg Baum wrote: There are no relyx programmers (anymore). It is good that you found out that the input to lyx2lyx and therefroe relyx and not lyx2lyx was wrong. However, it does not make much sense (IMO) to try to fix bugs in relyx unless you are really fluent in perl and can do that in a couple of minutes. IMO the time would be better spent in preparing ready-to-install packages of tex2lyx and testing tex2lyx. Standalone tex2lyx (before lyx 1.4) would be great, because I've been told it works in all the cases where relyx fails. (And I learned that relyx is obsolete/unmaintained.) I'm aware there are tradeoffs between working on the complete 1.4 release and working on the separation of tex2lyx from lyx 1.4, and I have no clue about the work involved. But I don't expect lyx 1.4 coming soon, so IMveryHO as an end-user having tex2lyx sooner rather than later would be very useful. (Again: only developers can judge if it's worth the effort, this is just to express my (and maybe others'?) preferences.) -sven
Re: follow-up: relyx / lyx2lyx problems -- next bug
Am Donnerstag, 27. Januar 2005 23:27 schrieb Sven Schreiber: I hope this is useful for the relyx-programmer(s) to squash the bug... There are no relyx programmers (anymore). It is good that you found out that the input to lyx2lyx and therefroe relyx and not lyx2lyx was wrong. However, it does not make much sense (IMO) to try to fix bugs in relyx unless you are really fluent in perl and can do that in a couple of minutes. IMO the time would be better spent in preparing ready-to-install packages of tex2lyx and testing tex2lyx. Georg
Re: follow-up: relyx / lyx2lyx problems -- next bug
Am Donnerstag, 27. Januar 2005 23:27 schrieb Sven Schreiber: I hope this is useful for the relyx-programmer(s) to squash the bug... There are no relyx programmers (anymore). It is good that you found out that the input to lyx2lyx and therefroe relyx and not lyx2lyx was wrong. However, it does not make much sense (IMO) to try to fix bugs in relyx unless you are really fluent in perl and can do that in a couple of minutes. IMO the time would be better spent in preparing ready-to-install packages of tex2lyx and testing tex2lyx. Georg
Re: follow-up: relyx / lyx2lyx problems -- next bug
Am Donnerstag, 27. Januar 2005 23:27 schrieb Sven Schreiber: > I hope this is useful for the relyx-programmer(s) to squash the bug... There are no relyx programmers (anymore). It is good that you found out that the input to lyx2lyx and therefroe relyx and not lyx2lyx was wrong. However, it does not make much sense (IMO) to try to fix bugs in relyx unless you are really fluent in perl and can do that in a couple of minutes. IMO the time would be better spent in preparing ready-to-install packages of tex2lyx and testing tex2lyx. Georg
Re: follow-up: relyx / lyx2lyx problems -- next bug
On Thursday 27 January 2005 22:27, Sven Schreiber wrote: from-relyx # The reLyX bundled with LyX 1.3 created this file. # For more info see http://www.lyx.org/ \lyxformat 2.15 \textclass article \use_natbib 0 \use_numerical_citations 0 \layout Standard \LyXTable multicol5 1 2 0 0 0 0 0 0 0 0 0 0 This line is bogus. This is clearly wrong, it shouldn't be here. The line above says that this table has 1 line and two columns. Bellow we have discription for the columns and then for all cells (2), so this line is completly wrong. :-( 8 0 0 8 0 0 0 8 0 0 0 0 0 0 8 0 0 0 0 0 \begin_inset Formula \( 7 \latex latex \backslash )* \latex default * \newline \begin_inset Formula \( 4 \latex latex \backslash )* \latex default * \newline \the_end /from-relyx Now I don't know much about the lyx-format, but this looks a bit strange considering where it came from... With this input, lyx2lyx hangs! forever. lyx2lyx must trust in some way the input file. It is very difficult to distinguish and guard against all the different possibilities. At least with regard to older lyx formats. That is one of the main reasons why we have been cleaning the file format in 1.4, actually we had more file format changes in 1.4 than all the previous versions combined. (!) :-) Workaround/solution: put a blank after the closing $, like this: $x$ **. (@Günter Milde: next item for the latex-import-wiki: avoid having something directly after the closing math-$.) Note that if a thing like $x$** exists only once in the source, then lyx2lyx doesn't hang but the output is of course not what it's intended to be. And if the source is just the line $7$** $4$** (without the tabular), same thing: no hang, but strange lyx output. Hey -- wait a minute: relyx is written in perl, right? Maybe $* gets evaluated directly by perl although it's not supposed to be? (Don't know what's the special meaning of $* in perl.) Oh well, just a wild idea. I hope this is useful for the relyx-programmer(s) to squash the bug... That is the problem. The perl code can be quite difficult to grok, and no one here has enough knowledge to fix it. :-( -sven -- José Abílio
Re: follow-up: relyx / lyx2lyx problems -- solution
On Thu, Jan 27, 2005 at 09:02:17PM +0100, Sven Schreiber wrote: (Latex doesn't complain, so I guess that theoretically this should be supported by relyx -- but it's a bit unfair. Maybe someone knows if that was clean latex in some official sense?) Official TeX syntax is whatever TeX understands. So yes, this is legal. Unfortunately, if I may add. And I think this particular nastyness was taken care of in the math parser and conseqnetly in tex2lyx. Andre'
Re: follow-up: relyx / lyx2lyx problems -- next bug
On Thursday 27 January 2005 22:27, Sven Schreiber wrote: from-relyx # The reLyX bundled with LyX 1.3 created this file. # For more info see http://www.lyx.org/ \lyxformat 2.15 \textclass article \use_natbib 0 \use_numerical_citations 0 \layout Standard \LyXTable multicol5 1 2 0 0 0 0 0 0 0 0 0 0 This line is bogus. This is clearly wrong, it shouldn't be here. The line above says that this table has 1 line and two columns. Bellow we have discription for the columns and then for all cells (2), so this line is completly wrong. :-( 8 0 0 8 0 0 0 8 0 0 0 0 0 0 8 0 0 0 0 0 \begin_inset Formula \( 7 \latex latex \backslash )* \latex default * \newline \begin_inset Formula \( 4 \latex latex \backslash )* \latex default * \newline \the_end /from-relyx Now I don't know much about the lyx-format, but this looks a bit strange considering where it came from... With this input, lyx2lyx hangs! forever. lyx2lyx must trust in some way the input file. It is very difficult to distinguish and guard against all the different possibilities. At least with regard to older lyx formats. That is one of the main reasons why we have been cleaning the file format in 1.4, actually we had more file format changes in 1.4 than all the previous versions combined. (!) :-) Workaround/solution: put a blank after the closing $, like this: $x$ **. (@Günter Milde: next item for the latex-import-wiki: avoid having something directly after the closing math-$.) Note that if a thing like $x$** exists only once in the source, then lyx2lyx doesn't hang but the output is of course not what it's intended to be. And if the source is just the line $7$** $4$** (without the tabular), same thing: no hang, but strange lyx output. Hey -- wait a minute: relyx is written in perl, right? Maybe $* gets evaluated directly by perl although it's not supposed to be? (Don't know what's the special meaning of $* in perl.) Oh well, just a wild idea. I hope this is useful for the relyx-programmer(s) to squash the bug... That is the problem. The perl code can be quite difficult to grok, and no one here has enough knowledge to fix it. :-( -sven -- José Abílio
Re: follow-up: relyx / lyx2lyx problems -- solution
On Thu, Jan 27, 2005 at 09:02:17PM +0100, Sven Schreiber wrote: (Latex doesn't complain, so I guess that theoretically this should be supported by relyx -- but it's a bit unfair. Maybe someone knows if that was clean latex in some official sense?) Official TeX syntax is whatever TeX understands. So yes, this is legal. Unfortunately, if I may add. And I think this particular nastyness was taken care of in the math parser and conseqnetly in tex2lyx. Andre'
Re: follow-up: relyx / lyx2lyx problems -- next bug
On Thursday 27 January 2005 22:27, Sven Schreiber wrote: > > > # The reLyX bundled with LyX 1.3 created this file. > # For more info see http://www.lyx.org/ > \lyxformat 2.15 > \textclass article > \use_natbib 0 > \use_numerical_citations 0 > > \layout Standard > > > > \LyXTable > multicol5 > 1 2 0 0 0 0 0 0 > 0 0 0 0 This line is bogus. This is clearly wrong, it shouldn't be here. The line above says that this table has 1 line and two columns. Bellow we have discription for the columns and then for all cells (2), so this line is completly wrong. :-( > 8 0 0 "" "" > 8 0 0 "" "" > 0 8 0 0 0 0 0 "" "" > 0 8 0 0 0 0 0 "" "" > > > \begin_inset Formula \( 7 > \latex latex > > \backslash )* > \latex default > * > \newline > > \begin_inset Formula \( 4 > \latex latex > > \backslash )* > \latex default > * > \newline > > > \the_end > > > Now I don't know much about the lyx-format, but this looks a bit strange > considering where it came from... With this input, lyx2lyx hangs! > forever. lyx2lyx must trust in some way the input file. It is very difficult to distinguish and guard against all the different possibilities. At least with regard to older lyx formats. That is one of the main reasons why we have been cleaning the file format in 1.4, actually we had more file format changes in 1.4 than all the previous versions combined. (!) :-) > Workaround/solution: put a blank after the closing $, like this: > "$x$ **". > > (@Günter Milde: next item for the latex-import-wiki: avoid having > something directly after the closing math-$.) > > Note that if a thing like "$x$**" exists only once in the source, then > lyx2lyx doesn't hang but the output is of course not what it's intended > to be. And if the source is just the line "$7$** $4$**" (without the > tabular), same thing: no hang, but strange lyx output. > > Hey -- wait a minute: relyx is written in perl, right? Maybe "$*" gets > evaluated directly by perl although it's not supposed to be? (Don't know > what's the special meaning of $* in perl.) Oh well, just a wild idea. > > I hope this is useful for the relyx-programmer(s) to squash the bug... That is the problem. The perl code can be quite difficult to grok, and no one here has enough knowledge to fix it. :-( > -sven -- José Abílio
Re: follow-up: relyx / lyx2lyx problems -- solution
On Thu, Jan 27, 2005 at 09:02:17PM +0100, Sven Schreiber wrote: > (Latex doesn't complain, so I guess that theoretically this should be > supported by relyx -- but it's a bit unfair. Maybe someone knows if that > was clean latex in some "official" sense?) Official TeX syntax is whatever TeX understands. So yes, this is "legal". Unfortunately, if I may add. And I think this particular nastyness was taken care of in the math parser and conseqnetly in tex2lyx. Andre'
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
On Wednesday 26 January 2005 16:05, Sven Schreiber wrote: Jose' Matos wrote: Do you have a small example where this happens? It should be easy to fix. I cannot reproduce the infinite hanging yet with a small example, but I can reproduce an abort with error, so I'll leave the hang for later -- please note again, this is *not* win-specific, I also tried importing it on linux. Consider this latex doc: \documentclass{article} \begin{document} \begin{tabular}{p{1.75cm}|c|p{0.75cm}|p{2cm}|p{3cm}|p{1.5cm}|p{1.5cm}} eigenvalue \\ \hline \multicolumn{6}{l}{log} \\ \hline \end{tabular} \end{document} This compiles without errors in latex. I run relyx on it, that reports finished successfully! and I get the following lyx document (I've tried not to change line spacing etc.): Running it over tex2lyx I get a different file, and this is a valid lyx file, as well what you intended. :-) ... Then I run lyx2lyx on it, and it reports Malformed lyx file and aborts without output. Is it multicolumn alone or do the column widths have anything to do? I am not sure, it should declare 14 cells, yet shows 26 (!?), so this is a bug from reLyX. cheers, sven Until know all lyx2lyx bugs have been solved quickly, and I intend to maintain this record. What can be done in another stage is to recover gracefully from malformed lyx files, but that is clearly another issue. :-) -- José Abílio
Re: follow-up: relyx / lyx2lyx problems -- solution
Jose' Matos wrote: I cannot reproduce the infinite hanging yet with a small example, but I can reproduce an abort with error, so I'll leave the hang for later -- please note again, this is *not* win-specific, I also tried importing it on linux. Consider this latex doc: \documentclass{article} \begin{document} \begin{tabular}{p{1.75cm}|c|p{0.75cm}|p{2cm}|p{3cm}|p{1.5cm}|p{1.5cm}} eigenvalue \\ \hline \multicolumn{6}{l}{log} \\ \hline \end{tabular} \end{document} Running it over tex2lyx I get a different file, and this is a valid lyx file, as well what you intended. :-) That's good news, and I also have good news: Looking at the above (stripped down but real-world) latex example again I realized that the column numbers don't match in the two rows, it's 7 in the first row but 6 in the second. That probably happened by adding a column to the table at some stage and forgetting about the multicolumn, and hey, it worked. (Latex doesn't complain, so I guess that theoretically this should be supported by relyx -- but it's a bit unfair. Maybe someone knows if that was clean latex in some official sense?) So I changed the multicolumn to \multicolumn{7}{l}{log} and it worked perfectly through relyx and lyx2lyx. @Günter (Milde): Seems that my first contribution to the coming (?) wiki site about latex import into lyx is the advice to make sure that in the original tabular code the column numbers are constant across rows. Until know all lyx2lyx bugs have been solved quickly, and I intend to maintain this record. What can be done in another stage is to recover gracefully from malformed lyx files, but that is clearly another issue. :-) I agree that (if the latex code is ok in the first place) it's a bug in relyx, not lyx2lyx. But it would be nice if lyx2lyx could somehow recognize the bad parts in the .lyx document from relyx (like the tabular in this case). For example, if the code currently triggers such a malformed message while being inside a tabular, how about just aborting the conversion of this particular tabular and printing a warning (a note thingy?) into the output? Anyway, I will correct all those glitches in the original bigger latex doc and see whether that already solved all the import problems. If not, I'll try to find another example demonstrating the remaining problems, if any persist. And so on -sven
Re: follow-up: relyx / lyx2lyx problems -- next bug
Jose' Matos wrote: Do you have a small example where this happens? It should be easy to fix. Alright, I can now reproduce the hanging in lyx2lyx, when processing a file from relyx. Consider this latex doc, which compiles fine, and must be one of the shortest ever written: \documentclass{article} \begin{document} \begin{tabular}{cc} $7$** $4$** \\ \end{tabular} \end{document} This becomes the following relyx-lyx-file (again with finished succesfully-message): from-relyx # The reLyX bundled with LyX 1.3 created this file. # For more info see http://www.lyx.org/ \lyxformat 2.15 \textclass article \use_natbib 0 \use_numerical_citations 0 \layout Standard \LyXTable multicol5 1 2 0 0 0 0 0 0 0 0 0 0 8 0 0 8 0 0 0 8 0 0 0 0 0 0 8 0 0 0 0 0 \begin_inset Formula \( 7 \latex latex \backslash )* \latex default * \newline \begin_inset Formula \( 4 \latex latex \backslash )* \latex default * \newline \the_end /from-relyx Now I don't know much about the lyx-format, but this looks a bit strange considering where it came from... With this input, lyx2lyx hangs! forever. Workaround/solution: put a blank after the closing $, like this: $x$ **. (@Günter Milde: next item for the latex-import-wiki: avoid having something directly after the closing math-$.) Note that if a thing like $x$** exists only once in the source, then lyx2lyx doesn't hang but the output is of course not what it's intended to be. And if the source is just the line $7$** $4$** (without the tabular), same thing: no hang, but strange lyx output. Hey -- wait a minute: relyx is written in perl, right? Maybe $* gets evaluated directly by perl although it's not supposed to be? (Don't know what's the special meaning of $* in perl.) Oh well, just a wild idea. I hope this is useful for the relyx-programmer(s) to squash the bug... -sven
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
On Wednesday 26 January 2005 16:05, Sven Schreiber wrote: Jose' Matos wrote: Do you have a small example where this happens? It should be easy to fix. I cannot reproduce the infinite hanging yet with a small example, but I can reproduce an abort with error, so I'll leave the hang for later -- please note again, this is *not* win-specific, I also tried importing it on linux. Consider this latex doc: \documentclass{article} \begin{document} \begin{tabular}{p{1.75cm}|c|p{0.75cm}|p{2cm}|p{3cm}|p{1.5cm}|p{1.5cm}} eigenvalue \\ \hline \multicolumn{6}{l}{log} \\ \hline \end{tabular} \end{document} This compiles without errors in latex. I run relyx on it, that reports finished successfully! and I get the following lyx document (I've tried not to change line spacing etc.): Running it over tex2lyx I get a different file, and this is a valid lyx file, as well what you intended. :-) ... Then I run lyx2lyx on it, and it reports Malformed lyx file and aborts without output. Is it multicolumn alone or do the column widths have anything to do? I am not sure, it should declare 14 cells, yet shows 26 (!?), so this is a bug from reLyX. cheers, sven Until know all lyx2lyx bugs have been solved quickly, and I intend to maintain this record. What can be done in another stage is to recover gracefully from malformed lyx files, but that is clearly another issue. :-) -- José Abílio
Re: follow-up: relyx / lyx2lyx problems -- solution
Jose' Matos wrote: I cannot reproduce the infinite hanging yet with a small example, but I can reproduce an abort with error, so I'll leave the hang for later -- please note again, this is *not* win-specific, I also tried importing it on linux. Consider this latex doc: \documentclass{article} \begin{document} \begin{tabular}{p{1.75cm}|c|p{0.75cm}|p{2cm}|p{3cm}|p{1.5cm}|p{1.5cm}} eigenvalue \\ \hline \multicolumn{6}{l}{log} \\ \hline \end{tabular} \end{document} Running it over tex2lyx I get a different file, and this is a valid lyx file, as well what you intended. :-) That's good news, and I also have good news: Looking at the above (stripped down but real-world) latex example again I realized that the column numbers don't match in the two rows, it's 7 in the first row but 6 in the second. That probably happened by adding a column to the table at some stage and forgetting about the multicolumn, and hey, it worked. (Latex doesn't complain, so I guess that theoretically this should be supported by relyx -- but it's a bit unfair. Maybe someone knows if that was clean latex in some official sense?) So I changed the multicolumn to \multicolumn{7}{l}{log} and it worked perfectly through relyx and lyx2lyx. @Günter (Milde): Seems that my first contribution to the coming (?) wiki site about latex import into lyx is the advice to make sure that in the original tabular code the column numbers are constant across rows. Until know all lyx2lyx bugs have been solved quickly, and I intend to maintain this record. What can be done in another stage is to recover gracefully from malformed lyx files, but that is clearly another issue. :-) I agree that (if the latex code is ok in the first place) it's a bug in relyx, not lyx2lyx. But it would be nice if lyx2lyx could somehow recognize the bad parts in the .lyx document from relyx (like the tabular in this case). For example, if the code currently triggers such a malformed message while being inside a tabular, how about just aborting the conversion of this particular tabular and printing a warning (a note thingy?) into the output? Anyway, I will correct all those glitches in the original bigger latex doc and see whether that already solved all the import problems. If not, I'll try to find another example demonstrating the remaining problems, if any persist. And so on -sven
Re: follow-up: relyx / lyx2lyx problems -- next bug
Jose' Matos wrote: Do you have a small example where this happens? It should be easy to fix. Alright, I can now reproduce the hanging in lyx2lyx, when processing a file from relyx. Consider this latex doc, which compiles fine, and must be one of the shortest ever written: \documentclass{article} \begin{document} \begin{tabular}{cc} $7$** $4$** \\ \end{tabular} \end{document} This becomes the following relyx-lyx-file (again with finished succesfully-message): from-relyx # The reLyX bundled with LyX 1.3 created this file. # For more info see http://www.lyx.org/ \lyxformat 2.15 \textclass article \use_natbib 0 \use_numerical_citations 0 \layout Standard \LyXTable multicol5 1 2 0 0 0 0 0 0 0 0 0 0 8 0 0 8 0 0 0 8 0 0 0 0 0 0 8 0 0 0 0 0 \begin_inset Formula \( 7 \latex latex \backslash )* \latex default * \newline \begin_inset Formula \( 4 \latex latex \backslash )* \latex default * \newline \the_end /from-relyx Now I don't know much about the lyx-format, but this looks a bit strange considering where it came from... With this input, lyx2lyx hangs! forever. Workaround/solution: put a blank after the closing $, like this: $x$ **. (@Günter Milde: next item for the latex-import-wiki: avoid having something directly after the closing math-$.) Note that if a thing like $x$** exists only once in the source, then lyx2lyx doesn't hang but the output is of course not what it's intended to be. And if the source is just the line $7$** $4$** (without the tabular), same thing: no hang, but strange lyx output. Hey -- wait a minute: relyx is written in perl, right? Maybe $* gets evaluated directly by perl although it's not supposed to be? (Don't know what's the special meaning of $* in perl.) Oh well, just a wild idea. I hope this is useful for the relyx-programmer(s) to squash the bug... -sven
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
On Wednesday 26 January 2005 16:05, Sven Schreiber wrote: > Jose' Matos wrote: > > Do you have a small example where this happens? > > > > It should be easy to fix. > > I cannot reproduce the infinite "hanging" yet with a small example, but > I can reproduce an abort with error, so I'll leave the hang for later -- > please note again, this is *not* win-specific, I also tried importing it > on linux. Consider this latex doc: > > \documentclass{article} > \begin{document} > \begin{tabular}{p{1.75cm}|c|p{0.75cm}|p{2cm}|p{3cm}|p{1.5cm}|p{1.5cm}} > & & & eigenvalue & & & \\ \hline > \multicolumn{6}{l}{log} \\ \hline > \end{tabular} > \end{document} > > This compiles without errors in latex. > > I run relyx on it, that reports "finished successfully!" and I get the > following lyx document (I've tried not to change line spacing etc.): Running it over tex2lyx I get a different file, and this is a valid lyx file, as well what you intended. :-) ... > Then I run lyx2lyx on it, and it reports "Malformed lyx file" and aborts > without output. > > Is it multicolumn alone or do the column widths have anything to do? I am not sure, it should declare 14 cells, yet shows 26 (!?), so this is a bug from reLyX. > cheers, sven Until know all lyx2lyx bugs have been solved quickly, and I intend to maintain this record. What can be done in another stage is to recover gracefully from malformed lyx files, but that is clearly another issue. :-) -- José Abílio
Re: follow-up: relyx / lyx2lyx problems -- solution
Jose' Matos wrote: I cannot reproduce the infinite "hanging" yet with a small example, but I can reproduce an abort with error, so I'll leave the hang for later -- please note again, this is *not* win-specific, I also tried importing it on linux. Consider this latex doc: \documentclass{article} \begin{document} \begin{tabular}{p{1.75cm}|c|p{0.75cm}|p{2cm}|p{3cm}|p{1.5cm}|p{1.5cm}} & & & eigenvalue & & & \\ \hline \multicolumn{6}{l}{log} \\ \hline \end{tabular} \end{document} Running it over tex2lyx I get a different file, and this is a valid lyx file, as well what you intended. :-) That's good news, and I also have good news: Looking at the above (stripped down but real-world) latex example again I realized that the column numbers don't match in the two rows, it's 7 in the first row but 6 in the second. That probably happened by adding a column to the table at some stage and forgetting about the multicolumn, and hey, it worked. (Latex doesn't complain, so I guess that theoretically this should be supported by relyx -- but it's a bit unfair. Maybe someone knows if that was clean latex in some "official" sense?) So I changed the multicolumn to "\multicolumn{7}{l}{log}" and it worked perfectly through relyx and lyx2lyx. @Günter (Milde): Seems that my first contribution to the coming (?) wiki site about latex import into lyx is the advice to make sure that in the original tabular code the column numbers are constant across rows. Until know all lyx2lyx bugs have been solved quickly, and I intend to maintain this record. What can be done in another stage is to recover gracefully from malformed lyx files, but that is clearly another issue. :-) I agree that (if the latex code is ok in the first place) it's a bug in relyx, not lyx2lyx. But it would be nice if lyx2lyx could somehow recognize the bad parts in the .lyx document from relyx (like the tabular in this case). For example, if the code currently triggers such a "malformed" message while being inside a tabular, how about just aborting the conversion of this particular tabular and printing a warning (a note thingy?) into the output? Anyway, I will correct all those glitches in the original bigger latex doc and see whether that already solved all the import problems. If not, I'll try to find another example demonstrating the remaining problems, if any persist. And so on -sven
Re: follow-up: relyx / lyx2lyx problems -- next bug
Jose' Matos wrote: Do you have a small example where this happens? It should be easy to fix. Alright, I can now reproduce the "hanging" in lyx2lyx, when processing a file from relyx. Consider this latex doc, which compiles fine, and must be one of the shortest ever written: \documentclass{article} \begin{document} \begin{tabular}{cc} $7$** & $4$** \\ \end{tabular} \end{document} This becomes the following relyx-lyx-file (again with "finished succesfully"-message): # The reLyX bundled with LyX 1.3 created this file. # For more info see http://www.lyx.org/ \lyxformat 2.15 \textclass article \use_natbib 0 \use_numerical_citations 0 \layout Standard \LyXTable multicol5 1 2 0 0 0 0 0 0 0 0 0 0 8 0 0 "" "" 8 0 0 "" "" 0 8 0 0 0 0 0 "" "" 0 8 0 0 0 0 0 "" "" \begin_inset Formula \( 7 \latex latex \backslash )* \latex default * \newline \begin_inset Formula \( 4 \latex latex \backslash )* \latex default * \newline \the_end Now I don't know much about the lyx-format, but this looks a bit strange considering where it came from... With this input, lyx2lyx hangs! forever. Workaround/solution: put a blank after the closing $, like this: "$x$ **". (@Günter Milde: next item for the latex-import-wiki: avoid having something directly after the closing math-$.) Note that if a thing like "$x$**" exists only once in the source, then lyx2lyx doesn't hang but the output is of course not what it's intended to be. And if the source is just the line "$7$** $4$**" (without the tabular), same thing: no hang, but strange lyx output. Hey -- wait a minute: relyx is written in perl, right? Maybe "$*" gets evaluated directly by perl although it's not supposed to be? (Don't know what's the special meaning of $* in perl.) Oh well, just a wild idea. I hope this is useful for the relyx-programmer(s) to squash the bug... -sven
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
On 25.01.05, Sven Schreiber wrote: Ok, I take that as meaning that relyx tabular (or similar) is really a hopeless case. Then I redirect my suggestion to tex2lyx: maybe it's a good idea to collect in some public place hints and experience from users with respect to what works and what doesn't. And this time right from the start of this new tool tex2lyx. IMHO, the lyx wiki would be the right place for such user-provided hints. Maybe we could start a section for tex2lyx (or even for relyx, as long as we have to live with it) e.g. in http://wiki.lyx.org/pmwiki.php/Tips/Tips Günter -- G.Milde web.de
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
Jose' Matos wrote: Do you have a small example where this happens? It should be easy to fix. I cannot reproduce the infinite hanging yet with a small example, but I can reproduce an abort with error, so I'll leave the hang for later -- please note again, this is *not* win-specific, I also tried importing it on linux. Consider this latex doc: \documentclass{article} \begin{document} \begin{tabular}{p{1.75cm}|c|p{0.75cm}|p{2cm}|p{3cm}|p{1.5cm}|p{1.5cm}} eigenvalue \\ \hline \multicolumn{6}{l}{log} \\ \hline \end{tabular} \end{document} This compiles without errors in latex. I run relyx on it, that reports finished successfully! and I get the following lyx document (I've tried not to change line spacing etc.): snip # The reLyX bundled with LyX 1.3 created this file. # For more info see http://www.lyx.org/ \lyxformat 2.15 \textclass article \use_natbib 0 \use_numerical_citations 0 \layout Standard \LyXTable multicol5 2 7 0 0 0 0 0 0 0 1 0 0 0 1 0 0 8 0 1 1.75cm 8 0 1 8 0 1 0.75cm 8 0 1 2cm 8 0 1 3cm 8 0 1 1.5cm 8 0 0 1.5cm 0 8 0 1 0 0 0 0 8 0 1 0 0 0 0 8 0 1 0 0 0 0 8 0 1 0 0 0 0 8 0 1 0 0 0 0 8 0 1 0 0 0 0 8 0 1 0 0 0 1 2 0 1 0 0 0 2 8 0 1 0 0 0 2 8 0 1 0 0 0 2 8 0 1 0 0 0 2 8 0 1 0 0 0 2 8 0 1 0 0 0 0 8 0 1 0 0 0 \newline \newline \newline eigenvalue \newline \newline \newline \newline log \the_end /snip along with this .relyx1 file, if it matters at all: snip \documentclass{article} /snip Then I run lyx2lyx on it, and it reports Malformed lyx file and aborts without output. Is it multicolumn alone or do the column widths have anything to do? cheers, sven
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
G. Milde wrote: IMHO, the lyx wiki would be the right place for such user-provided hints. Maybe we could start a section for tex2lyx (or even for relyx, as long as we have to live with it) e.g. in http://wiki.lyx.org/pmwiki.php/Tips/Tips Günter That's a great idea. Looking at the wiki, maybe use the latex page (which seems natural and is pretty empty) instead of tips? -sven
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
On 25.01.05, Sven Schreiber wrote: Ok, I take that as meaning that relyx tabular (or similar) is really a hopeless case. Then I redirect my suggestion to tex2lyx: maybe it's a good idea to collect in some public place hints and experience from users with respect to what works and what doesn't. And this time right from the start of this new tool tex2lyx. IMHO, the lyx wiki would be the right place for such user-provided hints. Maybe we could start a section for tex2lyx (or even for relyx, as long as we have to live with it) e.g. in http://wiki.lyx.org/pmwiki.php/Tips/Tips Günter -- G.Milde web.de
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
Jose' Matos wrote: Do you have a small example where this happens? It should be easy to fix. I cannot reproduce the infinite hanging yet with a small example, but I can reproduce an abort with error, so I'll leave the hang for later -- please note again, this is *not* win-specific, I also tried importing it on linux. Consider this latex doc: \documentclass{article} \begin{document} \begin{tabular}{p{1.75cm}|c|p{0.75cm}|p{2cm}|p{3cm}|p{1.5cm}|p{1.5cm}} eigenvalue \\ \hline \multicolumn{6}{l}{log} \\ \hline \end{tabular} \end{document} This compiles without errors in latex. I run relyx on it, that reports finished successfully! and I get the following lyx document (I've tried not to change line spacing etc.): snip # The reLyX bundled with LyX 1.3 created this file. # For more info see http://www.lyx.org/ \lyxformat 2.15 \textclass article \use_natbib 0 \use_numerical_citations 0 \layout Standard \LyXTable multicol5 2 7 0 0 0 0 0 0 0 1 0 0 0 1 0 0 8 0 1 1.75cm 8 0 1 8 0 1 0.75cm 8 0 1 2cm 8 0 1 3cm 8 0 1 1.5cm 8 0 0 1.5cm 0 8 0 1 0 0 0 0 8 0 1 0 0 0 0 8 0 1 0 0 0 0 8 0 1 0 0 0 0 8 0 1 0 0 0 0 8 0 1 0 0 0 0 8 0 1 0 0 0 1 2 0 1 0 0 0 2 8 0 1 0 0 0 2 8 0 1 0 0 0 2 8 0 1 0 0 0 2 8 0 1 0 0 0 2 8 0 1 0 0 0 0 8 0 1 0 0 0 \newline \newline \newline eigenvalue \newline \newline \newline \newline log \the_end /snip along with this .relyx1 file, if it matters at all: snip \documentclass{article} /snip Then I run lyx2lyx on it, and it reports Malformed lyx file and aborts without output. Is it multicolumn alone or do the column widths have anything to do? cheers, sven
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
G. Milde wrote: IMHO, the lyx wiki would be the right place for such user-provided hints. Maybe we could start a section for tex2lyx (or even for relyx, as long as we have to live with it) e.g. in http://wiki.lyx.org/pmwiki.php/Tips/Tips Günter That's a great idea. Looking at the wiki, maybe use the latex page (which seems natural and is pretty empty) instead of tips? -sven
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
On 25.01.05, Sven Schreiber wrote: > Ok, I take that as meaning that relyx & tabular (or similar) is really a > hopeless case. Then I redirect my suggestion to tex2lyx: maybe it's a > good idea to collect in some public place hints and experience from > users with respect to what works and what doesn't. And this time right > from the start of this new tool tex2lyx. IMHO, the lyx wiki would be the right place for such user-provided hints. Maybe we could start a section for tex2lyx (or even for relyx, as long as we have to live with it) e.g. in http://wiki.lyx.org/pmwiki.php/Tips/Tips Günter -- G.Milde web.de
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
Jose' Matos wrote: Do you have a small example where this happens? It should be easy to fix. I cannot reproduce the infinite "hanging" yet with a small example, but I can reproduce an abort with error, so I'll leave the hang for later -- please note again, this is *not* win-specific, I also tried importing it on linux. Consider this latex doc: \documentclass{article} \begin{document} \begin{tabular}{p{1.75cm}|c|p{0.75cm}|p{2cm}|p{3cm}|p{1.5cm}|p{1.5cm}} & & & eigenvalue & & & \\ \hline \multicolumn{6}{l}{log} \\ \hline \end{tabular} \end{document} This compiles without errors in latex. I run relyx on it, that reports "finished successfully!" and I get the following lyx document (I've tried not to change line spacing etc.): # The reLyX bundled with LyX 1.3 created this file. # For more info see http://www.lyx.org/ \lyxformat 2.15 \textclass article \use_natbib 0 \use_numerical_citations 0 \layout Standard \LyXTable multicol5 2 7 0 0 0 0 0 0 0 1 0 0 0 1 0 0 8 0 1 "1.75cm" "" 8 0 1 "" "" 8 0 1 "0.75cm" "" 8 0 1 "2cm" "" 8 0 1 "3cm" "" 8 0 1 "1.5cm" "" 8 0 0 "1.5cm" "" 0 8 0 1 0 0 0 "" "" 0 8 0 1 0 0 0 "" "" 0 8 0 1 0 0 0 "" "" 0 8 0 1 0 0 0 "" "" 0 8 0 1 0 0 0 "" "" 0 8 0 1 0 0 0 "" "" 0 8 0 1 0 0 0 "" "" 1 2 0 1 0 0 0 "" "" 2 8 0 1 0 0 0 "" "" 2 8 0 1 0 0 0 "" "" 2 8 0 1 0 0 0 "" "" 2 8 0 1 0 0 0 "" "" 2 8 0 1 0 0 0 "" "" 0 8 0 1 0 0 0 "" "" \newline \newline \newline eigenvalue \newline \newline \newline \newline log \the_end along with this .relyx1 file, if it matters at all: \documentclass{article} Then I run lyx2lyx on it, and it reports "Malformed lyx file" and aborts without output. Is it multicolumn alone or do the column widths have anything to do? cheers, sven
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
G. Milde wrote: IMHO, the lyx wiki would be the right place for such user-provided hints. Maybe we could start a section for tex2lyx (or even for relyx, as long as we have to live with it) e.g. in http://wiki.lyx.org/pmwiki.php/Tips/Tips Günter That's a great idea. Looking at the wiki, maybe use the latex page (which seems natural and is pretty empty) instead of tips? -sven
follow-up: relyx / lyx2lyx problems and tex2lyx future
(Sorry for breaking the thread, I had just subscribed to the list and didn't confirm quickly enough, so I had to pick up the answers from the archive. But I'm fairly sure I'm on now.) Re Georg: 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. Ok, I take that as meaning that relyx tabular (or similar) is really a hopeless case. Then I redirect my suggestion to tex2lyx: maybe it's a good idea to collect in some public place hints and experience from users with respect to what works and what doesn't. And this time right from the start of this new tool tex2lyx. Re JMarc: 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. Yes I read about this bug and therefore did it by hand from the cli. Also as I said it happens on linux, too. Forgive me for babbling on a little, I won't do it often: I believe that lyx should really focus on the latex-integration aspect. The wysiwym approach is great, but that together with just exporting to latex is also done by texmacs (although I cannot tell how good it is at that) and in the future apparently also by openoffice (same obvious caveat), not mentioning commercial apps. Imagine: if the OO latex export filter will be good (big if), during the revision process authors can even use the word-doc format (OO handles that pretty well), even for exchange, and in the end have great tex output. So the only (I'm exaggerating...) remaining competitive advantage of lyx would be the direct latex integration. Lyx should build on that by making it easier to use the established latex doc-format for collaboration and exchange. Therefore, imho better latex import is really essential for the future of lyx. Ok, enough already, thanks for your patience (and the developers for the program). -sven
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
On Tuesday 25 January 2005 17:57, Sven Schreiber wrote: Yes I read about this bug and therefore did it by hand from the cli. Also as I said it happens on linux, too. Do you have a small example where this happens? It should be easy to fix. -- José Abílio
follow-up: relyx / lyx2lyx problems and tex2lyx future
(Sorry for breaking the thread, I had just subscribed to the list and didn't confirm quickly enough, so I had to pick up the answers from the archive. But I'm fairly sure I'm on now.) Re Georg: 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. Ok, I take that as meaning that relyx tabular (or similar) is really a hopeless case. Then I redirect my suggestion to tex2lyx: maybe it's a good idea to collect in some public place hints and experience from users with respect to what works and what doesn't. And this time right from the start of this new tool tex2lyx. Re JMarc: 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. Yes I read about this bug and therefore did it by hand from the cli. Also as I said it happens on linux, too. Forgive me for babbling on a little, I won't do it often: I believe that lyx should really focus on the latex-integration aspect. The wysiwym approach is great, but that together with just exporting to latex is also done by texmacs (although I cannot tell how good it is at that) and in the future apparently also by openoffice (same obvious caveat), not mentioning commercial apps. Imagine: if the OO latex export filter will be good (big if), during the revision process authors can even use the word-doc format (OO handles that pretty well), even for exchange, and in the end have great tex output. So the only (I'm exaggerating...) remaining competitive advantage of lyx would be the direct latex integration. Lyx should build on that by making it easier to use the established latex doc-format for collaboration and exchange. Therefore, imho better latex import is really essential for the future of lyx. Ok, enough already, thanks for your patience (and the developers for the program). -sven
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
On Tuesday 25 January 2005 17:57, Sven Schreiber wrote: Yes I read about this bug and therefore did it by hand from the cli. Also as I said it happens on linux, too. Do you have a small example where this happens? It should be easy to fix. -- José Abílio
follow-up: relyx / lyx2lyx problems and tex2lyx future
(Sorry for breaking the thread, I had just subscribed to the list and didn't confirm quickly enough, so I had to pick up the answers from the archive. But I'm fairly sure I'm on now.) Re Georg: 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. Ok, I take that as meaning that relyx & tabular (or similar) is really a hopeless case. Then I redirect my suggestion to tex2lyx: maybe it's a good idea to collect in some public place hints and experience from users with respect to what works and what doesn't. And this time right from the start of this new tool tex2lyx. Re JMarc: 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. Yes I read about this bug and therefore did it by hand from the cli. Also as I said it happens on linux, too. Forgive me for babbling on a little, I won't do it often: I believe that lyx should really focus on the latex-integration aspect. The wysiwym approach is great, but that together with "just" exporting to latex is also done by texmacs (although I cannot tell how good it is at that) and in the future apparently also by openoffice (same obvious caveat), not mentioning commercial apps. Imagine: if the OO latex export filter will be good (big if), during the revision process authors can even use the word-doc format (OO handles that pretty well), even for exchange, and in the end have great tex output. So the only (I'm exaggerating...) remaining competitive advantage of lyx would be the direct latex integration. Lyx should build on that by making it easier to use the established latex doc-format for collaboration and exchange. Therefore, imho better latex import is really essential for the future of lyx. Ok, enough already, thanks for your patience (and the developers for the program). -sven
Re: follow-up: relyx / lyx2lyx problems and tex2lyx future
On Tuesday 25 January 2005 17:57, Sven Schreiber wrote: > Yes I read about this bug and therefore did it by hand from the cli. > Also as I said it happens on linux, too. Do you have a small example where this happens? It should be easy to fix. -- José Abílio