2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team.
10 * ====================================================== */
12 #ifndef BUFFERPARAMS_H
13 #define BUFFERPARAMS_H
19 #include "lyxtextclass.h"
20 #include "LaTeXFeatures.h"
24 #include "insets/insetquotes.h"
26 #include <boost/array.hpp>
34 /** Buffer parameters.
35 This class contains all the parameters for this a buffer uses. Some
36 work needs to be done on this class to make it nice. Now everything
72 enum VMARGIN_PAPER_TYPE {
104 enum PAPER_ORIENTATION {
106 ORIENTATION_PORTRAIT,
108 ORIENTATION_LANDSCAPE
113 /// read a header token, if unrecognised, return it or an unknown class name
114 string const readToken(LyXLex & lex, string const & token);
117 void writeFile(std::ostream &) const;
119 /** \returns true if the babel package is used (interogates
120 the BufferParams and a LyXRC variable).
121 This returned value can then be passed to the insets...
123 bool writeLaTeX(std::ostream &, LaTeXFeatures &, TexRow &) const;
126 void setPaperStuff();
129 void useClassDefaults();
132 bool hasClassDefaults() const;
135 VSpace const & getDefSkip() const { return defskip; }
138 void setDefSkip(VSpace const & vs) { defskip = vs; }
140 /** Wether paragraphs are separated by using a indent like in
141 articles or by using a little skip like in letters.
143 PARSEP paragraph_separation;
145 InsetQuotes::quote_language quotes_language;
147 InsetQuotes::quote_times quotes_times;
151 lyx::textclass_type textclass;
153 LyXTextClass const & getLyXTextClass() const;
155 /* this are for the PaperLayout */
156 /// the general papersize (papersize2 or paperpackage
157 PAPER_SIZE papersize;
158 /// the selected Geometry papersize
159 VMARGIN_PAPER_TYPE papersize2;
160 /// a special paperpackage .sty-file
161 PAPER_PACKAGES paperpackage;
163 PAPER_ORIENTATION orientation;
185 /* some LaTeX options */
186 /// The graphics driver
187 string graphicsDriver;
197 Language const * language;
205 string float_placement;
207 unsigned int columns;
209 LyXTextClass::PageSides sides;
213 boost::array<Bullet, 4> temp_bullets;
215 boost::array<Bullet, 4> user_defined_bullets;
217 void readPreamble(LyXLex &);
219 void readLanguage(LyXLex &);
221 void readGraphicsDriver(LyXLex &);
223 /// use AMS package, not, or auto
233 bool use_numerical_citations;
234 /// revision tracking for this buffer ?
235 bool tracking_changes;
236 /// Time ago we agreed that this was a buffer property [ale990407]
239 /// map of the file's author IDs to buffer author IDs
240 std::vector<int> author_map;
244 AuthorList authorlist;
248 /** This is the amount of space used for paragraph_separation "skip",
249 and for detached paragraphs in "indented" documents.