]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.cpp
Fix tablefootnote loading order (#11841)
[lyx.git] / src / LaTeXFeatures.cpp
index 268910ae5b87725cf0b7c9f266b60771ec687919..a9ad21ca2c6e028674dfb95189fa677b7e76b879 100644 (file)
@@ -963,7 +963,6 @@ char const * simplefeatures[] = {
        "array",
        "verbatim",
        "longtable",
-       "rotating",
        "latexsym",
        "pifont",
        // subfig is handled in BufferParams.cpp
@@ -975,7 +974,6 @@ char const * simplefeatures[] = {
          the `float' package. See the caption package documentation
          for explanation.*/
        "float",
-       "rotfloat",
        "wrapfig",
        "booktabs",
        "dvipost",
@@ -1022,7 +1020,6 @@ char const * simplefeatures[] = {
        "todonotes",
        "forest",
        "varwidth",
-       "tablefootnote",
        "environ"
 };
 
@@ -1246,6 +1243,16 @@ string const LaTeXFeatures::getPackages() const
                                 << "]{graphicx}\n";
        }
 
+       // These must be loaded after graphicx, since they try
+       // to load graphicx without options
+       if (mustProvide("rotating"))
+               packages << "\\usepackage{rotating}\n";
+       if (mustProvide("rotfloat"))
+               packages << "\\usepackage{rotfloat}\n";
+       // and this must be loaded after rotating
+       if (mustProvide("tablefootnote"))
+               packages << "\\usepackage{tablefootnote}\n";
+
        // lyxskak.sty --- newer chess support based on skak.sty
        if (mustProvide("chess"))
                packages << "\\usepackage[ps,mover]{lyxskak}\n";