On Thu, 2005-06-09 at 15:37, Helge Hafting wrote: > This is the stranges bug I have seen in a long while. > > Load the attached file into lyx-1.4cvs. > Don't use a very big lyx window, the effect is ruined if > the line that says it shouldn�'t be visible shows in your lyx. > Adjust window size before loading if need be. (Or insert more > junk lines in the document, then save, quit lyx, restart lyx.) > > Export the file to tex, and/or view->dvi. > > Now scroll through the entire file, without making any changes. > > Export the file to tex, and or view->dvi. > > Notice that it is different! There are two paragraphs of the > "labeling" type in there. The first one has a std. environment > nested into it. The second is _not_ nested into the first, but > �looks like that in the first dvi file. Everyting is ok in the > second dvi file, after scrolling through the document in the GUI. > If you've _seen_ the text in the GUI, then it is ok. If you > haven't _seen_ it, then things go wrong. Gui viewing affects > the generated latex. > > Here is a diff -u of the two tex files, for those that doesn't > bother reproducing it themselves: > > --- test2a.tex 2005-06-09 14:25:28.072635272 +0200 > +++ test2b.tex 2005-06-09 14:26:14.185625032 +0200 > @@ -35,14 +35,14 @@ > THIS LINE SHOULD NOT BE VISIBLE AS LYX-1.4cvs LOADS THE DOCUMENT. > > \begin{labeling}{00.00.0000} > -\item Problem New document, koma-script report. Use labeling. > +\item [{Problem}] New document, koma-script report. Use labeling. > > > A std. environment nested in the labeling. Any environment will do > actually, but it must be nesteded! > > -\item Look This labeling seems nested in the dvi, but it is not nested in > -lyx. > +\item [{Look}] This labeling seems nested in the dvi, but it is not nested > +in lyx. > \end{labeling} > The above nesting errror \emph{disappear} if you scroll down to this > paragraph before doing view->dvi or export->latex! > > > Helge Hafting
Fix attached. Your first guess was right: "Document data structures aren't properly set up when loading, only when viewing them?" I'll commit this presently. - Martin
Index: text.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text.C,v retrieving revision 1.604 diff -u -p -r1.604 text.C --- text.C 9 Jun 2005 09:58:05 -0000 1.604 +++ text.C 16 Jun 2005 13:15:19 -0000 @@ -371,6 +371,8 @@ void readParagraph(Buffer const & buf, P break; } } + // Initialize begin_of_body_ on load; redoParagraph maintains + par.setBeginOfBody(); }
signature.asc
Description: This is a digitally signed message part