]> git.lyx.org Git - lyx.git/blob - src/LaTeXFeatures.h
be168ffef28cd6ba5f5ad573ece3e2a07217de10
[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-2001 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 #include "layout.h"
25
26 class BufferParams; 
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 */
35 struct LaTeXFeatures {
36         ///
37         LaTeXFeatures(BufferParams const &, LyXTextClass::size_type n) ;
38         /// The packaes needed by the document
39         string const getPackages() const;
40         /// The macros definitions needed by the document
41         string const getMacros() const;
42         /// The definitions needed by the document's textclass
43         string const getTClassPreamble() const;
44         /// The sgml definitions needed by the document (dobook/linuxdoc)
45         string const getLyXSGMLEntities() const;
46         ///
47         string const getIncludedFiles(string const & fname) const;
48         ///
49         void getFloatDefinitions(std::ostream & os) const;
50
51         ///
52         void showStruct() const;
53
54         /// Provide a string name-space to the requirements
55         void require(string const & name);
56
57         /// Static preamble bits from the external material insets
58         string externalPreambles;
59
60         ///
61         bool array;
62         ///
63         bool color;     // color.sty
64         ///
65         bool graphicx; // graphicx.sty
66         ///
67         bool graphics;  // graphics.sty
68         ///
69         bool setspace;  // setspace.sty
70         ///
71         bool makeidx;   // makeind.sty
72         ///
73         bool verbatim;  // verbatim.sty
74         ///
75         bool longtable; // longtable.sty
76         ///
77         //bool algorithm; // algorithm.sty
78         ///
79         bool rotating;  // rotating.sty
80         ///
81         bool amssymb;   // amssymb.sty
82         ///
83         bool latexsym;   // latexsym.sty
84         ///
85         bool pifont;    // pifont.sty
86         ///
87         bool subfigure; // subfigure.sty
88         ///
89         bool floatflt;  // floatflt.sty
90         ///
91         bool url;       // url.sty
92         ///
93         bool varioref;  // varioref.sty
94         ///
95         bool prettyref; // prettyref.sty
96         ///
97         bool chess;     // chess.sty
98         ///
99         bool natbib;    // natbib.sty
100         ///
101         bool floats;    // float.sty
102         
103         ///
104         bool lyx;
105         ///
106         bool lyxline;
107         /// \noun
108         bool noun;
109         /// \lyxarrow
110         bool lyxarrow;
111
112         ///
113         bool quotesinglbase;
114         ///
115         bool quotedblbase;
116         ///
117         bool guilsinglleft;
118         ///
119         bool guilsinglright;
120         ///
121         bool guillemotleft;
122         ///
123         bool guillemotright;
124
125         ///
126         bool amsstyle;
127         ///
128         bool boldsymbol;
129         ///
130         bool binom;
131         
132         std::vector<bool> layout;
133
134         ///
135         bool ParagraphIndent;
136         ///
137         bool NeedLyXFootnoteCode;
138         ///
139         bool NeedLyXMinipageIndent;
140         ///
141         typedef std::set<Language const *> LanguageList;
142         ///
143         LanguageList UsedLanguages;
144         ///
145         typedef std::set<string> UsedFloats;
146         ///
147         UsedFloats usedFloats;
148         ///
149         typedef std::map<string , string> FileMap;
150         ///
151         FileMap IncludedFiles;
152         ///
153         BufferParams const & bufferParams() const;
154 private:
155         ///
156         BufferParams const & params;
157 };
158
159 #endif