Stefano Franchi schreef:
A colleague sent me a latex file that (on my system)compiles perfectly to pdf.
Importing into lyx mangles it up in such a way that it doesn't compile any to
pdf anymore (from lyx). Here is what I see:
1. In the preamble, tex2lyx gobbles up whitespace in (what seems to me) random
places. As a consequence, several Latex commands are chained up back to back,
and, understandably, Latex is not happy.
This was our fault: http://www.lyx.org/trac/ticket/6474. This must get
fixed before the next release.
2. In the text, \par commands are inserted here and there. Again, I cannot see
a specific pattern.
3. The file contains many equations (in fact, it is almost all equations), and
some of them must have been mangled up, because (after correcting the preamble
problem), the file does not compile and I get tens of Latex errors about a
missing and/or extra }. I suppose the problems may be caused by the same
gobbling up of white space that causes problem 1, but I am not sure (I know
very little about equation formatting, and never write equations in Latex)
I guess that it is known that problems appear when there are macros in
math with arguments which LyX doesn't know (we basically don't support
arguments in LyX, except a few).
Does anyone know if this is a known problem? Perhaps it is encoding related?
Or Windows/Linux related (I am on Linux, the colleague is on Windows)?
Without seeing the file, it is difficult to say why it happens, but I
don't expect it to be caused by the encoding or platform.
Vincent