// You should also run the development/tools/updatelayouts.py script,
// to update the format of all of our layout files.
//
-int const LAYOUT_FORMAT = 58; // rgh: ProvideStyle
+int const LAYOUT_FORMAT = 59; //gm: OutlinerName, AddToToc, IsTocCaption
namespace {
TC_CITEENGINETYPE,
TC_CITEFORMAT,
TC_DEFAULTBIBLIO,
- TC_FULLAUTHORLIST
+ TC_FULLAUTHORLIST,
+ TC_OUTLINERNAME
};
{ "nofloat", TC_NOFLOAT },
{ "noinsetlayout", TC_NOINSETLAYOUT },
{ "nostyle", TC_NOSTYLE },
+ { "outlinername", TC_OUTLINERNAME },
{ "outputformat", TC_OUTPUTFORMAT },
{ "outputtype", TC_OUTPUTTYPE },
{ "packageoptions", TC_PKGOPTS },
floatlist_.erase(nofloat);
}
break;
+
+ case TC_OUTLINERNAME:
+ error = !readOutlinerName(lexrc);
+ break;
} // end of switch
// Note that this is triggered the first time through the loop unless
}
+bool TextClass::readOutlinerName(Lexer & lexrc)
+{
+ std::string type;
+ docstring name;
+ if (lexrc.next())
+ type = lexrc.getString();
+ else {
+ lexrc.printError("No type given for OutlinerName: `$$Token'.");
+ return false;
+ }
+ if (lexrc.next())
+ name = lexrc.getDocString();
+ else {
+ lexrc.printError("No name given for OutlinerName: `$$Token'.");
+ return false;
+ }
+ outliner_names_[type] = name;
+ return true;
+}
+
+
+docstring TextClass::outlinerName(std::string const & type) const
+{
+ std::map<std::string,docstring>::const_iterator const it
+ = outliner_names_.find(type);
+ if (it == outliner_names_.end()) {
+ LYXERR0("Missing OutlinerName for " << type << "!");
+ return from_utf8(type);
+ } else
+ return it->second;
+}
+
+
string const & TextClass::prerequisites(string const & sep) const
{
if (contains(prerequisites_, ',')) {