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



Reply via email to