]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.C
More 'standard conformant blurb' nonsense.
[lyx.git] / src / LaTeXFeatures.C
index f79a7aa5e7a9cbfa4017f844b9204bf6b7d3189c..0652983faa0cf9786ad87c4205f779e059c518f6 100644 (file)
@@ -24,6 +24,8 @@
 #include "support/filetools.h"
 #include "support/lstrings.h"
 
+using namespace lyx::support;
+
 using lyx::textclass_type;
 
 using std::endl;
@@ -38,6 +40,14 @@ LaTeXFeatures::LaTeXFeatures(BufferParams const & p)
 {}
 
 
+bool LaTeXFeatures::useBabel() const
+{
+       return lyxrc.language_use_babel ||
+               bufferParams().language->lang() != lyxrc.default_language ||
+               this->hasLanguages();
+}
+
+
 void LaTeXFeatures::require(string const & name)
 {
        if (isRequired(name))
@@ -176,12 +186,12 @@ int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *);
 
 }
 
+
 string const LaTeXFeatures::getPackages() const
 {
        ostringstream packages;
        LyXTextClass const & tclass = params.getLyXTextClass();
 
-
        //
        //  These are all the 'simple' includes.  i.e
        //  packages which we just \usepackage{package}
@@ -340,6 +350,10 @@ string const LaTeXFeatures::getMacros() const
        if (isRequired("NeedTabularnewline"))
                macros << tabularnewline_def;
 
+       // greyedout environment (note inset)
+       if (isRequired("lyxgreyedout"))
+               macros << lyxgreyedout_def;
+
        // floats
        getFloatDefinitions(macros);