// -*- C++ -*-
/* This file is part of
-* ======================================================
+* ======================================================
*
* LyX, The Document Processor
*
-* Copyright (C) 1995 Matthias Ettrich
-* Copyright (C) 1995-1999 the LyX Team.
+* Copyright 1995 Matthias Ettrich
+* Copyright 1995-2000 the LyX Team.
*
-*======================================================*/
+* ====================================================== */
#ifndef LATEXFEATURES_H
#define LATEXFEATURES_H
#pragma interface
#endif
+#include <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
in buffer.C and paragraph.C when you do so. */
struct LaTeXFeatures {
///
- LaTeXFeatures(int n) ;
- ///
- ~LaTeXFeatures() {
- delete[] layout;
- }
+ LaTeXFeatures(BufferParams const &, int n) ;
/// The packaes needed by the document
- string getPackages(BufferParams const ¶ms);
+ string getPackages();
/// The macros definitions needed by the document
- string getMacros(BufferParams const ¶ms);
+ string getMacros();
/// The definitions needed by the document's textclass
- string getTClassPreamble(BufferParams const ¶ms);
+ string getTClassPreamble();
///
- void showStruct(BufferParams ¶ms);
+ 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 color; // color.sty
+#ifdef USE_GRAPHICX
+ ///
+ bool graphicx; // graphicx.sty
+#else
///
bool graphics; // graphics.sty
+#endif
///
bool setspace; // setspace.sty
///
bool floatflt; // floatflt.sty
///
bool url; // url.sty
+ ///
+ bool varioref; // varioref.sty
+ ///
+ bool prettyref; // prettyref.sty
+ ///
+ bool chess; // chess.sty
//@}
//@Man: Layouts
//@{
- bool *layout;
+ std::vector<bool> layout;
//@}
//@Man: Special features
bool NeedLyXFootnoteCode;
///
bool NeedLyXMinipageIndent;
+ ///
+ typedef std::set<Language const *> LanguageList;
+ ///
+ LanguageList UsedLanguages;
+ ///
+ typedef std::set<string> FloatList;
+ ///
+ FloatList usedFloats;
//@}
+ BufferParams const & bufferParams() const;
+private:
+ BufferParams const & params;
};
#endif