void LaTeXFeatures::useLayout(docstring const & layoutname)
+{
+ useLayout(layoutname, 0);
+}
+
+
+void LaTeXFeatures::useLayout(docstring const & layoutname, int level)
{
// Some code to avoid loops in dependency definition
- static int level = 0;
const int maxlevel = 30;
if (level > maxlevel) {
lyxerr << "LaTeXFeatures::useLayout: maximum level of "
require(layout.requires());
if (!layout.depends_on().empty()) {
- ++level;
- useLayout(layout.depends_on());
- --level;
+ useLayout(layout.depends_on(), level + 1);
}
usedLayouts_.push_back(layoutname);
} else {
<< to_utf8(layoutname) << "' does not exist in this class"
<< endl;
}
-
- --level;
}
"multirow",
"tfrupee",
"shapepar",
- "rsphrase"
+ "rsphrase",
+ "algorithm2e",
+ "sectionbox",
+ "tcolorbox",
+ "pdfcomment"
};
char const * bibliofeatures[] = {
// The rest of these packages are somewhat more complicated
// than those above.
- // The tipa package and its extenstions (tipx, tone) must not
- // be loaded with non-TeX font, since fontspec includes the
+ // The tipa package and its extensions (tipx, tone) must not
+ // be loaded with non-TeX fonts, since fontspec includes the
// respective macros
if (mustProvide("tipa") && !params_.useNonTeXFonts)
packages << "\\usepackage{tipa}\n";