X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLaTeXFeatures.cpp;h=1e809380179ac19c81036f8074bf4a7296e62f2a;hb=1797f5218b8819874f9dbe97b44445b3b5d598a0;hp=46caa8671ce579a5da621efcd569700a383d8813;hpb=f2c9b56fb4e4abd5183858984dd9329453004c96;p=lyx.git diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 46caa8671c..1e80938017 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -237,7 +237,7 @@ void LaTeXFeatures::require(set const & names) void LaTeXFeatures::getAvailable() { - Lexer lex(0, 0); + Lexer lex; support::FileName const real_file = libFileSearch("", "packages.lst"); if (real_file.empty()) @@ -449,7 +449,9 @@ char const * simplefeatures[] = { "endnotes", "ifthen", "amsthm", - "listings" + "listings", + "bm", + "pdfpages" }; int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *); @@ -489,6 +491,9 @@ string const LaTeXFeatures::getPackages() const (mustProvide("esintoramsmath") && params_.use_esint == BufferParams::package_off)) { packages << "\\usepackage{amsmath}\n"; + } else if (mustProvide("amsbsy")) { + // amsbsy is already provided by amsmath + packages << "\\usepackage{amsbsy}\n"; } // wasysym is a simple feature, but it must be after amsmath if both @@ -572,7 +577,7 @@ string const LaTeXFeatures::getPackages() const // natbib.sty if (mustProvide("natbib")) { packages << "\\usepackage["; - if (params_.citeEngine() == biblio::ENGINE_NATBIB_NUMERICAL) + if (params_.citeEngine() == ENGINE_NATBIB_NUMERICAL) packages << "numbers"; else packages << "authoryear"; @@ -606,12 +611,6 @@ string const LaTeXFeatures::getPackages() const "\\makenomenclature\n"; } - // bm -- this package interrogates the font allocations to determine - // which bold fonts are available, so it is best loaded as the last one, - // and, in any case, after amsmath. - if (mustProvide("bm")) - packages << "\\usepackage{bm}\n"; - return packages.str(); } @@ -780,7 +779,8 @@ docstring const LaTeXFeatures::getIncludedFiles(string const & fname) const } -void LaTeXFeatures::showStruct() const { +void LaTeXFeatures::showStruct() const +{ lyxerr << "LyX needs the following commands when LaTeXing:" << "\n***** Packages:" << getPackages() << "\n***** Macros:" << getMacros()