]> git.lyx.org Git - features.git/blob - src/LaTeXFeatures.h
33b51556cf65f3589d62bd37d3607912980adad0
[features.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         ///
45         void showStruct();
46
47         /// Provide a string name-space to the requirements
48         void require(string const & name);
49
50         /// Static preamble bits from the external material insets
51         string externalPreambles;
52
53         //@Man: Packages
54         //@{
55         ///
56         bool color;     // color.sty
57 #ifdef USE_GRAPHICX
58         ///
59         bool graphicx; // graphicx.sty
60 #else
61         ///
62         bool graphics;  // graphics.sty
63 #endif
64         ///
65         bool setspace;  // setspace.sty
66         ///
67         bool makeidx;   // makeind.sty
68         ///
69         bool verbatim;  // verbatim.sty
70         ///
71         bool longtable; // longtable.sty
72         ///
73         bool algorithm; // algorithm.sty
74         ///
75         bool rotating;  // rotating.sty
76         ///
77         bool amssymb;   // amssymb.sty
78         ///
79         bool latexsym;   // latexsym.sty
80         ///
81         bool pifont;    // pifont.sty
82         ///
83         bool subfigure; // subfigure.sty
84         ///
85         bool floatflt;  // floatflt.sty
86         ///
87         bool url;       // url.sty
88         ///
89         bool varioref;  // varioref.sty
90         ///
91         bool prettyref; // prettyref.sty
92         ///
93         bool chess;     // chess.sty
94         //@}
95
96         
97         //@Man: Commands
98         //@{
99         ///
100         bool lyx;
101         ///
102         bool lyxline;
103         /// \noun
104         bool noun;
105         /// \lyxarrow
106         bool lyxarrow;
107         //@}
108         
109         //@Man: Quotes
110         //@{
111         ///
112         bool quotesinglbase;
113         ///
114         bool quotedblbase;
115         ///
116         bool guilsinglleft;
117         ///
118         bool guilsinglright;
119         ///
120         bool guillemotleft;
121         ///
122         bool guillemotright;
123         //@}
124         
125         //@Man: Math mode
126         //@{
127         ///
128         bool amsstyle;
129         ///
130         bool boldsymbol;
131         ///
132         bool binom;
133         //@}
134         
135         //@Man: Layouts
136         //@{
137         std::vector<bool> layout;
138         //@}
139         
140         //@Man: Special features
141         //@{
142         bool LyXParagraphIndent;
143         ///
144         bool NeedLyXFootnoteCode;
145         ///
146         bool NeedLyXMinipageIndent;
147         ///
148         typedef std::set<Language const *> LanguageList;
149         ///
150         LanguageList UsedLanguages;
151         //@}
152         BufferParams const & bufferParams() const;
153 private:
154         BufferParams const & params;
155 };
156
157 #endif