On Tuesday 11 March 2008 07:09, Helge Hafting wrote:
> Steve Litt wrote:
> > Hi all,
> >
> > I just lost my entire book structure due to a small modification to my
> > layout file that prevented compilation. LyX therefore reverted the book's
> > document class from my custom "rjustbook" to "article", removing all
> > chapters and flattening out the table of contents.
>
> Ouch!
> I sometimes work with layout files too.
> Whenever I have made a "bad change" and open a document,
> LyX first brings up a message box about "unknown layout,
> reverting to article". This tells me that something went wrong,
> and the trick is to quit without saving at this point.
>
> There are sometimes warnings about various styles converted
> to "standard" as well.  (If the document have styles that doesn't
> exist in "article".)
>
> The warning about conversion to "article" and lost styles says
> a lot about what happens - especially to those who make their
> own layouts and know what this is about.  Other people
> will rarely get such problems.
>
> Or did LyX not tell you that the document turned into "article"?
> That's a bug, of course.

Hi Helge,

It probably told me, but obviously not in a way that made an impression on me. 
I was working so fast I probably just scanned over it or just clicked. I'd 
prefer an error message like this:

============================================
DANGER! ACHTUNG! PELEGRO!

Your document class has reverted to Article, and all environments derived from 
the document class you had been working on (rjustbook) have reverted to body 
text, IN THE LYX DOCUMENT! If you save this docuument, you will lose those 
environments forever! We recommend you save under a new name, fix the problem 
causing the document class reversion, and then integrate your new work into 
the old LyX file.

 .--------------------.      .------------------------.
| Save under new name |     | Ignore at your own risk |
'---------------------'     '-------------------------'

============================================

Yes, the preceding is a lot of text, but it can save a lot of heartache.

SteveT

Steve Litt
Author: Universal Troubleshooting Process books and courseware
http://www.troubleshooters.com/

Reply via email to