On 29.04.2008, at 19:28, Steve Litt wrote:

On Tuesday 29 April 2008 13:11, rgheck wrote:
Steve Litt wrote:
On Tuesday 29 April 2008 09:00, you wrote:
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.

I'm using a layout file in the source file directory. However, there's a
symlink to a the same name in /home/slitt/.lyx/layouts.

OK, then that is definitely related. LyX won't see the one in
.lyx/layouts if there is one in the document directory with the same
name. At least, there are circumstances under which it won't use it.
What happens, I think, is that

One more thing that might provide a hint. At least some of the times I observed this automatic switching away from my custom document class, when I scanned the list of available document classes to "put it back", my custom document class was listed twice in the document class. This document class switching is intermittent, and while I can't say for sure a correspondence between it appearing twice and it evaporating, I cannot remember a time it disappeared when it was not listed twice, and I cannot
remember a time when it did not disappear when it was listed twice.

This is again a consequence of using the local layout. It's listed twice
because one of them is the local layout and one of them is the system
version. See my post to the devel list for ideas about who this could
have caused the problem.

rh

Thanks Richard,

I doubt it's that simple, because I've been using the exact same layout in
book dir, symlink in /home/slitt/.lyx/layouts since "Troubleshooting
Techniques of the Successful Technologist" in 2001, and the problem did not routinely occur. Furthermore, I'm using it right now, and right now the problem is not occurring. There must be other factors, and right now I just don't have the time to investigate this intermittent. I'm trying to get my new book out this week. However, if I see it happen again, I'll try to get
every bit of information I can.

I guess this behavior is new to Lyx 1.5.x and you probably did use LyX 1.3.x by the time :-)

Richards answer also explains a related problem I had a couple of days ago: As Steve, I had a layout side by side to my master document, but also sym'linked from my .lyx/layouts directory. (Before Lyx 1.5 this was basically the only way to maintain the layout together with the documents in a source control system such as svn.)

The actual chapters are input'ed as child documents into the master lyx file. On disk, they are located in a "part" subdirectory. When I tried to compile the master (I had not done so for many weeks, so this was the first time trying it with 1.5), I got a lot of funny error messages; something similar to:

"ERROR: Layout 'thesis' used by child document is incompatible to layout 'thesis' used by master document"

It took me quite a while to figure out that LyX uses the side-by-side layout file for the master, but the one from .lyx/layouts for the children and that this caused the problem. (I would consider this as a bug, as both layout files were actually identical, so not incompatible at all!)

I solved the issue by renaming the layout file so it is no longer considered as one by LyX and all files (master and children) refer to the same layout in my .lyx/layouts folder.


Daniel

Daniel

Reply via email to