4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
8 * \author Jean-Marc Lasgouttes
10 * \author André Pönitz
12 * Full author contact details are available in file CREDITS.
15 #ifndef BUFFERPARAMS_H
16 #define BUFFERPARAMS_H
19 #include "BranchList.h"
21 #include "lyxtextclass.h"
26 #include "insets/insetquotes.h"
28 #include "support/types.h"
30 #include <boost/array.hpp>
32 #include "support/std_string.h"
40 /** Buffer parameters.
41 This class contains all the parameters for this a buffer uses. Some
42 work needs to be done on this class to make it nice. Now everything
57 /// read a header token, if unrecognised, return it or an unknown class name
58 string const readToken(LyXLex & lex, string const & token);
61 void writeFile(std::ostream &) const;
63 /** \returns true if the babel package is used (interogates
64 the BufferParams and a LyXRC variable).
65 This returned value can then be passed to the insets...
67 bool writeLaTeX(std::ostream &, LaTeXFeatures &, TexRow &) const;
73 void useClassDefaults();
76 bool hasClassDefaults() const;
79 VSpace const & getDefSkip() const { return defskip; }
82 void setDefSkip(VSpace const & vs) { defskip = vs; }
84 /** Wether paragraphs are separated by using a indent like in
85 articles or by using a little skip like in letters.
87 PARSEP paragraph_separation;
89 InsetQuotes::quote_language quotes_language;
91 InsetQuotes::quote_times quotes_times;
95 lyx::textclass_type textclass;
97 LyXTextClass const & getLyXTextClass() const;
99 /* this are for the PaperLayout */
100 /// the general papersize (papersize2 or paperpackage
101 PAPER_SIZE papersize;
102 /// the selected Geometry papersize
103 VMARGIN_PAPER_TYPE papersize2;
104 /// a special paperpackage .sty-file
105 PAPER_PACKAGES paperpackage;
107 PAPER_ORIENTATION orientation;
129 /* some LaTeX options */
130 /// The graphics driver
131 string graphicsDriver;
141 Language const * language;
143 BranchList branchlist;
151 string float_placement;
153 unsigned int columns;
155 LyXTextClass::PageSides sides;
159 boost::array<Bullet, 4> temp_bullets;
161 boost::array<Bullet, 4> user_defined_bullets;
163 void readPreamble(LyXLex &);
165 void readLanguage(LyXLex &);
167 void readGraphicsDriver(LyXLex &);
169 /// use AMS package, not, or auto
179 bool use_numerical_citations;
180 /// revision tracking for this buffer ?
181 bool tracking_changes;
182 /// Time ago we agreed that this was a buffer property [ale990407]
187 /// map of the file's author IDs to buffer author IDs
188 std::vector<int> author_map;
190 string const dvips_options() const;
192 string const paperSizeName() const;
196 AuthorList authorlist;
200 /** This is the amount of space used for paragraph_separation "skip",
201 and for detached paragraphs in "indented" documents.