// You should also run the development/tools/updatelayouts.py script,
// to update the format of all of our layout files.
//
// You should also run the development/tools/updatelayouts.py script,
// to update the format of all of our layout files.
//
{ "htmltocsection", TC_HTMLTOCSECTION },
{ "ifcounter", TC_IFCOUNTER },
{ "input", TC_INPUT },
{ "htmltocsection", TC_HTMLTOCSECTION },
{ "ifcounter", TC_IFCOUNTER },
{ "input", TC_INPUT },
{ "insetlayout", TC_INSETLAYOUT },
{ "leftmargin", TC_LEFTMARGIN },
{ "maxcitenames", TC_MAXCITENAMES },
{ "insetlayout", TC_INSETLAYOUT },
{ "leftmargin", TC_LEFTMARGIN },
{ "maxcitenames", TC_MAXCITENAMES },
{ "modifystyle", TC_MODIFYSTYLE },
{ "nocounter", TC_NOCOUNTER },
{ "nofloat", TC_NOFLOAT },
{ "modifystyle", TC_MODIFYSTYLE },
{ "nocounter", TC_NOCOUNTER },
{ "nofloat", TC_NOFLOAT },
{ "pagesize", TC_PAGESIZE },
{ "pagestyle", TC_PAGESTYLE },
{ "preamble", TC_PREAMBLE },
{ "pagesize", TC_PAGESIZE },
{ "pagestyle", TC_PAGESTYLE },
{ "preamble", TC_PREAMBLE },
{ "provides", TC_PROVIDES },
{ "providesmodule", TC_PROVIDESMODULE },
{ "providestyle", TC_PROVIDESTYLE },
{ "provides", TC_PROVIDES },
{ "providesmodule", TC_PROVIDESMODULE },
{ "providestyle", TC_PROVIDESTYLE },
if (!path().empty() && (prefixIs(inc, "./") ||
prefixIs(inc, "../")))
tmp = fileSearch(path(), inc, "layout");
if (!path().empty() && (prefixIs(inc, "./") ||
prefixIs(inc, "../")))
tmp = fileSearch(path(), inc, "layout");
// fall through
case TC_PROVIDESTYLE:
// if modifystyle is true, then we got here by falling through
// so we are not in an ProvideStyle block
// fall through
case TC_PROVIDESTYLE:
// if modifystyle is true, then we got here by falling through
// so we are not in an ProvideStyle block
// If the layout already exists, then we want to add it to
// the existing layout, as long as we are not in an ProvideStyle
// block.
// If the layout already exists, then we want to add it to
// the existing layout, as long as we are not in an ProvideStyle
// block.
Layout & lay = operator[](name);
error = !readStyle(lexrc, lay, rt);
}
// If the layout does not exist, then we want to create a new
// one, but not if we are in a ModifyStyle block.
Layout & lay = operator[](name);
error = !readStyle(lexrc, lay, rt);
}
// If the layout does not exist, then we want to create a new
// one, but not if we are in a ModifyStyle block.
+ case TC_MODIFYINSETLAYOUT:
+ modify = true;
+ // fall through
+ case TC_PROVIDEINSETLAYOUT:
+ // if modifyinsetlayout is true, then we got here by falling through
+ // so we are not in an ProvideInsetLayout block
+ if (!modify)
+ provide = true;
+ // fall through
}
docstring const name = subst(lexrc.getDocString(), '_', ' ');
bool const validating = (rt == VALIDATION);
}
docstring const name = subst(lexrc.getDocString(), '_', ' ');
bool const validating = (rt == VALIDATION);
if (name.empty()) {
string s = "Could not read name for InsetLayout: `$$Token' "
+ lexrc.getString() + " is probably not valid UTF-8!";
if (name.empty()) {
string s = "Could not read name for InsetLayout: `$$Token' "
+ lexrc.getString() + " is probably not valid UTF-8!";
InsetLayout & il = insetlayoutlist_[name];
error = !il.read(lexrc, *this, validating);
InsetLayout & il = insetlayoutlist_[name];
error = !il.read(lexrc, *this, validating);
InsetLayout il;
il.setName(name);
error = !il.read(lexrc, *this, validating);
if (!error)
insetlayoutlist_[name] = il;
InsetLayout il;
il.setName(name);
error = !il.read(lexrc, *this, validating);
if (!error)
insetlayoutlist_[name] = il;
<< to_utf8(makeDisplayPath(layout_file.absFileName()))
<< "'\n(Check `" << name_
<< "')\nCheck your installation and "
<< to_utf8(makeDisplayPath(layout_file.absFileName()))
<< "'\n(Check `" << name_
<< "')\nCheck your installation and "
-DocumentClassPtr getDocumentClass(
- LayoutFile const & baseClass, LayoutModuleList const & modlist,
- string const & cengine, bool const clone)
+DocumentClassPtr getDocumentClass(LayoutFile const & baseClass, LayoutModuleList const & modlist,
+ string const & cengine, bool clone, bool internal)
DocumentClassPtr doc_class =
DocumentClassPtr(new DocumentClass(baseClass));
for (auto const & mod : modlist) {
LyXModule * lm = theModuleList[mod];
if (!lm) {
DocumentClassPtr doc_class =
DocumentClassPtr(new DocumentClass(baseClass));
for (auto const & mod : modlist) {
LyXModule * lm = theModuleList[mod];
if (!lm) {
- docstring const msg =
- bformat(_("The module %1$s has been requested by\n"
- "this document but has not been found in the list of\n"
- "available modules. If you recently installed it, you\n"
- "probably need to reconfigure LyX.\n"), from_utf8(mod));
- if (!clone)
+ if (show_warnings) {
+ docstring const msg =
+ bformat(_("The module %1$s has been requested by\n"
+ "this document but has not been found in the list of\n"
+ "available modules. If you recently installed it, you\n"
+ "probably need to reconfigure LyX.\n"), from_utf8(mod));
docstring const prereqs = from_utf8(getStringFromVector(lm->prerequisites(), "\n\t"));
docstring const msg =
bformat(_("The module %1$s requires a package that is not\n"
docstring const prereqs = from_utf8(getStringFromVector(lm->prerequisites(), "\n\t"));
docstring const msg =
bformat(_("The module %1$s requires a package that is not\n"
FileName layout_file = libFileSearch("layouts", lm->getFilename());
if (!doc_class->read(layout_file, TextClass::MODULE)) {
docstring const msg =
FileName layout_file = libFileSearch("layouts", lm->getFilename());
if (!doc_class->read(layout_file, TextClass::MODULE)) {
docstring const msg =
- docstring const msg =
- bformat(_("The cite engine %1$s has been requested by\n"
- "this document but has not been found in the list of\n"
- "available engines. If you recently installed it, you\n"
- "probably need to reconfigure LyX.\n"), from_utf8(cengine));
- if (!clone)
+ if (show_warnings) {
+ docstring const msg =
+ bformat(_("The cite engine %1$s has been requested by\n"
+ "this document but has not been found in the list of\n"
+ "available engines. If you recently installed it, you\n"
+ "probably need to reconfigure LyX.\n"), from_utf8(cengine));
docstring const prereqs = from_utf8(getStringFromVector(ce->prerequisites(), "\n\t"));
docstring const msg =
bformat(_("The cite engine %1$s requires a package that is not\n"
docstring const prereqs = from_utf8(getStringFromVector(ce->prerequisites(), "\n\t"));
docstring const msg =
bformat(_("The cite engine %1$s requires a package that is not\n"
FileName layout_file = libFileSearch("citeengines", ce->getFilename());
if (!doc_class->read(layout_file, TextClass::CITE_ENGINE)) {
docstring const msg =
FileName layout_file = libFileSearch("citeengines", ce->getFilename());
if (!doc_class->read(layout_file, TextClass::CITE_ENGINE)) {
docstring const msg =