]> git.lyx.org Git - lyx.git/blob - src/LaTeXFeatures.h
25b1db14b8e9d6ef40a6dd0d99f19275644a30b3
[lyx.git] / src / LaTeXFeatures.h
1 // -*- C++ -*-
2 /* This file is part of
3 * ====================================================== 
4
5 *           LyX, The Document Processor
6 *        
7 *           Copyright 1995 Matthias Ettrich
8 *           Copyright 1995-2000 the LyX Team.
9 *
10 * ====================================================== */
11
12 #ifndef LATEXFEATURES_H
13 #define LATEXFEATURES_H
14
15
16 #ifdef __GNUG__
17 #pragma interface
18 #endif
19
20 #include <vector>
21 #include <set>
22
23 #include "LString.h"
24
25 class BufferParams; 
26 class LyXTextClass;
27 struct Language;
28
29 /** The packages and commands that a buffer needs. This struct
30   contains an entry for each of the latex packages and
31   commands that a buffer might need. This struct is supposed to be
32   extended as the need arises. Remember to update the validate function
33   in buffer.C and paragraph.C when you do so. */
34 struct LaTeXFeatures {
35         ///
36         LaTeXFeatures(BufferParams const &, int n) ;
37         /// The packaes needed by the document
38         string getPackages();
39         /// The macros definitions needed by the document
40         string getMacros();
41         /// The definitions needed by the document's textclass
42         string getTClassPreamble();
43         ///
44         string getIncludedFiles();
45
46         ///
47         void showStruct();
48
49         /// Provide a string name-space to the requirements
50         void require(string const & name);
51
52         /// Static preamble bits from the external material insets
53         string externalPreambles;
54
55         //@Man: Packages
56         //@{
57         ///
58         bool color;     // color.sty
59 #ifdef USE_GRAPHICX
60         ///
61         bool graphicx; // graphicx.sty
62 #else
63         ///
64         bool graphics;  // graphics.sty
65 #endif
66         ///
67         bool setspace;  // setspace.sty
68         ///
69         bool makeidx;   // makeind.sty
70         ///
71         bool verbatim;  // verbatim.sty
72         ///
73         bool longtable; // longtable.sty
74         ///
75         bool algorithm; // algorithm.sty
76         ///
77         bool rotating;  // rotating.sty
78         ///
79         bool amssymb;   // amssymb.sty
80         ///
81         bool latexsym;   // latexsym.sty
82         ///
83         bool pifont;    // pifont.sty
84         ///
85         bool subfigure; // subfigure.sty
86         ///
87         bool floatflt;  // floatflt.sty
88         ///
89         bool url;       // url.sty
90         ///
91         bool varioref;  // varioref.sty
92         ///
93         bool prettyref; // prettyref.sty
94         ///
95         bool chess;     // chess.sty
96         //@}
97
98         
99         //@Man: Commands
100         //@{
101         ///
102         bool lyx;
103         ///
104         bool lyxline;
105         /// \noun
106         bool noun;
107         /// \lyxarrow
108         bool lyxarrow;
109         //@}
110         
111         //@Man: Quotes
112         //@{
113         ///
114         bool quotesinglbase;
115         ///
116         bool quotedblbase;
117         ///
118         bool guilsinglleft;
119         ///
120         bool guilsinglright;
121         ///
122         bool guillemotleft;
123         ///
124         bool guillemotright;
125         //@}
126         
127         //@Man: Math mode
128         //@{
129         ///
130         bool amsstyle;
131         ///
132         bool boldsymbol;
133         ///
134         bool binom;
135         //@}
136         
137         //@Man: Layouts
138         //@{
139         std::vector<bool> layout;
140         //@}
141         
142         //@Man: Special features
143         //@{
144         bool LyXParagraphIndent;
145         ///
146         bool NeedLyXFootnoteCode;
147         ///
148         bool NeedLyXMinipageIndent;
149         ///
150         typedef std::set<Language const *> LanguageList;
151         ///
152         LanguageList UsedLanguages;
153         ///
154         typedef std::set<string> FloatList;
155         ///
156         FloatList usedFloats;
157         ///
158         typedef std::map<string , string> FileMap;
159         ///
160         FileMap IncludedFiles;
161         //@}
162         BufferParams const & bufferParams() const;
163 private:
164         BufferParams const & params;
165 };
166
167 #endif