Reuben Thomas wrote:
>> Reuben, I believe that this is configurable behaviour. Hack your
>> ${PREFIX}/share/lyx/layouts/stdlists.inc file,
>
> Another problem: am I right in thinking that I can't override
> /usr/share/lyx/layouts/stdlists.inc with
> ~/.lyx/layouts/stdlists.inc? Testing suggests that I can't, which
> sucks.
Easy! This particular developer might start sulking and ignore you if
you start using pejorative language.
I'm surprised. Here is the code that is used to find 'stdlists.inc' on
reading the line 'Input stdlists.inc' in the layout file:
case TC_INPUT: // Include file
if (lexrc.next()) {
string tmp = LibFileSearch("layouts",
lexrc.getString(),
"layout");
if (Read(tmp, true)) {
lexrc.printError("Error reading input"
"file: "+tmp);
error = true;
}
}
break;
and this is the all-important 'LibFileSearch':
// Search the file name.ext in the subdirectory dir of
// 1) user_lyxdir
// 2) build_lyxdir (if not empty)
// 3) system_lyxdir
string const LibFileSearch(string const & dir, string const & name,
string const & ext)
{
string fullname = FileSearch(AddPath(user_lyxdir, dir), name, ext);
if (!fullname.empty())
return fullname;
if (!build_lyxdir.empty())
fullname = FileSearch(AddPath(build_lyxdir, dir), name, ext);
if (!fullname.empty())
return fullname;
return FileSearch(AddPath(system_lyxdir, dir), name, ext);
}
--
Angus