Tuukka is right, this is what I am seeing as well. It looks like LyX "normalizes" ERT TeX code when it saves a document, even if the TeX code is using a construct such as \begin{verbatim} ... \end{verbatim} that one would think would prevent such behavior. As the text CVS includes does not include TeX code like \newline but instead just seperates newlines with a single <cr> (or <crlf>, depending on your platform), when LyX "normalizes" the code is squishes it togehter on to one line.
If there is some way to make LyX not touch the *formatting* of TeX code in an ERT section, that would solve the problem. If there is a way to make LyX honor <crlf> as a \newline in a certain section of text, that would solve the problem. This problem could be generalized as "how to programmatically insert preformatted text into a .lyx file without using LyX". Tuukka Toivonen <[EMAIL PROTECTED]> 09/24/2002 01:54 PM To: Lars Gullik Bjønnes <[EMAIL PROTECTED]> cc: [EMAIL PROTECTED], (bcc: Daniel Clark/Cambridge/IBM) Subject: Re: Including CVS $Log$ tag in LyX doxument On 24 Sep 2002, Lars Gullik Bjønnes wrote: >\begin{verbatim} >$Log$ >\end{verbatim} > >what happens if you put this in a ERT? I don't use CVS, but trying with hand: when this is saved, it'll look in .lyx file something like this: \latex latex $Log$ When CVS modifies this, it'll replace it with multiple lines: \latex latex $Log version string$ Some other lines here When this is now loaded back to LyX, the lines are concatenated. When it's again saved, the result is: \latex latex $Log version string$Some otherlines here ...and now CVS probably doesn't understand it anymore.