Jean-Marc Lasgouttes wrote:

> I would propose to have LyX output some meta-comments indicating for
> example the list of modules and the textclass (if it is not equal to
> document class name). Well-formed meta comments should also be used to
> indicate what parts of preamble should be skipped by tex2lyx (instead of
> the current form that reads human-readable comments)

Meta-comments would be very helpful to give some hints to tex2lyx. However 
my experience with parsing of comments in files that may be edited by other 
tools or humans is quite bad. I have seen this to fail too often and would 
not consider this a reliable solution. IMHO those comments should rather be 
used as hints, i.e. look for this or that module, but they should not be 
used as authorative source for the modules list.

> THere is a bug where I argued a lot with Uwe about that:
> http://www.lyx.org/trac/ticket/6059

I don't have the time right now to read the complete discussion, but if you 
just take the initial description the current situation is not much 
different. The old descriptions reads:

"... the preamble contains declaration that come from the layout file, and 
that the new preamble handling code that relies on an hardcoded list of 
macro names is not able to identify them."

The current problem could be formulated like this:

"... the preamble contains declaration that come from the layout file, and 
that the new preamble handling code skips all definitions, but they are not 
re-added by LyX because tex2lyx does not recognize the used commands in the 
document."

The roundtrip of many nontrivial documents (especially if they use newer LyX 
features) fails currently. From the LyX manuals, only Math.lyx produces a 
compilable document currently, and only because I explicitly fixed the 
problems of this file.


Georg

Reply via email to