]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.C
Point fix, earlier forgotten
[lyx.git] / src / LaTeXFeatures.C
index ae9e23002be46e10943a2cdfddf904e80f9400d4..0fc6816232cf4a3e7bc472678392729d25a1e929 100644 (file)
@@ -1,12 +1,16 @@
-/* This file is part of
- * ======================================================
+/**
+ * \file LaTeXFeatures.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           LyX, The Document Processor
+ * \author José Matos
+ * \author Lars Gullik Bjønnes
+ * \author Jean-Marc Lasgouttes
+ * \author Jürgen Vigna
+ * \author André Pönitz
  *
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2001 the LyX Team.
- *
- * ====================================================== */
+ * Full author contact details are available in file CREDITS.
+ */
 
 #include <config.h>
 
@@ -24,6 +28,8 @@
 #include "support/filetools.h"
 #include "support/lstrings.h"
 
+using namespace lyx::support;
+
 using lyx::textclass_type;
 
 using std::endl;
@@ -38,6 +44,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))
@@ -340,6 +354,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);