]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.cpp
Revert "Fix bug with wrong baseline calculation in last paragraph"
[lyx.git] / src / LaTeXFeatures.cpp
index d291f668da239afd8cb7dc7f52bfbe5cb11b7bae..506af187c911d71d574e6d45f6f3f39f142040e2 100644 (file)
@@ -426,9 +426,14 @@ void LaTeXFeatures::require(set<string> const & names)
 
 
 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 "
@@ -448,9 +453,7 @@ void LaTeXFeatures::useLayout(docstring const & layoutname)
                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 {
@@ -458,8 +461,6 @@ void LaTeXFeatures::useLayout(docstring const & layoutname)
                       << to_utf8(layoutname) << "' does not exist in this class"
                       << endl;
        }
-
-       --level;
 }
 
 
@@ -740,7 +741,11 @@ char const * simplefeatures[] = {
        "multirow",
        "tfrupee",
        "shapepar",
-       "rsphrase"
+       "rsphrase",
+       "algorithm2e",
+       "sectionbox",
+       "tcolorbox",
+       "pdfcomment"
 };
 
 char const * bibliofeatures[] = {
@@ -856,8 +861,8 @@ string const LaTeXFeatures::getPackages() const
        // 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";