Steve Litt wrote:
Hi all,

I'm not going to call this a bug.
Sounds like it is a bug to me.

I suppose the explanation is rooted in a mistake I made, followed by ignoring a warning. However, I think this represents a MAJOR useability problem and should be addressed, if only to protect the user from himself.

This is the second time I lost all the custom styles in my LyX file because the document class reverted back to Article. I had already done a lot of work, so I didn't want to revert back to a 1 hour old backup, although in retropsect that would have been easier and safer.

My LyX file keeps reverting to a blank document class. I have a feeling it's something in my \frontmatter, but can't be sure. Basically, any time I do anything involving Document->settings, my custom document class goes away.

This puzzles me. Your document class shouldn't change unless (a) you select a new class or (b) the document class is one that is unknown to LyX. But of course (b) shouldn't happen except when you open the document, and (a) isn't something likely to happen accidentally unless you're doing something with accelerators.

But I've done a little experimenting, and here's one way this can happen. First, you have to be using a "local" layout file, that is, a layout file that is not in your LyX user directory but instead in the directory with the source file. Second, you have to "Save as..." to some other directory. If you then open Document>Settings, all will seem well until you hit OK (or Apply), at which point...

There's a little warning, but nothing that says DANGER, YOUR SOURCE FILE HAS JUST LOST EVERY CUSTOM ENVIRONMENT AS WELL AS CHAPTERS, AND IF YOU SAVE IT IT WILL COST YOU HOURS OF WORK. IF AT ALL POSSIBLE, ABORT THIS LYX SESSION WITHOUT SAVING AND RESUME FROM A BACKUP!!!!!

...you'll get the warning: Using default document class because class YourLocalLayout is unknown. But you should also get a window labeled Parse Errors, showing you the dozens of layouts that have changed. (You can even click on these, and you'll be taken to them.) I don't know if that is what is causing your problem, but it is a bug, to be sure.

Are you using a local layout? etc? Is that the error you are getting? Are you getting the Parse Errors window?

Richard

Reply via email to