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 <boost/array.hpp>
30 #include "support/std_string.h"
38 /** Buffer parameters.
39 This class contains all the parameters for this a buffer uses. Some
40 work needs to be done on this class to make it nice. Now everything
55 /// read a header token, if unrecognised, return it or an unknown class name
56 string const readToken(LyXLex & lex, string const & token);
59 void writeFile(std::ostream &) const;
61 /** \returns true if the babel package is used (interogates
62 the BufferParams and a LyXRC variable).
63 This returned value can then be passed to the insets...
65 bool writeLaTeX(std::ostream &, LaTeXFeatures &, TexRow &) const;
71 void useClassDefaults();
74 bool hasClassDefaults() const;
77 VSpace const & getDefSkip() const { return defskip; }
80 void setDefSkip(VSpace const & vs) { defskip = vs; }
82 /** Wether paragraphs are separated by using a indent like in
83 articles or by using a little skip like in letters.
85 PARSEP paragraph_separation;
87 InsetQuotes::quote_language quotes_language;
89 InsetQuotes::quote_times quotes_times;
93 lyx::textclass_type textclass;
95 LyXTextClass const & getLyXTextClass() const;
97 /* this are for the PaperLayout */
98 /// the general papersize (papersize2 or paperpackage
100 /// the selected Geometry papersize
101 VMARGIN_PAPER_TYPE papersize2;
102 /// a special paperpackage .sty-file
103 PAPER_PACKAGES paperpackage;
105 PAPER_ORIENTATION orientation;
127 /* some LaTeX options */
128 /// The graphics driver
129 string graphicsDriver;
139 Language const * language;
141 BranchList branchlist;
149 string float_placement;
151 unsigned int columns;
153 LyXTextClass::PageSides sides;
157 boost::array<Bullet, 4> temp_bullets;
159 boost::array<Bullet, 4> user_defined_bullets;
161 void readPreamble(LyXLex &);
163 void readLanguage(LyXLex &);
165 void readGraphicsDriver(LyXLex &);
167 /// use AMS package, not, or auto
177 bool use_numerical_citations;
178 /// revision tracking for this buffer ?
179 bool tracking_changes;
180 /// Time ago we agreed that this was a buffer property [ale990407]
185 /// map of the file's author IDs to buffer author IDs
186 std::vector<int> author_map;
188 string const dvips_options() const;
190 string const paperSizeName() const;
194 AuthorList authorlist;
198 /** This is the amount of space used for paragraph_separation "skip",
199 and for detached paragraphs in "indented" documents.