string const LayoutFileList::localPrefix = "LOCAL:";
+string const LayoutFileList::embeddedPrefix = "EMBED:";
LayoutFileIndex
- LayoutFileList::addLayoutFile(string const & textclass, string const & path)
+ LayoutFileList::addLayoutFile(string const & textclass, string const & path,
+ Layout_Type type)
{
// FIXME There is a bug here: 4593
//
// NOTE: latex class name is defined in textclass.layout, which can be
// different from textclass
string fullName = addName(path, textclass + ".layout");
- string localIndex = localPrefix + fullName;
+ string localIndex;
+
+ if (type == Local)
+ localIndex = localPrefix + fullName;
+ else if (type == Embedded)
+ localIndex = embeddedPrefix + textclass;
// if the local file has already been loaded, return it
if (haveClass(localIndex))
BOOST_ASSERT(sub.size() == 4);
// now, create a TextClass with description containing path information
string className(sub.str(2) == "" ? textclass : sub.str(2));
- string description(sub.str(3) + " <" + path + ">");
LayoutFile * tmpl =
- new LayoutFile(textclass, className, description, true);
+ new LayoutFile(textclass, className, localIndex, true);
// This textclass is added on request so it will definitely be
// used. Load it now because other load() calls may fail if they
// are called in a context without buffer path information.