]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.h
Angus insetindex patch + protect patch from Dekel
[lyx.git] / src / LaTeXFeatures.h
index 5cabd5d2c14f2d9eadc8fa9e0f81369e567c5a3c..cee55913a121baf94785f6acbfc916483df0c751 100644 (file)
 #endif
 
 #include <vector>
-using std::vector;
+#include <set>
 
 #include "LString.h"
 
 class BufferParams; 
 class LyXTextClass;
-
+struct Language;
 
 /** The packages and commands that a buffer needs. This struct
   contains an entry for each of the latex packages and
@@ -33,28 +33,35 @@ class LyXTextClass;
   in buffer.C and paragraph.C when you do so. */
 struct LaTeXFeatures {
        ///
-       LaTeXFeatures(int n) ;
+       LaTeXFeatures(BufferParams const &, int n) ;
        /// The packaes needed by the document
-       string getPackages(BufferParams const & params);
+       string getPackages();
        /// The macros definitions needed by the document
-       string getMacros(BufferParams const & params);
+       string getMacros();
        /// The definitions needed by the document's textclass
-       string getTClassPreamble(BufferParams const & params);
+       string getTClassPreamble();
+       ///
+       string getIncludedFiles();
 
        ///
-       void showStruct(BufferParams const & params);
+       void showStruct();
+
+       /// Provide a string name-space to the requirements
+       void require(string const & name);
+
+       /// Static preamble bits from the external material insets
+       string externalPreambles;
 
        //@Man: Packages
        //@{
        ///
+       bool array;
+       ///
        bool color;     // color.sty
-#ifdef USE_GRAPHICX
        ///
        bool graphicx; // graphicx.sty
-#else
        ///
        bool graphics;  // graphics.sty
-#endif
        ///
        bool setspace;  // setspace.sty
        ///
@@ -79,6 +86,12 @@ struct LaTeXFeatures {
        bool floatflt;  // floatflt.sty
        ///
        bool url;       // url.sty
+       ///
+       bool varioref;  // varioref.sty
+       ///
+       bool prettyref; // prettyref.sty
+       ///
+       bool chess;     // chess.sty
        //@}
 
        
@@ -122,7 +135,7 @@ struct LaTeXFeatures {
        
        //@Man: Layouts
        //@{
-       vector<bool> layout;
+       std::vector<bool> layout;
        //@}
        
        //@Man: Special features
@@ -132,7 +145,22 @@ struct LaTeXFeatures {
        bool NeedLyXFootnoteCode;
        ///
        bool NeedLyXMinipageIndent;
+       ///
+       typedef std::set<Language const *> LanguageList;
+       ///
+       LanguageList UsedLanguages;
+       ///
+       typedef std::set<string> FloatList;
+       ///
+       FloatList usedFloats;
+       ///
+       typedef std::map<string , string> FileMap;
+       ///
+       FileMap IncludedFiles;
        //@}
+       BufferParams const & bufferParams() const;
+private:
+       BufferParams const & params;
 };
 
 #endif